/* ==================================================================
   POSTIDA HVAC - MAIN CSS
   Single stylesheet for the entire application.
   Design language: clean, modern, professional (Buffer/Linear style)
   Font: Inter via Google Fonts CDN
   Icons: FontAwesome 6 via CDN
   ================================================================== */

/* ------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (Design Tokens)
   ------------------------------------------------------------------ */
:root {
    /* Brand - Postida Blue */
    --primary:         #0d6efd;
    --primary-dark:    #0a58ca;
    --primary-light:   #4d94fe;
    --primary-subtle:  #e7f0ff;

    /* Grays */
    --gray-50:  #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic */
    --success: #10b981;
    --error:   #ef4444;
    --warning: #f59e0b;
    --info:    #3b82f6;

    /* Platform brand colors */
    --facebook-color:  #1877f2;
    --instagram-color: #e1306c;

    /* Backgrounds */
    --bg-primary:   #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary:  #f1f5f9;

    /* Typography — compact scale (14px base for app density) */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --text-xs:   0.6875rem;   /* 11px */
    --text-sm:   0.8125rem;   /* 13px */
    --text-base: 0.875rem;    /* 14px — app base */
    --text-lg:   1rem;         /* 16px */
    --text-xl:   1.125rem;     /* 18px */
    --text-2xl:  1.25rem;      /* 20px */
    --text-3xl:  1.5rem;       /* 24px */
    --text-4xl:  1.875rem;     /* 30px */
    --text-5xl:  2.5rem;       /* 40px */

    /* Spacing — tightened 8px base for app density */
    --space-1:  0.25rem;    /* 4px  */
    --space-2:  0.5rem;     /* 8px  */
    --space-3:  0.625rem;   /* 10px */
    --space-4:  0.75rem;    /* 12px */
    --space-5:  1rem;       /* 16px */
    --space-6:  1.25rem;    /* 20px */
    --space-8:  1.5rem;     /* 24px */
    --space-10: 2rem;       /* 32px */
    --space-12: 2.5rem;     /* 40px */
    --space-16: 3rem;       /* 48px */
    --space-20: 4rem;       /* 64px */

    /* Borders */
    --radius-sm:   0.375rem;
    --radius-base: 0.5rem;
    --radius-lg:   0.75rem;
    --radius-xl:   1rem;
    --radius-2xl:  1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm:   0 1px 2px 0 rgba(0,0,0,0.05);
    --shadow-base: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --shadow-md:   0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg:   0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-xl:   0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);

    /* Sidebar — tighter than default to give content more room */
    --sidebar-width: 210px;
    --topbar-height: 48px;
}

/* ------------------------------------------------------------------
   RESET AND BASE
   ------------------------------------------------------------------ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    color: var(--gray-700);
    background: var(--bg-secondary);
    line-height: 1.5;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ------------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: var(--space-3);
}
h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------
   LAYOUT UTILITIES
   ------------------------------------------------------------------ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ------------------------------------------------------------------
   APP SHELL - Left sidebar + main content area
   Used by all authenticated pages (feed, generator, history, etc.)
   ------------------------------------------------------------------ */
.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

/* SIDEBAR */
.app-sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: var(--space-3) var(--space-3);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--primary);
    border-radius: var(--radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-base);
    flex-shrink: 0;
}

/* Logo image replacement for sidebar -- matches height, preserves aspect ratio */
.sidebar-logo-img {
    height: 28px;
    width: auto;
    flex-shrink: 0;
    display: block;
}

.sidebar-logo-text {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-3) var(--space-2);
    overflow-y: auto;
}

.sidebar-nav-label {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: var(--space-2) var(--space-2) var(--space-1);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-2);
    border-radius: var(--radius-base);
    color: var(--gray-600);
    font-weight: 500;
    font-size: var(--text-sm);
    transition: all 0.15s;
    margin-bottom: 1px;
    cursor: pointer;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-nav-item i {
    width: 18px;
    text-align: center;
    font-size: var(--text-base);
    flex-shrink: 0;
}

.sidebar-nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.sidebar-nav-item.active {
    background: var(--primary-subtle);
    color: var(--primary);
}

/* Getting Started nav item -- amber when on other pages, blue when active */
.sidebar-nav-item--start {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    margin-bottom: var(--space-3);
    font-weight: 600;
}

.sidebar-nav-item--start i {
    color: #d97706;
}

.sidebar-nav-item--start:hover {
    background: #fde68a;
    color: #78350f;
}

/* Override to blue only when actually on the Getting Started page */
.sidebar-nav-item--start.active {
    background: var(--primary-subtle);
    color: var(--primary);
    border-color: #c7d2fe;
}

.sidebar-nav-item--start.active i {
    color: var(--primary);
}


/* Compact stats widget (credits + accounts) inside sidebar */
.sidebar-stats {
    margin: var(--space-2) var(--space-2);
    padding: var(--space-3);
    background: var(--primary-subtle);
    border-radius: var(--radius-lg);
    border: 1px solid #c7d2fe;
}

/* Single stat row: icon + label on left, "N of X" on right */
.sidebar-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    line-height: 1.4;
}

.sidebar-stat-left {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-stat-icon {
    font-size: 0.7rem;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-stat-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.65rem;
}

.sidebar-stat-right {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: var(--text-xs);
}

.sidebar-stat-of {
    font-weight: 400;
    color: var(--primary-light);
}

/* Thin progress bar under each row */
.sidebar-stat-bar {
    margin-top: var(--space-1);
    height: 3px;
    background: #c7d2fe;
    border-radius: var(--radius-full);
    overflow: hidden;
}

.sidebar-stat-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

/* Sidebar bottom user profile area */
.sidebar-user {
    padding: var(--space-3) var(--space-3);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sidebar-user-avatar {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: var(--text-xs);
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-plan {
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* MAIN CONTENT AREA */
.app-main {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Top bar inside main content (page title + actions) */
.app-topbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 0 var(--space-5);
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.app-topbar-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-900);
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.app-content {
    padding: var(--space-5);
    flex: 1;
}

/* ------------------------------------------------------------------
   BUTTONS
   ------------------------------------------------------------------ */
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-ghost,
.btn-sm {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-base);
    font-weight: 500;
    font-size: var(--text-sm);
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.btn-danger {
    background: var(--error);
    color: white;
}
.btn-danger:hover {
    background: #dc2626;
    color: white;
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
    border: 1px solid transparent;
}
.btn-ghost:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: var(--text-xs);
}

.btn-block { width: 100%; justify-content: center; }

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ------------------------------------------------------------------
   MARKETING NAVBAR (guest pages: index, pricing, login, register)
   ------------------------------------------------------------------ */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}

.navbar-guest .container,
.navbar .navbar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    position: relative;
}

/* Brand / logo link */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand i {
    color: var(--primary);
    font-size: 1.2rem;
}

.navbar-brand:hover { color: var(--primary); }

/* Logo image inside navbar-brand -- preserves aspect ratio, never stretches */
.navbar-logo {
    display: block;
    height: 28px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

/* Brand name text next to the logo */
.navbar-brand-text {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

/* Nav links + buttons row */
.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.navbar-menu .nav-link {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-base);
    transition: color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.navbar-menu .nav-link:hover,
.navbar-menu .nav-link.active {
    color: var(--primary);
    background: var(--primary-subtle);
}

/* Buttons inside navbar need consistent sizing */
.navbar-menu .btn-primary,
.navbar-menu .btn-secondary,
.navbar-menu .btn-outline {
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    line-height: 1;
    transition: all 0.2s;
}

.navbar-menu .btn-primary {
    background: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}
.navbar-menu .btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: white;
    transform: none;
}

.navbar-menu .btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}
.navbar-menu .btn-secondary:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

/* Guest navbar: Log In -- outlined, sits between plain nav links and solid Get Started */
.btn-login {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
    font-weight: 600;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-base);
    color: var(--gray-700);
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-subtle);
}

