/* Shared Sidebar Navigation Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh; /* fallback */
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh; /* modern browsers */
    display: flex;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-sidebar: #111111;
    --bg-tertiary: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --accent: #FFB347;
    --accent-hover: #ffc875;
    --accent-light: rgba(59, 130, 246, 0.15);
    --success: #22c55e;
    --error: #ef4444;
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.08);
    --shadow: rgba(0, 0, 0, 0.4);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --sidebar-width: 240px;
}

/* Usage Pill - Top Right Corner */
.usage-pill {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
}

.usage-pill:hover {
    background: rgba(17, 17, 17, 1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.6);
}

.usage-pill.usage-warning {
    border-color: rgba(239, 68, 68, 0.5);
    animation: pulse-warning 2s infinite;
}

.usage-pill.usage-unlimited {
    border-color: rgba(34, 197, 94, 0.5);
}

@keyframes pulse-warning {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(239, 68, 68, 0.3);
    }
}

.usage-tier {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.usage-tier.tier-free {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.usage-tier.tier-starter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.usage-tier.tier-pro {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.usage-tier.tier-business {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
}

.usage-count {
    color: var(--text-primary);
    font-weight: 600;
}

/* Modal Overlay */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .modal-close {
        width: 48px;
        height: 48px;
    }
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal .error-message {
    margin-bottom: 20px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 8px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
}

.modal .btn-primary {
    width: 100%;
    padding: 14px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.modal .btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.modal-footer-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-footer-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

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

/* Responsive Design for Modals */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px;
        margin: 16px;
    }

    /* Usage pill mobile adjustments */
    .usage-pill {
        top: 76px;
        right: 12px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .usage-tier {
        padding: 3px 8px;
        font-size: 10px;
    }

    .modal-header h2 {
        font-size: 20px;
    }
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    padding: 24px 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    overscroll-behavior: auto;
}

.sidebar-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

/* Tier Badge in Sidebar Header */
.tier-badge-header {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
    vertical-align: middle;
}

.tier-badge-header.tier-free {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-badge-header.tier-starter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.tier-badge-header.tier-pro {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 87, 108, 0.3);
}

.tier-badge-header.tier-business {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(25, 84, 123, 0.3);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    font-weight: 500;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .sidebar-link {
        min-height: 48px;
        padding: 14px 16px;
    }
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
}

/* Collapsible Section in Sidebar */
.sidebar-section {
    margin-top: 8px;
}

.sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 12px 16px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 15px;
    font-weight: 500;
    user-select: none;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .sidebar-section-header {
        min-height: 48px;
        padding: 14px 16px;
    }
}

.sidebar-section-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidebar-section-header .arrow {
    transition: transform 0.2s;
    font-size: 12px;
}

.sidebar-section.open .arrow {
    transform: rotate(90deg);
}

.sidebar-section-content {
    display: none;
    padding-left: 16px;
    margin-top: 4px;
    margin-bottom: 8px;
}

.sidebar-section.open .sidebar-section-content {
    display: block;
}

.sidebar-section-content .sidebar-link {
    font-size: 14px;
    padding: 10px 16px;
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

/* Auth Section in Sidebar */
.sidebar-footer .user-info {
    background: transparent;
    border: none;
    padding: 0 16px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer .user-email {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-footer .btn-logout,
.sidebar-footer .btn-secondary {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: block;
}

.sidebar-footer .btn-logout:hover,
.sidebar-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh; /* fallback */
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh; /* modern browsers */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .mobile-menu-btn {
        width: 48px;
        height: 48px;
    }
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Sidebar Backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* ============================================
   BOTTOM TAB BAR NAVIGATION - MOBILE
   ============================================ */

@media (max-width: 768px) {
    /* Hide sidebar completely on mobile */
    .sidebar,
    .mobile-menu-btn,
    .sidebar-backdrop {
        display: none !important;
    }

    /* Main content takes full width with padding for bottom nav */
    .main-content {
        margin-left: 0 !important;
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        min-height: 100vh;
        min-height: -webkit-fill-available;
        min-height: 100dvh;
        overflow-y: visible; /* Allow body to scroll instead */
        -webkit-overflow-scrolling: auto;
    }

    /* Bottom Tab Bar Container */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(64px + env(safe-area-inset-bottom, 0px));
        background: rgba(17, 17, 17, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        display: flex;
        justify-content: space-around;
        align-items: flex-start;
        z-index: 1000;
        padding-top: 8px;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    /* Individual Tab Item */
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex: 1;
        height: 56px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 11px;
        font-weight: 500;
        gap: 4px;
        transition: color 0.2s ease;
        padding-top: 4px;
        -webkit-tap-highlight-color: transparent;
    }

    /* Active Tab */
    .bottom-nav-item.active {
        color: var(--accent);
    }

    /* Sign In button - highlighted in bottom nav */
    .bottom-nav-item.bottom-nav-item-primary {
        color: #7bf6d6;
        font-weight: 600;
    }

    .bottom-nav-item.bottom-nav-item-primary svg {
        stroke: #7bf6d6;
        stroke-width: 2.5px;
    }

    /* Tab Icon (SVG or emoji) */
    .bottom-nav-item .nav-icon {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        line-height: 1;
    }

    .bottom-nav-item svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        stroke-width: 2;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    /* Tab Label */
    .bottom-nav-item span {
        font-size: 11px;
        line-height: 1.2;
    }

    /* Usage pill reposition to top-right */
    .usage-pill {
        top: 76px;
        right: 12px;
        left: auto;
        padding: 8px 12px;
        font-size: 12px;
    }

    .usage-tier {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* Adjust upgrade banner for bottom nav */
    .upgrade-banner {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
        transform: translateX(-50%);
        left: 50%;
    }

    @keyframes slideUp {
        from {
            opacity: 0;
            transform: translateX(-50%) translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }
    }
}

@media (max-width: 480px) {
    .bottom-nav-item span {
        font-size: 10px;
    }
    
    .bottom-nav-item .nav-icon {
        font-size: 20px;
    }
}

/* Desktop - Normal Sidebar */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .sidebar-backdrop {
        display: none !important;
    }

    .sidebar {
        left: 0 !important;
    }

    .bottom-nav {
        display: none !important;
    }
}

/* Footer */
.site-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    padding: 32px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
}

/* Sticky Footer for Gallery */
.sticky-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.sticky-footer .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.sticky-footer .footer-section h4 {
    display: none;
}

.sticky-footer .footer-links {
    gap: 20px;
}

.sticky-footer .footer-bottom {
    display: none;
}

@media (max-width: 768px) {
    .sticky-footer .footer-content {
        flex-direction: column;
        gap: 12px;
    }

    .sticky-footer .footer-links {
        justify-content: center;
    }
}

/* Top Navigation Bar */
.navbar {
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
    padding: 0;
    height: 64px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    margin: 0 auto;
    width: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 20px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .nav-link {
        min-height: 48px;
        padding: 12px 16px;
    }
}

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

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: var(--text-secondary);
    text-decoration: none;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .dropdown-toggle {
        min-height: 48px;
        padding: 12px 16px;
    }
}

.dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.dropdown-toggle::after {
    content: '';
    border: solid var(--text-secondary);
    border-width: 0 2px 2px 0;
    display: inline-block;
    padding: 2px;
    transform: rotate(45deg);
    transition: transform 0.2s;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(-135deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    min-width: 180px;
    padding: 8px 0;
    margin-top: 4px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    min-height: 44px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    font-size: 14px;
}

/* Touch target improvements for mobile */
@media (max-width: 768px) {
    .dropdown-menu a {
        min-height: 48px;
        padding: 14px 16px;
    }
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 16px;
    }

    .nav-menu {
        gap: 8px;
    }

    .nav-link,
    .dropdown-toggle {
        min-height: 48px;
        padding: 12px 16px;
        font-size: 13px;
    }

    .dropdown-menu {
        min-width: 160px;
    }
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* fallback */
    min-height: -webkit-fill-available; /* iOS Safari */
    min-height: 100dvh; /* modern browsers */
    padding: 24px;
}

.auth-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 40px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.auth-card h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin: 0 0 8px 0;
}

.auth-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    text-align: center;
    margin: 0 0 32px 0;
    line-height: 1.5;
}

.auth-card .form-group {
    margin-bottom: 20px;
}

.auth-card .form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-card .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.auth-card .form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.auth-card .form-group input::placeholder {
    color: var(--text-muted);
}

.auth-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-card .btn-primary {
    background: var(--accent);
    color: white;
}

.auth-card .btn-primary:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-1px);
}

