@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Colors - Premium Dark Mode */
    --bg-primary: #0a0e17; /* Deepest space blue/black */
    --bg-secondary: #121826;
    --bg-card: rgba(255, 255, 255, 0.02);
    --bg-glass: rgba(18, 24, 38, 0.6);
    --bg-glass-hover: rgba(25, 34, 52, 0.8);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #ff6b00; /* Vibrant Neon Orange */
    --accent-hover: #ff8533;
    --accent-glow: rgba(255, 107, 0, 0.4);
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);
    --warning: #f59e0b;
    --info: #3b82f6;

    --border-light: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(255, 107, 0, 0.5);

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5), 0 2px 4px -1px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5), 0 4px 6px -2px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 15px var(--accent-glow);
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s ease-out;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden; /* For Flush App Layout */
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

button, input, select, textarea {
    font-family: inherit;
    color: inherit;
    outline: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.text-center { text-align: center; }

/* Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

.hidden { display: none !important; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 15px var(--accent-glow); }
    50% { box-shadow: 0 0 30px rgba(255, 107, 0, 0.6); }
}

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

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Global SaaS App Layout (Flush Architecture) */
.app-main-wrapper {
    flex: 1;
    display: flex;
    min-height: 0;
    overflow: hidden;
}

.app-main-wrapper:has(.panel-page) {
    flex-direction: column;
}

.panel-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow: hidden;
}

.panel-page .mobile-tabs {
    flex-shrink: 0;
    margin: var(--spacing-sm) var(--spacing-md) 0;
}

.panel-page .app-layout {
    flex: 1;
    min-height: 0;
}

.app-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.app-sidebar-left {
    width: 300px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-sidebar-right {
    width: 360px;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-canvas {
    flex: 1;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.04), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.03), transparent 50%);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
}

/* Sections and Headers in Sidebar */
.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-primary);
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.sidebar-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.08);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.sidebar-header-title {
    flex: 1;
    min-width: 0;
}

.sidebar-header-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.sidebar-body {
    padding: var(--spacing-md) var(--spacing-lg);
}

.sidebar-body-flush {
    padding: 0;
    overflow: hidden;
}

.sidebar-body-scroll {
    padding: 1rem 1.25rem;
    overflow-y: auto;
    gap: 0.85rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.canvas-header {
    padding: var(--spacing-md) 1rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-shrink: 0;
}

.canvas-header-main {
    min-width: 0;
    flex: 1;
}

.canvas-header-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    word-break: break-word;
}

.canvas-header-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.canvas-header-subtitle.is-document-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.canvas-close-btn {
    background: transparent !important;
    border: 1px solid var(--border-light) !important;
    flex-shrink: 0;
}

.workspace-content {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.workspace-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md) 1rem;
    width: 100%;
    min-height: 0;
    overflow-y: auto;
}

.workspace-editor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 280px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.light-theme .workspace-editor-card {
    background: rgba(255, 255, 255, 0.75);
}

.panel-page .editor-toolbar {
    margin: 0;
    border-bottom: 1px solid var(--border-light);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.25);
}

.panel-page .editor-toolbar.is-hidden {
    display: none;
}

.editor-toolbar-spacer {
    flex: 1;
}

.panel-page .ai-edit-btn {
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.2);
}

.panel-page .seamless-editor-content {
    flex: 1;
    padding: var(--spacing-md) 1rem;
    font-size: 1.05rem;
    line-height: 1.7;
    border: none;
    outline: none;
    min-height: 200px;
}

.panel-page .seamless-editor-content p {
    margin-bottom: 1rem;
}

.panel-page .seamless-editor-content h1,
.panel-page .seamless-editor-content h2,
.panel-page .seamless-editor-content h3 {
    font-size: inherit;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.panel-page .seamless-editor-content em,
.panel-page .seamless-editor-content i {
    color: var(--text-muted);
    font-style: italic;
}

.panel-page .editor-stats-bar {
    margin: 0;
    border-top: 1px dashed var(--border-light);
    background: transparent;
}

.panel-page .editor-stats-bar.is-hidden {
    display: none;
}

.workspace-audio-panel {
    flex-shrink: 0;
}

.audio-panel-prompt-neutral {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
}

.custom-audio-player-neutral {
    background: transparent;
    border: 1px solid var(--border-light);
    margin-top: var(--spacing-sm);
}

.workspace-footer-actions {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    flex-shrink: 0;
    padding-top: var(--spacing-xs);
}

.workspace-footer-actions > .btn {
    flex: 1;
    min-width: 120px;
    background: transparent;
    border: 1px solid var(--border-light);
}

@media (max-width: 640px) {
    .canvas-header {
        align-items: flex-start;
    }

    .workspace-body {
        padding: var(--spacing-sm) 0.75rem;
    }

    .canvas-header {
        padding: var(--spacing-sm) 0.75rem;
    }

    .workspace-footer-actions > .btn {
        min-width: calc(50% - var(--spacing-sm));
    }
}

/* Forms & Inputs */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
    background: rgba(0, 0, 0, 0.3);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
}
select.form-control option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Custom Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}
.checkbox-label:hover {
    color: var(--text-primary);
}
.checkbox-input {
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
}
.checkbox-input:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}
.checkbox-input:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #e65c00);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline:hover {
    background: rgba(255, 107, 0, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.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.25);
}

/* Navbar */
.navbar {
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.navbar-container {
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Site logo */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: inherit;
    line-height: 0;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    font: inherit;
}

.site-logo-image {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.site-logo--navbar .site-logo-image {
    height: 36px;
}

.site-logo--auth.site-logo {
    margin-bottom: 0.75rem;
}

.site-logo--auth .site-logo-image {
    height: 44px;
}

.site-logo--auth-mobile.site-logo {
    margin: 0;
}

.site-logo--auth-mobile .site-logo-image {
    height: 34px;
}

.site-logo--admin .site-logo-image {
    height: 28px;
}

.site-logo--presentation .site-logo-image {
    height: 32px;
}

.site-logo-divider {
    flex-shrink: 0;
    width: 1px;
    height: 1.35rem;
    margin: 0 0.7rem;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 107, 0, 0.45) 18%,
        rgba(255, 107, 0, 0.45) 82%,
        transparent 100%
    );
    opacity: 0.85;
}

.site-logo-tagline {
    flex-shrink: 0;
    font-family: 'Cinzel', 'Georgia', 'Times New Roman', serif;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.34em;
    text-transform: uppercase;
    color: var(--accent-primary);
    line-height: 1;
    white-space: nowrap;
    padding-top: 0.05rem;
}

.site-logo--auth .site-logo-tagline {
    font-size: 0.68rem;
    letter-spacing: 0.36em;
}

.site-logo--auth-mobile .site-logo-tagline {
    font-size: 0.56rem;
    letter-spacing: 0.28em;
}

.site-logo--admin .site-logo-tagline {
    font-size: 0.54rem;
    letter-spacing: 0.3em;
}

.site-logo--presentation .site-logo-tagline {
    color: var(--accent-primary);
}

.site-logo-suffix {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    line-height: 1.2;
}

.light-theme .site-logo-suffix {
    color: var(--text-muted);
}

.light-theme .site-logo-tagline {
    color: var(--accent-primary);
}

.light-theme .site-logo-divider {
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(255, 107, 0, 0.35) 18%,
        rgba(255, 107, 0, 0.35) 82%,
        transparent 100%
    );
}

.presentation-brand .site-logo-suffix {
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 640px) {
    .site-logo--navbar .site-logo-tagline,
    .site-logo--navbar .site-logo-divider {
        display: none;
    }
}

/* Site Footer */
.site-footer {
    flex-shrink: 0;
    border-top: none;
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
}

.site-footer-inner {
    position: relative;
    width: 100%;
    min-height: 3.25rem;
    padding: 0.55rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.site-footer-left {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    z-index: 1;
}

.site-footer-legal {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.78);
    white-space: nowrap;
}

.site-footer-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.site-footer-right {
    flex: 1 1 0;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    z-index: 1;
}

.site-footer-copy {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    white-space: nowrap;
}

.site-footer-right a {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: color var(--transition-fast);
    white-space: nowrap;
}

.site-footer-right a:hover {
    color: #fff;
}

.site-footer-partner-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    opacity: 0.98;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.site-footer-partner-logo:hover {
    opacity: 1;
    transform: scale(1.03);
}

.site-footer-partner-logo img {
    display: block;
    height: 28px;
    width: auto;
    max-width: 130px;
    object-fit: contain;
    object-position: center;
    vertical-align: middle;
}

@media (max-width: 900px) {
    .site-footer-inner {
        flex-direction: column;
        align-items: stretch;
        min-height: 0;
        padding: 0.75rem 1rem;
        gap: 0.65rem;
    }

    .site-footer-center {
        position: static;
        transform: none;
        order: 1;
    }

    .site-footer-left {
        order: 2;
        align-items: flex-start;
    }

    .site-footer-right {
        order: 3;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .site-footer-inner {
        text-align: center;
    }

    .site-footer-left {
        align-items: center;
    }

    .site-footer-right {
        justify-content: center;
    }
}

.light-theme .site-footer {
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 0.9rem;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Admin Layout Layout */
.admin-layout {
    display: flex;
    flex: 1;
    min-height: 0;
}

.admin-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.admin-sidebar-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
}

.admin-nav {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.admin-nav-item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.admin-nav-button {
    width: 100%;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.admin-nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--spacing-sm) 0;
}

.admin-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-md) var(--spacing-lg);
}

.admin-header-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-main {
    padding: var(--spacing-lg);
    flex: 1;
    overflow-y: auto;
    width: 100%;
}

/* Admin panels & forms */
.admin-page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 1100px) {
    .admin-page-grid {
        grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
        align-items: start;
    }
}

.admin-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.admin-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
}

.admin-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-panel-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.15rem;
}

.admin-panel-body {
    padding: 1.5rem;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 640px) {
    .admin-form-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
    }
}

.admin-inspiration-box {
    max-height: 160px;
    overflow-y: auto;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-table-panel .table-wrapper {
    border-radius: 0;
}

.admin-table-panel .table th,
.admin-table-panel .table td {
    vertical-align: middle;
}

.admin-action-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.admin-main .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.admin-main .form-control {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.12);
}

.admin-main .form-control:focus {
    background: rgba(0, 0, 0, 0.5);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.admin-main .form-control:disabled,
.admin-main .form-control[readonly] {
    opacity: 0.7;
    cursor: not-allowed;
}

.admin-main .glass-panel {
    background: var(--bg-secondary);
}

.admin-nav-item.active {
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.2);
}

/* Legacy admin modal alias */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal .modal-content {
    width: 100%;
    max-width: 440px;
    transform: scale(0.95) translateY(16px);
    transition: transform 0.3s ease;
}

.modal.is-open .modal-content {
    transform: scale(1) translateY(0);
}

.modal .modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.15);
}

