/* ============================================================
   Golden Pocket - Premium Fintech Theme
   Gold + Green + White
   ============================================================ */

:root {
    --gold: #D4AF37;
    --gold-deep: #C9A227;
    --gold-soft: #F5EFD9;
    --green: #1B5E20;
    --green-mid: #2E7D32;
    --green-soft: #E7F2E8;
    --white: #FFFFFF;
    --offwhite: #F8F9FA;
    --ink: #1F2328;
    --ink-soft: #4B5058;
    --muted: #8A9099;
    --line: #ECEDEF;
    --danger: #C0392B;
    --danger-soft: #FBEAE8;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(20, 20, 30, 0.06), 0 1px 2px rgba(20, 20, 30, 0.04);
    --shadow: 0 6px 24px rgba(20, 20, 30, 0.08);
    --shadow-lg: 0 18px 48px rgba(20, 20, 30, 0.12);
    --gold-grad: linear-gradient(135deg, #E7C766 0%, #D4AF37 45%, #C9A227 100%);
    --green-grad: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--offwhite);
    color: var(--ink);
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
a { color: var(--green-mid); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--green); }
.text-muted-soft { color: var(--muted) !important; }

/* ---------------- Brand mark ---------------- */
.gp-brand {
    display: inline-flex; align-items: center; gap: .55rem;
    font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--ink);
}
.gp-brand:hover { color: var(--ink); }
.gp-logo {
    width: 34px; height: 34px; border-radius: 9px;
    background: var(--gold-grad);
    display: inline-flex; align-items: center; justify-content: center;
    color: #4a3a06; box-shadow: var(--shadow-sm);
    font-size: 1rem;
}
.gp-brand .gp-accent { color: var(--gold-deep); }

