/* ═══════════════════════════════════════════════════════════════
   FIGMA SAAS FLASHCARDS — DESIGN SYSTEM & PALETTE
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg-primary: #09111f;
    --bg-secondary: #0f1626;
    --bg-tertiary: rgba(255, 255, 255, 0.05);
    --bg-quaternary: rgba(255, 255, 255, 0.08);
    --surface: rgba(15, 22, 40, 0.55);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --surface-glass: rgba(255, 255, 255, 0.05);
    --surface-card: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    --glass-blur: blur(24px) saturate(180%);
    
    /* Brand & Accent Colors */
    --accent-primary: #C1121F;
    --accent-primary-hover: #A30E19;
    --accent-primary-light: #FFA586;
    --accent-crimson: #C1121F;
    --accent-cream: #FDF0D5;
    --accent-cyan: #669BBC;
    --accent-cyan-light: #8ecae6;
    --accent-blue: #003049;
    
    /* Legacy aliases mapped to new palette */
    --accent-violet: #C1121F;
    --accent-violet-light: #FFA586;
    
    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #C1121F, #780000);
    --accent-gradient-glow: linear-gradient(135deg, #C1121F, #003049);
    
    /* Typography Colors */
    --text-primary: #E6E8F0;
    --text-secondary: rgba(230, 232, 240, 0.75);
    --text-muted: #64748b;
    
    /* Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(193, 18, 31, 0.4);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 25px rgba(0, 0, 0, 0.3);
    --shadow-lg: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 16px 45px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 4px 20px rgba(193, 18, 31, 0.4);
    
    /* Layout */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 240px;
    --font-ui: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-card: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

html.light {
    --bg-primary: #f4f6fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: rgba(0, 0, 0, 0.04);
    --bg-quaternary: rgba(0, 0, 0, 0.07);
    --surface: rgba(255, 255, 255, 0.72);
    --surface-hover: rgba(0, 0, 0, 0.03);
    --surface-glass: rgba(255, 255, 255, 0.65);
    --surface-card: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65));
    --glass-blur: blur(24px) saturate(180%);
    --text-primary: #0f1626;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.09);
    --border-hover: rgba(193, 18, 31, 0.3);
    --shadow-sm: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 25px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 45px rgba(0,0,0,0.12);
    --shadow-glow: 0 4px 20px rgba(193, 18, 31, 0.2);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; font-family: var(--font-ui); background: var(--bg-primary); color: var(--text-primary); }
body {
    display: flex; height: 100vh; height: 100dvh; overflow: hidden; position: relative;
    background: radial-gradient(ellipse 70% 55% at 12% 28%, rgba(193, 18, 31, 0.32) 0%, transparent 65%),
                radial-gradient(ellipse 55% 45% at 88% 72%, rgba(0, 48, 73, 0.45) 0%, transparent 65%),
                radial-gradient(ellipse 30% 25% at 75% 10%, rgba(102, 155, 188, 0.12) 0%, transparent 50%),
                #09111f;
}
body::before {
    content: ""; position: fixed; inset: 0; opacity: 0.02; pointer-events: none; z-index: 9999;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(9, 17, 31, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; flex-shrink: 0; position: relative; z-index: 10;
    box-shadow: var(--shadow-lg);
}
.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.15rem 1rem; border-bottom: 1px solid var(--border-color);
}
.sidebar-logo {
    font-family: var(--font-card); font-size: 1.15rem; font-weight: 700;
    display: flex; align-items: center; gap: 0.65rem; color: var(--text-primary);
}
.sidebar {
    width: 240px;
    background: rgba(11, 15, 25, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    height: 100vh;
    user-select: none;
    z-index: 100;
}

html.light .sidebar {
    background: rgba(255, 255, 255, 0.75);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    padding: 1.15rem 1rem 0.9rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.sidebar-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #C1121F, #780000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    box-shadow: 0 0 15px rgba(193, 18, 31, 0.5);
    flex-shrink: 0;
}

.sidebar-logo-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sidebar-logo-sub {
    font-size: 0.56rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-actions { display: flex; gap: 0.35rem; }

.sidebar-body { 
    flex: 1; 
    overflow-y: auto; 
    padding: 0.5rem 0.5rem; 
    -webkit-overflow-scrolling: touch; 
}

.sidebar-nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 0.5rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
}

.sidebar-nav-item i {
    font-size: 0.82rem;
    width: 16px;
    text-align: center;
}

.sidebar-nav-item:hover {
    color: rgba(255, 255, 255, 0.80);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item.active {
    background: rgba(193, 18, 31, 0.20);
    color: #EF4444;
    border: 1px solid rgba(193, 18, 31, 0.28);
}

.sidebar-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.75rem 0.35rem 0.75rem;
}

.sidebar-nav-header span {
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.25);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.sidebar-nav-header button {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: rgba(193, 18, 31, 0.15);
    color: #EF4444;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-nav-header button:hover {
    background: rgba(193, 18, 31, 0.30);
}

/* Deck Items - Figma Prototype */
.deck-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    margin-bottom: 0.15rem;
    position: relative;
}

.deck-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.07);
}

.deck-item.active {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.12);
}

.deck-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #FFFFFF;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    margin-top: 1px;
}

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

.deck-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deck-item:hover .deck-name,
.deck-item.active .deck-name {
    color: #FFFFFF;
}

.deck-stats-chip {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.15rem;
    font-size: 0.58rem;
    font-weight: 700;
}

.deck-chip-due {
    color: #C1121F;
}

.deck-chip-new {
    color: #669BBC;
}

.deck-chip-ok {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
}

.deck-menu-btn {
    opacity: 0;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    border-radius: 4px;
    transition: var(--transition);
}

.deck-item:hover .deck-menu-btn { opacity: 1; }
.deck-menu-btn:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.1); }

.sidebar-user-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sidebar-user-footer:hover {
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C1121F, #780000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

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

.sidebar-user-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-meta {
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Folder Items */
.folder-item { margin-bottom: 0.25rem; }
.folder-header {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    transition: var(--transition);
}
.folder-header:hover { background: var(--surface-hover); color: var(--text-primary); }
.folder-header i { transition: transform 0.2s ease; font-size: 0.65rem; }
.folder-header.collapsed i { transform: rotate(-90deg); }
.folder-children { padding-left: 0.75rem; }
.folder-children.collapsed { display: none; }

/* ═══════════════════════════════════════════════════════════════
   BUTTONS & BADGES
   ═══════════════════════════════════════════════════════════════ */
.btn-icon {
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color);
    color: var(--text-secondary); width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md);
    transition: var(--transition); font-size: 0.9rem;
}
.btn-icon:hover { background: rgba(255, 255, 255, 0.09); color: var(--text-primary); border-color: rgba(255,255,255,0.15); transform: translateY(-1px); }
.btn-icon:active { transform: scale(0.96); }

.btn-primary {
    background: var(--accent-gradient); color: var(--accent-cream); border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.6rem 1.25rem; border-radius: var(--radius-lg); font-weight: 600; font-size: 0.85rem;
    transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    box-shadow: var(--shadow-glow); text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #d61523, #8a0000);
    transform: translateY(-1px); box-shadow: 0 6px 25px rgba(193, 18, 31, 0.5);
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
    background: rgba(255, 255, 255, 0.06); color: var(--text-primary); border: 1px solid var(--border-color);
    padding: 0.6rem 1.25rem; border-radius: var(--radius-lg); font-weight: 600; font-size: 0.85rem;
    transition: var(--transition); display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    backdrop-filter: blur(10px);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px); color: white;
}
.btn-secondary:active { transform: scale(0.97); }

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.78rem; border-radius: var(--radius-md); }
.btn-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.3); color: white; }
.btn-block { width: 100%; justify-content: center; }

/* ═══════════════════════════════════════════════════════════════
   MAIN CONTENT & HEADER
   ═══════════════════════════════════════════════════════════════ */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.header {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--border-color);
    background: rgba(9, 17, 31, 0.75); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 1rem; min-width: 0; }