/* User dropdown */
.user-menu { position: relative; }

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    padding: var(--space-1) var(--space-3) var(--space-1) var(--space-1);
    cursor: pointer;
    transition: border-color 0.15s;
}
.user-menu-trigger:hover { border-color: var(--gray-300); }

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xs);
    font-weight: 700;
    flex-shrink: 0;
}

.user-menu-trigger .fa-chevron-down {
    font-size: 10px;
    color: var(--gray-400);
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 300;
    overflow: hidden;
}
.user-menu-dropdown.show { display: block; }

.user-menu-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
}
.user-name  { font-weight: 600; font-size: var(--text-sm); color: var(--gray-900); }
.user-email { font-size: var(--text-xs); color: var(--gray-500); margin-top: 2px; }
.user-plan  { margin-top: var(--space-2); }

.user-menu-section {
    padding: var(--space-1) 0;
    border-bottom: 1px solid var(--gray-100);
}
.user-menu-section:last-child { border-bottom: none; }

.user-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--gray-700);
    text-decoration: none;
    transition: background 0.15s;
}
.user-menu-item:hover  { background: var(--gray-50); color: var(--gray-900); }
.user-menu-item i      { width: 16px; text-align: center; color: var(--gray-400); }
.user-menu-admin       { color: var(--primary); font-weight: 500; }
.user-menu-admin i     { color: var(--primary); }

/* Admin navbar */
.navbar-admin { background: var(--gray-900); border-bottom-color: var(--gray-700); }
.navbar-admin .navbar-brand { color: white; }
.navbar-admin .navbar-brand i { color: var(--primary-light); }
.navbar-admin .nav-link { color: var(--gray-300); }
.navbar-admin .nav-link:hover,
.navbar-admin .nav-link.active { color: white; background: rgba(255,255,255,.08); }

/* Responsive: collapse menu on small screens */
@media (max-width: 640px) {
    .navbar-menu .nav-link span,
    .navbar-menu .nav-link-text { display: none; }
    .navbar-menu { gap: var(--space-2); }
}

/* ------------------------------------------------------------------
   FORMS
   ------------------------------------------------------------------ */
/* .form-input is an alias for .form-control - both work identically */
.form-control,
.form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-base);
    font-size: var(--text-sm);
    font-family: var(--font-primary);
    color: var(--gray-900);
    background: white;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

.form-control::placeholder,
.form-input::placeholder { color: var(--gray-400); }

textarea.form-control,
textarea.form-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

select.form-control,
select.form-input { cursor: pointer; }

.form-group { margin-bottom: var(--space-4); }

.form-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--gray-700);
}

.form-help {
    display: block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-500);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.required { color: var(--error); }

/* ------------------------------------------------------------------
   CARDS (generic)
   ------------------------------------------------------------------ */
.card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

.card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0;
}

/* ------------------------------------------------------------------
   BADGES
   ------------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1.4;
}

.badge-success   { background: #d1fae5; color: #065f46; }
.badge-danger    { background: #fee2e2; color: #991b1b; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-info      { background: #dbeafe; color: #1e40af; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }
.badge-primary   { background: var(--primary-subtle); color: var(--primary-dark); }

/* Platform-specific badges */
.badge-facebook {
    background: #e7f0fd;
    color: var(--facebook-color);
}
.badge-instagram {
    background: #fce4ec;
    color: var(--instagram-color);
}

/* ------------------------------------------------------------------
   ALERTS
   ------------------------------------------------------------------ */
.alert {
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    font-size: var(--text-sm);
    position: relative;
    animation: slideDown 0.3s ease;
}

.alert i:first-child { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

.alert-dismissible { padding-right: var(--space-12); }

.btn-close {
    position: absolute;
    right: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    color: inherit;
    opacity: 0.6;
    transition: opacity 0.2s;
}
.btn-close:hover { opacity: 1; }

/* ------------------------------------------------------------------
   FLASH MESSAGES (fixed top banner)
   ------------------------------------------------------------------ */
.flash-message {
    position: fixed;
    top: 0;
    left: var(--sidebar-width); /* offset past sidebar */
    right: 0;
    z-index: 9999;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    animation: slideDown 0.3s ease;
}

.flash-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    padding: var(--space-2);
    transition: color 0.2s;
}
.flash-close:hover { color: var(--gray-900); }

.flash-success { color: var(--success); background: #f0fdf4; border-bottom-color: var(--success); }
.flash-error   { color: var(--error); background: #fef2f2; border-bottom-color: var(--error); }
.flash-warning { color: #92400e; background: #fffbeb; border-bottom-color: #f59e0b; }
.flash-info    { color: var(--info); background: #eff6ff; border-bottom-color: var(--info); }

/* ------------------------------------------------------------------
   CONTENT FEED
   ------------------------------------------------------------------ */

/* Category tab bar */
.feed-tabs {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

/* Mobile dropdown — hidden on desktop, shown on small screens */
.feed-tabs-mobile {
    display: none;
    margin-bottom: var(--space-4);
}

@media (max-width: 600px) {
    .feed-tabs        { display: none; }
    .feed-tabs-mobile { display: block; }
}

.feed-tab {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--gray-600);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-block;
}

.feed-tab:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.feed-tab.active {
    background: var(--primary-subtle);
    color: var(--primary);
    border-color: #c7d2fe;
}

/* Content card grid — 3 columns max for larger, more readable cards */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

/* 2 columns on medium screens */
@media (max-width: 1200px) {
    .feed-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 2 columns on tablets */
@media (max-width: 820px) {
    .feed-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 1 column on mobile */
@media (max-width: 520px) {
    .feed-grid { grid-template-columns: 1fr; }
}

/* Individual content card */
.content-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    box-shadow: var(--shadow-md);
}

/* Card image */
.content-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--gray-100);
    /* Image protection: prevent text/image selection on the container */
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.content-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Prevent drag-to-desktop and long-press save on mobile */
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Category badge overlaid on image */
.content-card-category {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    background: rgba(0, 0, 0, 0.55);
    color: white;
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: capitalize;
    backdrop-filter: blur(4px);
}

/* Featured star badge on image */
.content-card-featured {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--warning);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xs);
}

/* ------------------------------------------------------------------
   CARD TOOLBAR
   Compact strip above the image: category left, actions right
   ------------------------------------------------------------------ */
.card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    gap: var(--space-2);
}

.card-toolbar-category {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--gray-500);
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.card-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    color: var(--gray-400);
    font-size: var(--text-sm);
    cursor: pointer;
    border-radius: var(--radius-base);
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
    padding: 0;
}

