/**
 * CouplesAI Master Theme CSS
 * Single source of truth for all styling
 * Black to Red gradient, Dark mode, Crimson accents
 */

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

/* Reset & Base */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #1A0A0A 0%, #DC143C 100%);
    background-attachment: fixed;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Theme Colors */
:root {
    --color-primary: #DC143C;
    --color-secondary: #1A0A0A;
    --color-accent: #FF6B9D;
    --bg-black: #0F0F0F;
    --bg-card: #1A1A1A;
    --bg-input: #252525;
    --text-white: #FFFFFF;
    --text-gray: #B0B0B0;
    --text-gray-dark: #6B6B6B;
    --border-dark: #2A2A2A;
    --border-input: #3A3A3A;
}

/* Layout - 900px Constrained */
.content-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) and (max-width: 1024px) {
    .content-container {
        max-width: 750px;
    }
}

/* Logo - COUPLESAI Split Weight - 40px on ALL screens */
.couplesai-logo {
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: baseline;
}

.couplesai-logo .couples {
    font-weight: 300;
    color: white;
    letter-spacing: 3px;
    font-size: 1.75rem; /* 28px always */
}

.couplesai-logo .ai {
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    font-size: 1.75rem; /* 28px always */
}

/* Logo with Tagline - Centered */
.logo-with-tagline {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

/* Tagline - scales proportionally, ALWAYS narrower than logo */
.logo-tagline {
    font-size: 7px;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    margin-top: 0;
    font-weight: 500;
    text-transform: uppercase;
}

/* Footer Logo - Smaller */
.couplesai-logo-small .couples {
    font-weight: 300;
    color: white;
    letter-spacing: 3px;
    font-size: 1.25rem; /* 20px */
}

.couplesai-logo-small .ai {
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    font-size: 1.25rem; /* 20px */
}

/* Full Page Gradient - Applied to body */
/* gradient-bg class removed - body itself is the gradient */

/* Gradient utility for icon circles and buttons */
.gradient-icon {
    background: linear-gradient(135deg, var(--color-primary) 0%, #8B0000 100%);
}

.btn-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, #8B0000 100%);
    transition: all 0.3s ease;
    min-height: 44px;
    border: none;
    cursor: pointer;
}

.btn-gradient:active {
    transform: scale(0.98);
}

@media (hover: hover) {
    .btn-gradient:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 25px -5px rgba(220, 20, 60, 0.6);
    }
}

/* Forms */
input,
textarea,
select {
    font-size: 16px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    color: var(--text-white);
}

/* Auto-expanding textarea */
textarea.auto-expand {
    min-height: 80px;
    max-height: 300px;
    overflow-y: auto;
    resize: none;
    transition: height 0.1s ease;
}

/* Character counter */
.char-counter {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    transition: color 0.2s ease;
}

.char-counter.warning {
    color: #f59e0b;
}

.char-counter.danger {
    color: #ef4444;
}

.char-counter .count {
    font-variant-numeric: tabular-nums;
}

input::placeholder,
textarea::placeholder,
select::placeholder {
    color: var(--text-gray-dark);
}

input:focus,
textarea:focus,
select:focus {
    background: #2A2A2A;
    border-color: var(--color-primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.3);
}

input:disabled,
textarea:disabled,
select:disabled {
    background: var(--bg-card);
    color: #8B8B8B;
    cursor: not-allowed;
}

label {
    -webkit-user-select: none;
    user-select: none;
    color: #E5E5E5;
}

/* Cards - Translucent with backdrop blur */
.dark-card {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(42, 42, 42, 0.6);
}

.character-item {
    background: rgba(37, 37, 37, 0.8);
    border-color: rgba(58, 58, 58, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

/* Buttons */
button,
.btn {
    min-height: 44px;
    font-family: 'Inter', sans-serif;
}

.touch-manipulation:active {
    transform: scale(0.98);
}

/* Links */
a {
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
}

/* Utility Classes */
.text-red { color: var(--color-primary); }
.text-gray { color: var(--text-gray); }
.bg-dark { background: var(--bg-black); }
.bg-card { background: var(--bg-card); }
.border-dark { border-color: var(--border-dark); }

/* Action Cards */
.action-card {
    background: rgba(37, 37, 37, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(58, 58, 58, 0.5);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.action-card:hover {
    background: rgba(37, 37, 37, 0.9);
    transform: translateY(-2px);
    border-color: var(--color-primary);
    box-shadow: 0 8px 20px rgba(220, 20, 60, 0.3);
}

.action-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    position: relative;
}

/* Story Cards */
.story-card {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    cursor: pointer;
}

.story-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 20, 60, 0.3);
    border-color: var(--color-primary);
    background: rgba(26, 26, 26, 0.9);
}

/* Alerts */
.alert-yellow {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 16px;
}

.alert-green {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 16px;
}

.alert-red {
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 8px;
    padding: 16px;
}

/* Info Bar - Blue, Informative (matches alert styling) */
.info-bar {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 16px;
}

/* Badge */
.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid var(--bg-input);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 48px;
    height: 48px;
    border: 2px solid transparent;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Partner Type Cards */
.partner-type-card {
    background: #252525;
    border: 2px solid #3A3A3A;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.partner-type-card:hover {
    border-color: #DC143C;
    transform: translateY(-2px);
}

.partner-type-card.selected {
    border-color: #DC143C;
    background: rgba(220, 20, 60, 0.1);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.2);
}

