/* ==========================================================================
   Platform Demo — Stylesheet
   CreativAI | Identyczne menu z marketing app + demo-specific additions
   ========================================================================== */

/* ── CSS Variables (z header.css marketingu) ─────────────────────────────── */
:root {
    --primary-blue:      #0ea5e9;
    --primary-dark:      #0284c7;
    --primary-light:     #38bdf8;
    --primary-lighter:   #7dd3fc;
    --primary-lightest:  #f0f9ff;

    --secondary-navy:    #1e293b;
    --secondary-slate:   #334155;
    --secondary-gray:    #64748b;
    --secondary-light:   #94a3b8;
    --secondary-lighter: #cbd5e1;

    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-gray:  #f1f5f9;

    --text-dark:  #1e293b;
    --text-body:  #334155;
    --text-muted: #64748b;

    --border-radius:    0.375rem;
    --border-radius-lg: 0.5rem;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;

    --font-size-xs:   0.75rem;
    --font-size-sm:   0.875rem;
    --font-weight-medium:   500;
    --font-weight-semibold: 600;
    --font-weight-bold:     700;

    --transition-all:       all 0.15s ease-in-out;
    --transition-colors:    color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    --transition-transform: transform 0.15s ease-in-out;

    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);

    --z-header:   2000;
    --z-dropdown: 1900;

    --banner-h: 0px;
    --container-max:     1400px;
    --container-padding: 2rem;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
html,
body.demo-body {
    margin: 0 !important;
    padding: 0 !important;
}

body.demo-body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg-gray);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* demo-banner removed */

/* ── Container (override global.css jeśli trzeba) ───────────────────────── */
.demo-main .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--container-padding);
}

.header .container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
header.demo-header {
    position: sticky;
    top: 0 !important;
    margin: 0 !important;
    z-index: var(--z-header);
    background: var(--bg-white);
    border-bottom: 1px solid var(--secondary-lighter);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ── header__content — identyczne z header.css ───────────────────────────── */
.header .header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    min-height: 80px;
}

/* ── Logo ────────────────────────────────────────────────────────────────── */
.header .header__logo { flex-shrink: 0; }

/* Wrapper link — SVG logo identyczne z marketing app */
a.demo-logo-link {
    position: relative;
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    opacity: 1;
    transition: opacity 0.15s;
}
a.demo-logo-link:hover { opacity: 0.8; }

a.demo-logo-link svg {
    display: block;
}

.demo-badge {
    position: absolute;
    top: 50%;
    right: 2px;
    transform: translateY(calc(-50% + 2px));
    display: inline-block;
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.06em;
    line-height: 1;
    pointer-events: none;
}

/* ── Header Nav ──────────────────────────────────────────────────────────── */
.header .header__nav {
    flex: 1;
    display: flex;
    justify-content: center;
    margin: 0 0.5rem;
    overflow: visible;
}

.header .nav-list {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    margin: 0;
    padding: 0;
    list-style: none;
    white-space: nowrap;
}

.header .nav-item { position: relative; }

.header .nav-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: var(--space-2) var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--border-radius-lg);
    transition: var(--transition-colors);
    white-space: nowrap;
    cursor: pointer;
}

.header .nav-link:hover {
    color: var(--primary-blue);
    background-color: var(--primary-lightest);
    text-decoration: none;
}

.header .nav-link--active {
    color: var(--primary-blue) !important;
    background-color: var(--primary-lightest) !important;
}

/* SVG chevron icon */
.header .nav-link__icon {
    display: inline-block;
    flex-shrink: 0;
    transition: var(--transition-transform);
}

.header .nav-item--dropdown:hover > .nav-link .nav-link__icon,
.header .user-menu:hover > .user-menu-trigger .nav-link__icon {
    transform: rotate(180deg);
}

/* ── Nav Dropdown ────────────────────────────────────────────────────────── */
.header .nav-dropdown {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: var(--bg-white);
    border: 1px solid var(--secondary-lighter);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    min-width: 210px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-all);
    z-index: var(--z-dropdown);
    list-style: none;
    margin: 0;
}

.header .nav-item--dropdown:hover > .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header .nav-dropdown li { list-style: none; }

.header .nav-dropdown__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-size-sm);
    color: var(--text-body);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition-colors);
    white-space: nowrap;
}

