/* ═══════════════════════════════════════════════════════════════
   KAIXA Licence Server — Deep Slate SaaS Theme
   ═══════════════════════════════════════════════════════════════ */
:root {
    --bg-primary: #0f172a;
    /* Slate 900 */
    --bg-secondary: #0b1121;
    /* Slate 950 */
    --bg-card: rgba(30, 41, 59, 0.6);
    /* Slate 800 glass */
    --bg-hover: rgba(51, 65, 85, 0.5);
    /* Slate 700 */
    --bg-input: rgba(15, 23, 42, 0.8);
    --border: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.04);

    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-secondary: #cbd5e1;
    /* Slate 300 */
    --text-muted: #94a3b8;
    /* Slate 400 */

    --accent: #6366f1;
    /* Indigo 500 */
    --accent-hover: #818cf8;
    /* Indigo 400 */
    --accent-glow: rgba(99, 102, 241, 0.2);

    --green: #10b981;
    /* Emerald 500 */
    --green-bg: rgba(16, 185, 129, 0.15);
    --green-border: rgba(16, 185, 129, 0.3);

    --yellow: #f59e0b;
    /* Amber 500 */
    --yellow-bg: rgba(245, 158, 11, 0.15);
    --yellow-border: rgba(245, 158, 11, 0.3);

    --red: #ef4444;
    /* Red 500 */
    --red-bg: rgba(239, 68, 68, 0.15);
    --red-border: rgba(239, 68, 68, 0.3);

    --orange: #f97316;
    /* Orange 500 */
    --orange-bg: rgba(249, 115, 22, 0.15);
    --orange-border: rgba(249, 115, 22, 0.3);

    --radius: 12px;
    --radius-sm: 8px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--accent);
    color: #fff;
}

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ─── LOGIN ─── */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-secondary);
    background-image: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 50%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    padding: 2.5rem 2.5rem;
    width: 420px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-icon {
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-muted);
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

/* ─── FORMS ─── */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(15, 23, 42, 0.95);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.error-msg {
    color: var(--red);
    font-size: 0.85rem;
    margin: 0.75rem 0;
    padding: 0.6rem 0.85rem;
    background: var(--red-bg);
    border: 1px solid var(--red-border);
    border-radius: var(--radius-sm);
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.01em;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

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

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

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--green);
    color: #fff;
    box-shadow: 0 2px 10px var(--green-bg);
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--red);
    color: #fff;
    box-shadow: 0 2px 10px var(--red-bg);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--yellow);
    color: #111827;
    box-shadow: 0 2px 10px var(--yellow-bg);
}

.btn-warning:hover {
    background: #d97706;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
}

.btn-icon {
    padding: 0.4rem;
    font-size: 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border);
}

.btn-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* Lucide standard */

/* ─── APP LAYOUT ─── */
.app {
    display: flex;
    min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: 240px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 10;
}

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

.sidebar-nav {
    flex: 1;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-align: left;
    width: 100%;
}

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

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-item svg {
    width: 1.2rem;
    height: 1.2rem;
}

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

/* ─── MAIN ─── */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 2.5rem 3rem;
}

/* ─── VIEWS ─── */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h1 {
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-header h1 svg {
    width: 1.6rem;
    height: 1.6rem;
    color: var(--accent);
}

/* ─── STATS ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all var(--transition);
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.stat-label svg {
    width: 1.1rem;
    height: 1.1rem;
    color: var(--accent);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-value.green {
    color: var(--green);
}

.stat-value.yellow {
    color: var(--yellow);
}

.stat-value.red {
    color: var(--red);
}

.stat-value.accent {
    color: var(--accent-hover);
}

/* ─── PANELS ─── */
.panel-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.panel h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel h3 svg {
    width: 1.2rem;
    height: 1.2rem;
    color: var(--accent);
}

/* ─── TABLES ─── */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

thead th {
    text-align: left;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ─── BADGES ─── */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.badge svg {
    width: 0.8rem;
    height: 0.8rem;
    stroke-width: 2.5;
}

.badge-active,
.badge-online {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}

.badge-expired,
.badge-warning {
    background: var(--yellow-bg);
    color: var(--yellow);
    border: 1px solid var(--yellow-border);
}

.badge-revoked,
.badge-offline {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

.badge-demo {
    background: var(--accent-glow);
    color: var(--accent-hover);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* ─── FILTERS ─── */
.filters-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters-bar select,
.filters-bar input {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    min-width: 160px;
}

.filters-bar select:focus,
.filters-bar input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-glow);
}

/* ─── MODAL ─── */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 17, 33, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 600px;
    max-width: 95vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
}

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

.modal-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

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

.modal-body {
    padding: 1.75rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.modal-actions.grid-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: unset;
    width: 100%;
}

.modal-actions.grid-actions .btn {
    width: 100%;
}

.modal-actions.grid-actions .btn:nth-child(3):last-child {
    grid-column: span 2;
}

/* ─── GLOBAL DIALOG (Confirm/Prompt) ─── */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 17, 33, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dialog {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    width: 420px;
    max-width: 90vw;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dialog-overlay.active .dialog {
    transform: scale(1) translateY(0);
}

.dialog-header {
    padding: 1.25rem 1.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dialog-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.dialog-header svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--accent);
}

.dialog-body {
    padding: 0.75rem 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.dialog-input {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.dialog-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.dialog-actions {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    background: rgba(0, 0, 0, 0.1);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* ─── TOAST ─── */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: toastIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), toastOut 0.4s ease 3s forwards;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    max-width: 380px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.toast svg {
    width: 1.1rem;
    height: 1.1rem;
}

.toast-success {
    background: rgba(16, 185, 129, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

.toast-error {
    background: rgba(239, 68, 68, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

.toast-info {
    background: rgba(99, 102, 241, 0.95);
    color: #fff;
    backdrop-filter: blur(8px);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
}

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ─── KEY DISPLAY ─── */
.key-display {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    color: var(--accent-hover);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    word-break: break-all;
    max-height: 120px;
    overflow-y: auto;
    margin: 1rem 0;
}

/* ─── EMPTY STATE ─── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.1);
    stroke-width: 1.5;
}

.empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ─── PAGINATION ─── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 0;
}

.pagination button {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition);
    min-width: 2rem;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.pagination button.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

/* ─── BOTTOM NAV (Mobile) ─── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    z-index: 50;
    padding: 0.25rem 0;
    padding-bottom: max(0.25rem, env(safe-area-inset-bottom));
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.bottom-nav-item.active {
    color: var(--accent-hover);
}

.bottom-nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ─── UTILS ─── */
.lucide {
    stroke-width: 2;
    flex-shrink: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }

    .main-content {
        margin-left: 220px;
        padding: 2rem;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 64px;
    }

    .sidebar-header h2,
    .sidebar-header img:not(.logo-icon),
    .nav-item span:not(.nav-icon),
    .sidebar-footer {
        display: none;
    }

    .sidebar-header {
        justify-content: center;
        padding: 1rem;
    }

    .nav-item {
        justify-content: center;
        padding: 0.75rem;
    }

    .main-content {
        margin-left: 64px;
        padding: 1.5rem;
    }

    .panel-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 640px) {
    .sidebar {
        display: none;
    }

    .main-content {
        margin-left: 0;
        padding: 1.25rem;
        padding-bottom: 5rem;
    }

    .bottom-nav {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .login-card {
        width: 92vw;
        padding: 2rem 1.5rem;
    }

    .modal {
        max-width: 95vw;
    }
}

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