.modal .modal-body {
    padding: 1.25rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.light-theme .admin-panel,
.light-theme .admin-main .glass-panel {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.light-theme .admin-panel-header,
.light-theme .modal .modal-header {
    background: #f8fafc;
}

.light-theme .admin-main .form-control {
    background: #ffffff;
    border-color: #cbd5e1;
}

.light-theme .admin-main .form-control:focus {
    background: #ffffff;
}

.light-theme .admin-inspiration-box {
    background: #f8fafc;
}

.light-theme .admin-nav-item.active {
    background: rgba(255, 107, 0, 0.08);
}

.light-theme .modal {
    background: rgba(15, 23, 42, 0.35);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid transparent;
    font-size: 0.95rem;
}
.alert-success {
    background: var(--success-bg);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}
.alert-error {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* Grid Layouts */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }

@media (min-width: 1024px) {
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-6 { grid-column: span 6 / span 6; }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
    .lg\:col-span-9 { grid-column: span 9 / span 9; }
    .lg\:col-span-12 { grid-column: span 12 / span 12; }
}

/* Specific UI Components */

/* Tags / Badges */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}
.badge-accent { background: var(--accent-glow); color: var(--accent-primary); border: 1px solid rgba(255, 107, 0, 0.3); }
.badge-success { background: var(--success-bg); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.badge-info { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.3); }
.badge-danger { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-neutral { background: rgba(255,255,255,0.05); color: var(--text-secondary); border: 1px solid var(--border-light); }
.badge-muted { background: rgba(255, 255, 255, 0.05); color: var(--text-secondary); border: 1px solid var(--border-light); }

/* History Items */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

.history-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-secondary);
}

.history-item {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.history-item:hover {
    border-color: rgba(255, 107, 0, 0.45);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.history-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.history-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.history-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.history-item-author {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-date {
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-status {
    flex-shrink: 0;
    font-size: 0.65rem;
    padding: 0.12rem 0.45rem;
    letter-spacing: 0.02em;
}

/* Empty State Styling */
.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: rgba(255, 107, 0, 0.08);
    border: 1.5px dashed rgba(255, 107, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.05);
    margin-bottom: var(--spacing-md);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(8px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.modal-container {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}
.modal-overlay.is-open .modal-container {
    transform: scale(1) translateY(0);
}
.modal-container.modal-xl {
    max-width: 800px;
    height: 90vh;
    display: flex;
    flex-direction: column;
}
.modal-container.modal-xl .modal-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Popover Overlay */
.popover-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}
.popover-overlay.is-open {
    opacity: 1;
    visibility: visible;
}
.popover-container {
    position: absolute;
    background: var(--bg-secondary);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    width: 350px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transform: translateY(-10px);
    transition: transform 0.2s ease;
    overflow: hidden;
}
.popover-overlay.is-open .popover-container {
    transform: translateY(0);
}

.modal-header {
    background: rgba(0,0,0,0.2);
    padding: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}
.modal-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-title {
    font-size: 1.125rem;
    font-weight: 700;
}
.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.modal-body {
    padding: var(--spacing-lg);
}

/* Progress Bar */
.progress-container {
    height: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--spacing-sm) 0 var(--spacing-lg) 0;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
    border-radius: var(--radius-full);
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
}
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Steps List */
.steps-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.875rem;
}
.steps-list::-webkit-scrollbar { width: 6px; }
.steps-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

.step-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-muted);
    padding: var(--spacing-xs) 0;
    transition: color 0.3s;
}
.step-item.is-active {
    color: var(--text-primary);
    font-weight: 500;
}
.step-item.is-done {
    color: var(--text-secondary);
}
.step-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.step-item.is-active .step-dot {
    border-color: var(--accent-primary);
}
.step-item.is-active .step-dot-inner {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
.step-item.is-done .step-dot {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 107, 0, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

/* Teleprompter — unified */
html.telkin-teleprompter-open,
body.telkin-teleprompter-open {
    overflow: hidden !important;
    height: 100%;
}

body.telkin-teleprompter-open .navbar,
body.telkin-teleprompter-open .site-footer,
body.telkin-teleprompter-open .skip-link,
body.telkin-teleprompter-open .presentation-header {
    visibility: hidden !important;
    pointer-events: none;
}

.telkin-teleprompter {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: 100vh;
    background: #000;
    z-index: 2147483000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    isolation: isolate;
}

.telkin-teleprompter.hidden {
    display: none;
}

.telkin-teleprompter:fullscreen {
    width: 100vw;
    height: 100vh;
}

.telkin-teleprompter-viewport {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    overflow: hidden;
}

.telkin-teleprompter-viewport::after {
    content: '';
    position: absolute;
    left: 8vw;
    right: 8vw;
    top: 42%;
    height: 0;
    border-top: 1px solid rgba(255, 107, 0, 0.22);
    pointer-events: none;
    z-index: 2;
}

.telkin-teleprompter-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: calc(42vh * var(--telkin-tp-pad-scale, 1)) 8vw calc(55vh * var(--telkin-tp-pad-scale, 1));
    color: #fff;
    font-size: calc(clamp(1.85rem, 4.8vw, 3.75rem) * var(--telkin-tp-font-scale, 1));
    font-weight: 600;
    line-height: 1.6;
    white-space: pre-wrap;
    text-align: center;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85);
    will-change: transform;
}

.telkin-teleprompter-no-line .telkin-teleprompter-viewport::after {
    display: none;
}

.telkin-teleprompter-settings {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.85rem 1.25rem;
    padding: 0.65rem 1.25rem;
    background: rgba(12, 12, 12, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.telkin-teleprompter-settings.hidden {
    display: none;
}

.telkin-teleprompter-setting {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    user-select: none;
}

.telkin-teleprompter-setting input {
    accent-color: var(--accent-primary);
}

.telkin-teleprompter-controls-divider {
    width: 1px;
    height: 1.35rem;
    background: rgba(255, 255, 255, 0.14);
    margin: 0 0.15rem;
}

.telkin-teleprompter-settings-btn.is-active {
    border-color: rgba(255, 107, 0, 0.55);
    color: #ffb366;
}

.telkin-teleprompter-controls {
    flex-shrink: 0;
    background: rgba(20, 20, 20, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.telkin-teleprompter-controls-main,
.telkin-teleprompter-controls-side {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.telkin-teleprompter-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    margin-right: 0.35rem;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.telkin-teleprompter-metric,
.telkin-teleprompter-wpm {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    font-variant-numeric: tabular-nums;
    min-width: 72px;
    text-align: center;
}

#telkinTeleprompterFontScale {
    min-width: 52px;
}

@media (max-width: 768px) {
    .telkin-teleprompter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .telkin-teleprompter-controls-main,
    .telkin-teleprompter-controls-side {
        justify-content: center;
    }

    .telkin-teleprompter-title {
        max-width: 100%;
        text-align: center;
        margin-right: 0;
    }
}

/* Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}
.table th, .table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}
.table th {
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.2);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}
.table tbody tr {
    transition: background var(--transition-fast);
}
.table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Auth Pages */
body.auth-page {
    overflow: auto;
    height: auto;
    min-height: 100vh;
}

.auth-page-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
}

@media (min-width: 960px) {
    .auth-page-shell {
        grid-template-columns: 1fr 1fr;
    }
}

.auth-brand-panel {
    position: relative;
    display: none;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 2.5rem;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-light);
    overflow: hidden;
}

@media (min-width: 960px) {
    .auth-brand-panel {
        display: flex;
    }
}

.auth-brand-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.auth-brand-content {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
}

.auth-brand-icon {
    margin-bottom: 1.5rem;
}

.auth-brand-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.auth-brand-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 2rem;
}

.auth-feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    transition: border-color var(--transition-fast);
}

.auth-feature:hover {
    border-color: rgba(255, 107, 0, 0.25);
}

.auth-feature strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.auth-feature p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem 2.5rem;
    min-height: 100vh;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.04), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.03), transparent 50%);
}

.auth-form-toolbar {
    width: 100%;
    max-width: 420px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.auth-theme-btn {
    padding: 0.4rem 0.6rem !important;
    font-size: 0.95rem !important;
    border-radius: var(--radius-md) !important;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.auth-card-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-alert {
    margin-bottom: 1rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-form-block {
    padding: 0.9rem 1rem;
    margin: 0;
}

.auth-form-block .form-control {
    font-size: 0.95rem;
}

.auth-submit-btn {
    margin-top: 0.35rem;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    gap: 0.5rem;
}

.auth-quick-login {
    margin-top: 0.5rem;
    text-align: center;
}

.auth-quick-login-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.auth-footer-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.auth-footer-link a {
    font-weight: 600;
    margin-left: 0.25rem;
}

.auth-footer-link a:hover {
    text-decoration: underline;
}

.auth-page-note {
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* Mobile brand header (shown only on small screens) */
.auth-mobile-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.5rem;
    width: 100%;
    max-width: 420px;
}

.auth-mobile-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 0.75rem;
}

.auth-mobile-icon svg {
    width: 24px;
    height: 24px;
}

.auth-mobile-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

@media (min-width: 960px) {
    .auth-mobile-brand {
        display: none;
    }
}

@media (max-width: 959px) {
    .auth-form-panel::before {
        content: none;
    }
}

/* Legacy auth wrapper (register etc.) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.04), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.03), transparent 50%);
}

.auth-wrapper .auth-card {
    max-width: 440px;
}

/* Glass panel (shared card surface) */
.glass-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.glass-panel-body {
    padding: 2rem;
}

.glass-panel-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
}

.register-bonus-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.2);
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.register-bonus-badge strong {
    font-weight: 700;
}

.register-speaker-block {
    gap: 0.55rem;
}

.register-speaker-help {
    margin: 0 0 0.15rem;
}

.pending-approval-alert {
    margin-bottom: 0.85rem;
}

.pending-approval-summary {
    margin-top: 0;
}

.pending-approval-note {
    margin: 0 0 1rem;
    line-height: 1.5;
}

.speaker-picker-learning {
    width: 100%;
    margin-top: 0.35rem;
}

.speaker-picker-learning-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.28rem;
}

.speaker-picker-learning-label {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.speaker-picker-learning-pct {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.speaker-picker-progress-track {
    height: 5px;
}

.speaker-picker-item .speaker-progress-fill::after {
    display: none;
}

.register-speaker-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.14);
}

.register-speaker-selected-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.light-theme .register-speaker-selected {
    background: rgba(255, 107, 0, 0.04);
}

.light-theme .register-speaker-picker {
    background: #f8fafc;
}

/* Light theme auth overrides */
.light-theme .auth-brand-panel {
    background: #f8fafc;
}

.light-theme .auth-feature {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.light-theme .auth-card {
    background: #ffffff;
    box-shadow: var(--shadow-lg);
}

.light-theme .auth-form-panel {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.03), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.02), transparent 50%);
}

.light-theme .auth-wrapper {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.03), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.02), transparent 50%);
}

/* Textarea Output */
.textarea-output {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
    background: rgba(0,0,0,0.15);
}

