/* ═══════════════════════════════════════════════════════
   NN Gold — Professional CSS
   Theme: White #F8F9FA + Navy #1B263B + Gold #C5A028
   Font: Prompt (Google Fonts)
   ═══════════════════════════════════════════════════════ */

:root {
    --bg: #F8F9FA;
    --navy: #1B263B;
    --navy-light: #2D3E5F;
    --gold: #C5A028;
    --gold-light: #D4AF37;
    --gold-dark: #A6841E;
    --white: #FFFFFF;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --gray-dark: #495057;
    --border: #DEE2E6;
    --success: #28A745;
    --danger: #DC3545;
    --info: #17A2B8;
    --warning: #FFC107;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --nav-h: 60px;
}

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

body {
    font-family: 'Prompt', sans-serif;
    background: var(--bg);
    color: var(--navy);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ─── Navbar ───────────────────────────────────────────── */

.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--navy);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    font-weight: 700;
    font-size: 18px;
    margin-right: auto;
}

.nav-brand svg { width: 28px; height: 28px; }
.nav-brand .gold-text { color: var(--gold); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle svg { width: 26px; height: 26px; color: var(--white); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,0.8);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-links a svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

.nav-links a.active {
    background: var(--gold);
    color: var(--navy);
    font-weight: 600;
}

.nav-links a.nav-logout {
    color: rgba(255,255,255,0.5);
    margin-left: 8px;
}
.nav-links a.nav-logout:hover { color: var(--danger); }

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        gap: 2px;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-lg);
    }
    body.nav-open .nav-links { transform: translateY(0); }
    .nav-links a { padding: 12px 16px; font-size: 15px; }
}

/* ─── Content ──────────────────────────────────────────── */

.content {
    padding-top: calc(var(--nav-h) + 16px);
    padding-left: 16px;
    padding-right: 16px;
    padding-bottom: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title svg { width: 24px; height: 24px; color: var(--gold); }

@media (max-width: 768px) {
    .content { padding-left: 12px; padding-right: 12px; }
    .page-title { font-size: 18px; }
}

/* ─── Cards ────────────────────────────────────────────── */

.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-light);
}
.card-title svg { width: 20px; height: 20px; color: var(--gold); }

/* ─── Grid ─────────────────────────────────────────────── */

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── KPI Cards ────────────────────────────────────────── */

.kpi-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
    transition: transform 0.2s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.kpi-label {
    font-size: 13px;
    color: var(--gray);
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.kpi-label svg { width: 16px; height: 16px; }

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
}
.kpi-value.baht { color: var(--navy); }
.kpi-value.kip, .kpi-value.lak { color: var(--info); }
.kpi-value.profit { color: var(--success); }
.kpi-value.loss { color: var(--danger); }
.kpi-value.expense { color: var(--danger); }

.kpi-sub {
    font-size: 12px;
    color: var(--gray);
    margin-top: 4px;
}

.kpi-card.buy { border-left-color: var(--info); }
.kpi-card.sell { border-left-color: var(--success); }
.kpi-card.profit { border-left-color: var(--gold); }
.kpi-card.expense { border-left-color: var(--danger); }

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }

.btn-primary {
    background: var(--gold);
    color: var(--navy);
}
.btn-primary:hover { background: var(--gold-dark); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); }

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover { background: #c82333; }

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--navy);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 17px; }
.btn-block { width: 100%; }

/* ─── Type Buttons (gold/silver/brass) ─────────────────── */