.auth-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

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

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

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.auth-footer a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.auth-footer a:hover {
    color: var(--accent);
}

.auth-card .status-message {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.auth-card .status-message.success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.auth-card .status-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.auth-card .status-message.info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

@media (max-width: 768px) {
    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 28px;
    }

    .auth-card h1 {
        font-size: 24px;
    }
}

/* Upgrade Banner - Floating Pill */
.upgrade-banner {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(calc(-50% + var(--sidebar-width) / 2));
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(calc(-50% + var(--sidebar-width) / 2)) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(calc(-50% + var(--sidebar-width) / 2)) translateY(0);
    }
}

.upgrade-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.95));
    backdrop-filter: blur(10px);
    padding: 14px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.4);
    max-width: 90vw;
}

.upgrade-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.upgrade-text strong {
    font-weight: 700;
}

.upgrade-btn {
    background: white;
    color: #3b82f6;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
}

.upgrade-btn:hover {
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.upgrade-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.upgrade-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 600px) {
    .upgrade-banner {
        bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    }

    .upgrade-banner-content {
        padding: 12px 16px;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 24px;
    }

    .upgrade-text {
        font-size: 13px;
        text-align: center;
    }

    .upgrade-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
}


/* ============================================
   MOBILE MORE MENU MODAL (Bottom Sheet)
   ============================================ */

.mobile-more-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
}

.mobile-more-menu.open {
    display: block;
}

.mobile-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.mobile-more-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    animation: slideUpSheet 0.3s ease;
    max-height: 70vh;
    overflow-y: auto;
}

.mobile-more-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.mobile-more-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.mobile-more-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-more-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.mobile-more-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-more-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
    min-height: 48px;
}

.mobile-more-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.mobile-more-item .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-secondary);
}

.mobile-more-item.admin-only {
    display: none;
}

.mobile-more-item.admin-only.visible {
    display: flex;
}

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

@keyframes slideUpSheet {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Only show mobile more menu on mobile */
@media (min-width: 769px) {
    .mobile-more-menu {
        display: none !important;
    }
}
