* {
    box-sizing: border-box;
}

:root {
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-glow: rgba(129, 140, 248, 0.2);
    --bg-main: #080b14;
    --card-bg: #111827;
    --card-hover: #1f2937;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass: rgba(20, 27, 45, 0.8);
    --success: #4ade80;
    --warning: #fbbf24;
    --danger: #f87171;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.5), 0 2px 4px -1px rgb(0 0 0 / 0.3);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.3);
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    min-height: 100vh;
    background-image: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
}

.premium-nav {
    background: var(--glass);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
}

.nav-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    color: var(--primary);
    background: var(--primary-glow);
}

.main-container {
    width: 100%;
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fix for centered content on dashboard */
.content-centered {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

/* New Premium Header */
.premium-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(8, 11, 20, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.premium-header-brand {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.premium-header-brand:hover {
    opacity: 0.8;
}

.premium-header-actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.premium-header-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-header-link:hover {
    color: var(--text-main);
}

.premium-header-link.active {
    color: var(--primary);
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.4rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
    padding: 0.2rem 0.35rem;
    border-radius: 999px;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
}

.lang-flag:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.lang-flag.active {
    opacity: 1;
    background: rgba(129, 140, 248, 0.15);
    border: 1px solid rgba(129, 140, 248, 0.4);
}

/* Chat logic: no padding on main if we are in chat */
body.full-chat .main-container {
    padding: 0;
}

body.full-chat .chat-full-container {
    height: 100vh;
}

.sidebar-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2050;
}

body.sidebar-open .sidebar-mask {
    display: block;
}

/* For pages that DON'T need full width */

.premium-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    border-color: rgba(129, 140, 248, 0.3);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.btn-premium {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-primary-premium {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    gap: 0.5rem;
}

.btn-primary-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--primary-glow);
}

.btn-secondary-premium {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-main) !important;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444 !important;
    padding: 0.75rem 1.5rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.glass-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-main);
    width: 100%;
    display: block;
    transition: all 0.2s;
    font-size: 0.95rem;
}

/* Fix for Chrome autofill background */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #141b2d inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
}

.glass-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: rgba(15, 23, 42, 0.8);
}

select option {
    background-color: #141b2d !important;
    color: #f8fafc !important;
}

.badge-premium {
    padding: 0.35rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary);
}