.partner-type-card.selected::after {
    content: '✓ SELECTED';
    display: block;
    color: #10B981;
    font-size: 12px;
    font-weight: 700;
    margin-top: 12px;
}

/* Horizontal Option Selector - 3 across */
.option-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.option-btn {
    display: block;
    position: relative;
    background: rgba(37, 37, 37, 0.8);
    border: 1px solid rgba(58, 58, 58, 0.6);
    border-radius: 6px;
    padding: 10px 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.option-btn:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.4);
}

.option-btn.selected {
    background: rgba(220, 20, 60, 0.2);
    border-color: var(--color-primary);
}

.option-btn .option-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.option-btn .option-title {
    font-weight: 600;
    font-size: 14px;
    color: white;
    margin-bottom: 2px;
}

.option-btn .option-desc {
    font-size: 11px;
    color: #777;
}

.option-btn.selected .option-desc {
    color: #999;
}

.option-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Age Confirmation Checkbox */
.age-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(220, 20, 60, 0.1);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.age-checkbox-wrapper input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: #DC143C;
    flex-shrink: 0;
}

.age-checkbox-wrapper label {
    color: #E5E5E5;
    font-size: 0.875rem;
    line-height: 1.5;
    cursor: pointer;
}

/* Feature Cards - Polished */
.feature-card {
    text-align: center;
    padding: 32px 24px;
    background: rgba(26, 26, 26, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(220, 20, 60, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 32px;
    color: var(--color-primary);
    margin-bottom: 16px;
}

/* CTA Button Glow */
.btn-glow {
    box-shadow: 0 4px 20px rgba(220, 20, 60, 0.3);
}

.btn-glow:hover {
    box-shadow: 0 6px 25px rgba(220, 20, 60, 0.4);
}

/* Fade-in Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.delay-1 { animation-delay: 0.1s; opacity: 0; }
.delay-2 { animation-delay: 0.2s; opacity: 0; }
.delay-3 { animation-delay: 0.3s; opacity: 0; }
.delay-4 { animation-delay: 0.4s; opacity: 0; }

/* ===== DASHBOARD SIDEBAR LAYOUT ===== */

/* Dashboard body removes default gradient overflow handling */
.dashboard-body {
    overflow-x: hidden;
}

/* Dashboard container uses flexbox for sidebar layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(42, 42, 42, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(42, 42, 42, 0.6);
}

.sidebar-logo {
    font-family: 'Montserrat', sans-serif;
    display: inline-flex;
    align-items: baseline;
    text-decoration: none;
}

.sidebar-logo .couples {
    font-weight: 300;
    color: white;
    letter-spacing: 3px;
    font-size: 1.5rem;
}

.sidebar-logo .ai {
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    font-size: 1.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-gray);
    text-decoration: none;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(220, 20, 60, 0.1);
    color: var(--text-white);
}

.nav-item.active {
    background: rgba(220, 20, 60, 0.15);
    color: var(--text-white);
    border-left: 3px solid var(--color-primary);
    margin-left: -3px;
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-item .nav-label {
    flex: 1;
    font-weight: 500;
    font-size: 14px;
}

.nav-badge {
    background: var(--color-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(42, 42, 42, 0.6);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #8B0000);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-status {
    font-size: 12px;
    color: var(--text-gray-dark);
}

/* Main content area */
.dashboard-main {
    flex: 1;
    margin-left: 240px;
    padding: 24px;
    min-height: 100vh;
}

.dashboard-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.page-subtitle {
    color: var(--text-gray);
    font-size: 14px;
}

/* Dashboard footer */
.dashboard-footer {
    margin-left: 240px;
    padding: 24px;
    border-top: 1px solid rgba(42, 42, 42, 0.4);
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 42, 0.6);
    z-index: 99;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header .sidebar-logo .couples,
.mobile-header .sidebar-logo .ai {
    font-size: 1.25rem;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 20px;
    cursor: pointer;
}

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

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

/* Mobile responsive */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
    }

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

    .dashboard-main {
        margin-left: 0;
        padding-top: 76px;
    }

    .dashboard-footer {
        margin-left: 0;
    }
}

/* ===== LIST CONTROLS ===== */
.list-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(37, 37, 37, 0.8);
    border: 1px solid rgba(58, 58, 58, 0.6);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: rgba(37, 37, 37, 1);
}

.search-box input::placeholder {
    color: var(--text-gray-dark);
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray-dark);
    font-size: 14px;
}

.control-select {
    padding: 10px 36px 10px 14px;
    background: rgba(37, 37, 37, 0.8);
    border: 1px solid rgba(58, 58, 58, 0.6);
    border-radius: 8px;
    color: var(--text-white);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236B6B6B' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
}