.card-toolbar-btn:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Favorited heart: solid red */
.card-toolbar-btn.is-favorited {
    color: var(--error);
}
.card-toolbar-btn.is-favorited:hover {
    color: var(--error);
    background: #fee2e2;
}

/* Card body */
.content-card-body {
    padding: var(--space-3);
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Caption text - compact, 6-line clamp, respects line breaks */
.content-card-caption {
    font-size: var(--text-xs);
    color: var(--gray-600);
    line-height: 1.5;
    flex: 1;
    margin-bottom: var(--space-3);
    white-space: pre-line;
    /* Show 6 lines then truncate */
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Caption edit textarea - hidden by default, shown when Edit is clicked */
.content-card-caption-edit {
    display: none;
    width: 100%;
    font-size: var(--text-xs);
    color: var(--gray-700);
    line-height: 1.5;
    border: 1px solid var(--primary);
    border-radius: var(--radius-base);
    padding: var(--space-2);
    resize: vertical;
    min-height: 100px;
    font-family: var(--font-primary);
    margin-bottom: var(--space-4);
    transition: box-shadow 0.2s;
}

.content-card-caption-edit:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

/* Card action buttons */
.content-card-actions {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.content-card-actions .btn-primary,
.content-card-actions .btn-secondary,
.content-card-actions .btn-ghost {
    flex: 1;
    justify-content: center;
    min-width: 0;
    font-size: var(--text-xs);
    padding: 0.5rem 0.75rem;
}

/* Connect/Post button gets more horizontal room than ghost icon buttons.
   !important needed to beat the card-actions group override above. */
.content-card-actions .btn-primary {
    padding: 0.5rem 1.25rem !important;
    white-space: nowrap;
}

/* Edit mode: show Save/Cancel instead of action buttons */
.content-card-edit-actions {
    display: none;
    gap: var(--space-2);
}

.content-card-edit-actions .btn-primary,
.content-card-edit-actions .btn-ghost {
    flex: 1;
    justify-content: center;
    font-size: var(--text-xs);
    padding: 0.5rem 0.75rem;
}

/* When card is in edit mode */
.content-card.is-editing .content-card-caption { display: none; }
.content-card.is-editing .content-card-caption-edit { display: block; }
.content-card.is-editing .content-card-actions { display: none; }
.content-card.is-editing .content-card-edit-actions { display: flex; }

/* Edit focus effect: lift the editing card and dim all siblings.
   The .feed-grid-editing class is toggled on the grid by JS when
   any card enters or exits edit mode. */
.feed-grid-editing .content-card:not(.is-editing) {
    opacity: 0.35;
    pointer-events: none; /* prevent clicking other cards while editing */
    transition: opacity 0.2s ease;
}

.content-card.is-editing {
    box-shadow: var(--shadow-xl);
    transform: translateY(-3px);
    border-color: var(--primary);
    position: relative;
    z-index: 10;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

/* Copy success indicator */
.content-card-copy-success {
    display: none;
    font-size: var(--text-xs);
    color: var(--success);
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-2);
    animation: fadeIn 0.2s ease;
}

/* Empty state */
.feed-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--gray-500);
}

.feed-empty i {
    font-size: 2.5rem;
    color: var(--gray-300);
    margin-bottom: var(--space-3);
}

.feed-empty h3 {
    color: var(--gray-700);
    margin-bottom: var(--space-2);
}

/* ------------------------------------------------------------------
   FREE PLAN UPGRADE WALL
   Shown in the grid when a free user tries to paginate past page 1.
   ------------------------------------------------------------------ */
.feed-upgrade-wall {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-10) var(--space-6);
    color: var(--gray-500);
    background: white;
    border: 2px dashed var(--primary-subtle);
    border-radius: var(--radius-xl);
}

.feed-upgrade-wall i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: var(--space-3);
    opacity: 0.6;
}

.feed-upgrade-wall h3 {
    color: var(--gray-800);
    margin-bottom: var(--space-2);
}

.feed-upgrade-wall p {
    color: var(--gray-500);
    max-width: 420px;
    margin: 0 auto var(--space-6);
    font-size: var(--text-sm);
}

/* Locked pagination links for free plan */
.page-link-locked {
    color: var(--gray-400) !important;
    background: var(--gray-50) !important;
    border-color: var(--gray-200) !important;
    cursor: pointer;
}

.page-link-locked:hover {
    background: var(--primary-subtle) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Hint text below locked pagination */
.feed-upgrade-hint {
    text-align: center;
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: var(--space-3);
}

.feed-upgrade-hint i {
    color: var(--primary);
    margin-right: var(--space-1);
}

/* ------------------------------------------------------------------
   MODAL (Post Now / Schedule)
   ------------------------------------------------------------------ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.2s ease;
}

.modal-overlay.show .modal {
    transform: translateY(0) scale(1);
}

/* ------------------------------------------------------------------
   IMAGE PREVIEW LIGHTBOX MODAL
   Split layout: image fixed at top, caption scrolls below.
   Keeps the full caption always readable regardless of length.
   ------------------------------------------------------------------ */
.image-preview-modal {
    background: white;
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 700px;
    /* Total modal height capped so it fits the viewport */
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(16px) scale(0.98);
    transition: transform 0.2s ease;
}

.modal-overlay.show .image-preview-modal {
    transform: translateY(0) scale(1);
}

/* Image wrapper: fixed height, never grows */
.image-preview-image-wrap {
    position: relative;
    flex-shrink: 0;
    background: var(--gray-100);
    max-height: 55vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevent selection and context menu on the whole image area */
    -webkit-user-select: none;
    user-select: none;
}

.image-preview-img {
    width: 100%;
    display: block;
    max-height: 55vh;
    object-fit: contain;
    /* Prevent drag-to-desktop, long-press save, and right-click save */
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

.image-preview-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.55);
    border: none;
    color: white;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.image-preview-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Caption area: takes remaining space and scrolls if long */
.image-preview-caption-wrap {
    flex: 1;               /* grows to fill remaining modal height */
    overflow-y: auto;      /* scrolls if caption is very long */
    padding: var(--space-5);
    border-top: 1px solid var(--gray-100);
}

.image-preview-caption {
    font-size: var(--text-sm);
    color: var(--gray-700);
    line-height: 1.75;
    margin: 0;
    white-space: pre-line; /* respects line breaks in captions */
}

.modal-header {
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-base);
    transition: all 0.2s;
    font-size: var(--text-lg);
    line-height: 1;
}
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }

.modal-body { padding: var(--space-4); }
.modal-footer {
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
}

/* Publish modal - flex layout so controls and footer stay pinned while body scrolls */
.publish-modal {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* prevent double scrollbar -- body scrolls instead */
}
.publish-modal .modal-body {
    padding: var(--space-3) var(--space-4);
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* allows flex child to shrink and scroll */
}
.publish-modal .modal-footer {
    flex-shrink: 0; /* never let the footer collapse */
}