.type-btn-group { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.type-btn {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.type-btn:hover { border-color: var(--gold); }
.type-btn.active {
    border-color: var(--gold);
    background: rgba(197,160,40,0.08);
    box-shadow: 0 0 0 3px rgba(197,160,40,0.15);
}
.type-btn svg { width: 36px; height: 36px; margin-bottom: 8px; }
.type-btn .type-name { font-size: 16px; font-weight: 600; color: var(--navy); }
.type-btn.gold svg { color: var(--gold); }
.type-btn.silver svg { color: #999; }
.type-btn.brass svg { color: #B87333; }

/* ─── Action Toggle ────────────────────────────────────── */

.action-toggle {
    display: flex;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
}
.action-toggle button {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-family: inherit;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.2s;
}
.action-toggle button.active {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow);
}
.action-toggle button.active.buy { color: var(--info); }
.action-toggle button.active.sell { color: var(--success); }

/* ─── Forms ────────────────────────────────────────────── */

.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.form-label .req { color: var(--danger); }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    color: var(--navy);
    background: var(--white);
    transition: border-color 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197,160,40,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }

.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

.currency-toggle {
    display: flex;
    background: var(--gray-light);
    border-radius: var(--radius-sm);
    overflow: hidden;
}
.currency-toggle button {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray);
    transition: all 0.2s;
}
.currency-toggle button.active {
    background: var(--navy);
    color: var(--white);
}

/* ─── Tables ───────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: var(--navy);
    color: var(--white);
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    font-size: 13px;
}
.data-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tr:nth-child(even) { background: rgba(0,0,0,0.02); }
.data-table tr:hover { background: rgba(197,160,40,0.05); }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-gold { background: rgba(197,160,40,0.15); color: var(--gold-dark); }
.badge-silver { background: rgba(108,117,125,0.15); color: var(--gray-dark); }
.badge-brass { background: rgba(184,115,51,0.15); color: #B87333; }
.badge-buy { background: rgba(23,162,184,0.15); color: var(--info); }
.badge-sell { background: rgba(40,167,69,0.15); color: var(--success); }
.badge-baht { background: rgba(27,38,59,0.1); color: var(--navy); }
.badge-kip, .badge-lak { background: rgba(23,162,184,0.1); color: var(--info); }
.badge-deposit { background: rgba(40,167,69,0.15); color: var(--success); }
.badge-withdraw { background: rgba(220,53,69,0.15); color: var(--danger); }
.badge-expense { background: rgba(255,193,7,0.15); color: #B8860B; }

/* ─── Summary Box ──────────────────────────────────────── */

.summary-box {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.summary-item {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    box-shadow: var(--shadow);
    flex: 1;
    min-width: 150px;
}
.summary-item .label {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 4px;
}
.summary-item .value {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}
.summary-item .value.kip, .summary-item .value.lak { color: var(--info); }

/* ─── Balance Card ─────────────────────────────────────── */

.balance-card {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.balance-card .bal-label { font-size: 14px; opacity: 0.8; }
.balance-card .bal-value { font-size: 28px; font-weight: 700; color: var(--gold); }

/* ─── Filter Bar ───────────────────────────────────────── */

.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: flex-end;
}
.filter-bar .form-group { margin-bottom: 0; min-width: 140px; }

/* ─── Stock Card ───────────────────────────────────────── */

.stock-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
    border-top: 4px solid var(--gold);
}
.stock-card.silver { border-top-color: #999; }
.stock-card.brass { border-top-color: #B87333; }

.stock-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}
.stock-header svg { width: 28px; height: 28px; }
.stock-header .name { font-size: 18px; font-weight: 700; }

.stock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 576px) { .stock-grid { grid-template-columns: 1fr; } }

.stock-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}
.stock-item .label { font-size: 12px; color: var(--gray); }
.stock-item .value { font-size: 18px; font-weight: 700; color: var(--navy); }

.stock-remaining {
    background: rgba(197,160,40,0.1);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stock-remaining .label { font-size: 14px; font-weight: 600; color: var(--navy); }
.stock-remaining .value { font-size: 22px; font-weight: 700; color: var(--gold-dark); }

/* ─── Login ────────────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, #0D1117 100%);
}
.login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo svg { width: 56px; height: 56px; }
.login-logo h1 { font-size: 24px; font-weight: 700; color: var(--navy); margin-top: 8px; }
.login-logo .sub { font-size: 14px; color: var(--gray); }

.login-error {
    background: rgba(220,53,69,0.1);
    color: var(--danger);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
}

/* ─── Chart ────────────────────────────────────────────── */

.chart-container {
    position: relative;
    height: 250px;
    margin-top: 12px;
}

/* ─── Flash Messages ───────────────────────────────────── */

.flash {
    background: rgba(40,167,69,0.1);
    color: var(--success);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    border: 1px solid rgba(40,167,69,0.3);
}

/* ─── Toast ────────────────────────────────────────────── */

.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
    pointer-events: none;
}
.toast.show { opacity: 1; bottom: 30px; }
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* ─── Staff Layout (desktop-first) ─────────────────────── */

.staff-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 16px;
}
@media (max-width: 992px) {
    .staff-layout { grid-template-columns: 1fr; }
}

/* ─── Today List Items ──────────────────────────────────── */

.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    box-shadow: var(--shadow);
    border-left: 3px solid transparent;
}
.txn-item.buy { border-left-color: var(--info); }
.txn-item.sell { border-left-color: var(--success); }

.txn-item .icon { flex-shrink: 0; }
.txn-item .icon svg { width: 24px; height: 24px; }
.txn-item .info { flex: 1; min-width: 0; }
.txn-item .info .top { display: flex; gap: 8px; align-items: center; }
.txn-item .info .metal { font-weight: 600; color: var(--navy); }
.txn-item .info .time { font-size: 12px; color: var(--gray); }
.txn-item .info .detail { font-size: 13px; color: var(--gray); }
.txn-item .amount { font-weight: 700; font-size: 15px; color: var(--navy); white-space: nowrap; }
.txn-item .actions { display: flex; gap: 4px; }
.txn-item .actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.2s;
}
.txn-item .actions button:hover { background: var(--gray-light); }
.txn-item .actions svg { width: 18px; height: 18px; }
.txn-item .actions .edit { color: var(--info); }
.txn-item .actions .delete { color: var(--danger); }

/* ─── Price Card ───────────────────────────────────────── */