/* Audio Panel */
.audio-panel-prompt {
    background: rgba(255, 107, 0, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.2);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

/* Tabs */
.nav-tabs {
    display: flex;
    gap: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}
.nav-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}
.nav-tab:hover {
    color: var(--text-primary);
}
.nav-tab.active {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease-out;
}
.tab-pane.active {
    display: block;
}

/* Dashboard Empty State Elements */
.dashboard-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
}
.dashboard-card:hover {
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.05);
    transform: translateY(-2px);
}
.dashboard-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

/* Seamless Editor */
.seamless-editor-container {
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.seamless-editor-content {
    flex: 1;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
    padding: var(--spacing-lg) 0;
    outline: none;
    overflow-y: auto;
}
.seamless-editor-content[data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-style: italic;
}

/* Spin Icon */
.icon-spin {
    animation: spin 1s linear infinite;
}

/* Helpers */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }

.px-md { padding-left: var(--spacing-md); padding-right: var(--spacing-md); }
.py-md { padding-top: var(--spacing-md); padding-bottom: var(--spacing-md); }

.flex-1 { flex: 1; }
.shrink-0 { flex-shrink: 0; }

/* Rich Editor */
.rich-editor-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.editor-toolbar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.speech-document-header {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.speech-document-header.hidden {
    display: none;
}

.speech-document-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--text-primary);
}

.speech-document-meta {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.light-theme .speech-document-header {
    border-bottom-color: var(--border-light);
}

.editor-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
}

.editor-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.ai-edit-btn {
    background: rgba(255, 107, 0, 0.15);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.3);
}

.ai-edit-btn:hover {
    background: rgba(255, 107, 0, 0.25);
}

.editor-content {
    flex: 1;
    padding: var(--spacing-md);
    min-height: 250px;
    overflow-y: auto;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-primary);
    outline: none;
}

.editor-content:focus {
    background: rgba(0, 0, 0, 0.1);
}

.editor-content[data-placeholder]:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    cursor: text;
}

.editor-content p { margin-bottom: 1rem; }
.editor-content h1, .editor-content h2, .editor-content h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; color: var(--accent-primary); }
.editor-content ul { padding-left: 1.5rem; margin-bottom: 1rem; list-style-type: disc; }
.editor-content ol { padding-left: 1.5rem; margin-bottom: 1rem; list-style-type: decimal; }
.editor-content strong, .editor-content b { color: var(--text-primary); font-weight: 700; }

.editor-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─────────────────────────────────────────────
   3-Column Studio Layout
   ───────────────────────────────────────────── */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

@media (min-width: 1025px) {
    .dashboard-grid {
        grid-template-columns: 280px 1fr 340px;
    }
}

/* Mobile Tabs Navigation */
.mobile-tabs {
    display: none;
    gap: var(--spacing-xs);
    background: rgba(0, 0, 0, 0.25);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border: 1px solid var(--border-light);
}

.mobile-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.mobile-tab:hover {
    color: var(--text-primary);
}

.mobile-tab.active {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

@media (max-width: 1024px) {
    .mobile-tabs {
        display: flex;
    }
    .app-sidebar-left,
    .app-canvas,
    .app-sidebar-right {
        display: none !important;
        width: 100% !important; /* Ensure they take full width on mobile */
    }
    .app-sidebar-left.mobile-active,
    .app-canvas.mobile-active,
    .app-sidebar-right.mobile-active {
        display: flex !important;
        flex-direction: column;
    }
    .app-layout {
        flex-direction: column;
    }
}

/* Custom Audio Player */
.custom-audio-player {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 107, 0, 0.2);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-md);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 12px rgba(255, 107, 0, 0.05);
}

.player-play-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.player-play-btn:hover {
    transform: scale(1.05);
    background: var(--accent-hover);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.player-progress-container {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    transition: width 0.1s linear;
}

.player-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
}

.player-action-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.player-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* Speaker Profile Card */
.engine-block-speaker {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.speaker-select {
    font-size: 0.875rem;
}

.speaker-search {
    margin-bottom: 0.5rem;
}

.speaker-picker {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-height: 11.5rem;
    overflow-y: auto;
    padding: 0.45rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(0, 0, 0, 0.06);
    scrollbar-gutter: stable;
}

.speaker-picker-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.12rem;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.65rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.speaker-picker-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.speaker-picker-item.is-selected {
    background: rgba(255, 107, 0, 0.08);
    border-color: rgba(255, 107, 0, 0.28);
    box-shadow: inset 3px 0 0 var(--accent-primary);
}

.speaker-picker-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.3;
    word-break: break-word;
}

.speaker-picker-role {
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.35;
    word-break: break-word;
}

.speaker-picker-empty {
    padding: 0.75rem 0.65rem;
    text-align: center;
}

.speaker-profile-card {
    margin-top: 0.15rem;
    padding: 1rem 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 107, 0, 0.14);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.speaker-profile-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.speaker-profile-meta {
    flex: 1;
    min-width: 0;
}

.speaker-profile-name-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.speaker-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    line-height: 1.2;
    max-width: 100%;
}

.speaker-role-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.22rem;
    width: 100%;
    max-width: 100%;
}

.speaker-role-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.16rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.speaker-role-pill.is-compact {
    font-size: 0.56rem;
    padding: 0.14rem 0.42rem;
    letter-spacing: -0.01em;
}

.speaker-role-pill.is-micro {
    font-size: 0.5rem;
    padding: 0.12rem 0.38rem;
    letter-spacing: -0.015em;
}

.speaker-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
}

.speaker-status-chip.is-success {
    color: #059669;
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
}

.speaker-status-chip.is-warning {
    color: #d97706;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.2);
}

.speaker-status-chip.is-info {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.2);
}

.speaker-status-chip.is-muted {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    border-color: var(--border-light);
}

.speaker-profile-card.is-empty {
    opacity: 0.92;
}

.speaker-learning-block {
    padding-top: 0.75rem;
    padding-bottom: 0.15rem;
    border-top: 1px solid var(--border-light);
}

.speaker-learning-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.speaker-learning-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.speaker-learning-value {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-primary);
}

.speaker-progress-track {
    height: 8px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.speaker-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
    transition: width 0.45s ease-out;
    position: relative;
}

.speaker-progress-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    animation: shimmer 1.8s infinite;
}

.speaker-learning-hint {
    margin: 0.55rem 0 0;
    line-height: 1.4;
}

.speaker-training-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    background: rgba(255, 107, 0, 0.08);
}

.speaker-training-alert.hidden {
    display: none;
}

.speaker-training-alert.is-warning {
    background: rgba(255, 107, 0, 0.1);
    border-color: rgba(255, 107, 0, 0.28);
}

.speaker-training-alert.is-info {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.22);
}

.speaker-training-alert.is-success {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.22);
}

.speaker-training-alert-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
}

.speaker-training-alert.is-info .speaker-training-alert-icon {
    color: #2563eb;
    background: rgba(59, 130, 246, 0.12);
}

.speaker-training-alert.is-success .speaker-training-alert-icon {
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
}

.speaker-training-alert-body {
    min-width: 0;
    flex: 1;
}

.speaker-training-alert-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
    margin-bottom: 0.25rem;
}

.speaker-training-alert-text {
    margin: 0 0 0.45rem;
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.speaker-training-alert-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

.speaker-training-alert.is-info .speaker-training-alert-link {
    color: #2563eb;
}

.speaker-training-alert.is-success .speaker-training-alert-link {
    color: #059669;
}

.speaker-training-alert-link:hover {
    text-decoration: underline;
}

.light-theme .speaker-training-alert.is-warning {
    background: rgba(255, 107, 0, 0.07);
}

.light-theme .speaker-training-alert.is-info {
    background: rgba(59, 130, 246, 0.06);
}

.light-theme .speaker-training-alert.is-success {
    background: rgba(16, 185, 129, 0.06);
}

.speaker-avatar-glow {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), #e65c00);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 1rem;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.28);
    overflow: hidden;
}

.speaker-avatar-glow.has-photo {
    background: var(--bg-card);
    padding: 0;
}

.speaker-avatar-glow img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.engine-block-training,
.app-training-top {
    flex-shrink: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
}

.training-top-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
}

.training-top-toggle-main {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.training-top-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.training-top-chevron {
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.app-training-top.is-collapsed .training-top-chevron {
    transform: rotate(-90deg);
}

.training-top-body {
    padding: 0 1.25rem 1.1rem;
    max-height: 340px;
    overflow: auto;
}

.app-training-top.is-collapsed .training-top-body {
    display: none;
}

.training-top-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.training-subsection-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.9rem;
}

@media (max-width: 1100px) {
    .training-top-grid {
        grid-template-columns: 1fr;
    }
}

.training-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.training-panel-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border-radius: var(--radius-full);
    padding: 0.15rem 0.55rem;
}

.training-panel-intro {
    margin-bottom: var(--spacing-sm);
}

.training-subsection + .training-subsection {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-light);
}

.training-subsection-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.training-list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-sm);
    max-height: 140px;
    overflow-y: auto;
}

.training-list li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--spacing-sm);
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--border-light);
}

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

.training-item-meta {
    color: var(--text-secondary);
    font-size: 0.72rem;
    margin-top: 0.15rem;
}

.training-delete-btn {
    border: none;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.72rem;
    padding: 0.15rem 0.35rem;
    flex-shrink: 0;
}

.training-empty {
    padding: var(--spacing-sm);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
}

.training-form .engine-textarea {
    min-height: 88px;
}

.training-photo-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.training-photo-preview {
    width: 72px;
    height: 72px;
    font-size: 1rem;
}

/* Model Eğitimi page */
.training-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

.training-hero {
    position: relative;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.25rem;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 140, 58, 0.04) 50%, transparent 100%),
        var(--bg-secondary);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.training-hero-glow {
    position: absolute;
    top: -60px;
    right: -20px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.16) 0%, transparent 70%);
    pointer-events: none;
}

.training-hero-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
}

.training-hero-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.65rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 107, 0, 0.12);
    border: 1px solid rgba(255, 107, 0, 0.22);
    font-size: 1.35rem;
}

.training-hero-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.training-hero-subtitle {
    margin: 0;
    max-width: 40rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.65;
}

.training-stats-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.22);
    white-space: nowrap;
}

.training-speaker-card,
.training-picker-card {
    display: flex;
    align-items: center;
    gap: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.training-speaker-avatar {
    width: 64px;
    height: 64px;
    font-size: 1rem;
    flex-shrink: 0;
}

.training-speaker-copy {
    flex: 1 1 180px;
    min-width: 0;
}

.training-speaker-name {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.training-speaker-role {
    margin: 0.15rem 0 0;
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.training-speaker-score-wrap {
    margin-left: auto;
    text-align: right;
}

.training-speaker-score {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1.1;
}

.training-speaker-score-label {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.training-picker-card {
    flex-direction: column;
    align-items: stretch;
}

.training-picker-list {
    max-height: 220px;
    overflow-y: auto;
}

.training-field-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.training-search,
.training-input,
.training-textarea {
    width: 100%;
}

.training-textarea {
    min-height: 96px;
    resize: vertical;
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
}

.training-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.training-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
}

.training-card-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.16);
    font-size: 1rem;
}

.training-card-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
}