/* ---------------- Buttons ---------------- */
.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.35rem; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; border: none; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-grad); color: #4a3a06; box-shadow: 0 6px 18px rgba(201, 162, 39, .35); }
.btn-gold:hover { color: #3a2d04; box-shadow: 0 10px 26px rgba(201, 162, 39, .45); transform: translateY(-1px); }
.btn-green { background: var(--green-grad); color: #fff; box-shadow: 0 6px 18px rgba(27, 94, 32, .28); }
.btn-green:hover { color: #fff; box-shadow: 0 10px 26px rgba(27, 94, 32, .38); transform: translateY(-1px); }
.btn-outline-gold { background: #fff; color: var(--gold-deep); border: 1.5px solid var(--gold); }
.btn-outline-gold:hover { background: var(--gold-soft); color: var(--gold-deep); }
.btn-outline-dark { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-outline-dark:hover { border-color: var(--ink-soft); background: var(--offwhite); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:hover { background: #f6d8d4; color: var(--danger); }
.btn-sm { padding: .4rem .9rem; font-size: .82rem; }

/* ---------------- Cards ---------------- */
.gp-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); padding: 1.5rem;
}
.gp-card-hover { transition: transform .2s ease, box-shadow .2s ease; }
.gp-card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------------- Stat cards ---------------- */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-icon {
    width: 46px; height: 46px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center; font-size: 1.15rem; margin-bottom: .85rem;
}
.stat-icon.gold { background: var(--gold-soft); color: var(--gold-deep); }
.stat-icon.green { background: var(--green-soft); color: var(--green); }
.stat-icon.ink { background: #EEF0F3; color: var(--ink); }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .stat-value, .stat-value { word-break: break-word; overflow-wrap: anywhere; }
@media (max-width: 575.98px) {
    .stat-card .stat-value, .stat-value { font-size: 1rem !important; white-space: nowrap; }
    .stat-card .stat-icon { width: 40px; height: 40px; margin-bottom: .6rem; }
}
.stat-card .stat-label { color: var(--muted); font-size: .85rem; font-weight: 500; }

/* ---------------- Badges ---------------- */
.gp-badge { display: inline-block; padding: .28rem .7rem; border-radius: 999px; font-size: .74rem; font-weight: 700; text-transform: capitalize; letter-spacing: .01em; }
.badge-pending  { background: #FFF4D6; color: #9A7B12; }
.badge-approved { background: var(--green-soft); color: var(--green); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-active   { background: #E3F0FF; color: #1565C0; }
.badge-closed   { background: #EEF0F3; color: var(--ink-soft); }

/* ---------------- Forms ---------------- */
.form-label { font-weight: 600; font-size: .88rem; color: var(--ink-soft); margin-bottom: .35rem; }
.form-control, .form-select {
    border-radius: var(--radius-sm); border: 1.5px solid var(--line); padding: .65rem .85rem;
    font-size: .95rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, .18);
}
.input-group-text { background: var(--offwhite); border: 1.5px solid var(--line); border-radius: var(--radius-sm); }

/* ---------------- Navbar (user) ---------------- */
.gp-navbar {
    background: #fff; border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 1030;
}
.gp-navbar .nav-link { color: var(--ink-soft); font-weight: 500; border-radius: 8px; padding: .5rem .85rem !important; }
.gp-navbar .nav-link:hover { color: var(--ink); background: var(--offwhite); }
.gp-navbar .nav-link.active { color: var(--gold-deep); background: var(--gold-soft); }
.notif-dot { position: absolute; top: 2px; right: 2px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid #fff; }

/* ---------------- Admin sidebar ---------------- */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 250px; background: #14181C; color: #C9CDD3; flex-shrink: 0;
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040;
    transition: transform .25s ease; overflow-y: auto;
}
.admin-sidebar .side-brand { padding: 1.25rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.07); color: #fff; }
.admin-sidebar .side-link {
    display: flex; align-items: center; gap: .8rem; padding: .75rem 1.25rem;
    color: #AEB4BC; font-weight: 500; font-size: .92rem; border-left: 3px solid transparent;
}
.admin-sidebar .side-link i { width: 20px; text-align: center; }
.admin-sidebar .side-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-sidebar .side-link.active { color: var(--gold); background: rgba(212,175,55,.10); border-left-color: var(--gold); }
.admin-main { flex: 1; margin-left: 250px; min-width: 0; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .85rem 1.5rem; position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between; }
.admin-content { padding: 1.75rem 1.5rem; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 1035; }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; }
}

/* ---------------- Tables ---------------- */
.gp-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.gp-table thead th { background: var(--offwhite); color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; padding: .75rem 1rem; border-bottom: 1px solid var(--line); text-align: left; }
.gp-table tbody td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); font-size: .92rem; vertical-align: middle; }
.gp-table tbody tr:hover { background: #FCFBF5; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }

/* ---------------- Auth pages ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual {
    background: var(--green-grad); color: #fff; padding: 3rem; position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-visual::after { content:''; position:absolute; width:340px; height:340px; border-radius:50%; background: rgba(212,175,55,.18); bottom:-120px; right:-90px; }
.auth-visual::before { content:''; position:absolute; width:200px; height:200px; border-radius:50%; background: rgba(255,255,255,.06); top:-60px; left:-40px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 2.5rem 1.5rem; background: #fff; }
.auth-box { width: 100%; max-width: 420px; }
@media (max-width: 860px) { .auth-wrap { grid-template-columns: 1fr; } .auth-visual { display: none; } }

/* ---------------- Landing ---------------- */
.hero { background: radial-gradient(1200px 500px at 80% -10%, rgba(212,175,55,.14), transparent), var(--white); padding: 4.5rem 0 3rem; }
.hero-badge { display:inline-flex; align-items:center; gap:.5rem; background: var(--gold-soft); color: var(--gold-deep); font-weight:600; font-size:.82rem; padding:.4rem .9rem; border-radius:999px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.08; }
.hero-highlight { color: var(--gold-deep); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--gold-soft); color: var(--gold-deep); display:inline-flex; align-items:center; justify-content:center; font-size:1.25rem; }
.section-eyebrow { color: var(--gold-deep); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }

/* ---------------- Misc ---------------- */
.divider { height:1px; background: var(--line); margin: 1.25rem 0; }
.progress-thin { height: 8px; border-radius: 999px; background: var(--offwhite); }
.progress-thin .progress-bar { background: var(--gold-grad); border-radius: 999px; }
.empty-state { text-align:center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: var(--line); margin-bottom: .75rem; }
.toast-container { z-index: 1090; margin-top: 66px; pointer-events: none; }
.toast-container .toast { pointer-events: auto; }
footer.gp-footer { background: #14181C; color: #9AA0A8; padding: 2rem 0; margin-top: 3rem; }
.spinner-btn { display:none; width:1rem; height:1rem; border:2px solid rgba(255,255,255,.5); border-top-color:#fff; border-radius:50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* fade-in */
.fade-up { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity:0; transform: translateY(12px); } to { opacity:1; transform:none; } }