.header .nav-dropdown__link:hover {
    color: var(--primary-blue);
    background-color: var(--primary-lightest);
    text-decoration: none;
}

.header .nav-dropdown__link.logout-button { color: #dc2626 !important; }
.header .nav-dropdown__link.logout-button:hover { background: #fef2f2 !important; color: #b91c1c !important; }

.header .nav-dropdown__divider {
    height: 1px;
    background: var(--secondary-lighter);
    margin: var(--space-1) var(--space-3);
    list-style: none;
}

/* ── Header Actions ──────────────────────────────────────────────────────── */
.header .header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ── Back to Site (zamiast session-timer) ────────────────────────────────── */
.header .session-timer,
.header .back-to-site {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--secondary-lighter);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition-colors);
    text-decoration: none;
    white-space: nowrap;
}

.header .session-timer:hover,
.header .back-to-site:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    text-decoration: none;
    background: var(--primary-lightest);
}

.header .timer-text { font-size: var(--font-size-sm); }

/* ── User Menu (DIV-based, z marketingu) ─────────────────────────────────── */
.header .user-menu {
    position: relative;
}

.header .user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--secondary-lighter);
    border-radius: var(--border-radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition-colors);
    white-space: nowrap;
    user-select: none;
}

.header .user-menu:hover > .user-menu-trigger {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    background: var(--primary-lightest);
}

/* User dropdown — zawsze right-aligned */
.header .user-menu-dropdown {
    left: auto !important;
    right: 0 !important;
    min-width: 160px;
}

/* Lang dropdown — right-aligned */
.header .lang-dropdown {
    left: auto !important;
    right: 0 !important;
    min-width: 120px;
}

/* User avatar (circle z inicjałami) */
.header .user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-xs);
    flex-shrink: 0;
}

/* ── Main Content Area ───────────────────────────────────────────────────── */
.demo-main {
    min-height: calc(100vh - var(--banner-h) - 80px);
}