.training-card-desc {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
}

.training-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.75rem;
    padding: 1rem;
}

.training-card-footnote {
    margin: 0;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.training-photo-preview-wrap {
    display: flex;
    justify-content: center;
    padding: 0.35rem 0 0.15rem;
}

.training-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
}

.training-file-label {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius-md);
    border: 1px dashed rgba(255, 107, 0, 0.28);
    background: rgba(255, 107, 0, 0.04);
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.training-file-label:hover {
    border-color: rgba(255, 107, 0, 0.45);
    background: rgba(255, 107, 0, 0.07);
}

.training-file-label-text {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.training-file-input {
    font-size: 0.76rem;
    color: var(--text-muted);
}

.training-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    max-height: 180px;
    overflow-y: auto;
}

.training-list-item,
.training-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.training-list-item.is-empty,
.training-list li.text-muted {
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    background: transparent;
    border-style: dashed;
}

.training-list-icon {
    flex-shrink: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.training-list-body {
    flex: 1;
    min-width: 0;
}

.training-list-body strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.training-item-meta {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-secondary);
    font-size: 0.72rem;
    line-height: 1.4;
    word-break: break-word;
}

.training-voice-item {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
}

.training-voice-item-head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
}

#trainingVoiceList.training-list {
    max-height: 340px;
}

.training-voice-player {
    width: 100%;
}

.training-voice-player .custom-audio-player-compact {
    margin-top: 0;
}

.custom-audio-player-compact {
    gap: 0.45rem;
    padding: 0.4rem 0.55rem;
    margin-top: 0;
    background: rgba(0, 0, 0, 0.18);
}

.custom-audio-player-compact .player-play-btn {
    width: 30px;
    height: 30px;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}

.custom-audio-player-compact .player-progress-container {
    height: 5px;
}

.custom-audio-player-compact .player-time {
    font-size: 0.68rem;
    min-width: 68px;
}

.light-theme .custom-audio-player-compact {
    background: rgba(0, 0, 0, 0.04);
}

.training-text-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.training-text-kind {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.training-text-kind--archive {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.training-text-kind--system {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
}

.training-text-kind--user {
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.22);
}

.training-delete-btn {
    flex-shrink: 0;
    border: 1px solid rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    cursor: pointer;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.training-delete-btn:hover {
    background: rgba(239, 68, 68, 0.14);
    border-color: rgba(239, 68, 68, 0.4);
}

.training-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-xl);
    border: 1px dashed var(--border-light);
    background: var(--bg-card);
    text-align: center;
}

.training-empty-state p {
    margin: 0;
    max-width: 26rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.55;
}

.training-empty-icon {
    font-size: 1.6rem;
    opacity: 0.85;
}

.light-theme .training-hero {
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.07) 0%, rgba(255, 140, 58, 0.03) 50%, transparent 100%),
        #f8fafc;
}

.light-theme .training-card,
.light-theme .training-speaker-card,
.light-theme .training-picker-card,
.light-theme .training-empty-state {
    background: #ffffff;
}

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

@media (max-width: 768px) {
    .training-page {
        padding: 1rem 1rem 2.5rem;
    }

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

    .training-speaker-score-wrap {
        width: 100%;
        margin-left: 0;
        text-align: left;
    }
}

/* Legacy training page aliases — no styles needed */

.speaker-admin-photo,
.speaker-table-photo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.speaker-admin-photo-fallback,
.speaker-table-photo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), #e65c00);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: var(--success);
    animation: success-pulse 2s infinite;
}

/* Legacy aliases */
.active-speaker-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
}

.active-speaker-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.speaker-details {
    flex: 1;
    min-width: 0;
}

.speaker-role {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.speaker-info-panel {
    border-top: 1px solid var(--border-light);
}

.speaker-progress-container {
    height: 8px;
    background: rgba(0, 0, 0, 0.12);
}

@keyframes success-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Onboarding Cards */
.onboarding-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

@media (min-width: 640px) {
    .onboarding-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.onboarding-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    transition: all var(--transition-normal);
    text-align: left;
}

.onboarding-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 107, 0, 0.2);
    transform: translateY(-2px);
}

.onboarding-icon {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent-primary);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Input Error Animation */
.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Global Layout Utilities */
.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

@media (min-width: 1025px) {
    .lg\:hidden, .lg-hidden {
        display: none !important;
    }
}

/* Ensure cross-browser appearance resets for select arrows */
select.form-control {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

/* ─────────────────────────────────────────────
   Premium Light Theme Styles (Global Standards)
   ───────────────────────────────────────────── */

.light-theme {
    --bg-primary: #ffffff; /* pure white canvas */
    --bg-secondary: #f8fafc; /* slate-50 sidebar */
    --bg-card: #ffffff; /* cards on gray background */
    --bg-glass: #ffffff;
    --bg-glass-hover: #f1f5f9;
    
    --text-primary: #0f172a; /* Slate-900 */
    --text-secondary: #334155; /* Slate-700 */
    --text-muted: #64748b; /* Slate-400 */
    
    --border-light: #e2e8f0; /* Slate-200 (crisp, clear lines) */
    --border-focus: #ff6b00;
    
    /* Soft slate light-mode shadow system */
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.04), 0 2px 4px -2px rgba(15, 23, 42, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.04), 0 4px 6px -4px rgba(15, 23, 42, 0.02);
    
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 107, 0, 0.02), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.02), transparent 30%);
}

.light-theme body {
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.light-theme .glass-panel {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.light-theme .glass-panel:hover {
    background-color: var(--bg-secondary);
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: var(--shadow-md);
}

.light-theme .glass-panel-header {
    border-color: rgba(15, 23, 42, 0.05);
}

/* Form controls in light theme */
.light-theme .form-control {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: var(--text-primary);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

.light-theme .form-control:focus {
    background-color: #ffffff;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.1);
}

.light-theme select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
}

.light-theme select.form-control option {
    background-color: #ffffff;
    color: var(--text-primary);
}

/* Secondary Buttons in light theme */
.light-theme .btn-secondary {
    background-color: #ffffff;
    color: var(--text-primary);
    border: 1px solid #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.02);
}

.light-theme .btn-secondary:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
}

/* Checkboxes in light theme */
.light-theme .checkbox-input {
    background-color: #ffffff;
    border-color: #cbd5e1;
}

.light-theme .checkbox-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* History Items in light theme */
.light-theme .history-item {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.light-theme .history-item:hover {
    background-color: var(--bg-card);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

/* Editor Toolbar and Stats Bar */
.light-theme .editor-toolbar,
.light-theme .editor-stats-bar {
    background-color: #f8fafc !important;
    border-color: #e2e8f0;
}

.light-theme .editor-btn {
    color: var(--text-secondary);
}

.light-theme .editor-btn:hover {
    background-color: #f1f5f9;
    color: var(--text-primary);
}

.light-theme .seamless-editor-content {
    color: var(--text-primary);
}

/* Onboarding Cards */
.light-theme .onboarding-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.02);
}

.light-theme .onboarding-card:hover {
    background-color: #ffffff;
    border-color: rgba(255, 107, 0, 0.3);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.05);
}

/* Active Speaker Card */
.light-theme .active-speaker-card {
    background-color: var(--bg-card);
    border-color: var(--border-light);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.light-theme .speaker-progress-container {
    background-color: #e2e8f0;
}

/* Custom Audio Player */
.light-theme .custom-audio-player {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.light-theme .player-progress-container {
    background-color: #f1f5f9;
}

.light-theme .player-action-btn:hover {
    background-color: #f8fafc;
}

/* Modals in light theme */
.light-theme .modal-overlay {
    background-color: rgba(15, 23, 42, 0.3);
}

.light-theme .modal-container {
    background-color: #ffffff;
    border-color: #e2e8f0;
    box-shadow: var(--shadow-lg);
}

.light-theme .modal-header {
    background-color: #f8fafc;
    border-color: #e2e8f0;
}

.light-theme .modal-title {
    color: var(--text-primary);
}

.light-theme .modal-subtitle {
    color: var(--text-secondary);
}

.light-theme .step-item.is-active {
    color: var(--text-primary);
}

.light-theme .step-item.is-done {
    color: var(--text-secondary);
}

.light-theme .step-dot {
    border-color: #cbd5e1;
}

/* Scrollbars in light theme */
.light-theme ::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}

/* Popover / AI edit modal */
.light-theme .popover-container {
    background-color: #ffffff;
    border-color: var(--accent-primary);
}

/* Confirm modal message text */
.light-theme #confirmMessage {
    color: var(--text-primary) !important;
}

/* Credit Badge */
.light-theme .credit-badge {
    background-color: rgba(255, 107, 0, 0.08) !important;
    border: 1px solid rgba(255, 107, 0, 0.2) !important;
    color: var(--accent-primary) !important;
}