/* Pinned controls area between scrollable body and footer */
.publish-controls-pinned {
    flex-shrink: 0;
    padding: var(--space-2) var(--space-4);
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}
.publish-modal .modal-header { padding: var(--space-3) var(--space-4); }
.publish-modal .modal-title { font-size: var(--text-base); }

/* Image preview - full width, scaled down to keep 1:1 images reasonable */
.publish-preview-img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: var(--radius-base);
    margin-bottom: var(--space-3);
    background: var(--gray-50);
}

/* Editable caption textarea */
.publish-caption {
    width: 100%;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-base);
    font-size: 12px;
    font-family: inherit;
    line-height: 1.5;
    color: var(--gray-800);
    resize: vertical;
    margin-bottom: var(--space-3);
    box-sizing: border-box;
}

.publish-caption:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

/* Controls row: account chips left, toggle right */
.publish-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

/* Schedule inline row */
.publish-schedule-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.publish-schedule-row .form-control {
    flex: 1;
    font-size: 13px;
    padding: 6px 10px;
}

.publish-schedule-row .form-help {
    font-size: 11px;
    color: var(--gray-400);
    white-space: nowrap;
}

/* Account chips (compact pill toggles) */
.account-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.account-chip { cursor: pointer; }

.account-chip input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.account-chip-body {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 12px;
    color: var(--gray-600);
    background: white;
    transition: all 0.15s;
    user-select: none;
}

.account-chip-body:hover {
    border-color: var(--primary);
    background: var(--primary-subtle);
}

.account-chip input:checked + .account-chip-body {
    border-color: var(--primary);
    background: var(--primary-subtle);
    color: var(--primary);
    font-weight: 500;
}

/* Post type toggle (Post Now vs Schedule) - inline compact */
.post-type-toggle {
    display: inline-flex;
    gap: 2px;
    background: var(--gray-100);
    padding: 2px;
    border-radius: var(--radius-base);
}

.post-type-option {
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    transition: all 0.15s;
    border: none;
    background: none;
    white-space: nowrap;
}

.post-type-option.active {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-sm);
}

/* Schedule datetime fields - hidden until Schedule is selected */
.schedule-fields {
    display: none;
    margin-bottom: var(--space-3);
    animation: fadeIn 0.2s ease;
}
.schedule-fields.show { display: block; }

/* Flatpickr overrides to match Postida design */
.flatpickr-calendar {
    font-family: var(--font-primary) !important;
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}
.flatpickr-months .flatpickr-month {
    background: var(--primary) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: white !important;
    font-weight: 600 !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    fill: white !important;
    color: white !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}
.flatpickr-day.today {
    border-color: var(--primary-light) !important;
}
.flatpickr-time input {
    font-family: var(--font-primary) !important;
    font-size: var(--text-sm) !important;
}
/* Flatpickr alt input styling (the visible text field) */
input.flatpickr-ready + .flatpickr-input,
input.flatpickr-ready {
    cursor: pointer;
}

/* No accounts connected state inside modal */
.modal-no-accounts {
    text-align: center;
    padding: var(--space-5);
    color: var(--gray-500);
}

.modal-no-accounts i {
    font-size: 2rem;
    color: var(--gray-300);
    margin-bottom: var(--space-3);
}

/* ------------------------------------------------------------------
   ADMIN WARNING BANNERS
   Rendered by renderTokenEncryptionWarning() in functions.php
   ------------------------------------------------------------------ */
.admin-warning {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-5);
}

.admin-warning--critical {
    background: #fff1f2;
    border: 2px solid #fda4af;
    color: #881337;
}

.admin-warning--caution {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: #92400e;
    font-size: var(--text-sm);
}

.admin-warning__icon {
    font-size: var(--text-2xl);
    flex-shrink: 0;
    padding-top: 2px;
}

.admin-warning__body strong {
    display: block;
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
}

.admin-warning__body p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.admin-warning__body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------
   PAGINATION
   ------------------------------------------------------------------ */
.pagination {
    display: flex;
    list-style: none;
    gap: var(--space-1);
    justify-content: center;
    margin-top: var(--space-5);
    flex-wrap: wrap;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-base);
    font-size: var(--text-xs);
    color: var(--gray-600);
    background: white;
    transition: all 0.15s;
}

.page-item .page-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-900);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ------------------------------------------------------------------
   AUTH PAGES (login, register, etc.)
   ------------------------------------------------------------------ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-logo {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--text-xl);
    margin: 0 auto var(--space-3);
}

.auth-header h1 { margin-bottom: var(--space-2); font-size: var(--text-xl); }
.auth-header p  { color: var(--gray-500); font-size: var(--text-sm); margin-bottom: 0; }

.auth-footer {
    text-align: center;
    padding-top: var(--space-5);
    border-top: 1px solid var(--gray-200);
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: var(--space-5);
}

/* ------------------------------------------------------------------
   SOCIAL CONNECT PAGE
   ------------------------------------------------------------------ */
.social-accounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.social-account-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-account-picture {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.social-account-placeholder {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.social-account-info { flex: 1; min-width: 0; }

.social-account-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.social-account-meta {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.social-account-token-warning {
    font-size: 11px;
    color: var(--warning);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

/* ------------------------------------------------------------------
   CONNECT OPTIONS CARDS
   Rendered from $connectOptions array in social-connect.php.
   Add new cards by adding entries to that array -- no CSS changes needed.
   ------------------------------------------------------------------ */
.connect-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.connect-option-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: white;
    text-decoration: none;
    color: var(--gray-900);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.connect-option-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--gray-900);
}

.connect-option-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-base);
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-bottom: 2px;
}

.connect-option-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-900);
    line-height: 1.2;
}

.connect-option-desc {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.4;
}

.connect-option-hint {
    font-size: 11px;
    color: var(--primary);
    font-weight: 500;
    margin-top: auto;
    padding-top: 4px;
}

/* ------------------------------------------------------------------
   POST HISTORY TABLE
   ------------------------------------------------------------------ */
.history-table-wrap {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}

.history-table th {
    background: var(--gray-50);
    padding: var(--space-2) var(--space-3);
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--gray-200);
}

.history-table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    vertical-align: middle;
}

.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--gray-50); }

.history-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-base);
    object-fit: cover;
}

/* ------------------------------------------------------------------
   LOADING STATES
   ------------------------------------------------------------------ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.skeleton {
    background: var(--gray-200);
    border-radius: var(--radius-base);
    animation: pulse 1.5s ease infinite;
}

.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.spinner-primary {
    border: 2px solid var(--primary-subtle);
    border-top-color: var(--primary);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------
   ANIMATIONS
   ------------------------------------------------------------------ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(0); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.3s ease-out; }

/* ------------------------------------------------------------------
   FOOTER (public/marketing pages only)
   ------------------------------------------------------------------ */
.footer {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: var(--space-12) 0 var(--space-6);
    margin-top: var(--space-16);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: var(--text-sm);
}
/* Secondary legal line below copyright */
.footer-legal {
    margin-top: var(--space-1);
    font-size: .75rem;
    color: var(--gray-400);
}

/* ------------------------------------------------------------------
   SIDEBAR MOBILE TOGGLE
   ------------------------------------------------------------------ */