.header-title { font-family: var(--font-card); font-size: 1.25rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.header-subtitle { font-size: 0.78rem; color: var(--text-muted); }
.header-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.search-box {
    display: flex; align-items: center; gap: 0.5rem; background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 0 0.85rem;
    transition: var(--transition);
}
.search-box:focus-within { border-color: rgba(193, 18, 31, 0.4); box-shadow: 0 0 15px rgba(193, 18, 31, 0.2); background: rgba(255, 255, 255, 0.08); }
.search-box i { color: var(--text-muted); font-size: 0.85rem; }
.search-box input {
    background: none; border: none; color: var(--text-primary); padding: 0.5rem 0;
    font-size: 0.85rem; outline: none; width: 160px;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Content Area */
.content-area { flex: 1; overflow-y: auto; position: relative; -webkit-overflow-scrolling: touch; }

/* ═══════════════════════════════════════════════════════════════
   WELCOME / DASHBOARD SCREEN
   ═══════════════════════════════════════════════════════════════ */
.welcome-screen {
    display: flex; align-items: center; justify-content: center; min-height: 100%;
    padding: 2rem; animation: fadeIn 0.5s ease;
}
.welcome-content { text-align: center; max-width: 760px; width: 100%; }
.welcome-icon {
    width: 80px; height: 80px; margin: 0 auto 1.5rem; border-radius: 24px;
    background: var(--accent-gradient); display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; color: white; box-shadow: var(--shadow-glow); animation: float 3.5s ease-in-out infinite;
}
.welcome-title {
    font-family: var(--font-card); font-size: 2.4rem; font-weight: 700; margin-bottom: 0.75rem;
    color: var(--text-primary); letter-spacing: -0.02em;
}
.welcome-subtitle { font-size: 1rem; color: var(--text-secondary); margin-bottom: 2.5rem; line-height: 1.6; }
.welcome-actions { display: flex; gap: 1rem; justify-content: center; margin-bottom: 3rem; flex-wrap: wrap; }
.welcome-decks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.welcome-deck-card {
    background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl); padding: 1.5rem; border: 1px solid var(--border-color); cursor: pointer;
    transition: var(--transition-slow); text-align: left; position: relative; overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.welcome-deck-card:hover { transform: translateY(-5px); border-color: var(--border-hover); box-shadow: 0 14px 40px rgba(193, 18, 31, 0.25); }
.welcome-deck-emoji { font-size: 2rem; margin-bottom: 0.85rem; display: block; }
.welcome-deck-name { font-weight: 700; font-size: 1rem; margin-bottom: 0.35rem; color: var(--text-primary); }
.welcome-deck-desc { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }

/* ═══════════════════════════════════════════════════════════════
   CARD LIST VIEW
   ═══════════════════════════════════════════════════════════════ */
.cards-list { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.cards-list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.cards-list-header h3 { font-size: 0.85rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.card-list-item {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; margin-bottom: 0.65rem;
    background: var(--surface-card); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-lg); border: 1px solid var(--border-color); cursor: pointer;
    transition: var(--transition); animation: fadeIn 0.25s ease forwards; box-shadow: var(--shadow-sm);
}
.card-list-item:hover { border-color: var(--border-hover); transform: translateX(4px); background: rgba(255, 255, 255, 0.06); }
.card-list-item .card-front-preview {
    flex: 1; font-size: 0.9rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-list-item .card-back-preview {
    flex: 1; font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-list-item .card-tags { display: flex; gap: 0.35rem; flex-shrink: 0; }
.tag-chip {
    background: rgba(102, 155, 188, 0.12); color: var(--accent-cyan); padding: 0.2rem 0.6rem;
    border-radius: 20px; font-size: 0.72rem; font-weight: 600; border: 1px solid rgba(102, 155, 188, 0.25);
}
.card-list-item .card-actions-btns { display: flex; gap: 0.25rem; opacity: 0; transition: var(--transition); }
.card-list-item:hover .card-actions-btns { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   STUDY VIEW (GLASSMORPHIC 3D FLIP CARD)
   ═══════════════════════════════════════════════════════════════ */
.study-view {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100%; padding: 1.5rem; animation: fadeIn 0.3s ease;
}
.content-area:fullscreen {
    background: #09111f !important; overflow-y: auto;
}
.content-area:fullscreen .study-view {
    width: 100%; height: 100%; min-height: 100dvh;
    display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem;
}
.content-area:fullscreen .card-container { max-width: 650px; }
.content-area:fullscreen .card-3d { min-height: 380px; }

.study-progress-bar {
    width: 100%; max-width: 540px; height: 5px; background: rgba(255, 255, 255, 0.08);
    border-radius: 4px; margin-bottom: 0.75rem; overflow: hidden;
}
.study-progress-fill { height: 100%; background: var(--accent-gradient); border-radius: 4px; transition: width 0.4s ease; box-shadow: var(--shadow-glow); }
.study-counter { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.25rem; font-weight: 600; }
.study-mode-tabs {
    display: flex; gap: 0.35rem; margin-bottom: 1.5rem; background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 0.3rem;
}
.study-mode-tab {
    padding: 0.45rem 1rem; border: none; background: none; color: var(--text-muted);
    border-radius: var(--radius-lg); font-size: 0.8rem; font-weight: 600; transition: var(--transition);
}
.study-mode-tab.active { background: var(--accent-crimson); color: var(--accent-cream); box-shadow: var(--shadow-glow); }
.study-mode-tab:hover:not(.active) { color: var(--text-primary); }

/* 3D Card Flip */
.card-container { perspective: 1200px; width: 100%; max-width: 540px; margin-bottom: 1.5rem; }
.card-3d {
    position: relative; width: 100%; min-height: 310px; transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; cursor: pointer;
}
.card-3d.flipped { transform: rotateY(180deg); }
.card-face {
    position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    background: rgba(15, 22, 40, 0.78); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl); border: 1px solid var(--border-color);
    padding: 3rem 1.75rem 2.5rem 1.75rem; display: flex; flex-direction: column;
    justify-content: flex-start; align-items: center; overflow: hidden; box-shadow: var(--shadow-lg);
}
.card-face.back { transform: rotateY(180deg); }
.card-face .card-content {
    font-family: var(--font-card); font-size: 1.2rem; line-height: 1.7; text-align: center;
    width: 100%; word-wrap: break-word; overflow-y: auto; flex: 1; color: var(--text-primary);
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
}
.card-face .card-content::before,
.card-face .card-content::after { content: ""; margin: auto; }
.card-face .card-content img { max-width: 100%; border-radius: var(--radius-md); margin: 0.5rem 0; box-shadow: var(--shadow-md); }
.card-face .card-content code { background: rgba(255, 255, 255, 0.08); padding: 0.15rem 0.45rem; border-radius: 6px; font-size: 0.9em; color: var(--accent-cyan); }
.card-face .card-content pre { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-color); padding: 1rem; border-radius: var(--radius-md); overflow-x: auto; text-align: left; width: 100%; margin: 0.5rem 0; }
.card-face .card-content pre code { background: none; padding: 0; color: inherit; }
.card-label { position: absolute; top: 1.15rem; left: 1.25rem; font-size: 0.68rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.card-tags-display { position: absolute; bottom: 1.15rem; left: 1.25rem; display: flex; gap: 0.35rem; flex-wrap: wrap; }

/* Study Buttons & Rating Controls */
.show-answer-btn {
    background: var(--accent-gradient); color: var(--accent-cream); border: 1px solid rgba(255,255,255,0.15);
    padding: 0.9rem 2.75rem; border-radius: var(--radius-xl); font-weight: 700; font-size: 1rem;
    transition: var(--transition); box-shadow: var(--shadow-glow); text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.show-answer-btn:hover { transform: scale(1.04); box-shadow: 0 8px 30px rgba(193,18,31,0.6); }

.rating-buttons { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; width: 100%; max-width: 540px; }
.rating-btn {
    flex: 1; min-width: 95px; display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
    padding: 0.75rem 1rem; border-radius: var(--radius-lg); border: 1px solid var(--border-color);
    background: rgba(15, 22, 40, 0.7); color: var(--text-primary); font-weight: 700; font-size: 0.88rem;
    transition: var(--transition); backdrop-filter: blur(16px);
}
.rating-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.rating-btn .rating-interval { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }
.rating-btn.again { border-color: #C1121F; background: rgba(193, 18, 31, 0.12); }
.rating-btn.again:hover { background: rgba(193, 18, 31, 0.25); color: white; }
.rating-btn.hard { border-color: #F59E0B; background: rgba(245, 158, 11, 0.1); }
.rating-btn.hard:hover { background: rgba(245, 158, 11, 0.22); color: white; }
.rating-btn.good { border-color: #10B981; background: rgba(16, 185, 129, 0.1); }
.rating-btn.good:hover { background: rgba(16, 185, 129, 0.22); color: white; }
.rating-btn.easy { border-color: #669BBC; background: rgba(102, 155, 188, 0.12); }
.rating-btn.easy:hover { background: rgba(102, 155, 188, 0.25); color: white; }

/* Type Answer & Multiple Choice */
.type-answer-area { width: 100%; max-width: 540px; margin-bottom: 1rem; }
.type-answer-input {
    width: 100%; padding: 0.85rem 1.15rem; background: rgba(255, 255, 255, 0.05); border: 2px solid var(--border-color);
    border-radius: var(--radius-lg); color: var(--text-primary); font-size: 1rem; outline: none;
    transition: var(--transition); font-family: var(--font-card);
}
.type-answer-input:focus { border-color: rgba(193, 18, 31, 0.5); box-shadow: 0 0 15px rgba(193, 18, 31, 0.25); }
.type-answer-input.correct { border-color: #10B981; background: rgba(16,185,129,0.12); }
.type-answer-input.incorrect { border-color: #C1121F; background: rgba(193,18,31,0.12); }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; width: 100%; max-width: 540px; }
.choice-btn {
    padding: 0.9rem 1.15rem; background: rgba(15, 22, 40, 0.7); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); color: var(--text-primary); font-size: 0.88rem; text-align: left;
    transition: var(--transition); display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-card);
    backdrop-filter: blur(12px);
}
.choice-btn:hover:not(:disabled) { border-color: rgba(193, 18, 31, 0.4); transform: translateY(-2px); background: rgba(255, 255, 255, 0.08); }
.choice-btn .choice-letter {
    width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.8rem; flex-shrink: 0;
}
.choice-btn.correct { border-color: #10B981; background: rgba(16,185,129,0.15); }
.choice-btn.correct .choice-letter { background: #10B981; color: white; }
.choice-btn.incorrect { border-color: #C1121F; background: rgba(193,18,31,0.15); }
.choice-btn.incorrect .choice-letter { background: #C1121F; color: white; }

/* Session End Summary */
.session-summary { text-align: center; padding: 2rem; animation: fadeIn 0.5s ease; }
.session-summary h2 {
    font-family: var(--font-card); font-size: 1.8rem; margin-bottom: 1.5rem;
    color: var(--text-primary); font-weight: 700;
}
.session-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2rem; max-width: 440px; margin-left: auto; margin-right: auto; }
.session-stat {
    background: var(--surface); border-radius: var(--radius-lg); padding: 1.25rem; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.session-stat-value { font-size: 1.8rem; font-weight: 700; font-family: var(--font-card); color: var(--text-primary); }
.session-stat-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   EDITOR VIEW
   ═══════════════════════════════════════════════════════════════ */
.editor-view { padding: 1.5rem; max-width: 900px; margin: 0 auto; width: 100%; animation: fadeIn 0.3s ease; }
.editor-toolbar {
    display: flex; gap: 0.35rem; padding: 0.5rem; background: rgba(15, 22, 40, 0.85);
    border: 1px solid var(--border-color); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-wrap: wrap; backdrop-filter: blur(12px);
}
.toolbar-btn {
    width: 2.25rem; height: 2.25rem; border: none; background: none; color: var(--text-secondary);
    border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 0.85rem;
}
.toolbar-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }
.toolbar-sep { width: 1px; background: var(--border-color); margin: 0.25rem 0.15rem; }
.editor-fields {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--border-color);
    border-top: none; border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden;
}
.editor-field {
    min-height: 220px; max-height: 420px; padding: 1.15rem; outline: none; overflow-y: auto;
    font-family: var(--font-card); font-size: 0.95rem; line-height: 1.6; color: var(--text-primary);
    background: rgba(9, 17, 31, 0.7);
}
.editor-field:first-child { border-right: 1px solid var(--border-color); }
.editor-field:empty::before { content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; }
.editor-field:focus { background: rgba(15, 22, 40, 0.9); }
.editor-tag-area {
    display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 1rem;
    padding: 0.5rem 0.75rem; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); min-height: 44px;
}
.editor-tag-area input {
    flex: 1; min-width: 120px; background: none; border: none; color: var(--text-primary);
    font-size: 0.85rem; outline: none; padding: 0.25rem 0;
}
.editor-tag-area input::placeholder { color: var(--text-muted); }
.tag-chip-editable {
    display: flex; align-items: center; gap: 0.35rem; background: rgba(193, 18, 31, 0.15);
    color: var(--accent-crimson-light, #FFA586); padding: 0.2rem 0.6rem; border-radius: 20px;
    font-size: 0.78rem; font-weight: 600; border: 1px solid rgba(193, 18, 31, 0.3);
}
.tag-chip-editable button {
    background: none; border: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; opacity: 0.7;
}
.tag-chip-editable button:hover { opacity: 1; color: #C1121F; }
.editor-actions { display: flex; gap: 0.75rem; margin-top: 1.25rem; justify-content: flex-end; }

/* ═══════════════════════════════════════════════════════════════
   MODALS (GLASSMORPHIC OVERLAY & CONTAINERS)
   ═══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
    z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal {
    background: rgba(15, 22, 38, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-xl); padding: 2rem; width: 90%; max-width: 560px; max-height: 85vh;
    overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    border: 1px solid var(--border-color); transform: scale(0.94) translateY(10px); transition: transform 0.25s ease;
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.modal-title { font-size: 1.25rem; font-weight: 700; font-family: var(--font-card); color: var(--text-primary); }
.modal-close {
    width: 32px; height: 32px; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); color: var(--text-secondary); display: flex; align-items: center; justify-content: center;
    transition: var(--transition); font-size: 1.1rem;
}
.modal-close:hover { color: var(--text-primary); background: rgba(255, 255, 255, 0.12); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.4rem; }
.form-control {
    width: 100%; padding: 0.65rem 0.9rem; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); color: var(--text-primary); font-size: 0.88rem; outline: none;
    transition: var(--transition);
}
.form-control:focus { border-color: rgba(193, 18, 31, 0.5); box-shadow: 0 0 15px rgba(193, 18, 31, 0.2); background: rgba(255, 255, 255, 0.08); }
textarea.form-control { resize: vertical; min-height: 100px; font-family: var(--font-ui); }
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
.color-picker { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.color-swatch {
    width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 3px solid transparent;
    transition: var(--transition); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.color-swatch:hover { transform: scale(1.15); }
.color-swatch.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-secondary); }

/* Import / Export & PDF Drop Zone */
.file-drop-zone, .pdf-drop-zone {
    border: 2px dashed var(--border-color); border-radius: var(--radius-lg); padding: 2.25rem 1.5rem;
    text-align: center; cursor: pointer; transition: var(--transition); background: rgba(255, 255, 255, 0.03);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.file-drop-zone:hover, .pdf-drop-zone:hover, .file-drop-zone.dragover, .pdf-drop-zone.dragover {
    border-color: rgba(193, 18, 31, 0.5); background: rgba(193, 18, 31, 0.06);
}
.file-drop-zone i, .pdf-drop-zone i { font-size: 2rem; color: var(--accent-crimson); margin-bottom: 0.75rem; transition: transform 0.2s ease; }
.pdf-drop-zone:hover i { transform: scale(1.15); }
.file-drop-zone p { color: var(--text-primary); font-size: 0.9rem; font-weight: 600; }
.file-drop-zone small { color: var(--text-muted); font-size: 0.75rem; margin-top: 0.25rem; }

.tab-bar { display: flex; gap: 0.35rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1.25rem; }
.tab-btn-modal {
    padding: 0.65rem 1rem; border: none; background: none; color: var(--text-muted);
    font-weight: 600; font-size: 0.85rem; border-bottom: 2px solid transparent;
    transition: var(--transition); cursor: pointer;
}
.tab-btn-modal.active { color: var(--text-primary); border-bottom-color: var(--accent-crimson); }
.tab-btn-modal:hover:not(.active) { color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════════
   STATS PANEL & HEATMAP
   ═══════════════════════════════════════════════════════════════ */
.stats-panel {
    position: fixed; top: 0; right: 0; width: 380px; height: 100vh;
    background: rgba(9, 17, 31, 0.92); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border-color); z-index: 100; transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto; box-shadow: var(--shadow-lg);
}
.stats-panel.open { transform: translateX(0); }
.stats-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); position: sticky; top: 0;
    background: rgba(9, 17, 31, 0.95); backdrop-filter: blur(20px); z-index: 1;
}
.stats-panel-header h3 { font-family: var(--font-card); font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.stats-section { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); }
.stats-section h4 { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.85rem; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.stat-card {
    background: var(--surface); border-radius: var(--radius-md); padding: 1rem; border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.stat-value { font-size: 1.5rem; font-weight: 700; font-family: var(--font-card); color: var(--text-primary); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; font-weight: 600; }
.heatmap-container { overflow-x: auto; }
.heatmap-container canvas { width: 100%; }
.chart-container { height: 200px; position: relative; }

/* ═══════════════════════════════════════════════════════════════
   CONTEXT MENU & TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════ */
.context-menu {
    position: fixed; background: rgba(15, 22, 38, 0.94); backdrop-filter: blur(20px);
    border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 0.35rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6); z-index: 3000; min-width: 170px;
    max-height: calc(100vh - 20px); overflow-y: auto; -webkit-overflow-scrolling: touch;
    animation: fadeIn 0.15s ease;
}
.context-menu-item {
    display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.75rem;
    border: none; background: none; width: 100%; text-align: left; color: var(--text-primary);
    font-size: 0.85rem; border-radius: var(--radius-sm); transition: var(--transition); font-weight: 500;
}
.context-menu-item:hover { background: rgba(255, 255, 255, 0.08); }
.context-menu-item.danger { color: #fca5a5; }
.context-menu-item.danger:hover { background: rgba(193, 18, 31, 0.2); }
.context-menu-sep { height: 1px; background: var(--border-color); margin: 0.25rem 0.5rem; }

.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 5000; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast {
    background: rgba(15, 22, 38, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-md); padding: 0.85rem 1.25rem; box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color); border-left: 4px solid var(--accent-crimson); font-size: 0.85rem;
    font-weight: 600; color: var(--text-primary); transform: translateX(120%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 360px; pointer-events: auto;
}
.toast.show { transform: translateX(0); }
.toast.success { border-left-color: #10B981; }
.toast.error { border-left-color: #C1121F; }
.toast.warning { border-left-color: #F59E0B; }
.toast.info { border-left-color: #669BBC; }

/* ═══════════════════════════════════════════════════════════════
   HOME DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════ */
.sidebar-nav-section {
    padding: 0.35rem 0;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    margin: 0.15rem 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--accent-crimson);
}

.sidebar-nav-item:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: rgba(193, 18, 31, 0.15);
    color: var(--text-primary);
    border: 1px solid rgba(193, 18, 31, 0.3);
}

.sidebar-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0.85rem 0.35rem 0.85rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.08em;
}

.sidebar-nav-header button {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.8rem;
}

.sidebar-nav-header button:hover {
    color: var(--accent-crimson);
}

.home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0.5rem 0.25rem;
}

.home-hero-card {
    background: linear-gradient(135deg, rgba(193, 18, 31, 0.25), rgba(0, 48, 73, 0.4));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(193, 18, 31, 0.3);
    border-radius: var(--radius-xl);
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(193, 18, 31, 0.15);
    position: relative;
    overflow: hidden;
}

.home-hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 650px;
    z-index: 1;
}

.home-hero-greeting h2 {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.home-hero-greeting p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.home-hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.home-hero-badge {
    z-index: 1;
}

.home-streak-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--surface);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.home-streak-box i {
    font-size: 2rem;
    color: #FFA586;
}

.home-streak-val {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
}

.home-streak-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.home-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.home-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.home-section-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
}

.home-decks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.home-deck-card {
    background: var(--surface-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.home-deck-card:hover {
    border-color: rgba(193, 18, 31, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.home-deck-card-top {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.home-deck-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.home-deck-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.home-deck-card-chips {
    display: flex;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.home-deck-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.home-quick-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.home-quick-card:hover {
    border-color: rgba(193, 18, 31, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.home-quick-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.home-quick-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
}

.home-quick-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.35;
}

@media (max-width: 900px) {
    .home-metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .home-decks-grid { grid-template-columns: repeat(2, 1fr); }
    .home-quick-grid { grid-template-columns: 1fr; }
    .home-hero-card { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}

@media (max-width: 550px) {
    .home-metrics-grid { grid-template-columns: 1fr; }
    .home-decks-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   FIGMA STATISTICAL DASHBOARD STYLES
   ═══════════════════════════════════════════════════════════════ */
.stats-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0.5rem 0.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.stats-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.stats-title {
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
}

.stats-streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #10B981;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

/* 4 Top Metric Cards Grid */
.stats-metrics-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.figma-metric-card {
    background: var(--surface-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.figma-metric-card:hover {
    border-color: rgba(193, 18, 31, 0.3);
    transform: translateY(-2px);
}

.figma-metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-card);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.figma-metric-value.cyan { color: #669BBC; }
.figma-metric-value.coral { color: #FFA586; }
.figma-metric-value.crimson { color: #C1121F; }
.figma-metric-value.cream { color: #FDF0D5; }

.figma-metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Charts Row */
.stats-charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.stats-card-box {
    background: var(--surface-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.stats-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stats-chart-wrapper {
    height: 190px;
    position: relative;
}

/* Activity Heatmap Card */
.heatmap-activity-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.75rem 0.25rem;
    scrollbar-width: none;
}
.heatmap-activity-row::-webkit-scrollbar { display: none; }

.heatmap-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.15s ease;
}

.heatmap-dot:hover {
    transform: scale(1.35);
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Macrosubjects List & Progress Bars */
.macro-subjects-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.macro-subject-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
}

.macro-subject-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 180px;
}

.macro-subject-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.macro-subject-bar-container {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1;
    max-width: 380px;
}

.macro-subject-bar-bg {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    overflow: hidden;
}

.macro-subject-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s ease;
}

.macro-subject-count {
    font-size: 0.88rem;
    font-weight: 700;
    min-width: 20px;
    text-align: right;
}

@media (max-width: 900px) {
    .stats-metrics-row { grid-template-columns: repeat(2, 1fr); }
    .stats-charts-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   MINHA CONTA (PROFILE & ACCOUNT MANAGEMENT)
   ═══════════════════════════════════════════════════════════════ */
.profile-view {
    max-width: 680px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    width: 100%;
    animation: slideUp 0.35s ease forwards;
}

.profile-card {
    background: var(--surface-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C1121F, #780000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.6rem;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(193, 18, 31, 0.4);
    flex-shrink: 0;
}

.profile-user-info h3 {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.profile-user-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.profile-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.badge-plan, .badge-role {
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-plan.free {
    background: rgba(102, 155, 188, 0.18);
    color: #669BBC;
    border-color: rgba(102, 155, 188, 0.35);
}

.badge-plan.starter {
    background: rgba(59, 130, 246, 0.18);
    color: #3B82F6;
    border-color: rgba(59, 130, 246, 0.35);
}

.badge-plan.pro {
    background: rgba(193, 18, 31, 0.18);
    color: #EF4444;
    border-color: rgba(193, 18, 31, 0.35);
}

.badge-plan.elite {
    background: rgba(139, 92, 246, 0.22);
    color: #A855F7;
    border-color: rgba(139, 92, 246, 0.45);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.badge-role.admin {
    background: rgba(245, 158, 11, 0.18);
    color: #F59E0B;
    border-color: rgba(245, 158, 11, 0.35);
}

.badge-role.user {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

html.light .profile-details {
    background: rgba(0, 0, 0, 0.02);
}

.profile-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.profile-detail-label {
    color: var(--text-muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.profile-section-title {
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

/* ═══════════════════════════════════════════════════════════════
   PAINEL ADMINISTRATIVO (ADMIN SAAS DASHBOARD)
   ═══════════════════════════════════════════════════════════════ */
.admin-view {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
    width: 100%;
    animation: slideUp 0.35s ease forwards;
}

.admin-card {
    background: var(--surface-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.admin-header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.admin-header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #C1121F, #780000);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.4rem;
    box-shadow: 0 0 20px rgba(193, 18, 31, 0.4);
    flex-shrink: 0;
}

.admin-header-text h3 {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.admin-header-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-tab-bar {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.35rem;
    border-radius: var(--radius-lg);
}

html.light .admin-tab-bar {
    background: rgba(0, 0, 0, 0.03);
}

.admin-tab-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.admin-tab-btn.active {
    background: rgba(193, 18, 31, 0.18);
    color: #EF4444;
    border-color: rgba(193, 18, 31, 0.35);
    box-shadow: 0 0 15px rgba(193, 18, 31, 0.2);
}

.admin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
}

@media (max-width: 800px) {
    .admin-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .admin-metrics-grid {
        grid-template-columns: 1fr;
    }
}

.admin-metric-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem 0.85rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

html.light .admin-metric-card {
    background: rgba(0, 0, 0, 0.02);
}

.admin-metric-card:hover {
    border-color: rgba(193, 18, 31, 0.35);
    transform: translateY(-2px);
}

.admin-metric-val {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-card);
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.admin-metric-lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.admin-search-bar {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.admin-table-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

html.light .admin-table-container {
    background: rgba(0, 0, 0, 0.02);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.admin-table th {
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-color);
}

html.light .admin-table th {
    background: rgba(0, 0, 0, 0.05);
}

.admin-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

html.light .admin-table tr:hover td {
    background: rgba(0, 0, 0, 0.03);
}

/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS & RESPONSIVE NAV
   ═══════════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.mobile-nav {
    display: none; position: fixed; bottom: 0; left: 0; width: 100%;
    background: rgba(9, 17, 31, 0.92); border-top: 1px solid var(--border-color);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); z-index: 1000; padding: 0.5rem 0.25rem;
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Ocultação total da barra inferior e layout de app para usuários deslogados */
.mobile-nav.hidden,
body.is-logged-out .mobile-nav,
body.landing-mode .mobile-nav,
body:not(.is-logged-in) .mobile-nav {
    display: none !important;
}

body.is-logged-out #sidebar,
body.landing-mode #sidebar,
body:not(.is-logged-in) #sidebar {
    display: none !important;
}

body.is-logged-out #mainHeader,
body.landing-mode #mainHeader,
body:not(.is-logged-in) #mainHeader {
    display: none !important;
}
.mobile-nav-items { 
    display: flex; 
    justify-content: space-around; 
    align-items: center; 
    width: 100%; 
    max-width: 540px; 
    margin: 0 auto; 
}
.mobile-nav-item {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; padding: 0.4rem 0.5rem;
    color: var(--text-muted); background: none; border: none; font-size: 0.68rem; font-weight: 600;
    transition: var(--transition); border-radius: var(--radius-sm);
}
.mobile-nav-item i { font-size: 1.15rem; }
.mobile-nav-item.active { color: var(--accent-cream); }

.sidebar-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6);
    z-index: 1400; opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.sidebar-backdrop.visible { display: block; opacity: 1; pointer-events: auto; }

@media (max-width: 768px) {
    :root {
        --glass-blur: none !important;
    }
    *, *::before, *::after {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }

    /* Prevent vanishing elements & GPU tile drops during momentum scroll */
    .content-area {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 95px;
    }

    /* Always show touch action buttons on mobile */
    .card-list-item {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
        padding: 0.85rem 1rem;
    }
    .card-list-item .card-actions-btns {
        opacity: 1 !important;
    }
    .deck-menu-btn {
        opacity: 0.85 !important;
    }

    /* Sidebar Drawer Dimensions */
    .sidebar {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        width: min(285px, 84vw) !important;
        height: 100%;
        z-index: 1500;
        transform: translate3d(-105%, 0, 0);
        transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
        box-shadow: none;
        background: #0b0f19 !important;
        border-right: 1px solid var(--border-color);
        will-change: transform;
    }
    .sidebar.mobile-open {
        transform: translate3d(0, 0, 0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.8);
    }
    .sidebar-backdrop {
        background: rgba(0, 0, 0, 0.75) !important;
    }
    #mobileMenuBtn {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* App Header Tuning on Mobile */
    .header {
        padding: 0.5rem 0.85rem !important;
        min-height: 52px;
    }
    .header-subtitle {
        display: none !important;
    }
    .header-title {
        font-size: 1.05rem !important;
        line-height: 1.2;
        max-width: 140px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .header-right {
        gap: 0.4rem !important;
    }
    .header-right #studyBtn,
    .header-right #addCardBtn,
    .header-right #bulkAddBtn,
    .header-right #aiBtn,
    .header-right #statsToggleBtn {
        display: none !important;
    }
    #creditsBtn {
        padding: 4px 8px !important;
        font-size: 0.78rem !important;
    }
    #creditsBtn span:last-child {
        display: none !important;
    }

    /* Mobile Bottom Navigation Bar - Apenas exibida para usuários logados no app */
    body.is-logged-in .mobile-nav:not(.hidden) {
        display: block !important;
        background: #09111f !important;
        padding: 0.4rem 0.2rem !important;
        padding-bottom: max(0.4rem, env(safe-area-inset-bottom)) !important;
        border-top: 1px solid var(--border-color) !important;
    }
    .mobile-nav-items {
        max-width: 100% !important;
    }
    .mobile-nav-item {
        font-size: 0.65rem !important;
        padding: 0.35rem 0.25rem !important;
        gap: 0.15rem !important;
        white-space: nowrap !important;
    }
    .mobile-nav-item i {
        font-size: 1.05rem !important;
    }

    /* Landing Top Nav Bar on Mobile */
    .landing-nav-bar {
        padding: 0.75rem 1rem !important;
        gap: 0.5rem !important;
    }
    .landing-brand-title {
        font-size: 1.1rem !important;
    }
    .landing-brand-meta {
        display: none !important;
    }
    .landing-nav-actions {
        gap: 0.4rem !important;
    }
    .landing-nav-actions .btn-editorial-primary,
    .landing-nav-actions .btn-editorial-secondary {
        padding: 0.42rem 0.75rem !important;
        font-size: 0.76rem !important;
        white-space: nowrap;
    }

    /* Landing Hero & Showcase Grid Fix */
    .landing-hero {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 2.25rem 1rem 2.5rem 1rem !important;
        gap: 2rem !important;
    }
    .landing-hero-content {
        min-width: 0 !important;
        width: 100% !important;
    }
    .landing-headline {
        font-size: clamp(1.85rem, 6.5vw, 2.45rem) !important;
        line-height: 1.18 !important;
        word-break: break-word;
        margin-bottom: 1rem !important;
    }
    .landing-subhead {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
        max-width: 100% !important;
        margin-bottom: 1.5rem !important;
    }
    .landing-hero-actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }
    .landing-hero-actions .btn-editorial-primary,
    .landing-hero-actions .btn-editorial-secondary {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* Showcase Card & Mode Tabs */
    .product-slate-card {
        min-width: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 1.15rem 0.85rem !important;
    }
    .slate-mode-tabs {
        max-width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 6px;
    }
    .slate-mode-tabs::-webkit-scrollbar {
        display: none;
    }
    .slate-mode-btn {
        padding: 5px 10px !important;
        font-size: 0.72rem !important;
        flex-shrink: 0;
    }
    .slate-card-content {
        padding: 1rem 0.85rem !important;
    }
    .slate-sm2-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.4rem !important;
    }
    .slate-sm2-btn {
        padding: 0.5rem 0.25rem !important;
        font-size: 0.72rem !important;
    }

    /* Modals & Dialogs on Mobile */
    .modal {
        width: 95vw !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        padding: 1.25rem 1rem !important;
        border-radius: 14px !important;
        margin: auto !important;
        box-sizing: border-box !important;
    }
    .modal-overlay {
        padding: 0.5rem !important;
        align-items: center !important;
    }
    .plans-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
    .landing-plans-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .credit-packages-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
    }
    .billing-cycle-switch, .cycle-toggle-wrapper {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    /* Search & Editor on Mobile */
    .search-box input {
        width: 100px;
    }
    .editor-fields {
        grid-template-columns: 1fr;
    }
    .editor-field:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    /* Study View & Flashcard on Mobile */
    .study-view {
        padding: 0.75rem !important;
    }
    .card-container {
        max-width: 100% !important;
        min-height: 230px !important;
    }
    .choice-grid {
        grid-template-columns: 1fr !important;
    }
    .rating-buttons {
        gap: 0.4rem !important;
        flex-wrap: wrap !important;
    }
    .rating-btn {
        flex: 1 1 calc(50% - 0.4rem) !important;
        padding: 0.65rem 0.5rem !important;
        font-size: 0.8rem !important;
        min-width: 0 !important;
    }
    .stats-panel {
        width: 100% !important;
    }
    .welcome-title {
        font-size: 1.8rem;
    }
    .welcome-actions {
        flex-direction: column;
        align-items: center;
    }

    /* Technical Registry Table on Mobile */
    .ledger-registry-wrapper {
        padding: 1rem 0.65rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .ledger-table {
        font-size: 0.78rem !important;
    }
    .ledger-table th, .ledger-table td {
        padding: 0.6rem 0.5rem !important;
    }
}

body.sidebar-active-lock {
    overflow: hidden !important;
    touch-action: none;
}

/* Shortcuts, Highlight & Extra SaaS Views */
.shortcuts-list { display: flex; flex-direction: column; gap: 0.15rem; }
.shortcut-row { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-bottom: 1px solid var(--border-color); }
.shortcut-row:last-child { border-bottom: none; }
kbd {
    background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border-color); padding: 0.2rem 0.5rem;
    border-radius: 6px; font-family: monospace; font-size: 0.8rem; color: var(--text-primary); font-weight: 600;
}
mark.search-highlight { background: rgba(193, 18, 31, 0.35); color: inherit; border-radius: 2px; padding: 0 2px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; color: var(--accent-crimson); opacity: 0.6; }
.empty-state h3 { font-size: 1.15rem; color: var(--text-primary); margin-bottom: 0.4rem; }
.empty-state p { font-size: 0.9rem; max-width: 320px; }

/* ═══════════════════════════════════════════════════════════════
   LIGHT MODE — VIBRANT LIGHT GLASSMORPHISM SYSTEM
   ═══════════════════════════════════════════════════════════════ */
html.light {
    --bg-primary: #eef2f9;
    --bg-secondary: rgba(255, 255, 255, 0.85);
    --bg-tertiary: rgba(0, 48, 73, 0.05);
    --bg-quaternary: rgba(0, 48, 73, 0.08);
    --surface: rgba(255, 255, 255, 0.72);
    --surface-hover: rgba(255, 255, 255, 0.9);
    --surface-glass: rgba(255, 255, 255, 0.65);
    
    --text-primary: #09111f;
    --text-secondary: rgba(9, 17, 31, 0.75);
    --text-muted: #556075;
    
    --border-color: rgba(255, 255, 255, 0.65);
    --border-hover: rgba(193, 18, 31, 0.4);
    
    --shadow-sm: 0 2px 10px rgba(0, 48, 73, 0.06);
    --shadow-md: 0 6px 22px rgba(0, 48, 73, 0.08);
    --shadow-lg: inset 0 1.5px 0 #ffffff, 0 14px 40px rgba(0, 48, 73, 0.1);
    --shadow-glow: 0 4px 20px rgba(193, 18, 31, 0.35);
}

html.light body {
    background: radial-gradient(ellipse 70% 55% at 12% 28%, rgba(193, 18, 31, 0.22) 0%, transparent 65%),
                radial-gradient(ellipse 55% 45% at 88% 72%, rgba(102, 155, 188, 0.3) 0%, transparent 65%),
                radial-gradient(ellipse 30% 25% at 75% 10%, rgba(255, 165, 134, 0.25) 0%, transparent 50%),
                #eef2f9;
    color: var(--text-primary);
}

html.light ::-webkit-scrollbar-thumb { background: rgba(0, 48, 73, 0.15); }
html.light ::-webkit-scrollbar-thumb:hover { background: rgba(0, 48, 73, 0.3); }

/* Sidebar & Header Glass - Light Mode */
html.light .sidebar {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

html.light .sidebar-header, 
html.light .sidebar-user-footer {
    border-color: rgba(0, 0, 0, 0.08);
}

html.light .sidebar-logo-title {
    color: #0f172a;
}

html.light .sidebar-logo-sub {
    color: #64748b;
}

html.light .sidebar-nav-item {
    color: #475569;
}

html.light .sidebar-nav-item:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.04);
}

html.light .sidebar-nav-item.active {
    background: rgba(193, 18, 31, 0.12);
    color: #C1121F;
    border-color: rgba(193, 18, 31, 0.25);
}

html.light .sidebar-nav-header span {
    color: #64748b;
}

html.light .deck-name {
    color: #1e293b;
}

html.light .deck-item:hover .deck-name,
html.light .deck-item.active .deck-name {
    color: #0f172a;
}

html.light .sidebar-user-name {
    color: #0f172a;
}

html.light .sidebar-user-meta {
    color: #64748b;
}

html.light .deck-chip-ok {
    color: #64748b;
}

html.light .deck-item {
    border-color: transparent;
}

html.light .deck-item:hover {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.06);
}

html.light .deck-item.active {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

html.light .header {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Buttons & Controls */
html.light .btn-primary {
    background: var(--accent-gradient);
    color: var(--accent-cream);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 20px rgba(193, 18, 31, 0.35);
}
html.light .btn-primary:hover {
    background: linear-gradient(135deg, #d61523, #8a0000);
    box-shadow: 0 6px 25px rgba(193, 18, 31, 0.5);
}

html.light .btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    color: #09111f;
    box-shadow: inset 0 1px 0 #ffffff, 0 2px 8px rgba(0, 48, 73, 0.05);
}
html.light .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(193, 18, 31, 0.3);
    color: #C1121F;
}

html.light .btn-icon {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #09111f;
}
html.light .btn-icon:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(193, 18, 31, 0.3);
    color: #C1121F;
}

html.light .search-box {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.8);
}
html.light .search-box input {
    color: #09111f;
}
html.light .search-box:focus-within {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(193, 18, 31, 0.5);
    box-shadow: 0 0 15px rgba(193, 18, 31, 0.25);
}

/* Cards & Dashboard */
html.light .welcome-deck-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1.5px 0 #ffffff, 0 10px 30px rgba(0, 48, 73, 0.08);
}
html.light .welcome-deck-card:hover {
    border-color: rgba(193, 18, 31, 0.35);
    box-shadow: inset 0 1.5px 0 #ffffff, 0 14px 40px rgba(193, 18, 31, 0.2);
}

html.light .card-list-item {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: inset 0 1.5px 0 #ffffff, 0 4px 15px rgba(0, 48, 73, 0.05);
}
html.light .card-list-item:hover {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(193, 18, 31, 0.35);
}

/* 3D Study Flashcard */
html.light .card-face {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 2px 0 #ffffff, 0 16px 45px rgba(0, 48, 73, 0.12);
}
html.light .card-face .card-content {
    color: #09111f;
}
html.light .card-face .card-content code {
    background: rgba(0, 48, 73, 0.08);
    color: #C1121F;
}
html.light .card-face .card-content pre {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 48, 73, 0.1);
    color: #09111f;
}

html.light .study-mode-tabs {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

html.light .rating-btn {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 48, 73, 0.12);
    color: #09111f;
    box-shadow: inset 0 1px 0 #ffffff, 0 4px 12px rgba(0, 48, 73, 0.05);
}
html.light .rating-btn.again { border-color: #C1121F; background: rgba(193, 18, 31, 0.12); }
html.light .rating-btn.again:hover { background: rgba(193, 18, 31, 0.25); }
html.light .rating-btn.hard { border-color: #F59E0B; background: rgba(245, 158, 11, 0.12); }
html.light .rating-btn.hard:hover { background: rgba(245, 158, 11, 0.24); }
html.light .rating-btn.good { border-color: #10B981; background: rgba(16, 185, 129, 0.12); }
html.light .rating-btn.good:hover { background: rgba(16, 185, 129, 0.24); }
html.light .rating-btn.easy { border-color: #669BBC; background: rgba(102, 155, 188, 0.15); }
html.light .rating-btn.easy:hover { background: rgba(102, 155, 188, 0.28); }

html.light .type-answer-input {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.9);
    color: #09111f;
}
html.light .type-answer-input:focus {
    border-color: rgba(193, 18, 31, 0.5);
    box-shadow: 0 0 15px rgba(193, 18, 31, 0.25);
}

html.light .choice-btn {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    color: #09111f;
}
html.light .choice-btn .choice-letter {
    background: rgba(0, 48, 73, 0.08);
    color: #09111f;
}

/* Editor */
html.light .editor-toolbar {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 48, 73, 0.1);
}
html.light .editor-field {
    background: rgba(255, 255, 255, 0.9);
    color: #09111f;
}
html.light .editor-field:first-child {
    border-right-color: rgba(0, 48, 73, 0.1);
}
html.light .editor-tag-area {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
}

/* Modals & Popups */
html.light .modal-overlay {
    background: rgba(9, 17, 31, 0.45);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
html.light .modal {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: inset 0 2px 0 #ffffff, 0 20px 60px rgba(0, 48, 73, 0.18);
}
html.light .form-control {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(0, 48, 73, 0.12);
    color: #09111f;
}
html.light .form-control:focus {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(193, 18, 31, 0.5);
    box-shadow: 0 0 15px rgba(193, 18, 31, 0.25);
}
html.light .file-drop-zone, html.light .pdf-drop-zone {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 48, 73, 0.15);
}

/* Stats Panel & Toasts */
html.light .stats-panel {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px);
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: -10px 0 35px rgba(0, 48, 73, 0.1);
}
html.light .stats-panel-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: rgba(0, 48, 73, 0.08);
}
html.light .stat-card {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(255, 255, 255, 0.9);
}

html.light .context-menu {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 48, 73, 0.12);
}
html.light .context-menu-item:hover {
    background: rgba(193, 18, 31, 0.08);
}

html.light .toast {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    color: #09111f;
    box-shadow: inset 0 1.5px 0 #ffffff, 0 10px 30px rgba(0, 48, 73, 0.12);
}

html.light .mobile-nav {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
}
html.light .mobile-nav-item.active {
    color: var(--accent-crimson);
}
html.light kbd {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 48, 73, 0.12);
    color: #09111f;
}

/* ══════════════════════════════════════════════════════
   SAAS PLANS, BILLING & CREDITS MODAL (ABACATEPAY)
══════════════════════════════════════════════════════ */
.plans-user-status-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(124, 58, 237, 0.25);
    border-radius: var(--radius-lg, 12px);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}
.plans-user-status-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.plans-user-status-left i {
    font-size: 1.6rem;
    color: #f59e0b;
}
.plans-status-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}
.plans-status-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Billing Cycle Switcher */
.billing-cycle-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    margin: 1.5rem 0 1.75rem 0;
    user-select: none;
}
.cycle-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast, 0.2s);
}
.cycle-label.active {
    color: var(--text-primary);
}
.discount-badge {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
    margin-left: 4px;
}
.cycle-toggle-track {
    width: 46px;
    height: 24px;
    background: var(--bg-tertiary, #1e293b);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background var(--transition-fast, 0.2s);
}
.cycle-toggle-track.yearly {
    background: var(--accent-violet, #7c3aed);
}
.cycle-toggle-knob {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: transform var(--transition-fast, 0.2s);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.cycle-toggle-track.yearly .cycle-toggle-knob {
    transform: translateX(22px);
}

/* 4 Plans Grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.plan-card {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 12px);
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform var(--transition-fast, 0.2s), border-color var(--transition-fast, 0.2s), box-shadow var(--transition-fast, 0.2s);
}
.plan-card:hover {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.plan-card.popular {
    border: 2px solid var(--accent-violet, #7c3aed);
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.08) 0%, var(--bg-secondary) 100%);
}
.plan-card.current {
    border-color: #10b981;
}
.plan-card-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.4);
    white-space: nowrap;
}
.plan-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}
.plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.plan-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-height: 2.2rem;
    line-height: 1.25;
}
.plan-price-wrap {
    margin: 0.75rem 0 0.25rem 0;
}
.plan-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}
.plan-price-period {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.plan-credits-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: 0.35rem;
}
.plan-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem 0;
    flex-grow: 1;
}
.plan-feature-item {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.3;
}
.plan-feature-item i {
    color: #10b981;
    font-size: 0.75rem;
    margin-top: 2px;
    flex-shrink: 0;
}
.plan-cta-btn {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all var(--transition-fast, 0.2s);
}

/* Credit Packages Add-on */
.credit-packages-section {
    background: var(--bg-tertiary, rgba(255, 255, 255, 0.02));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-lg, 12px);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.credit-packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.credit-pack-card {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.04));
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 8px);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform var(--transition-fast, 0.2s), border-color var(--transition-fast, 0.2s);
}
.credit-pack-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.4);
}
.credit-pack-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.credit-pack-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
}
.credit-pack-price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #f59e0b;
    margin: 0.35rem 0;
}
.credit-pack-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.abacate-trust-footer {
    padding-top: 0.5rem;
    text-align: center;
}

/* ══════════════════════════════════════════════════════
   SAAS LANDING & PLANS — UNIFIED VISUAL IDENTITY
   ══════════════════════════════════════════════════════ */
.landing-container {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-ui);
    overflow-x: hidden;
    position: relative;
}

/* Top Navigation */
.landing-nav-bar {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.landing-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
.landing-brand-title {
    font-family: var(--font-ui);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.landing-brand-meta {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.landing-status-pip-wrap {
    display: none;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 4px 12px;
    border-radius: 20px;
}
@media (min-width: 768px) {
    .landing-status-pip-wrap { display: flex; }
}
.live-pip {
    width: 7px;
    height: 7px;
    background: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10B981;
    animation: pipPulse 2s infinite ease-in-out;
}
@keyframes pipPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}
.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Hero Section */
.landing-hero {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4.5rem 1.5rem 3.5rem 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
}
.landing-hero-content {
    min-width: 0;
}
@media (min-width: 992px) {
    .landing-hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
        padding: 5.5rem 1.5rem 4.5rem 1.5rem;
    }
}
.landing-kicker {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-primary-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(193, 18, 31, 0.12);
    border: 1px solid rgba(193, 18, 31, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
}
.landing-headline {
    font-family: var(--font-ui);
    font-size: clamp(2.2rem, 4.8vw, 3.6rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-wrap: balance;
}
.landing-subhead {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--text-secondary);
    max-width: 54ch;
    margin-bottom: 2rem;
}
.landing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}
.btn-editorial-primary {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 0.85rem 1.75rem;
    background: var(--accent-primary);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-editorial-primary:hover {
    background: var(--accent-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(193, 18, 31, 0.35);
}
.btn-editorial-secondary {
    font-family: var(--font-ui);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.85rem 1.5rem;
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 8px);
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.btn-editorial-secondary:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Product UI Slate (Simulated Live Showcase) */
.product-slate-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Product UI Slate Mode Switcher Tabs */
.slate-mode-tabs {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    overflow-x: auto;
    padding-bottom: 2px;
}
.slate-mode-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.slate-mode-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.25);
}
.slate-mode-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(193, 18, 31, 0.35);
}

.slate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.slate-deck-tag {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-primary-light);
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}
.slate-telemetry {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}
.slate-card-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.slate-question-lbl {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.slate-question-text {
    font-family: var(--font-ui);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 1rem;
}
.slate-answer-box {
    border-left: 3px solid var(--accent-primary);
    padding-left: 0.85rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.slate-sm2-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: 1rem;
}
.slate-sm2-btn {
    padding: 0.6rem 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: var(--transition);
}
.slate-sm2-btn strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

/* Quiz Preview Options */
.slate-quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.slate-quiz-option {
    padding: 0.7rem 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.84rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}
.slate-quiz-option.correct {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10B981;
    color: var(--text-primary);
    font-weight: 600;
}
.slate-quiz-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #10B981;
    color: #ffffff;
    font-weight: 700;
}

/* Typing / Active Recall Preview */
.slate-typing-input-box {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.86rem;
    color: var(--text-primary);
    margin: 0.75rem 0;
    line-height: 1.4;
}
.slate-ai-feedback-box {
    background: rgba(193, 18, 31, 0.06);
    border-left: 3px solid var(--accent-primary);
    border-radius: 0 8px 8px 0;
    padding: 0.75rem 1rem;
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

/* Exam / Simulado Header & Progress */
.slate-exam-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.6rem 0 1rem 0;
}
.slate-exam-progress-fill {
    width: 75%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #10B981);
    border-radius: 3px;
}

/* Plans Section */
.landing-plans-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem 1.5rem;
    border-top: 1px solid var(--border-color);
}
.section-header-editorial {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-kicker {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-primary-light);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(193, 18, 31, 0.12);
    border: 1px solid rgba(193, 18, 31, 0.25);
    padding: 4px 12px;
    border-radius: 20px;
}
.section-title-editorial {
    font-family: var(--font-ui);
    font-size: clamp(2rem, 3.8vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}
.section-desc-editorial {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 52ch;
    margin: 0 auto;
    line-height: 1.55;
}

/* Plans Grid */
.landing-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3.5rem;
}
.landing-plan-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: var(--transition);
}
.landing-plan-card:hover {
    border-color: rgba(193, 18, 31, 0.4);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.landing-plan-card.featured {
    background: linear-gradient(180deg, rgba(193, 18, 31, 0.08) 0%, var(--bg-secondary) 100%);
    border: 2px solid var(--accent-primary);
    box-shadow: var(--shadow-glow);
}
.plan-tier-code {
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}
.landing-plan-card.featured .plan-tier-code {
    color: var(--accent-primary-light);
}
.plan-title-editorial {
    font-family: var(--font-ui);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.plan-desc-editorial {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    min-height: 2.5rem;
    margin-bottom: 1.25rem;
}
.plan-pricing-box {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.price-value-editorial {
    font-family: var(--font-ui);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.price-period-editorial {
    font-family: var(--font-ui);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 4px;
}
.plan-credits-pill-editorial {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--text-secondary);
    margin-top: 0.4rem;
}
.plan-feature-list-editorial {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
}
.plan-feature-item-editorial {
    font-family: var(--font-ui);
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}
.plan-feature-item-editorial i {
    color: #10B981;
    font-size: 0.75rem;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Technical Ledger Registry Table */
.ledger-registry-wrapper {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 1.75rem;
    overflow-x: auto;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}
.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
    font-family: var(--font-ui);
}
.ledger-table th {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}
.ledger-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
}
.ledger-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}
.ledger-table td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Auth Drawer / Direct Signup Form */
.signup-drawer-panel {
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.plan-pinned-badge {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(193, 18, 31, 0.12);
    border: 1px solid rgba(193, 18, 31, 0.35);
    color: var(--accent-primary-light);
    padding: 8px 14px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Google Auth Button Styling (Centered & Styled) */
.google-auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}
.google-btn-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
}
.google-btn-slot > div {
    display: flex !important;
    justify-content: center !important;
    margin: 0 auto !important;
}
.google-btn-slot iframe {
    margin: 0 auto !important;
    border-radius: 8px !important;
}
.google-btn-custom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 8px);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.google-btn-custom:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.google-btn-custom svg {
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Landing Footer & Legal Section */
.landing-footer {
    max-width: 1240px;
    margin: 4rem auto 0 auto;
    padding: 3.5rem 1.5rem 2.5rem 1.5rem;
    border-top: 1px solid var(--border-color);
    font-family: var(--font-ui);
}

.landing-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 900px) {
    .landing-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.landing-footer-col.brand-col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-col-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.footer-cnpj-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.footer-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-contact-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.6rem 0.85rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 8px);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-btn:hover {
    background: var(--surface);
    border-color: var(--accent-primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.footer-contact-btn.whatsapp i {
    color: #10B981;
    font-size: 1.3rem;
}

.footer-contact-btn.email i {
    color: var(--accent-primary-light);
    font-size: 1.1rem;
}

.contact-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}

.contact-val {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-legal-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-legal-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 6px 0;
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-size: 0.84rem;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.footer-legal-btn i {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-legal-btn:hover {
    color: var(--text-primary);
    transform: translateX(3px);
}

.footer-legal-btn:hover i {
    color: var(--accent-primary-light);
}

.landing-footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-trust-pills {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Subtle Credit Cost & Balance Badges */
.credit-cost-micro-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #F59E0B;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: 0.02em;
    vertical-align: middle;
    transition: var(--transition);
}

.credit-cost-micro-badge i {
    font-size: 0.65rem;
}

.user-credits-header-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--text-primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.user-credits-header-pill:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.45);
    transform: translateY(-1px);
}

.user-credits-header-pill strong {
    color: #F59E0B;
}

/* ═══════════════════════════════════════════════════════════════
   LANDING NICHES & SPECIALIZATIONS (SEO SECTION)
   ═══════════════════════════════════════════════════════════════ */
.landing-niches-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 4rem 1.5rem;
}

.landing-niches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-top: 2rem;
}

.niche-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 16px);
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.niche-card:hover {
    border-color: rgba(193, 18, 31, 0.35);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.niche-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.niche-badge {
    display: inline-flex;
    align-self: flex-start;
    font-family: var(--font-ui);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 8px;
    border-radius: 6px;
    border: 1px solid rgba(193, 18, 31, 0.3);
    color: var(--accent-primary-light);
    background: rgba(255, 255, 255, 0.02);
    margin-bottom: 0.65rem;
}

.niche-title {
    font-family: var(--font-ui);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.niche-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex: 1;
}

.niche-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.niche-tags span {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   LANDING FAQ SECTION WITH ACCORDION (RICH SNIPPETS SEO)
   ═══════════════════════════════════════════════════════════════ */
.landing-faq-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem 1.5rem;
}

.faq-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 2.25rem;
}

.faq-accordion-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    transition: var(--transition);
}

.faq-accordion-item:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-accordion-item.open {
    border-color: var(--accent-primary);
    background: linear-gradient(180deg, rgba(193, 18, 31, 0.04) 0%, var(--bg-secondary) 100%);
}

.faq-question-btn {
    width: 100%;
    padding: 1.15rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-ui);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    gap: 1rem;
    transition: color var(--transition-fast);
}

.faq-question-btn:hover {
    color: var(--accent-primary-light);
}

.faq-chevron {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.faq-accordion-item.open .faq-chevron {
    transform: rotate(180deg);
    color: var(--accent-primary-light);
}

.faq-answer-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    padding: 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.faq-accordion-item.open .faq-answer-content {
    max-height: 400px;
    padding: 0 1.25rem 1.25rem 1.25rem;
}

.faq-answer-content p {
    margin: 0;
}

.faq-answer-content code {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.82rem;
    color: var(--accent-primary-light);
}

@media (max-width: 768px) {
    .landing-niches-section {
        padding: 2.5rem 1rem 3rem 1rem !important;
    }
    .landing-niches-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    .niche-card {
        padding: 1.35rem 1.15rem !important;
    }
    .landing-faq-section {
        padding: 2.5rem 1rem 3.5rem 1rem !important;
    }
    .faq-question-btn {
        padding: 1rem !important;
        font-size: 0.88rem !important;
    }
    .faq-answer-content {
        font-size: 0.85rem !important;
        line-height: 1.55 !important;
    }
}

/* ══════════════════════════════════════════════════════
   AI LOCKED & UPGRADE PROMPT STYLES (FREE PLAN LOCK)
══════════════════════════════════════════════════════ */
.sidebar-lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 999px;
    margin-left: auto;
    gap: 3px;
    transition: all 0.2s ease;
}

.sidebar-nav-item:hover .sidebar-lock-badge {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    color: #ffffff;
}

.ai-locked-modal-header {
    text-align: center;
    padding: 0.5rem 0 0.5rem 0;
}

.ai-locked-icon-wrapper {
    width: 58px;
    height: 58px;
    margin: 0 auto 0.85rem auto;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18) 0%, rgba(245, 158, 11, 0.18) 100%);
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.2);
    animation: lockPulse 3s ease-in-out infinite alternate;
}

@keyframes lockPulse {
    0% { transform: scale(1); box-shadow: 0 0 15px rgba(245, 158, 11, 0.2); }
    100% { transform: scale(1.05); box-shadow: 0 0 28px rgba(245, 158, 11, 0.4); }
}

.ai-locked-icon-wrapper i {
    font-size: 1.6rem;
    color: #f59e0b;
}

.ai-locked-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.25rem 0 1rem 0;
}

@media (max-width: 540px) {
    .ai-locked-options-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }
}

.ai-locked-option-card {
    background: var(--bg-tertiary, #111827);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
    border-radius: var(--radius-lg, 12px);
    padding: 1.15rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.ai-locked-option-card:hover {
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.4);
}

.ai-locked-option-card.featured {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.14) 0%, rgba(17, 24, 39, 0.95) 100%);
    border-color: rgba(124, 58, 237, 0.45);
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.15);
}

.ai-locked-option-card.featured:hover {
    border-color: rgba(168, 85, 247, 0.7);
    box-shadow: 0 6px 25px rgba(124, 58, 237, 0.25);
}

.ai-locked-badge-pill {
    position: absolute;
    top: -10px;
    right: 12px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}