/* Main Navbar */
.light-theme .navbar {
    background-color: rgba(255, 255, 255, 0.8);
    border-color: #e2e8f0;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Badge Light Theme Overrides */
.light-theme .badge-accent { background: rgba(255, 107, 0, 0.08); color: var(--accent-primary); border-color: rgba(255, 107, 0, 0.2); }
.light-theme .badge-success { background: #dcfce7; color: #15803d; border-color: #86efac; }
.light-theme .badge-warning { background: #fef3c7; color: #b45309; border-color: #fcd34d; }
.light-theme .badge-info { background: #dbeafe; color: #1d4ed8; border-color: #93c5fd; }
.light-theme .badge-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.light-theme .badge-neutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.light-theme .badge-muted { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.light-theme .empty-state-icon {
    background: rgba(255, 107, 0, 0.04);
    border-color: rgba(255, 107, 0, 0.2);
}

.light-theme .sample-agenda {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.light-theme .sample-agenda:hover {
    background: rgba(255, 107, 0, 0.05);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.light-theme .sidebar-footer {
    background: var(--bg-secondary);
    border-color: var(--border-light);
}

/* ─────────────────────────────────────────────
   Main Prompt Bar (Claude/ChatGPT style)
   ───────────────────────────────────────────── */

.studio-hero .main-prompt-bar-container {
    margin-top: 1.5rem;
    max-width: 100%;
}

.main-prompt-bar-container {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: var(--spacing-lg) auto 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 0.35rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.main-prompt-bar-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-lg), 0 0 0 3px rgba(255, 107, 0, 0.15);
}

.main-prompt-bar-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0.8rem 1rem;
    font-size: 1.05rem;
    color: var(--text-primary);
    font-weight: 500;
}

.main-prompt-bar-input::placeholder {
    color: var(--text-muted);
}

.main-prompt-bar-btn {
    background: var(--accent-primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

.main-prompt-bar-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.main-prompt-bar-btn svg {
    width: 18px;
    height: 18px;
    transition: transform var(--transition-fast);
}

.main-prompt-bar-btn:hover svg {
    transform: translate(2px, -2px);
}

/* Quick Prompt Suggestions */
.quick-prompts-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem 0.85rem;
    margin-top: var(--spacing-md);
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.quick-prompt-pill {
    background: rgba(255, 107, 0, 0.04);
    border: 1px solid rgba(255, 107, 0, 0.12);
    color: var(--accent-primary);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quick-prompt-pill:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px var(--accent-glow);
}

/* Dark mode overrides for prompt bar elements */
body:not(.light-theme) .main-prompt-bar-container {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--border-light);
}

body:not(.light-theme) .main-prompt-bar-container:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 4px 30px -2px rgba(255, 107, 0, 0.15), 0 0 0 4px rgba(255, 107, 0, 0.2);
}

body:not(.light-theme) .quick-prompt-pill {
    background: rgba(255, 107, 0, 0.08);
    border-color: rgba(255, 107, 0, 0.2);
}

body:not(.light-theme) .quick-prompt-pill:hover {
    background: var(--accent-primary);
    color: white;
}

/* Credit Badge (Navbar) */
.credit-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.25);
    color: var(--accent-primary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.credit-badge:hover {
    background: rgba(255, 107, 0, 0.15);
    border-color: rgba(255, 107, 0, 0.4);
    transform: translateY(-1px);
}

/* Studio Empty State */
.studio-empty-state {
    padding: 2rem 1.5rem 3rem;
    min-height: 100%;
}

.studio-hero {
    position: relative;
    max-width: 640px;
    width: 100%;
    text-align: center;
}

.studio-hero-glow {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.studio-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--accent-primary), #e65c00);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.25);
}

.studio-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.studio-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 420px;
    margin: 0 auto 0.5rem;
    line-height: 1.6;
}

.studio-hints {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 2rem;
    text-align: left;
}

.studio-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.45;
    transition: border-color var(--transition-fast);
}

.studio-hint:hover {
    border-color: rgba(255, 107, 0, 0.25);
}

.studio-hint-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .studio-hints {
        grid-template-columns: 1fr;
    }
}

/* Quick Prompts — refined layout */
.quick-prompts-container {
    margin-top: 1.25rem;
}

.quick-prompts-label {
    display: block;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0;
    line-height: 1;
}

.quick-prompts-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Engine Panel (Right Sidebar) */
.engine-block {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.engine-block-compact {
    padding: 0.85rem 1rem;
}

.engine-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
}

.engine-textarea {
    min-height: 88px;
    resize: vertical;
    font-size: 0.9rem;
}

.sample-agenda-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

/* ── Chip tabanlı şablon & konu seçiciler ── */
.chip-section-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.template-chip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.template-chip-card {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.template-chip-card:hover {
    border-color: rgba(255, 107, 0, 0.45);
    background: rgba(255, 107, 0, 0.05);
}

.template-chip-card.is-active {
    border-color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    box-shadow: 0 0 0 1px rgba(255, 107, 0, 0.15);
}

.template-chip-icon {
    flex-shrink: 0;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: var(--radius-sm, 6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    line-height: 1;
}

.template-chip-icon-economy {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.template-chip-icon-economy::before {
    content: '₺';
    font-weight: 700;
}

.template-chip-icon-org {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.template-chip-icon-org::before {
    content: '◆';
    font-size: 0.55rem;
}

.template-chip-icon-debate {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.template-chip-icon-debate::before {
    content: '!';
    font-weight: 800;
}

.template-chip-icon-globe {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
}

.template-chip-icon-globe::before {
    content: '◎';
    font-size: 0.7rem;
}

.template-chip-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.template-chip-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

.template-chip-desc {
    font-size: 0.62rem;
    line-height: 1.35;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.briefing-templates {
    margin-bottom: 0.15rem;
}

.briefing-save-wrap {
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.light-theme .briefing-save-wrap {
    border-top-color: #e5e7eb;
}

.topic-suggestions {
    position: relative;
}

.topic-chip-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.1rem 0 0;
}

.topic-chip {
    flex: 0 1 auto;
    max-width: 100%;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.topic-chip:hover {
    border-color: rgba(255, 107, 0, 0.5);
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.06);
}

.topic-chip.is-active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
}

.light-theme .template-chip-card {
    background: #fff;
}

.light-theme .template-chip-card:hover {
    background: rgba(255, 107, 0, 0.04);
}

.light-theme .template-chip-card.is-active {
    background: rgba(255, 107, 0, 0.08);
}

.light-theme .topic-chip {
    background: #fff;
}

.sample-agenda {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.sample-agenda:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.05);
}

.inspiration-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.inspiration-item {
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    transition: background var(--transition-fast);
}

.inspiration-item:hover {
    background: rgba(255, 107, 0, 0.04);
}

.engine-block .speaker-profile-card {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.04), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 107, 0, 0.14);
    padding: 1rem;
    margin-top: 0;
}

.light-theme .speaker-profile-card {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.03), #ffffff);
    border-color: rgba(255, 107, 0, 0.16);
    box-shadow: var(--shadow-sm);
}

.light-theme .speaker-progress-track {
    background: #e2e8f0;
}

.light-theme .speaker-picker {
    background: #f8fafc;
}

.light-theme .speaker-picker-item:hover {
    background: #f1f5f9;
}

.light-theme .speaker-picker-item.is-selected {
    background: rgba(255, 107, 0, 0.06);
}

.light-theme .speaker-status-chip {
    background: #f8fafc;
}

/* Light theme studio & engine overrides */
.light-theme .studio-hint {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.light-theme .engine-block {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.light-theme .sidebar-header-icon {
    background: rgba(255, 107, 0, 0.06);
}

.light-theme .history-item-meta {
    color: #475569;
}

.light-theme .history-item-date {
    color: #64748b;
}

.light-theme .app-canvas {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.03), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.02), transparent 50%);
}

/* ─────────────────────────────────────────────
   Pricing Page
   ───────────────────────────────────────────── */

.pricing-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1.25rem 3rem;
}

.pricing-top {
    margin-bottom: 2rem;
}

.pricing-hero-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 1.5rem;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.07) 0%, var(--bg-card) 55%);
    border: 1px solid rgba(255, 107, 0, 0.14);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.pricing-hero-band-main {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    flex: 1 1 280px;
    min-width: 0;
}

.pricing-hero-icon--compact {
    width: 44px;
    height: 44px;
    margin-bottom: 0;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-primary);
}

.pricing-hero-band-text {
    min-width: 0;
}

.pricing-flow-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.65rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
}

.pricing-flow-steps li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.65rem 0.35rem 0.4rem;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-flow-step-num {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
}

.pricing-bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .pricing-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .pricing-bento {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }

    .pricing-bento-tile--balance {
        grid-column: span 3;
    }

    .pricing-bento-tile--ladder {
        grid-column: span 5;
    }

    .pricing-bento-tile--ladder.pricing-bento-tile--wide {
        grid-column: span 7;
    }

    .pricing-bento-tile--scenario {
        grid-column: span 4;
    }

    .pricing-bento-tile--limits {
        grid-column: 1 / -1;
    }

    .pricing-bento-tile--upsell {
        grid-column: 1 / -1;
    }
}

.pricing-bento-tile {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.pricing-bento-tile--balance {
    background: linear-gradient(160deg, rgba(255, 107, 0, 0.1) 0%, var(--bg-card) 70%);
    border-color: rgba(255, 107, 0, 0.22);
}

.pricing-bento-tile-head {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.pricing-bento-tile-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.pricing-bento-tile-icon--svg {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
}

.pricing-bento-tile-icon--svg svg {
    width: 1rem;
    height: 1rem;
}

.pricing-bento-tile-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.pricing-bento-tile-desc {
    margin: 0.15rem 0 0;
    font-size: 0.74rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.pricing-balance-hero {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.pricing-balance-hero strong {
    font-size: 2.25rem;
    line-height: 1;
    font-weight: 800;
    color: var(--accent-primary);
    letter-spacing: -0.03em;
}

.pricing-balance-hero span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-balance-estimate {
    margin: 0 0 0.65rem;
    font-size: 0.8rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.pricing-balance-estimate strong {
    color: var(--text-primary);
    font-weight: 700;
}

.pricing-balance-unit {
    margin: 0 0 0.65rem;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.pricing-balance-unit strong {
    color: var(--accent-primary);
    font-weight: 800;
}

.pricing-bento-tile--upsell {
    padding: 0.9rem 1.1rem;
    border-color: rgba(255, 107, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.04) 0%, var(--bg-card) 60%);
}

.pricing-bento-tile--upsell-active {
    border-color: rgba(255, 107, 0, 0.35);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.1) 0%, var(--bg-card) 55%);
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.1);
}

.pricing-upsell-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.pricing-upsell-copy {
    flex: 1 1 220px;
    min-width: 0;
}

.pricing-upsell-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
}

.pricing-bento-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-primary);
    text-decoration: none;
}

.pricing-bento-link:hover {
    text-decoration: underline;
}

.pricing-unit-ladder {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.pricing-unit-ladder-row {
    display: grid;
    grid-template-columns: minmax(4.5rem, 5.5rem) 1fr auto auto;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.pricing-unit-ladder-name {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pricing-unit-ladder-bar-wrap {
    height: 0.42rem;
    border-radius: var(--radius-full);
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.pricing-unit-ladder-bar {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.55), var(--accent-primary));
    min-width: 8%;
}

.pricing-unit-ladder-row.is-best .pricing-unit-ladder-bar {
    background: linear-gradient(90deg, #f59e0b, var(--accent-primary));
}

.pricing-unit-ladder-price {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.pricing-unit-ladder-save {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-full);
    color: #059669;
    background: rgba(16, 185, 129, 0.12);
}

.pricing-scenario-breakdown {
    list-style: none;
    margin: 0 0 0.75rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pricing-scenario-breakdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.pricing-scenario-breakdown strong {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-scenario-total {
    padding-top: 0.35rem;
    margin-top: 0.15rem;
    border-top: 1px dashed var(--border-light);
    font-weight: 600;
}

.pricing-scenario-cost {
    padding: 0.55rem 0.65rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.06);
    border: 1px solid rgba(255, 107, 0, 0.14);
}

.pricing-scenario-cost-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.15rem;
}

.pricing-scenario-cost-value {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.pricing-limits-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

@media (min-width: 640px) {
    .pricing-limits-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        max-width: 36rem;
    }
}

.pricing-limit-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.55rem 0.35rem;
    border-radius: var(--radius-md);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-light);
}

.pricing-limit-type {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}

.pricing-limit-chip strong {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.pricing-limit-sub {
    font-size: 0.62rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.pricing-usage-strip {
    padding: 1.1rem 1.2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(165deg, rgba(255, 107, 0, 0.04) 0%, var(--bg-card) 45%);
    border: 1px solid rgba(255, 107, 0, 0.12);
}

.pricing-usage-strip-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 0.85rem;
}

.pricing-usage-strip-head .pricing-section-desc {
    margin-bottom: 0;
}

.pricing-usage-unit-hint--inline {
    margin: 0;
    text-align: right;
}

.pricing-top-grid {
    align-items: start;
}

.pricing-top .pricing-hero {
    margin-bottom: 0;
}

.pricing-hero {
    position: relative;
}

.pricing-hero-glow {
    top: -40px;
    left: 0;
    transform: none;
    width: 240px;
    height: 240px;
}

.pricing-hero-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1rem;
}

.pricing-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-align: left;
}