.sidebar-toggle {
    display: none;
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    z-index: 200;
    transition: background 0.2s;
}
.sidebar-toggle:hover { background: var(--primary-dark); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}

/* ------------------------------------------------------------------
   RESPONSIVE
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
    }

    .app-sidebar.mobile-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: flex;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .feed-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .app-content {
        padding: var(--space-4);
    }

    .app-topbar {
        padding: 0 var(--space-4);
    }

    /* Flash message goes full width on mobile since sidebar is hidden */
    .flash-message {
        left: 0;
    }

    .feed-grid {
        grid-template-columns: 1fr;
    }

    .social-accounts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row-2 {
        grid-template-columns: 1fr;
    }

    .modal {
        max-width: 100%;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-height: 92vh;
    }

    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .post-type-toggle {
        /* Already inline-flex, no grid override needed on mobile */
    }

    .history-table th:nth-child(3),
    .history-table td:nth-child(3) { display: none; }
}

@media (max-width: 480px) {
    .feed-tabs { gap: var(--space-1); }
    .feed-tab  { padding: var(--space-2) var(--space-3); font-size: var(--text-xs); }

    .content-card-actions {
        flex-direction: column;
    }

    .social-accounts-grid {
        grid-template-columns: 1fr;
    }
}
/* ==================================================================
   LANDING PAGE STYLES
   ================================================================== */

/* Hero */
.hero {
    background: linear-gradient(135deg, #0a58ca 0%, #0d6efd 55%, #4d94fe 100%);
    color: #fff;
    padding: 5rem 0 4rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-eyebrow {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .8;
    margin-bottom: var(--space-3);
}

/* Hero — explicit sizes to preserve marketing impact despite tighter app tokens */
.hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: var(--space-4);
    color: #fff;
}

.hero-subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: .9;
    margin-bottom: var(--space-6);
}

.hero-cta {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-4);
}

/* Hero CTA buttons: white on blue bg for contrast */
.hero .btn-primary {
    background: white;
    color: var(--primary);
    font-weight: 700;
}
.hero .btn-primary:hover {
    background: var(--gray-100);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: .6rem 1.4rem;
    border: 2px solid rgba(255,255,255,.6);
    border-radius: var(--radius-lg);
    color: #fff;
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: border-color .2s, background .2s;
    background: transparent;
    cursor: pointer;
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,.1);
    color: #fff; /* prevent text turning blue on hover against the hero background */
}

/* Make btn-outline work outside hero (dark border) */
.section-white .btn-outline,
.section-light .btn-outline,
.pricing-card .btn-outline,
.about-hero .btn-outline {
    border-color: var(--primary);
    color: var(--primary);
}

.section-white .btn-outline:hover,
.section-light .btn-outline:hover,
.pricing-card .btn-outline:hover,
.about-hero .btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-lg {
    padding: .85rem 2rem;
    font-size: 1rem;
}

.hero-note {
    font-size: var(--text-sm);
    opacity: .7;
    margin: 0;
}

/* Hero trust bar (publishes to Facebook & Instagram) */
.hero-trust {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.65);
}

/* Hero card stack */
.hero-card-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.hero-card {
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    transition: transform .2s;
}

.hero-card:hover { transform: translateX(4px); }

.hero-card-1 { margin-left: 0; }
.hero-card-2 { margin-left: 1.5rem; }
.hero-card-3 { margin-left: 3rem; }

.hc-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.2);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.hc-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hc-body strong { font-size: var(--text-sm); font-weight: 600; }
.hc-body span   { font-size: var(--text-xs); opacity: .7; }

.hc-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 9999px;
}

.badge-green  { background: rgba(34,197,94,.25); color: #86efac; }
.badge-blue   { background: rgba(59,130,246,.25); color: #93c5fd; }
.badge-orange { background: rgba(249,115,22,.25); color: #fdba74; }

/* Sections */
.section-light  { background: var(--gray-50);  padding: 5rem 0; }
.section-white  { background: #fff;             padding: 5rem 0; }
.section-cta    {
    background: var(--gray-900);
    color: #fff;
    padding: 5rem 0;
    text-align: center;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

/* Marketing section headings — explicit sizes to preserve impact */
.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin: 0;
}

/* Feature cards (3 col) */
.three-col-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-3);
}

.text-red    { color: #ef4444; }
.text-orange { color: #f97316; }
.text-yellow { color: #eab308; }

.feature-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: var(--space-2); }
.feature-card p  { font-size: var(--text-sm); color: var(--gray-600); line-height: 1.6; margin: 0; }

/* Steps */
.steps-row {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.step-item {
    flex: 1;
    text-align: center;
}

.step-arrow {
    padding-top: 1.2rem;
    color: var(--gray-400);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.step-num {
    width: 52px;
    height: 52px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 auto var(--space-4);
}

.step-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-2); }
.step-item p  { font-size: var(--text-sm); color: var(--gray-600); line-height: 1.6; margin: 0; }

/* Category grid - 3 columns on desktop, 2 on tablet, 1 on mobile */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
}
@media (max-width: 768px) {
    .category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .category-grid { grid-template-columns: 1fr; }
}

.category-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.cat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: var(--space-3);
}

.category-card h4 { font-size: var(--text-sm); font-weight: 600; margin-bottom: var(--space-2); }
.category-card p  { font-size: var(--text-xs); color: var(--gray-600); line-height: 1.6; margin: 0; }

/* Pricing row */
.pricing-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
}

.pricing-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}

.pricing-featured .plan-name {
    margin-top: var(--space-4);
}

.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 9999px;
    white-space: nowrap;
}

.plan-name  { font-size: 1rem; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: .05em; margin-bottom: var(--space-2); }
/* Marketing pricing card price — keep visually large */
.plan-price { font-size: 2.75rem; font-weight: 700; color: var(--gray-900); margin-bottom: var(--space-5); }
.plan-price span { font-size: 1rem; color: var(--gray-500); font-weight: 400; }

.plan-features {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    text-align: left;
}

.plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--gray-100);
}

.plan-features li:last-child { border-bottom: none; }
.plan-features .fas.fa-check  { color: var(--success); flex-shrink: 0; }
.plan-features .fas.fa-times  { color: var(--gray-300); flex-shrink: 0; }
.feat-off { color: var(--gray-400); }

.btn-block { display: block; width: 100%; text-align: center; }

/* Final CTA section — explicit sizes for marketing impact */
.section-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: var(--space-3);
}

.section-cta p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.75);
    margin-bottom: var(--space-6);
}

/* Landing page responsive */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .hero-visual { display: none; }
    .steps-row   { flex-direction: column; }
    .step-arrow  { display: none; }
}

@media (max-width: 640px) {
    .hero-title { font-size: 2rem; }
    .hero-cta   { flex-direction: column; }
    .pricing-row { grid-template-columns: 1fr; }
}

/* ==================================================================
   PRICING PAGE (pricing.php)
   ================================================================== */

.pricing-page {
    padding: 5rem 0;
    background: var(--gray-50);
}

.pricing-hero {
    text-align: center;
    margin-bottom: 4rem;
}