.control-select:focus {
    outline: none;
    border-color: var(--color-primary);
}

@media (max-width: 768px) {
    .list-controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .control-select {
        width: 100%;
    }
}

/* ===== COMPACT STORY CARDS ===== */
.story-card-compact {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(42, 42, 42, 0.5);
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: block;
}

.story-card-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(220, 20, 60, 0.2);
    border-color: var(--color-primary);
    background: rgba(26, 26, 26, 0.9);
}

.story-card-compact.unread {
    border-left: 3px solid var(--color-primary);
}

.story-card-compact .story-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.story-card-compact .story-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-white);
    flex: 1;
}

.story-card-compact.unread .story-title {
    font-weight: 700;
}

.story-card-compact .story-meta-right {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-gray-dark);
    font-size: 12px;
}

.story-card-compact .story-meta-right .favorite {
    color: #facc15;
}

.story-card-compact .story-preview {
    color: var(--text-gray);
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.story-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-gray);
}

.story-tag.spicy {
    background: rgba(220, 20, 60, 0.15);
    color: var(--color-accent);
}

.story-tag.shared {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.story-tag i {
    font-size: 10px;
}

.new-badge {
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

/* Story list container */
.story-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== STORIES TABS ===== */
.stories-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(42, 42, 42, 0.6);
    padding-bottom: 0;
}

.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-white);
    background: rgba(220, 20, 60, 0.05);
}

.tab-btn.active {
    color: var(--text-white);
    border-bottom-color: var(--color-primary);
}

.tab-btn .tab-badge {
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile: Full-width cards & fixed tabs */
@media (max-width: 480px) {
    /* Full-width cards on mobile - maximize screen real estate */
    /* Keep padding-top: 76px for mobile header, remove horizontal padding */
    .dashboard-main {
        padding: 76px 0 16px 0;
        overflow-x: hidden;
    }

    .dashboard-content {
        overflow-x: hidden;
    }

    /* Dark cards extend edge-to-edge */
    .dark-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        overflow-x: hidden;
    }

    /* Page header needs horizontal padding since main area doesn't have it */
    .page-header {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Card content padding - override inline rounded-xl classes */
    .dark-card.rounded-xl,
    .dark-card[class*="rounded"] {
        border-radius: 0;
    }

    /* Ensure card internal padding is correct */
    .dark-card.p-6,
    .dark-card[class*="p-6"],
    .dark-card[class*="p-8"] {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Stories tabs - fit all tabs without scrolling */
    .stories-tabs {
        display: flex;
        gap: 0;
        overflow-x: visible;
        padding: 0;
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .tab-btn {
        flex: 1;
        padding: 10px 6px;
        font-size: 12px;
        text-align: center;
        white-space: nowrap;
    }

    .tab-btn .tab-badge {
        font-size: 9px;
        padding: 1px 5px;
        margin-left: 4px;
    }

    /* Story cards */
    .story-card-compact {
        padding: 12px 14px;
        border-radius: 8px;
    }

    .story-card-compact .story-title {
        font-size: 14px;
        word-break: break-word;
    }

    .story-card-compact .story-preview {
        font-size: 12px;
        word-break: break-word;
    }

    .story-card-compact .story-header {
        flex-wrap: wrap;
        gap: 4px;
    }

    .story-card-compact .story-meta-right {
        font-size: 11px;
        flex-shrink: 0;
    }

    .story-tags {
        flex-wrap: wrap;
    }

    .story-tag {
        font-size: 10px;
        padding: 3px 8px;
    }

    /* List controls */
    .list-controls {
        padding: 0;
    }
}

/* ===== PROFILE PANEL (Slide-out) ===== */
.profile-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 199;
}

.profile-panel-overlay.open {
    opacity: 1;
    visibility: visible;
}

.profile-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(42, 42, 42, 0.6);
    transition: right 0.3s ease;
    z-index: 200;
    overflow-y: auto;
    padding: 24px;
}

.profile-panel.open {
    right: 0;
}

.profile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(42, 42, 42, 0.6);
}

.profile-panel-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-white);
}

.profile-panel-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(42, 42, 42, 0.6);
    border-radius: 8px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.15s ease;
}

.profile-panel-close:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: rgba(220, 20, 60, 0.3);
    color: var(--text-white);
}

.profile-panel-section {
    margin-bottom: 32px;
}

.profile-panel-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile: full width panel */
@media (max-width: 480px) {
    .profile-panel {
        width: 100%;
        right: -100%;
    }
}

/* ===== LOGOUT BUTTON (Sidebar) ===== */
.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin-top: 16px;
    background: rgba(220, 20, 60, 0.08);
    border: 1px solid rgba(220, 20, 60, 0.2);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.15s ease;
}

.logout-btn:hover {
    background: rgba(220, 20, 60, 0.15);
    border-color: rgba(220, 20, 60, 0.4);
}

.logout-btn i {
    width: 20px;
    font-size: 14px;
}

/* ===== DASHBOARD LOADING STATE ===== */
.dashboard-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.dashboard-loading .spinner {
    width: 40px;
    height: 40px;
}