.pricing-hero-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
    text-align: left;
    max-width: none;
}

.pricing-balance-card {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 107, 0, 0.25);
    box-shadow: var(--shadow-sm);
}

.pricing-balance-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.pricing-balance-value {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.pricing-balance-value strong {
    font-size: 1.75rem;
    line-height: 1;
}

.pricing-balance-icon {
    font-size: 1.1rem;
}

.pricing-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.pricing-section-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
}

.pricing-usage-panel {
    padding: 1.15rem 1.2rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(165deg, rgba(255, 107, 0, 0.06) 0%, var(--bg-card) 42%);
    border: 1px solid rgba(255, 107, 0, 0.16);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.pricing-usage-panel-head {
    margin-bottom: 1rem;
}

.pricing-usage-unit-hint {
    margin: 0.55rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.pricing-usage-unit-hint strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.pricing-usage-cards {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.pricing-usage-cards--row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
}

@media (min-width: 768px) {
    .pricing-usage-cards--row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.pricing-usage-cards--row .pricing-usage-card {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 0.65rem;
}

.pricing-usage-cards--row .pricing-usage-card-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.pricing-usage-cards--row .pricing-usage-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.pricing-usage-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pricing-usage-card:hover {
    border-color: rgba(255, 107, 0, 0.28);
    box-shadow: 0 6px 18px rgba(255, 107, 0, 0.08);
}

.pricing-usage-card-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    flex-shrink: 0;
}

.pricing-usage-card-icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.pricing-usage-card--ai_edit .pricing-usage-card-icon {
    background: rgba(79, 70, 229, 0.1);
    color: #6366f1;
}

.pricing-usage-card--audio .pricing-usage-card-icon {
    background: rgba(14, 116, 144, 0.1);
    color: #0891b2;
}

.pricing-usage-card-body {
    min-width: 0;
}

.pricing-usage-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}

.pricing-usage-card-title {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.pricing-usage-credits-pill {
    flex-shrink: 0;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.2);
    white-space: nowrap;
}

.pricing-usage-card-sub {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.pricing-usage-card-note {
    margin: 0.25rem 0 0.55rem;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--text-muted);
}

.pricing-usage-card-cost {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.06);
    border: 1px solid rgba(255, 107, 0, 0.12);
}

.pricing-usage-cost-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pricing-usage-cost-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.pricing-usage-limit-pill {
    display: inline-flex;
    margin-top: 0.45rem;
    padding: 0.12rem 0.45rem;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
}

.pricing-usage-footnote {
    margin: 0.85rem 0 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: var(--text-muted);
}

.pricing-usage-section {
    margin-bottom: 0;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.pricing-usage-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
}

@media (min-width: 540px) and (max-width: 1023px) {
    .pricing-usage-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.pricing-usage-item {
    text-align: left;
    padding: 0.75rem 0.9rem;
}

.pricing-usage-item strong {
    display: block;
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
}

.pricing-usage-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
}

.pricing-packages-section {
    margin-bottom: 1.5rem;
}

.pricing-packages-header {
    margin-bottom: 1.5rem;
}

.pricing-packages-intro {
    max-width: 720px;
}

.pricing-reference-line {
    margin: 0.65rem 0 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.pricing-reference-line strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.pricing-shared-features {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.pricing-shared-features-label,
.pricing-extras-label {
    margin: 0 0 0.65rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.pricing-shared-features-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pricing-shared-features-list li {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pricing-shared-features-list svg {
    width: 15px;
    height: 15px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.pricing-extras-box {
    flex: 1;
}

.pricing-card-spacer {
    flex: 1;
    min-height: 0.25rem;
}

.pricing-volume-note {
    display: none;
}

.pricing-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
}

.pricing-grid-packages {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    align-items: stretch;
    overflow: visible;
    padding-top: 0.75rem;
}

@media (min-width: 720px) {
    .pricing-grid-packages {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1080px) {
    .pricing-grid-packages {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pricing-card {
        min-height: 448px;
    }
}

.light-theme .pricing-card-price-panel {
    background: rgba(255, 107, 0, 0.05);
    border-color: rgba(255, 107, 0, 0.14);
}

.light-theme .pricing-card-featured .pricing-card-price-panel {
    background: rgba(255, 107, 0, 0.08);
    border-color: rgba(255, 107, 0, 0.22);
}

.pricing-grid-packages .pricing-card {
    width: 100%;
    max-width: none;
    min-height: 100%;
}

.pricing-card {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 420px;
}

.pricing-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
    border-color: rgba(255, 107, 0, 0.22);
}

.pricing-card-featured {
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow:
        0 14px 40px rgba(255, 107, 0, 0.14),
        0 0 0 1px rgba(255, 107, 0, 0.08) inset;
    background: linear-gradient(180deg, rgba(255, 107, 0, 0.04) 0%, var(--bg-card) 38%);
}

.pricing-card-ribbon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    text-align: center;
    background: linear-gradient(90deg, var(--accent-primary), #ff8c3a);
    border-radius: calc(var(--radius-xl) - 1px) calc(var(--radius-xl) - 1px) 0 0;
}

.pricing-card-ribbon--badged {
    padding-right: 6.75rem;
}

.pricing-card-ribbon-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #fff;
    line-height: 1.2;
}

.pricing-ribbon-badge {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
    max-width: 6rem;
    line-height: 1.15;
    text-align: center;
}

.pricing-ribbon-badge.pricing-float-badge--popular {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    box-shadow: 0 3px 12px rgba(79, 70, 229, 0.45);
}

.pricing-ribbon-badge.pricing-float-badge--best {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    box-shadow: 0 3px 12px rgba(15, 118, 110, 0.45);
}

.pricing-card-has-ribbon .pricing-card-body {
    padding-top: 1.1rem;
}

.pricing-card-head {
    margin-bottom: 0.35rem;
}

.pricing-savings-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    color: #059669;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.22);
    white-space: nowrap;
}

.pricing-savings-badge-muted {
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.28);
}

.pricing-savings-value {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.62rem;
    font-weight: 700;
    color: #b45309;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    white-space: nowrap;
}

.pricing-card-intro {
    min-height: 5.75rem;
    margin-bottom: 0.85rem;
}

.pricing-card-hook {
    margin: 0.45rem 0 0;
    line-height: 1.45;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pricing-list-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-size: 0.72rem;
    min-height: 1.1rem;
}

.pricing-list-price-label {
    color: var(--text-muted);
    font-weight: 600;
}

.pricing-list-price-label-muted {
    opacity: 0.85;
}

.pricing-list-price-value {
    color: var(--text-muted);
    text-decoration: line-through;
    opacity: 0.85;
}

.pricing-hero-anchor strong {
    color: var(--text-primary);
}

.pricing-savings-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.65rem;
    margin-top: 0.35rem;
}

.pricing-unit-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.15rem;
}

.pricing-unit-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.pricing-card-price-panel {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem 1.05rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    background: rgba(255, 107, 0, 0.04);
    border: 1px solid rgba(255, 107, 0, 0.12);
    flex-shrink: 0;
}

.pricing-card-featured .pricing-card-price-panel {
    background: rgba(255, 107, 0, 0.07);
    border-color: rgba(255, 107, 0, 0.2);
}

.pricing-card-price-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    min-height: 2rem;
}

.pricing-card-price-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.pricing-card-body {
    padding: 1.15rem 1.2rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    min-height: 0;
}

.pricing-card-footer {
    margin-top: auto;
    padding-top: 0.25rem;
}

.pricing-buy-btn-alt {
    display: none;
}

.pricing-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0;
}

.pricing-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.pricing-card-price {
    font-size: clamp(1.45rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    word-break: break-word;
}

.pricing-card-pricing-row {
    display: none;
}

.pricing-card-currency {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    vertical-align: super;
    margin-right: 0.1rem;
}

.pricing-credit-pill {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 0.28rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.22);
    white-space: nowrap;
}

.pricing-features-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 0.35rem 0.85rem;
    margin-bottom: 1rem;
}

.pricing-features {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.42rem 0;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.pricing-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.8rem 1.25rem;
    font-size: 0.95rem;
}

.pricing-card-note {
    margin-top: 0.65rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.45;
}

.pricing-card-note a {
    font-weight: 600;
}

.pricing-back-link {
    text-align: center;
    margin-top: 1.25rem;
}

.pricing-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.pricing-back-btn:hover {
    color: var(--accent-primary);
}