/* Pricing page hero — explicit size to preserve marketing impact */
.pricing-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--space-3);
}

.pricing-hero p {
    font-size: 1.1rem;
    color: var(--gray-600);
    margin: 0;
}

/* 3-column pricing grid */
.pp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto 5rem;
    /* Extra top padding so the "Most Popular" badge has room above the card */
    padding-top: 1.5rem;
}

.pp-card {
    background: #fff;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem 2rem;  /* top padding gives badge room */
    text-align: center;
    position: relative;
}

.pp-featured {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}

/* Badge sits above card — extra top padding on featured card */
.pp-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    padding: 4px 18px;
    border-radius: 9999px;
    white-space: nowrap;
    z-index: 1;
}

/* Push tier label down on featured card so it clears the badge */
.pp-featured .pp-tier {
    margin-top: var(--space-4);
}

.pp-tier {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    margin-bottom: var(--space-2);
}

.pp-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-2);
    line-height: 1;
}

.pp-price span {
    font-size: 1rem;
    color: var(--gray-500);
    font-weight: 400;
}

.pp-desc {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-5);
}

.pp-features {
    list-style: none;
    margin: 0 0 var(--space-6);
    padding: 0;
    text-align: left;
}

.pp-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--gray-100);
}

.pp-features li:last-child { border-bottom: none; }
.pp-features .fas.fa-check { color: var(--success); flex-shrink: 0; }
.pp-features .fas.fa-times { color: var(--gray-300); flex-shrink: 0; }
.pp-features .feat-off      { color: var(--gray-400); }

/* FAQ */
.pp-faq {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.pp-faq h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2.5rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-5);
    text-align: left;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.faq-item h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.faq-item p {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0;
}

/* Also fix the same badge overlap on the index.php landing pricing section */
.pricing-row {
    padding-top: 1.5rem;
}

@media (max-width: 768px) {
    .pp-grid    { grid-template-columns: 1fr; }
    .faq-grid   { grid-template-columns: 1fr; }
    .pricing-row { grid-template-columns: 1fr; padding-top: 1.5rem; }
}


/* ==================================================================
   BILLING PAGE
   ================================================================== */

/* Two-column layout */
.billing-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--space-6);
    align-items: start;
}
@media (max-width: 900px) {
    .billing-layout { grid-template-columns: 1fr; }
}

/* Usage stats row */
.billing-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    text-align: center;
}
.billing-usage-num {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}
.billing-usage-lbl {
    font-size: .75rem;
    color: var(--gray-500);
    margin-top: var(--space-1);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Progress bar */
.billing-progress {
    height: 8px;
    background: var(--gray-100);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: var(--space-2);
}
.billing-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width .4s ease;
}
.billing-progress-fill--full { background: var(--error); }

/* Plan badge on current plan card */
.billing-plan-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.billing-plan-badge--free    { background: var(--gray-100); color: var(--gray-600); }
.billing-plan-badge--starter { background: #dbeafe; color: #1e40af; }
.billing-plan-badge--pro     { background: #d1fae5; color: #065f46; }

/* 3-column plan comparison grid */
.billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}
@media (max-width: 700px) {
    .billing-plans-grid { grid-template-columns: 1fr; }
}
.billing-plan-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    position: relative;
}
.billing-plan-card--current { background: var(--gray-50); }
.billing-plan-card--featured {
    border-color: var(--primary);
    background: #f5f3ff;
}
.billing-plan-badge-top {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 99px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.billing-plan-current-badge {
    display: inline-block;
    margin-bottom: var(--space-3);
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 99px;
    text-transform: uppercase;
}
.billing-plan-name {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-500);
    margin-bottom: var(--space-1);
}
.billing-plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-3);
    line-height: 1;
}
.billing-plan-price span {
    font-size: .9rem;
    font-weight: 400;
    color: var(--gray-400);
}
.billing-plan-btn { width: 100%; justify-content: center; margin-bottom: var(--space-4); }
.billing-plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: .85rem;
    color: var(--gray-700);
}
.billing-plan-features li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) 0;
}
.billing-plan-features .fa-check { color: var(--success); }

/* Sidebar meta rows */
.billing-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: .875rem;
    color: var(--gray-500);
}
.billing-meta-row:last-child { border-bottom: none; }

/* Modal overlay (no Bootstrap) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}
.modal-box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--gray-200);
}
.modal-box-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.modal-box-header--warning { background: #fef3c7; }
.modal-box-header--danger  { background: #fee2e2; }
.modal-box-body   { padding: var(--space-5); }
.modal-box-footer {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1rem;
    padding: 4px;
    line-height: 1;
}
.modal-close:hover { color: var(--gray-700); }


/* ------------------------------------------------------------------
   GENERATOR - Preview Panel (right side before generation runs)
   ------------------------------------------------------------------ */

/* Wrapper -- solid card, matches the result card style */
.generator-placeholder {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Inner panel -- one per type, swapped by JS on type toggle */
.gen-preview-panel {
    padding: var(--space-4);
}

/* Header row: icon + title/subtitle */
.gen-preview-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
}

.gen-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.gen-preview-icon--caption { background: var(--primary-subtle); color: var(--primary); }
.gen-preview-icon--image   { background: #fef3c7; color: #d97706; }

.gen-preview-title {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}

.gen-preview-subtitle {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-top: 2px;
}

/* Mockup box -- shows a skeleton of what the output will look like */
.gen-preview-mockup {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.gen-preview-mockup-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gray-400);
    margin-bottom: var(--space-3);
}

/* Fake image block used in the image-type mockup */
.gen-preview-mockup-image {
    width: 100%;
    height: 140px;
    background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
    border-radius: var(--radius-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--gray-400);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

.gen-preview-mockup-image i { font-size: 2rem; }

/* Skeleton shimmer lines representing generated text */
.gen-skeleton {
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.8s infinite;
    display: block;
}

.gen-skeleton--line {
    height: 12px;
    margin-bottom: var(--space-2);
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.gen-preview-mockup-caption { margin-bottom: var(--space-3); }

/* Fake action buttons in the mockup (decorative only, not clickable) */
.gen-preview-mockup-actions {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.gen-preview-mockup-btn {
    padding: 6px 14px;
    border-radius: var(--radius-base);
    font-size: var(--text-xs);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    pointer-events: none;
}

.gen-preview-mockup-btn--primary  { background: var(--primary); color: white; }
.gen-preview-mockup-btn--secondary {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

/* Numbered step list at the bottom of each preview panel */
.gen-preview-steps {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.gen-preview-step {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--gray-600);
}

.gen-preview-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-subtle);
    color: var(--primary);
    font-size: var(--text-xs);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ------------------------------------------------------------------
   BILLING - CANCELLATION NOTICE
   Shown when subscription_status = 'canceled' with days remaining
------------------------------------------------------------------ */
.billing-cancel-notice {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.billing-cancel-notice-icon {
    color: #f59e0b;
    font-size: 1.1rem;
    flex-shrink: 0;
    padding-top: 2px;
}

.billing-cancel-notice-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--text-sm);
    line-height: 1.5;
    color: var(--gray-700);
}

.billing-cancel-notice-body strong {
    font-weight: 600;
    color: var(--gray-900);
}


/* ------------------------------------------------------------------
   BILLING PAGE - FULL REDESIGN
   Compact current plan card, 2x2 sidebar, Stripe badge under button,
   smaller upsell plan cards, clean activity labels
------------------------------------------------------------------ */

/* Two-column outer layout */
.billing-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-5);
    align-items: start;
}
@media (max-width: 900px) {
    .billing-layout { grid-template-columns: 1fr; }
}