/* ── Page Header / Hero ──────────────────────────────────────────────────── */
.page-header--hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 3rem 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.page-header--hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(14,165,233,0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(2,132,199,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.page-header--hero::after {
    content: '';
    position: absolute; bottom: 1px; left: 0; right: 0; height: 1px;
    background: linear-gradient(to right, rgba(2,132,199,0.5) 0%, #fff 100%);
    z-index: 3;
}

.demo-main .page-header--hero .container {
    position: relative;
    z-index: 2;
    padding: 0;
}

.demo-main .page-header--hero .container::before {
    content: '';
    position: absolute; top: -2rem; left: 50%; transform: translateX(-50%);
    width: 60px; height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #0284c7);
    border-radius: 2px;
}

.page-header--hero .page-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .75rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #0ea5e9 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.page-header--hero .page-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: #64748b;
    line-height: 1.6;
    font-weight: 500;
    margin: 0;
    opacity: 0.9;
    text-align: center;
}

.ai-logo-text {
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Content after hero ──────────────────────────────────────────────────── */
.dashboard-content--after-hero,
.analytics-content--after-hero,
.automation-content--after-hero {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* ── Content Card — identyczne z marketing app ───────────────────────────── */
.content-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
    padding: 1.25rem 1.5rem;
}

.card-header h3 {
    color: #1e293b;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header i { color: #0ea5e9; }

.card-content { padding: 1.5rem; }

/* Enhanced Card Headers with Gradient — identyczne z marketing global.css L1119 */
.content-card .card-header {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: .75rem 1.25rem;
    border-bottom: none;
    margin: 0;
}

.content-card .card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.content-card .card-header h3 i {
    color: white;
    opacity: 0.9;
}

/* ── Stats Grid Modern ───────────────────────────────────────────────────── */
.stats-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.stat-card-modern {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
    cursor: default;
}

.stat-card-modern::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card-modern:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(14,165,233,0.15); border-color: #0ea5e9; }
.stat-card-modern:hover::before { transform: scaleX(1); }

.stat-card-modern.campaigns::before  { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.stat-card-modern.generations::before { background: linear-gradient(135deg,#8b5cf6,#7c3aed); }
.stat-card-modern.contacts::before   { background: linear-gradient(135deg,#10b981,#059669); }
.stat-card-modern.emailsends::before { background: linear-gradient(135deg,#0284c7,#0369a1); }
.stat-card-modern.templates::before  { background: linear-gradient(135deg,#14b8a6,#0d9488); }
.stat-card-modern.webhooks::before   { background: linear-gradient(135deg,#6366f1,#4f46e5); }
.stat-card-modern.automation::before { background: linear-gradient(135deg,#06b6d4,#0891b2); }

.stat-icon-modern {
    width: 3.5rem; height: 3.5rem;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-icon-modern.blue       { background: linear-gradient(135deg,#dbeafe,#bfdbfe); color: #3b82f6; }
.stat-icon-modern.purple     { background: linear-gradient(135deg,#e9d5ff,#ddd6fe); color: #8b5cf6; }
.stat-icon-modern.green      { background: linear-gradient(135deg,#d1fae5,#a7f3d0); color: #10b981; }
.stat-icon-modern.orange     { background: linear-gradient(135deg,#fed7aa,#fdba74); color: #f59e0b; }
.stat-icon-modern.teal       { background: linear-gradient(135deg,#ccfbf1,#99f6e4); color: #14b8a6; }
.stat-icon-modern.indigo     { background: linear-gradient(135deg,#e0e7ff,#c7d2fe); color: #6366f1; }
.stat-icon-modern.pink       { background: linear-gradient(135deg,#fce7f3,#fbcfe8); color: #ec4899; }
.stat-icon-modern.cyan       { background: linear-gradient(135deg,#cffafe,#a5f3fc); color: #06b6d4; }
.stat-icon-modern.blue-light { background: linear-gradient(135deg,#e0f2fe,#bae6fd); color: #0284c7; }
.stat-icon-modern.gray       { background: linear-gradient(135deg,#f3f4f6,#e5e7eb); color: #6b7280; }

.stat-content-modern { flex: 1; min-width: 0; }

.stat-value-modern {
    font-size: 2rem; font-weight: 700; color: #1e293b;
    margin-bottom: 0.25rem; line-height: 1;
}

.stat-label-modern {
    color: #64748b; font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem;
}

.stat-extra-modern { font-size: 0.8rem; font-weight: 500; color: #64748b; }
.stat-extra-modern.success { color: #10b981; }
.stat-extra-modern.text-warning { color: #1e293b; font-weight: 600; }
.stat-extra-modern.text-danger  { color: #1e293b; font-weight: 600; }
.stat-extra-modern i { font-size: 0.5rem; margin-right: 0.25rem; }

.progress-bar-modern {
    width: 100%; height: 4px; background: #f1f5f9;
    border-radius: 2px; overflow: hidden; margin: 0.5rem 0;
}

.progress-fill-modern {
    height: 100%;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    transition: width 0.3s ease;
}
.progress-fill-modern.warning { background: linear-gradient(135deg,#f59e0b,#d97706); }
.progress-fill-modern.danger  { background: linear-gradient(135deg,#ef4444,#dc2626); }

/* ── Dashboard Content Grid ──────────────────────────────────────────────── */
.dashboard-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.dashboard-content-grid .content-card .card-content { padding: 1rem 1.5rem; }
.dashboard-content-grid .content-card { margin-bottom: 1rem; }

@media (max-width: 1024px) {
    .dashboard-content-grid { grid-template-columns: 1fr; }
}

/* ── Activity List Modern ────────────────────────────────────────────────── */
.activity-list-modern { display: flex; flex-direction: column; gap: 0.75rem; }

.activity-item-modern {
    display: flex; align-items: center; gap: 1rem;
    padding: 0.75rem; border-radius: 8px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.activity-item-modern:hover { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

.activity-icon-modern {
    width: 2.5rem; height: 2.5rem; border-radius: 8px;
    background: linear-gradient(135deg,#dbeafe,#bfdbfe);
    color: #0ea5e9;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    border: 1px solid rgba(14,165,233,0.2);
}

.activity-content-modern { flex: 1; min-width: 0; }

.activity-title-modern {
    font-weight: 600; color: #1e293b; margin-bottom: 0.25rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.activity-time-modern { color: #64748b; font-size: 0.8rem; }

.activity-status-modern { color: #94a3b8; font-size: 0.875rem; flex-shrink: 0; }

/* ── Account Info Modern ─────────────────────────────────────────────────── */
.account-info-modern { display: flex; flex-direction: column; gap: 0.75rem; }

.info-item-modern {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 0; border-bottom: 1px solid #f1f5f9;
}
.info-item-modern:last-child { border-bottom: none; }

.info-label-modern { font-size: 0.875rem; color: #64748b; font-weight: 500; }
.info-value-modern { font-size: 0.875rem; color: #1e293b; font-weight: 600; }

.plan-badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.6rem; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 0.03em;
}
.plan-badge-blue { background: #dbeafe; color: #1d4ed8; }
.plan-badge-purple { background: #e9d5ff; color: #6d28d9; }
.plan-badge-gold { background: #fef3c7; color: #b45309; }

/* ── Dashboard action button ─────────────────────────────────────────────── */
.btn-dash-action {
    margin-left: auto;
    background: #0ea5e9; color: #fff;
    border: none; border-radius: 6px;
    padding: 6px 14px; font-size: 0.8rem; font-weight: 600;
    cursor: pointer; transition: background 0.15s;
    white-space: nowrap; flex-shrink: 0;
}
.btn-dash-action:hover { background: #0284c7; }

/* ── Activity toggle button ─────────────────────────────────────────────── */
.activity-toggle {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-activity-toggle {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.375rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.8rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-activity-toggle:hover {
    background: #f1f5f9;
    border-color: #0ea5e9;
    color: #0ea5e9;
}

/* ── Account Health Section ──────────────────────────────────────────────── */
.account-health-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

/* ── Limit Status Classes ────────────────────────────────────────────── */
.stat-card-modern.limit-ok      { background: linear-gradient(135deg,#f6fef9,#ecfdf5); border: 2px solid #10b981; }
.stat-card-modern.limit-warning  { background: linear-gradient(135deg,#fffbeb,#fef3c7); border: 2px solid #f59e0b; }
.stat-card-modern.limit-danger   { background: linear-gradient(135deg,#fef2f2,#fee2e2); border: 2px solid #ef4444; }
.stat-card-modern.limit-unlimited { background: linear-gradient(135deg,#f0f9ff,#e0f2fe); border: 2px solid #0ea5e9; }

/* Missing stat-card ::before accents */
.stat-card-modern.attachments::before { background: linear-gradient(135deg,#ec4899,#db2777); }
.stat-card-modern.abtests::before     { background: linear-gradient(135deg,#f59e0b,#d97706); }
.stat-card-modern.attachsize::before  { background: linear-gradient(135deg,#6b7280,#4b5563); }
.stat-card-modern.subscription::before { background: linear-gradient(135deg,#ea580c,#dc2626); }

/* Missing stat-icon colors */
.stat-icon-modern.amber  { background: linear-gradient(135deg,#fef3c7,#fde68a); color: #f59e0b; }
.stat-icon-modern.gold   { background: linear-gradient(135deg,#fef3c7,#fde047); color: #ea580c; }

/* plan-badge additional variants */
.plan-badge-gray    { background: #e5e7eb; color: #6b7280; }
.plan-badge-warning { background: #fef3c7; color: #92400e; }

/* ── Activity Status Badges ───────────────────────────────────────────── */
.activity-status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
    text-transform: uppercase;
}
.activity-status-badge.status-active,
.activity-status-badge.status-completed,
.activity-status-badge.status-success    { background: rgba(16,185,129,.12); color: #10b981; }
.activity-status-badge.status-sent       { background: rgba(59,130,246,.12); color: #3b82f6; }
.activity-status-badge.status-scheduled  { background: rgba(245,158,11,.12); color: #f59e0b; }
.activity-status-badge.status-draft      { background: rgba(148,163,184,.12); color: #64748b; }
.activity-status-badge.status-paused     { background: rgba(239,68,68,.12); color: #ef4444; }

/* activity link */
.activity-link { color: inherit; text-decoration: none; }
.activity-link:hover { color: #0ea5e9; }

/* ── Health Status Badge ─────────────────────────────────────────────── */
.health-status-badge.status-ok      { background: #d1fae5; color: #065f46; }
.health-status-badge.status-warning  { background: #fef3c7; color: #92400e; }
.health-status-badge.status-danger   { background: #fee2e2; color: #991b1b; }
.health-status-badge.status-unknown  { background: #e5e7eb; color: #6b7280; }

/* ── Empty State Modern ────────────────────────────────────────────────── */
.empty-state-modern {
    text-align: center;
    padding: 2rem 1rem;
    display: flex; flex-direction: row;
    align-items: center; gap: 1rem;
    justify-content: center;
}
.empty-icon-modern {
    width: 4rem; height: 4rem; margin: 0;
    background: #f1f5f9; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #64748b; font-size: 1.5rem; flex-shrink: 0;
}
.empty-title-modern    { font-size: 1.125rem; font-weight: 600; color: #1e293b; text-align: left; }
.empty-description-modern { color: #64748b; margin-left: .5rem; text-align: left; }

/* ── Notification Card ───────────────────────────────────────────────── */
.notification-card { border-left: 4px solid #0ea5e9; }
.notifications-grid { display: flex; flex-direction: column; gap: 1rem; }

.notification-item {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1rem; border-radius: 8px;
    background: #f8fafc; border: 1px solid #e2e8f0;
}
.notification-icon {
    width: 2.5rem; height: 2.5rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; flex-shrink: 0;
    background: #dbeafe; color: #0ea5e9;
}
.notification-item.success .notification-icon { background: #dcfce7; color: #10b981; }
.notification-item.warning .notification-icon { background: #fef3c7; color: #f59e0b; }
.notification-item.warning { background: #fffbeb; border-color: #fde68a; }
.notification-item.danger  { background: #fef2f2; border-color: #fecaca; }
.notification-item.danger .notification-icon  { background: #fee2e2; color: #ef4444; }
.notification-item.danger .notification-title  { color: #991b1b; }
.notification-item.danger .notification-message { color: #7f1d1d; }
.notification-item.danger .notification-action  { color: #ef4444; font-weight: 600; }
.notification-content { flex: 1; }
.notification-title   { font-weight: 600; color: #1e293b; margin-bottom: .25rem; }
.notification-message { color: #64748b; font-size: .9rem; margin-bottom: .5rem; }
.notification-action  { color: #0ea5e9; text-decoration: none; font-weight: 500; font-size: .9rem; }
.notification-action:hover { text-decoration: underline; }

/* ── Quick Actions Grid (action-card-modern) ───────────────────────────── */
.actions-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.action-card-modern {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
    padding: 1.5rem; transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; height: 100%;
}
.action-card-modern::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    transform: scaleX(0); transition: transform 0.3s ease;
}
.action-card-modern:hover { transform: translateY(-4px); box-shadow: 0 10px 25px rgba(14,165,233,0.15); border-color: #0ea5e9; }
.action-card-modern:hover::before { transform: scaleX(1); }
.action-icon-modern {
    width: 3.5rem; height: 3.5rem; margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #eff6ff, #f0f9ff);
    border: 2px solid #e2e8f0; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #0ea5e9; font-size: 1.25rem;
    transition: all 0.3s ease;
}
.action-card-modern:hover .action-icon-modern {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: #fff; border-color: #0ea5e9;
    transform: scale(1.05);
}
.action-content-modern { text-align: center; flex: 1; }
.action-content-modern h4 { color: #1e293b; margin: 0 0 0.75rem; font-size: 1.125rem; font-weight: 600; }
.action-content-modern p  { color: #64748b; margin: 0 0 1.5rem; font-size: .9rem; line-height: 1.5; }
.action-button-modern { margin-top: auto; }
.btn-action-modern {
    width: 100%; background: #f8fafc; color: #64748b;
    border: 1px solid #e2e8f0; border-radius: 8px;
    padding: 0.75rem 1rem; font-weight: 500; font-size: .9rem;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none; display: inline-flex;
    align-items: center; justify-content: center; gap: .5rem;
    cursor: pointer;
}
.action-card-modern:hover .btn-action-modern {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    color: #fff; border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14,165,233,0.25);
    text-decoration: none;
    transform: translateY(-1px);
}
.btn-action-modern i { font-size: .85rem; transition: transform .3s; }
.action-card-modern:hover .btn-action-modern i { transform: translateX(2px); }

/* ── Bootstrap-like utilities (brak Bootstrap w demo) ─────────────────── */
.row    { width: 100%; }
.col-12 { width: 100%; }
.mb-4   { margin-bottom: 1.5rem; }
.text-center { text-align: center; }

/* btn-outline-secondary for toggle button */
.btn { display: inline-flex; align-items: center; gap: .375rem; padding: .375rem .75rem; border-radius: .375rem; font-size: .875rem; font-weight: 500; cursor: pointer; transition: all .15s; text-decoration: none; border: 1px solid transparent; }
.btn-sm { padding: .25rem .5rem; font-size: .8rem; }
.btn-outline-secondary { border-color: #e2e8f0; background: #f8fafc; color: #64748b; }
.btn-outline-secondary:hover { border-color: #0ea5e9; background: #eff6ff; color: #0ea5e9; }

/* ── Footer separation ───────────────────────────────────────────────────── */
.footer { margin-top: 0; }

/* ── Generate Page ───────────────────────────────────────────────────────── */

/* Container spacing after hero */
.generate-content--after-hero {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Usage stats row */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0ea5e9;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Type grid — 4 columns, identical to marketing */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Type card — matching marketing */
.type-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.type-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.type-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.15);
    border-color: #0ea5e9;
}

.type-card:hover::before { transform: scaleX(1); }

.type-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.type-card:hover .type-icon {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%) !important;
    color: white !important;
    border-color: #0ea5e9 !important;
    transform: scale(1.1);
}

.type-content { flex: 1; display: flex; flex-direction: column; }

.type-content h4 {
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.type-content p {
    color: #64748b;
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
    flex: 1;
}

.type-actions { margin-top: auto; }

.btn-type-generate {
    width: 100%;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.type-card:hover .btn-type-generate {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border-color: #0ea5e9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

/* Prompt textarea */
.generate-prompt-box {
    width: 100%;
    min-height: 130px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
    color: #374151;
    resize: vertical;
    font-family: inherit;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    line-height: 1.6;
}

.generate-prompt-box:focus { border-color: #0ea5e9; background: #fff; }

.generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 1rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.generate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}

/* Generated result */
.generate-result-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.5rem;
}

.generate-result-subject {
    background: #f8fafc;
    border-left: 3px solid #0ea5e9;
    padding: 0.75rem 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.generate-result-body {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem;
    font-size: 0.875rem;
    color: #374151;
    line-height: 1.7;
    white-space: pre-line;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid #f1f5f9;
}

.generate-result-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.btn-result-copy {
    flex: 1;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-result-copy:hover { background: #e2e8f0; }

.btn-result-use {
    flex: 2;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.btn-result-use:hover { box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }

/* Recent generations list */
.generations-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.generation-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.generation-item:hover {
    background: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.1);
}

.generation-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.generation-content { flex: 1; min-width: 0; }

.generation-content h4 {
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.generation-meta {
    display: flex;
    gap: 1rem;
    color: #64748b;
    font-size: 0.8rem;
    margin: 0;
}

.generation-type {
    text-transform: capitalize;
    font-weight: 500;
}

.generation-actions { flex-shrink: 0; }

/* ── Generate Page – Enterprise Form ────────────────────────────────────── */

/* Active type card (email selected) */
.type-card--active {
    border-color: #0ea5e9;
    box-shadow: 0 4px 14px rgba(14,165,233,.18);
}
.type-card--active::before { transform: scaleX(1); }
.type-card--active .btn-type-generate {
    background: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    color: white;
    border-color: #0ea5e9;
}

/* 2-col form row: form (2fr) + sidebar (1fr) */
.generate-form-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
    align-items: start;
}

/* Form elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.required-star {
    color: #ef4444;
    margin-left: .2rem;
}

.form-select,
.form-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .625rem .875rem;
    font-size: .875rem;
    background: #fff;
    color: #374151;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
}

.form-textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: .625rem .875rem;
    font-size: .875rem;
    background: #fff;
    color: #374151;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    outline: none;
    resize: vertical;
    min-height: 110px;
    line-height: 1.6;
}

.form-select:focus,
.form-input:focus,
.form-textarea:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}

.form-help {
    display: block;
    font-size: .775rem;
    color: #64748b;
    margin-top: .3rem;
    line-height: 1.4;
}

/* Advanced options section */
.advanced-options {
    margin-top: .5rem;
    margin-bottom: .75rem;
}

.generate-advanced-toggle {
    font-size: .8rem;
    padding: .45rem .9rem;
    color: #475569;
    border-color: #e2e8f0;
}

.advanced-fields-demo {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: .75rem;
}

/* 2-col inside advanced options */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Form action buttons */
.form-actions {
    display: flex;
    gap: .75rem;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

/* Tips list */
.tips-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tips-list li {
    padding: .6rem 0;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    font-size: .855rem;
    line-height: 1.5;
    display: flex;
    gap: .5rem;
}

.tips-list li:last-child { border-bottom: none; }

.tips-list li::before {
    content: '✓';
    color: #10b981;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: .05rem;
}

/* Email types guide */
.email-types-guide { display: flex; flex-direction: column; gap: 0; }

.type-guide-item {
    padding: .65rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .82rem;
    line-height: 1.5;
    color: #374151;
}

.type-guide-item:last-child { border-bottom: none; }

.type-guide-item strong {
    color: #1e293b;
    font-weight: 600;
}

/* Card header actions (copy / download) */
.card-header-actions {
    display: flex;
    gap: .5rem;
    margin-left: auto;
}

/* Result card */
.generate-result-card {
    margin-top: 2rem;
}

/* Responsive: stack at 1024px */
@media (max-width: 1024px) {
    .generate-form-row {
        grid-template-columns: 1fr;
    }
    .form-row-2col {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .form-row-2col {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .form-actions .btn { width: 100%; justify-content: center; }
}

/* ── Billing Page ────────────────────────────────────────────────────────── */

/* Badge system */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge-success   { background: #d1fae5; color: #059669; }
.badge-warning   { background: #fef3c7; color: #d97706; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: #e5e7eb; color: #6b7280; }

/* Table */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 0.9rem;
}
.table thead th {
    background: #f8fafc;
    font-size: 0.7rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}
.table tbody tr:hover { background: #f8fafc; }
.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
    vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }

/* Plan status block */
.plan-status-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    gap: 1.5rem;
}
.plan-info .plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}
.plan-info .plan-description {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.plan-limits {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.limit-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #28a745;
    font-size: 0.85rem;
    font-weight: 500;
}
.limit-item i { color: #28a745; font-size: 0.8rem; }

/* Account info block */
.account-info-modern { display: flex; flex-direction: column; gap: 1rem; }
.account-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
}
.account-info-label { color: #6c757d; font-size: 0.85rem; }
.account-info-value { font-weight: 600; color: #374151; font-size: 0.9rem; }

/* Alert */
.alert {
    border-radius: 8px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    font-size: 0.9rem;
}
.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}
.alert-info a { color: #0c5460; font-weight: 600; }
.payment-methods-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.payment-methods-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

/* Empty state */
.empty-state-modern {
    text-align: center;
    padding: 3rem 1rem;
    color: #64748b;
}
.empty-icon-modern {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #cbd5e1;
}
.empty-title-modern {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}
.empty-description-modern {
    color: #64748b;
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.9rem;
}

/* Utilities */
.text-muted { color: #6c757d; }
.d-block { display: block; }
.text-center { text-align: center; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .header .nav-link { padding: var(--space-2) 0.35rem; font-size: 0.78rem; }
    .header .back-to-site .timer-text { display: none; }
}

@media (max-width: 960px) {
    .header .header__nav { display: none; }
    .header .header__content { min-height: 64px; }
}

@media (max-width: 768px) {
    .page-header--hero { padding: 2rem 0; min-height: 0; }
    .page-header--hero .page-title { font-size: 2rem; }
    .page-header--hero .page-subtitle { font-size: 1rem; }
    .usage-stats { grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
    .type-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .plan-status-modern { flex-direction: column; }
    .generate-result-actions { flex-direction: column; }
    .generate-result-actions .btn-result-copy,
    .generate-result-actions .btn-result-use { flex: none; width: 100%; }
}

@media (max-width: 640px) {
    .page-title { font-size: 1.375rem; }
    .demo-main .container { padding: 1rem; }
    .usage-stats { grid-template-columns: 1fr; }
    .type-grid { grid-template-columns: 1fr; }
}