@media (max-width: 899px) {
    .pricing-page {
        padding: 1.5rem 1rem 2.5rem;
    }

    .pricing-hero-title,
    .pricing-hero-subtitle {
        text-align: center;
    }

    .pricing-hero-icon {
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-balance-card {
        align-items: center;
        width: 100%;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }

    .pricing-offer-column .pricing-section-title,
    .pricing-offer-column .pricing-section-desc {
        text-align: center;
    }
}

.light-theme .pricing-hero-band,
.light-theme .pricing-bento-tile,
.light-theme .pricing-usage-strip {
    background: #ffffff;
}

.light-theme .pricing-bento-tile--balance {
    background: linear-gradient(160deg, rgba(255, 107, 0, 0.08) 0%, #ffffff 70%);
}

.light-theme .pricing-usage-panel {
    background: linear-gradient(165deg, rgba(255, 107, 0, 0.05) 0%, #ffffff 45%);
    border-color: rgba(255, 107, 0, 0.18);
}

.light-theme .pricing-usage-card {
    background: #ffffff;
}

.light-theme .pricing-usage-card-cost {
    background: #fff7ed;
    border-color: rgba(255, 107, 0, 0.16);
}

.light-theme .pricing-features-box {
    background: #f8fafc;
}

.light-theme .pricing-features li {
    border-bottom-color: #e2e8f0;
}

.light-theme .pricing-card-featured {
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.light-theme .pricing-usage-item {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.light-theme .app-main-wrapper:has(.pricing-page),
.light-theme .app-main-wrapper:has(.account-page),
.light-theme .app-main-wrapper:has(.advisor-page),
.light-theme .app-main-wrapper:has(.affiliate-page) {
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.03), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.02), transparent 50%);
}

/* ─────────────────────────────────────────────
   Admin Dashboard Stats
   ───────────────────────────────────────────── */

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .admin-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .admin-stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.admin-stat-card {
    display: block;
    padding: 1.25rem 1.35rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.admin-stat-card:hover {
    border-color: rgba(255, 107, 0, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.admin-stat-card-accent {
    border-color: rgba(255, 107, 0, 0.28);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.06), var(--bg-secondary));
}

.admin-order-action-form {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.pricing-empty-state {
    grid-column: 1 / -1;
    padding: 2rem 1.5rem;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
}

.text-success {
    color: #059669;
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.admin-stat-label {
    font-size: 0.825rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.admin-cell-truncate {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.admin-pagination ul.pagination,
.admin-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.35rem;
    padding: 0;
    margin: 0;
}

.admin-pagination .page-item,
.admin-pagination li {
    list-style: none;
}

.admin-pagination .page-link,
.admin-pagination a,
.admin-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.admin-pagination .page-item.active .page-link,
.admin-pagination li.active a,
.admin-pagination li.active span {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}

.admin-pagination a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.light-theme .admin-stat-card {
    background: #ffffff;
}

/* Auth form 2-col inside card */
.auth-card .admin-form-grid-2 {
    gap: 0.85rem;
}

.auth-card .admin-form-grid-2 .auth-form-block {
    margin-bottom: 0;
}

.register-bonus-badge.auth-alert {
    margin: 0 0 1rem;
}

/* Error pages */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.error-page-code {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.error-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1rem 0 0.5rem;
}

.error-page-message {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.checkout-page-inner {
    max-width: 720px;
    margin: 0 auto;
}

.checkout-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.checkout-card-header {
    margin-bottom: 1.25rem;
}

.checkout-status-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.75rem;
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-primary);
}

.checkout-status-paid { background: rgba(34, 197, 94, 0.15); color: var(--success); }
.checkout-status-awaiting_review { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.checkout-status-cancelled,
.checkout-status-expired { background: rgba(239, 68, 68, 0.12); color: var(--danger); }

.checkout-bank-box,
.checkout-proof-box {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-light);
}

.checkout-bank-list {
    display: grid;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.checkout-bank-list div {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.checkout-bank-list dt {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.checkout-bank-list dd {
    margin: 0;
    color: var(--text-primary);
}

.checkout-copy-field code {
    font-size: 0.95rem;
    word-break: break-all;
}

.checkout-warning {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.2);
    color: var(--text-primary);
}

.checkout-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* ─────────────────────────────────────────────
   Account / Orders Pages
   ───────────────────────────────────────────── */

body:has(.account-page),
body:has(.pricing-page),
body:has(.legal-page),
body:has(.training-page),
body:has(.advisor-page),
body:has(.affiliate-page) {
    overflow: auto;
    height: auto;
    min-height: 100vh;
}

.app-main-wrapper:has(.account-page),
.app-main-wrapper:has(.pricing-page),
.app-main-wrapper:has(.legal-page),
.app-main-wrapper:has(.training-page),
.app-main-wrapper:has(.advisor-page),
.app-main-wrapper:has(.affiliate-page) {
    overflow-y: auto;
    height: auto;
    min-height: 0;
    flex: 1;
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 0, 0.04), transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 100%, rgba(59, 130, 246, 0.03), transparent 50%);
}

.nav-user-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
}

.light-theme .nav-user-badge {
    background: rgba(0, 0, 0, 0.03);
}

.account-page {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.account-page-inner-narrow {
    max-width: 920px;
}

.account-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.account-hero-compact {
    margin-bottom: 1.25rem;
}

.account-hero-copy {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.account-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.18);
}

.account-hero-title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.15;
}

.account-hero-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    max-width: 36rem;
}

.account-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.account-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.account-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.account-stat-accent {
    border-color: rgba(255, 107, 0, 0.24);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.07), var(--bg-card));
}

.account-stat-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}

.account-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.account-stat-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.account-stat-icon {
    font-size: 1.1rem;
}

.account-stat-unit {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.account-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
}

.account-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border-light);
}

.account-panel-title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.account-panel-desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.account-empty-state {
    text-align: center;
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.account-empty-state-compact {
    padding: 2rem 1.25rem;
}

.account-empty-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.85rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
}

.account-empty-state h3 {
    margin: 0 0 0.35rem;
    font-size: 1rem;
}

.account-empty-state p {
    margin: 0 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.account-order-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-order-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.account-order-card:hover {
    border-color: rgba(255, 107, 0, 0.22);
    background: rgba(255, 107, 0, 0.03);
}

.account-order-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.account-order-ref {
    font-size: 0.82rem;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
}

.account-order-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.account-order-package {
    color: var(--text-primary);
    font-weight: 600;
}

.account-order-dot {
    opacity: 0.5;
}

.account-order-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    flex-shrink: 0;
}

.account-order-amount {
    font-size: 1.05rem;
    color: var(--accent-primary);
}

.account-status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

.account-status-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #059669;
}

.account-status-review {
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
}

.account-status-pending {
    background: rgba(255, 107, 0, 0.12);
    color: var(--accent-primary);
}

.account-status-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

.account-status-muted {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}

.account-table-wrap {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.account-table th {
    background: rgba(0, 0, 0, 0.16);
}

.account-table-date {
    white-space: nowrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.account-table-desc {
    color: var(--text-secondary);
    max-width: 280px;
}

.account-credit-badge {
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-full);
}

.account-credit-purchase { background: rgba(34, 197, 94, 0.12); color: #059669; }
.account-credit-grant { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.account-credit-bonus { background: rgba(168, 85, 247, 0.12); color: #7c3aed; }
.account-credit-usage { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.account-credit-muted { background: rgba(255, 255, 255, 0.06); color: var(--text-secondary); }

.account-credit-amount {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.account-credit-amount.is-positive { color: #059669; }
.account-credit-amount.is-negative { color: var(--danger); }

.account-payment-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 900px) {
    .account-payment-grid {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    }
}

.account-info-list {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.account-info-list div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    align-items: start;
}

.account-info-list dt {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.account-info-list dd {
    margin: 0;
    color: var(--text-primary);
}

.account-info-copy-row dd {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.account-copy-code {
    font-size: 0.92rem;
    word-break: break-all;
    padding: 0.35rem 0.55rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.18);
}

.account-copy-highlight {
    font-size: 1.15rem;
    color: var(--accent-primary);
}

.account-note-box {
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.18);
    font-size: 0.88rem;
    line-height: 1.55;
}

.account-note-meta {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.account-form .form-group {
    margin-bottom: 0.85rem;
}

.account-alert {
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
    line-height: 1.5;
}

.account-alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #059669;
}

.account-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.22);
    color: var(--danger);
}

.account-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.account-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--success);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    font-size: 0.88rem;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 0.5rem 1rem;
    background: var(--accent-primary);
    color: #fff;
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
}

.inline-logout-form,
.inline-delete-form {
    display: inline;
    margin: 0;
}

.legal-document h2 {
    font-size: 1rem;
    margin: 1.25rem 0 0.5rem;
}

.legal-document p,
.legal-document li {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Legal pages — full layout */
.legal-page {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem 2.5rem;
}

.legal-hero {
    margin: 0 -1.25rem 1.75rem;
    padding: 2rem 1.5rem 1.75rem;
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.12) 0%, rgba(255, 140, 58, 0.06) 45%, transparent 100%),
        var(--bg-secondary);
    border-bottom: 1px solid var(--border-light);
}

.legal-hero-inner {
    max-width: 760px;
}

.legal-hero-badge {
    display: inline-flex;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
    border: 1px solid rgba(255, 107, 0, 0.22);
}

.legal-hero-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 3vw, 2.15rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.legal-hero-subtitle {
    margin: 0 0 1rem;
    max-width: 42rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

.legal-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.legal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 960px) {
    .legal-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 2rem;
    }
}

.legal-toc {
    position: sticky;
    top: 5rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.legal-toc-title {
    margin: 0 0 0.75rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.legal-toc-list {
    margin: 0 0 1rem;
    padding-left: 1.1rem;
    font-size: 0.78rem;
    line-height: 1.5;
}

.legal-toc-list a {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.legal-toc-list a:hover {
    color: var(--accent-primary);
}

.legal-toc-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
}

.legal-toc-links a {
    padding: 0.28rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
}

.legal-toc-links a.is-active,
.legal-toc-links a:hover {
    color: var(--accent-primary);
    border-color: rgba(255, 107, 0, 0.28);
    background: rgba(255, 107, 0, 0.08);
}

.legal-body {
    padding: 1.35rem 1.35rem 1.5rem;
    border-radius: var(--radius-xl);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.legal-section {
    scroll-margin-top: 5.5rem;
}

.legal-section + .legal-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border-light);
}

.legal-section h2 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.legal-section p {
    margin: 0 0 0.85rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.75;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

.legal-section ul,
.legal-section ol {
    margin: 0 0 0.85rem;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.legal-section li + li {
    margin-top: 0.35rem;
}

.legal-section a {
    color: var(--accent-primary);
    font-weight: 600;
}

.legal-ordered {
    list-style: decimal;
}

.legal-info-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.legal-info-list li {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

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

.legal-info-list span {
    color: var(--text-muted);
    font-weight: 600;
}

.legal-info-list strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-callout {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    line-height: 1.65;
    color: var(--text-secondary);
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.18);
}

.legal-callout-warning {
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.22);
}

.legal-table-wrap {
    margin: 1rem 0;
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.legal-table th,
.legal-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-light);
}

.legal-table th {
    background: var(--bg-secondary);
    font-weight: 700;
    color: var(--text-primary);
}

.legal-table td {
    color: var(--text-secondary);
    line-height: 1.55;
}

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

.light-theme .legal-hero {
    background:
        linear-gradient(135deg, rgba(255, 107, 0, 0.08) 0%, rgba(255, 140, 58, 0.04) 45%, transparent 100%),
        #f8fafc;
}

.light-theme .legal-body,
.light-theme .legal-toc {
    background: #ffffff;
}

@media (max-width: 959px) {
    .legal-toc {
        position: static;
    }

    .legal-info-list li {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.auth-consent-label {
    margin: 0.75rem 0 1rem;
    font-size: 0.85rem;
    line-height: 1.45;
}

.light-theme .account-panel,
.light-theme .account-stat-card,
.light-theme .account-order-card {
    background: #ffffff;
}

.light-theme .account-empty-state {
    background: #fafafa;
}

@media (max-width: 768px) {
    .account-page {
        padding: 1.25rem 1rem 2rem;
    }

    .account-stats-grid {
        grid-template-columns: 1fr;
    }

    .account-hero-actions {
        width: 100%;
    }

    .account-hero-actions .btn {
        flex: 1;
    }

    .account-order-card {
        flex-direction: column;
        align-items: stretch;
    }

    .account-order-side {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .account-info-list div {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
}

/* ── Danışman paneli ── */
.advisor-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    width: 100%;
}

.advisor-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.advisor-hero-copy {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.advisor-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.35rem;
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.18);
}

.advisor-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

.advisor-title {
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.advisor-subtitle {
    margin: 0.45rem 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.advisor-speaker-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-light);
}

.advisor-header-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.advisor-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.advisor-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    box-shadow: var(--shadow-sm);
}

.advisor-stat-accent {
    border-color: rgba(255, 107, 0, 0.28);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.07), var(--bg-card));
}

.advisor-stat-model {
    grid-column: span 1;
}

.advisor-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.advisor-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.advisor-stat-icon {
    font-size: 1rem;
    margin-right: 0.15rem;
}