/* Current plan card — no inner padding wrapper, card handles it */
.billing-current-card {
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}

/* Plan name + badge row */
.billing-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.billing-plan-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.3;
}
.billing-plan-sub {
    font-size: var(--text-xs);
    color: var(--gray-500);
    margin-top: 2px;
}

/* Usage stats — compact 3-col grid */
.billing-usage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-3);
    text-align: center;
}
.billing-usage-stat { }
.billing-usage-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}
.billing-usage-lbl {
    font-size: var(--text-xs);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-top: 3px;
}

/* Progress bar */
.billing-progress {
    height: 5px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}
.billing-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width .4s ease;
}
.billing-progress-fill--full { background: var(--error); }

/* Actions + Stripe badge wrapper */
.billing-actions-wrap {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
}
.billing-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.billing-actions .btn-primary,
.billing-actions .btn-secondary {
    width: 90%;
    justify-content: center;
}

/* Stripe trust badge — small strip under buttons */
.billing-stripe-badge {
    font-size: var(--text-xs);
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}
.billing-stripe-badge i { color: var(--success); }
.billing-stripe-badge strong { color: var(--gray-600); }

/* Plan badge pills */
.billing-plan-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;  /* prevents badge from squishing on narrow screens */
    align-self: flex-start;
}
.billing-plan-badge--free    { background: var(--gray-100); color: var(--gray-600); }
.billing-plan-badge--starter { background: #dbeafe; color: #1e40af; }
.billing-plan-badge--pro     { background: #d1fae5; color: #065f46; }

/* Status colors */
.billing-status--active   { color: var(--success); }
.billing-status--canceled { color: var(--warning); }

/* ---- Compare Plans card ---- */
.billing-compare-card {
    padding: var(--space-4) var(--space-5);
}
.billing-compare-header {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: var(--space-4);
}

/* Plan cards grid — compact */
.billing-plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}
@media (max-width: 700px) {
    .billing-plans-grid { grid-template-columns: 1fr; }
}

.billing-plan-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-3) var(--space-3);
    position: relative;
    background: var(--gray-50);
    font-size: var(--text-sm);
}
.billing-plan-card--featured {
    border-color: var(--primary);
    background: var(--primary-subtle);
}
.billing-plan-card--current {
    border-color: var(--success);
}

.billing-plan-badge-top {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--primary);
    background: white;
    border: 1px solid var(--primary);
    border-radius: var(--radius-full);
    padding: 1px 8px;
    margin-bottom: var(--space-2);
}

.billing-plan-name {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.billing-plan-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
    margin-bottom: var(--space-2);
}
.billing-plan-price span {
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--gray-400);
}

.billing-plan-current-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--success);
    background: #d1fae5;
    border-radius: var(--radius-full);
    padding: 2px 8px;
    margin-bottom: var(--space-2);
}

.billing-plan-btn { margin-bottom: var(--space-2); width: 100%; justify-content: center; }

.billing-plan-features {
    list-style: none;
    padding: 0;
    margin: var(--space-2) 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.billing-plan-features li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-xs);
    color: var(--gray-600);
}
.billing-plan-features li i {
    color: var(--success);
    font-size: 10px;
    flex-shrink: 0;
    width: 12px;
}
.billing-plan-feature--no { color: var(--gray-400); }
.billing-plan-feature--no i { color: var(--gray-300); }

/* ---- Sidebar ---- */
.billing-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Top row: 2 cards side by side */
.billing-sidebar-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}
@media (max-width: 500px) {
    .billing-sidebar-top { grid-template-columns: 1fr; }
}

.billing-sidebar-card {
    padding: var(--space-3) var(--space-3);
}
.billing-sidebar-card-title {
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gray-400);
    margin-bottom: var(--space-3);
}

/* Meta rows (label + value) */
.billing-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    font-size: var(--text-xs);
    color: var(--gray-500);
    border-bottom: 1px solid var(--gray-100);
}
.billing-meta-row:last-child { border-bottom: none; }
.billing-meta-row strong { color: var(--gray-800); font-weight: 600; }

/* Activity card */
.billing-activity-card {
    padding: var(--space-3) var(--space-3);
    /* inherits .card border/shadow */
}
.billing-activity-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: var(--text-xs);
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-100);
}
.billing-activity-row:last-child { border-bottom: none; }
.billing-activity-plan {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-left: 3px;
}

/* ------------------------------------------------------------------
   GETTING STARTED PAGE
   ------------------------------------------------------------------ */
.gs-wrap {
    max-width: 640px;
}

.gs-intro {
    margin-bottom: var(--space-5);
}

.gs-intro h2 {
    margin-bottom: var(--space-2);
}

.gs-intro p {
    color: var(--gray-600);
    margin: 0;
}

/* Individual step card */
.gs-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}

/* Highlight the next action step */
.gs-step--highlight {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

/* Completed step — muted */
.gs-step--done {
    opacity: 0.65;
}

/* Step number / check circle */
.gs-step-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    background: var(--primary-subtle);
    border: 2px solid #c7d2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--text-xs);
    color: var(--primary);
    flex-shrink: 0;
}

.gs-step--done .gs-step-icon {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: var(--success);
}

.gs-step-body {
    flex: 1;
    min-width: 0;
}