.price-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    text-align: center;
    border-top: 4px solid;
    margin-bottom: 16px;
}
.price-card.gold { border-top-color: var(--gold); }
.price-card.silver { border-top-color: #999; }
.price-card.brass { border-top-color: #B87333; }

.price-card svg { width: 40px; height: 40px; }
.price-card.gold svg { color: var(--gold); }
.price-card.silver svg { color: #999; }
.price-card.brass svg { color: #B87333; }

.price-card .name { font-size: 18px; font-weight: 600; margin-top: 8px; }
.price-card .price { font-size: 28px; font-weight: 700; color: var(--navy); margin-top: 8px; }
.price-card .unit { font-size: 14px; color: var(--gray); }

.price-edit-input {
    width: 100%;
    padding: 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 18px;
    text-align: center;
    font-weight: 700;
    color: var(--navy);
}
.price-edit-input:focus { outline: none; border-color: var(--gold); }

/* ─── Empty State ──────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state p { font-size: 15px; }

/* ─── Responsive Staff (desktop) ───────────────────────── */

@media (min-width: 769px) {
    .staff-form .form-row { grid-template-columns: 1fr 1fr; display: grid; gap: 12px; }
}

/* ─── Boss Mobile ──────────────────────────────────────── */

@media (max-width: 768px) {
    .kpi-value { font-size: 20px; }
    .balance-card .bal-value { font-size: 22px; }
    .data-table { font-size: 13px; }
    .data-table th, .data-table td { padding: 8px; }
}

/* ─── Utility ──────────────────────────────────────────── */

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gray { color: var(--gray); }
.fw-bold { font-weight: 700; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.d-none { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }


/* ─── Logo ─────────────────────────────────────────────── */

.nav-brand .logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.login-logo img.login-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* ─── Branch Selector ──────────────────────────────────── */

.branch-select {
    background: var(--navy-light);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    margin-left: 4px;
    outline: none;
}
.branch-select:focus {
    border-color: var(--gold);
}
.branch-select option {
    background: var(--navy);
    color: var(--white);
}

.branch-badge {
    background: rgba(197,160,40,0.2);
    color: var(--gold-light);
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    margin-left: 4px;
    white-space: nowrap;
}

.badge-gold {
    background: rgba(197,160,40,0.15);
    color: var(--gold-dark);
}

/* ─── Mobile: branch select in nav ─────────────────────── */

@media (max-width: 768px) {
    .nav-brand .logo {
        width: 32px;
        height: 32px;
    }
    .branch-select {
        font-size: 12px;
        padding: 3px 6px;
    }
    .nav-brand span {
        font-size: 16px;
    }
}

/* ─── Bottom Navigation (Mobile Only) ─── */

.bottom-nav {
  display: none; /* hidden by default, shown on mobile */
}

.bottom-nav-more-panel {
  display: none; /* hidden by default */
}

@media (max-width: 768px) {
  /* Hide top navbar links on mobile */
  .nav-links { display: none !important; }
  .nav-toggle { display: none !important; }
  
  /* Show bottom nav */
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(197,160,40,0.2);
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    z-index: 1000;
    height: 64px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
  }
  
  /* Padding for main content so it doesn't hide behind bottom nav */
  .mobile-bottom-pad {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
  }
  
  /* Each button */
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    min-width: 48px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
  }
  
  .bottom-nav-item svg {
    width: 22px;
    height: 22px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  /* PRESS ANIMATION — กดแล้วยุบเล็กน้ำ */
  .bottom-nav-item:active {
    transform: scale(0.85);
    transition: transform 0.1s ease-out;
  }
  
  .bottom-nav-item:active svg {
    transform: scale(0.9);
  }
  
  /* RELEASE — เด้งกลับเหมือนเดิม */
  .bottom-nav-item {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  /* Active page highlight — ทองเรืองขึ้น */
  .bottom-nav-item.active {
    color: var(--gold);
  }
  
  .bottom-nav-item.active svg {
    filter: drop-shadow(0 0 6px rgba(197,160,40,0.5));
  }
  
  /* More panel — slide up */
  .bottom-nav-more-panel {
    display: flex;
    position: fixed;
    bottom: 64px;
    left: 0; right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
    border-top: 1px solid rgba(197,160,40,0.15);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
  }
  
  .bottom-nav-more-panel.show {
    transform: translateY(0);
  }
  
  .bottom-nav-more-panel a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
  }
  
  .bottom-nav-more-panel a:active {
    transform: scale(0.97);
    background: rgba(197,160,40,0.1);
  }
  
  .bottom-nav-more-panel a:hover {
    background: rgba(197,160,40,0.08);
    color: var(--gold);
  }
}

/* Desktop: hide bottom nav completely */
@media (min-width: 769px) {
  .bottom-nav { display: none !important; }
  .bottom-nav-more-panel { display: none !important; }
  .mobile-bottom-pad { padding-bottom: 40px !important; }
}