.advisor-progress {
    height: 5px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    margin-top: 0.35rem;
}

.advisor-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-hover));
    transition: width 0.4s ease-out;
}

.advisor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.advisor-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.35rem;
    box-shadow: var(--shadow-sm);
}

.advisor-card-primary {
    border-color: rgba(255, 107, 0, 0.2);
}

.advisor-card-wide {
    grid-column: 1 / -1;
}

.advisor-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.advisor-card-header h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.advisor-link-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.22);
    text-decoration: none;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}

.advisor-link-pill:hover {
    background: rgba(255, 107, 0, 0.16);
    border-color: rgba(255, 107, 0, 0.35);
}

.advisor-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
}

.advisor-empty-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
    background: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.15);
}

.advisor-empty-cta {
    margin-top: 0.65rem;
}

.advisor-draft-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advisor-draft-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-light);
}

.advisor-draft-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.advisor-draft-item:first-child {
    padding-top: 0;
}

.advisor-draft-meta {
    min-width: 0;
    flex: 1;
}

.advisor-draft-topic {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.advisor-draft-detail {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.briefing-template-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.briefing-template-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.briefing-template-card:hover {
    border-color: rgba(255, 107, 0, 0.35);
    background: rgba(255, 107, 0, 0.06);
    transform: translateX(2px);
}

.briefing-template-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
    background: rgba(255, 107, 0, 0.08);
}

.briefing-template-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.briefing-template-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.briefing-template-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.briefing-template-arrow {
    flex-shrink: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.briefing-template-card:hover .briefing-template-arrow {
    color: var(--accent-primary);
    transform: translateX(3px);
}

.advisor-tips-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.advisor-tip-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: rgba(255, 255, 255, 0.02);
}

.advisor-tip-card-warn {
    border-color: rgba(255, 107, 0, 0.25);
    background: rgba(255, 107, 0, 0.05);
    grid-column: 1 / -1;
}

.advisor-tip-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    line-height: 1.4;
}

.advisor-tip-card strong {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.advisor-tip-card p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.advisor-inspirations {
    margin: 1rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-light);
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.advisor-inspirations-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-right: 0.5rem;
}

.light-theme .advisor-stat-card,
.light-theme .advisor-card {
    background: #ffffff;
}

.light-theme .advisor-stat-accent {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.06), #ffffff);
}

.light-theme .advisor-empty-state {
    background: #fafafa;
}

.light-theme .advisor-speaker-badge {
    background: rgba(0, 0, 0, 0.03);
}

.light-theme .advisor-progress {
    background: #e2e8f0;
}

.light-theme .briefing-template-card,
.light-theme .advisor-tip-card {
    background: #fafafa;
}

.light-theme .briefing-template-card:hover {
    background: rgba(255, 107, 0, 0.05);
}

@media (max-width: 900px) {
    .advisor-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .advisor-page {
        padding: 1.25rem 1rem 2rem;
    }

    .advisor-grid,
    .advisor-tips-grid {
        grid-template-columns: 1fr;
    }

    .advisor-header-actions {
        width: 100%;
    }

    .advisor-header-actions .btn {
        flex: 1;
    }

    .advisor-tip-card-warn {
        grid-column: auto;
    }
}

@media (max-width: 480px) {
    .advisor-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Brifing paneli (stüdyo) ── */
.briefing-panel {
    border: 1px dashed var(--border-subtle, rgba(255,255,255,0.12));
    border-radius: var(--radius-md, 8px);
    padding: 0.75rem;
}

.briefing-summary {
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.briefing-summary::-webkit-details-marker {
    display: none;
}

.briefing-fields .form-control {
    font-size: 0.875rem;
}

.briefing-row {
    display: flex;
    gap: 0.75rem;
}

.briefing-row > div {
    flex: 1;
    max-width: 120px;
}

.inspiration-picker-list {
    max-height: 160px;
    overflow-y: auto;
}

.speech-status-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
}

.speech-status-bar .btn {
    flex: 0 0 auto;
    min-width: unset;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    white-space: nowrap;
    box-shadow: none;
}

.speech-status-bar .btn-primary {
    box-shadow: none;
}

.speech-status-bar .btn-primary:hover {
    transform: none;
    box-shadow: none;
}

.review-share-panel {
    padding: 0.75rem;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--border-subtle, rgba(255,255,255,0.08));
    background: var(--surface-elevated, rgba(255,255,255,0.03));
    margin-bottom: 0.5rem;
}

.review-share-input {
    flex: 1 1 200px;
    min-width: 0;
    font-size: 0.75rem;
}

.review-share-actions {
    width: 100%;
}

.review-share-wa {
    text-decoration: none;
    white-space: nowrap;
}

.workspace-footer-actions {
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .briefing-row {
        flex-direction: column;
    }

    .briefing-row > div {
        max-width: none;
    }
}

/* Bildirim zili */
.notification-bell-wrap {
    position: relative;
}

.notification-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: var(--accent-primary);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    max-height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    z-index: 2000;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem 0.85rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.notification-mark-all {
    border: none;
    background: none;
    color: var(--accent-primary);
    font-size: 0.72rem;
    cursor: pointer;
    padding: 0;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
}

.notification-item-link {
    display: flex;
    gap: 0.65rem;
    padding: 0.75rem 0.85rem;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-light);
}

.notification-item.is-unread .notification-item-link {
    background: rgba(255, 107, 0, 0.06);
}

.notification-item-link:hover {
    background: rgba(255, 107, 0, 0.1);
}

.notification-item-icon {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.notification-item-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.82rem;
    line-height: 1.35;
}

.notification-item-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.35;
}

.notification-item-time {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.notification-empty {
    padding: 1rem 0.85rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Davet programı ── */
.affiliate-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
    width: 100%;
}

.affiliate-hero-band {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 1.5rem;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.09) 0%, var(--bg-card) 58%);
    border: 1px solid rgba(255, 107, 0, 0.16);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.affiliate-hero-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1 1 320px;
    min-width: 0;
}

.affiliate-hero-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 0, 0.14);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 107, 0, 0.22);
}

.affiliate-eyebrow {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

.affiliate-title {
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
}

.affiliate-subtitle {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.55;
    max-width: 52ch;
}

.affiliate-reward-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid rgba(255, 107, 0, 0.28);
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.08);
    flex-shrink: 0;
}

.affiliate-hero-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.65rem;
    flex-shrink: 0;
}

.affiliate-package-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    min-width: 8.5rem;
}

.affiliate-package-badge-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.affiliate-package-badge strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.affiliate-package-badge-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}

.affiliate-package-badge-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.affiliate-reward-badge-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.affiliate-reward-badge strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1.1;
}

.affiliate-reward-badge-worth {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.2rem;
    line-height: 1.2;
}

.affiliate-reward-badge-note {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
    line-height: 1.2;
}

.affiliate-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.affiliate-stat {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.affiliate-stat--accent {
    border-color: rgba(255, 107, 0, 0.28);
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.07), var(--bg-card));
}

.affiliate-stat-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(255, 107, 0, 0.1);
    color: var(--accent-primary);
}

.affiliate-stat-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.affiliate-stat-value {
    display: block;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.affiliate-main {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.affiliate-share-card,
.affiliate-benefits {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.4rem;
    box-shadow: var(--shadow-sm);
}

.affiliate-share-card {
    border-color: rgba(255, 107, 0, 0.2);
}

.affiliate-share-card-head h2,
.affiliate-benefits h3,
.affiliate-steps h2 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.affiliate-share-card-head p {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.affiliate-link-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.affiliate-link-box {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 1.1rem;
    padding: 0.45rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
}

.affiliate-link-input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
}

.affiliate-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent-primary);
    border: none;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.affiliate-copy-btn:hover {
    background: var(--accent-hover);
}

.affiliate-copy-btn.is-copied {
    background: #16a34a;
}

.affiliate-code-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.85rem;
}

.affiliate-code-label {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.affiliate-code-chip {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.22);
    border-radius: var(--radius-full);
}

.affiliate-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.affiliate-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}

.affiliate-share-btn:hover {
    color: var(--text-primary);
    border-color: rgba(255, 107, 0, 0.3);
    background: rgba(255, 107, 0, 0.06);
}

.affiliate-share-btn--whatsapp:hover {
    color: #25d366;
    border-color: rgba(37, 211, 102, 0.35);
    background: rgba(37, 211, 102, 0.08);
}

.affiliate-benefits h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.affiliate-benefits-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.affiliate-benefits-list li {
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    align-items: center;
    column-gap: 0.75rem;
}

.affiliate-benefit-check {
    width: 1.75rem;
    height: 1.75rem;
    position: relative;
    flex-shrink: 0;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
    border-radius: 50%;
}

.affiliate-benefit-check svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
}

.affiliate-benefit-copy {
    min-width: 0;
}

.affiliate-benefits-list strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.1rem;
}

.affiliate-benefit-copy span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.affiliate-benefits-hint {
    margin: 1rem 0 0;
    padding: 0.65rem 0.85rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: rgba(255, 107, 0, 0.06);
    border: 1px dashed rgba(255, 107, 0, 0.22);
    border-radius: var(--radius-md);
}

.affiliate-steps {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.35rem 1.4rem;
    box-shadow: var(--shadow-sm);
}

.affiliate-steps h2 {
    margin-bottom: 1rem;
}

.affiliate-steps-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.affiliate-step {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
}

.affiliate-step--highlight {
    border-color: rgba(255, 107, 0, 0.28);
    background: linear-gradient(160deg, rgba(255, 107, 0, 0.08), rgba(255, 255, 255, 0.02));
}

.affiliate-step-num {
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--accent-primary);
    background: rgba(255, 107, 0, 0.12);
    border-radius: var(--radius-full);
}

.affiliate-step h3 {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0;
}

.affiliate-step p {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0.25rem 0 0;
}

.light-theme .affiliate-stat,
.light-theme .affiliate-share-card,
.light-theme .affiliate-benefits,
.light-theme .affiliate-steps {
    background: #ffffff;
}

.light-theme .affiliate-stat--accent {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.06), #ffffff);
}

.light-theme .affiliate-step--highlight {
    background: linear-gradient(160deg, rgba(255, 107, 0, 0.06), #fafafa);
}

.light-theme .affiliate-link-box {
    background: #f8fafc;
}

.light-theme .affiliate-step {
    background: #fafafa;
}

@media (max-width: 900px) {
    .affiliate-main {
        grid-template-columns: 1fr;
    }

    .affiliate-steps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .affiliate-page {
        padding: 1.25rem 1rem 2rem;
    }

    .affiliate-stats {
        grid-template-columns: 1fr;
    }

    .affiliate-hero-band {
        padding: 1.15rem 1.2rem;
    }

    .affiliate-reward-badge {
        width: 100%;
    }

    .affiliate-hero-badges {
        width: 100%;
    }

    .affiliate-package-badge {
        flex: 1 1 140px;
    }

    .affiliate-link-box {
        flex-direction: column;
    }

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

    .affiliate-steps-grid {
        grid-template-columns: 1fr;
    }
}