.gs-step-title {
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.gs-step-desc {
    font-size: var(--text-sm);
    color: var(--gray-600);
    margin-bottom: var(--space-3);
    line-height: 1.5;
}

.gs-step--done .gs-step-desc {
    margin-bottom: 0;
}

.gs-btn-row {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.gs-link {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
    margin-left: var(--space-2);
}

/* Done badge on the right */
.gs-step-badge {
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--success);
    white-space: nowrap;
    flex-shrink: 0;
}


/* ------------------------------------------------------------------
   FAQ PAGE
   ------------------------------------------------------------------ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.faq-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item[open] {
    border-color: var(--primary);
}
.faq-question {
    padding: var(--space-4);
    font-weight: 600;
    font-size: var(--text-base);
    color: var(--gray-900);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--gray-400);
    font-weight: 400;
    transition: transform 0.2s;
}
.faq-item[open] .faq-question::after {
    content: '-';
    color: var(--primary);
}
.faq-question:hover {
    color: var(--primary);
}
.faq-answer {
    padding: 0 var(--space-4) var(--space-4);
}
.faq-answer p {
    color: var(--gray-600);
    font-size: var(--text-sm);
    line-height: 1.7;
    margin: 0;
}
.faq-cta {
    text-align: center;
    margin-top: var(--space-8);
    padding: var(--space-8) var(--space-4);
    background: var(--gray-50);
    border-radius: var(--radius-2xl);
}
.faq-cta h2 {
    font-size: var(--text-xl);
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}
.faq-cta p {
    color: var(--gray-500);
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}


/* ------------------------------------------------------------------
   BLOG
   ------------------------------------------------------------------ */
.blog-grid {
    display: grid;
    gap: var(--space-4);
}
.blog-card {
    display: block;
    padding: var(--space-4) var(--space-5);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.blog-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}
.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}
.blog-card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}
.blog-card-date {
    font-size: var(--text-xs);
    color: var(--gray-400);
}
.blog-card-title {
    font-size: var(--text-lg);
    color: var(--gray-900);
    margin: 0 0 var(--space-2);
    line-height: 1.4;
}
.blog-card-desc {
    font-size: var(--text-sm);
    color: var(--gray-500);
    line-height: 1.6;
    margin: 0 0 var(--space-3);
}
.blog-card-read {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
}
/* Article page */
.blog-article-meta {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.blog-article-body {
    font-size: var(--text-base);
    color: var(--gray-700);
    line-height: 1.8;
}
.blog-article-body h2 {
    font-size: var(--text-lg);
    color: var(--gray-900);
    margin: var(--space-6) 0 var(--space-3);
}
.blog-article-body p {
    margin-bottom: var(--space-4);
}


/* ------------------------------------------------------------------
   LEGAL / CONTENT PAGES (FAQ, Blog, Privacy, Terms, About, Contact)
   ------------------------------------------------------------------ */
.legal-page {
    padding-top: var(--space-8);
    padding-bottom: var(--space-8);
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}
.legal-container h1 {
    font-size: var(--text-2xl);
    color: var(--gray-900);
    margin-bottom: var(--space-2);
}
.legal-container h2 {
    font-size: var(--text-lg);
    color: var(--gray-900);
    margin-top: var(--space-6);
    margin-bottom: var(--space-2);
}
.legal-container p, .legal-container li {
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.7;
}

/* ------------------------------------------------------------------
   MOBILE GUEST NAVBAR (hamburger menu)
   ------------------------------------------------------------------ */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-700);
    cursor: pointer;
    padding: var(--space-2);
}

/* Mobile slide-in overlay (covers full screen when open) */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 300;
    opacity: 0;
    transition: opacity 0.2s;
}
.mobile-nav-overlay.open {
    display: block;
    opacity: 1;
}

/* Side panel slides in from right */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 301;
    transition: right 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}
.mobile-nav-panel.open {
    right: 0;
}
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-100);
}
.mobile-nav-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    padding: var(--space-1);
}
.mobile-nav-links {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}
.mobile-nav-links a {
    display: block;
    padding: 12px 0;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-100);
}
.mobile-nav-links a:last-child {
    border-bottom: none;
}
.mobile-nav-cta {
    padding: var(--space-4);
    border-top: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.mobile-nav-cta a {
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius-base);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
}

/* Footer list cleanup (remove default bullets, add proper spacing) */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-section ul li {
    margin-bottom: var(--space-1);
}
.footer-section ul li a {
    font-size: var(--text-sm);
}

@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }
    .navbar-guest .navbar-menu {
        display: none;
    }

    /* Hero: tighter on mobile, single column */
    .hero {
        padding: 2.5rem 0 2rem;
    }
    .hero-inner {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    .hero h1 {
        font-size: 1.75rem;
    }
    .hero-desc {
        font-size: var(--text-base);
    }
    /* Hero buttons: white with blue text for contrast on blue bg */
    .hero .btn-primary {
        background: white;
        color: var(--primary);
    }
    .hero .btn-outline {
        border-color: white;
        color: white;
        background: rgba(255,255,255,0.15);
    }
    .hero-cta {
        flex-direction: column;
    }
    /* Hide hero image/preview on mobile */
    .hero-visual {
        display: none;
    }

    /* Legal/content pages tighter on mobile */
    .legal-page {
        padding-top: var(--space-5);
        padding-bottom: var(--space-5);
    }
    .legal-container {
        padding: 0 var(--space-4);
    }
    .legal-container h1 {
        font-size: var(--text-xl);
    }

    /* Footer stacks on mobile */
    .footer {
        padding: var(--space-6) 0 var(--space-4);
        margin-top: var(--space-8);
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-4);
    }

    /* FAQ CTA section tighter on mobile */
    .faq-cta {
        padding: var(--space-5) var(--space-3);
    }
    .faq-cta h2 {
        font-size: var(--text-lg);
    }

    /* Blog cards tighter on mobile */
    .blog-card {
        padding: var(--space-3) var(--space-4);
    }

    /* Feature/pain-point cards: icon + title only on mobile */
    .three-col-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2);
    }
    .feature-card {
        display: flex;
        gap: var(--space-2);
        align-items: center;
        padding: var(--space-2) var(--space-3);
    }
    .feature-icon {
        margin-bottom: 0;
        flex-shrink: 0;
        font-size: 1.2rem;
    }
    .feature-card h3 {
        font-size: var(--text-sm);
        margin-bottom: 0;
    }
    .feature-card p {
        display: none;
    }

    /* Category cards: icon + title only on mobile, no description */
    .category-grid {
        gap: var(--space-2);
    }
    .category-card {
        display: flex;
        gap: var(--space-2);
        align-items: center;
        padding: var(--space-2) var(--space-3);
    }
    .cat-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
        font-size: 0.9rem;
    }
    .category-card h3 {
        font-size: var(--text-sm);
        margin-bottom: 0;
    }
    .category-card p {
        display: none;
    }

    /* Pricing page tighter on mobile */
    .pricing-page {
        padding: var(--space-4) 0;
    }
    .pricing-hero {
        margin-bottom: var(--space-3);
    }
    .pricing-hero h1 {
        font-size: var(--text-xl);
        margin-bottom: var(--space-1);
    }
    .pricing-hero p {
        font-size: var(--text-sm);
    }
    .pp-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
        margin-bottom: var(--space-4);
        padding-top: var(--space-3);
    }
    .pp-card {
        padding: var(--space-3);
    }
    .pp-price {
        font-size: 1.75rem;
        margin-bottom: var(--space-1);
    }
    .pp-price span {
        font-size: var(--text-xs);
    }
    .pp-tier {
        font-size: var(--text-xs);
        margin-bottom: var(--space-1);
    }
    .pp-desc {
        font-size: var(--text-xs);
        margin-bottom: var(--space-2);
    }
    .pp-features {
        margin-bottom: var(--space-2);
    }
    .pp-features li {
        padding: 3px 0;
        font-size: var(--text-xs);
    }
    .pp-badge {
        font-size: 10px;
        padding: 3px 12px;
        top: -10px;
    }
    .pp-featured .pp-tier {
        margin-top: var(--space-2);
    }
    .pp-card .btn-block {
        padding: 0.5rem 1rem;
        font-size: var(--text-sm);
    }

    /* Section padding tighter on mobile */
    .section-white, .section-light {
        padding: var(--space-6) 0;
    }
    .section-white h2, .section-light h2 {
        font-size: var(--text-xl);
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    .navbar .navbar-content,
    .navbar-guest .container {
        padding: 0 var(--space-3);
    }
}