.badge-success {
    background: rgba(74, 222, 128, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
}

/* Table Styling */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.premium-table th {
    padding: 1rem 1.5rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.premium-table tr {
    background: transparent;
    transition: all 0.2s;
}

.premium-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    text-align: left;
}

.table-fixed {
    table-layout: fixed;
}

.table-fixed th,
.table-fixed td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sortable-table th[data-sort-key] {
    cursor: pointer;
    position: relative;
    padding-right: 2rem;
}

.sortable-table th[data-sort-key]::after {
    content: "↕";
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    opacity: 0.45;
}

.sortable-table th[data-sort-dir="asc"]::after {
    content: "↑";
    opacity: 0.9;
}

.sortable-table th[data-sort-dir="desc"]::after {
    content: "↓";
    opacity: 0.9;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: #080b14;
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 2100;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(-100%);
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(129, 140, 248, 0.3);
}

.sidebar.active {
    transform: translateX(0) !important;
}

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

.sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

@media (min-width: 1025px) {
    .sidebar-toggle {
        position: fixed;
        top: 0.75rem;
        left: 1.5rem;
        z-index: 2200;
        background: transparent;
        color: var(--text-main);
        border: none;
        width: 42px;
        height: 42px;
    }
}

/* Floating toggle only for desktop when sidebar is needed, now mostly handled inside header */
body:not(.sidebar-closed) .sidebar-toggle {
    left: calc(280px + 1rem);
}

/* Chat Input Improvements */
.chat-input-container {
    background: var(--glass);
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    margin: 1rem;
}

.chat-input-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-actions-group {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 2px;
}

.chat-form {
    flex: 1;
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-textarea {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: white;
    padding: 0.8rem 1.2rem;
    border-radius: 15px;
    outline: none;
    resize: none;
    font-size: 1rem;
    min-height: 48px;
    max-height: 200px;
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.5;
}

.chat-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.btn-chat-send {
    height: 48px;
    min-width: 48px;
    border-radius: 15px;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0 1.5rem;
    font-weight: 700;
}

.btn-chat-send:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-chat-action {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-chat-action:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
}

.sidebar-close-mobile {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
}

.sidebar-brand {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-right: 0.25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-link i {
    font-size: 1.1rem;
    width: 20px;
}

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

.sidebar-link.active {
    background: var(--primary-glow);
    color: var(--primary);
}

.sidebar-group {
    border-radius: 0.85rem;
    overflow: hidden;
}

.sidebar-group summary {
    list-style: none;
    cursor: pointer;
}

.sidebar-group summary::-webkit-details-marker {
    display: none;
}

.sidebar-caret {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.sidebar-group[open] .sidebar-caret {
    transform: rotate(180deg);
}

.sidebar-sublinks {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.25rem 0.25rem 0.75rem 2.25rem;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.7rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-sublink i {
    font-size: 1rem;
    width: 18px;
}

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

.sidebar-sublink.active {
    color: var(--primary);
    background: rgba(129, 140, 248, 0.12);
}

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

/* Page Layout Shift */
.has-sidebar {
    padding-left: 0;
    padding-top: 65px;
    transition: padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-closed.has-sidebar {
    padding-left: 0;
}

.has-sidebar .main-container {
    padding: 2rem;
}

body.sidebar-closed .main-container {
    padding: 2rem;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.active {
        transform: translateX(0) !important;
    }

    .has-sidebar {
        padding-left: 0 !important;
    }

    .sidebar-close-mobile {
        display: block;
    }

    .main-container {
        padding: 1rem !important;
        margin-top: 5px;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .premium-header {
        padding: 0 1rem;
    }

    .premium-header-link span {
        display: none;
    }

    .premium-header-brand {
        font-size: 0.9rem;
    }
}

.mobile-top-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #080b14;
    border-bottom: 1px solid var(--border);
    z-index: 1100;
    align-items: center;
    padding: 0 1rem;
    justify-content: space-between;
    backdrop-filter: blur(10px);
}

.mobile-brand {
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Table Fixes */
@media (max-width: 768px) {
    .premium-table thead {
        display: none;
    }

    .premium-table tr {
        display: block;
        background: var(--card-bg);
        margin-bottom: 1rem;
        border-radius: 1rem;
        border: 1px solid var(--border);
        padding: 1rem;
    }

    .premium-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: right;
    }

    .premium-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--text-muted);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-right: 1rem;
        text-align: left;
    }

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

/* Sales Gold Theme */
.card-gold {
    background: linear-gradient(135deg, #141b2d 0%, #1c253d 100%);
    border: 1px solid rgba(251, 191, 36, 0.2);
    position: relative;
    overflow: hidden;
}

.card-gold::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Badges */
.badge-premium {
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
}

.badge-success {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.2);
}

.badge-danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

.badge-primary {
    background: rgba(129, 140, 248, 0.1);
    color: #a5b4fc;
    border-color: rgba(129, 140, 248, 0.2);
}

.text-gold {
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.badge-gold {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

/* Alerts */
.alert-premium {
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    font-size: 0.9375rem;
    border: 1px solid transparent;
}

.alert-premium.success {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.2);
}

.alert-premium.danger {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.2);
}

/* Modern Slider / Detail Panel */
.detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 600px;
    max-width: 90vw;
    background: #0d121f;
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 3000;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.detail-panel.active {
    transform: translateX(0);
}

.detail-header {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 2rem;
}

.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 2999;
}

.detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.animate-fade-in {
    animation: fadeInDown 0.8s ease-out forwards;
}

.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.login-box {
    width: 100%;
    max-width: 450px;
    animation: fadeInUp 0.6s ease-out;
}

.btn-premium.pulse:hover {
    animation: pulse 1.5s infinite;
}

/* Side Panel / Slider */
.side-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-panel-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    max-width: 90vw;
    height: 100%;
    background: var(--card-bg);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 2001;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    transform: translateX(100%);
    visibility: hidden;
    padding: 0;
    /* Let body handle padding */
    overflow-y: auto;
    color: var(--text-main);
}

.side-panel.active {
    transform: translateX(0);
    visibility: visible;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.side-panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-panel {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.close-panel:hover {
    color: var(--text-main);
    transform: rotate(90deg);
}

.qr-container {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    display: inline-block;
    margin: 1.5rem 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

.info-group {
    margin-bottom: 1.5rem;
}

.info-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.25rem;
}

.info-value {
    color: var(--text-main);
    font-weight: 500;
    word-break: break-all;
}

/* Utility Classes for Responsiveness */
.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    gap: 1rem;
}

@media (max-width: 768px) {
    .header-flex {
        flex-direction: column !important;
        align-items: flex-start !important;
        margin-bottom: 1.5rem;
    }

    .header-flex>div,
    .header-flex>a,
    .header-flex>form {
        width: 100% !important;
    }

    .stackable {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .glass-input {
        font-size: 16px !important;
        /* Prevent zoom on iOS */
    }

    .premium-card {
        padding: 1.25rem !important;
    }

    h1 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }

    .btn-premium,
    .btn-secondary-premium {
        width: 100% !important;
    }

    .grid-2col-responsive {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .flex-stack-mobile {
        flex-direction: column !important;
    }
}

.grid-2col-responsive {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}