/* ==========================================================================
   Blue Peak Realtors — Admin Panel
   ========================================================================== */

:root {
    --navy-900: #071A33;
    --navy-800: #0B2545;
    --navy-700: #13315C;
    --gold-500: #C9A227;
    --gold-400: #D9B84A;
    --ink: #1B2530;
    --muted: #6B7A8C;
    --line: #E6EAF0;
    --bg: #F2F5F9;
    --radius: 12px;
    --shadow: 0 2px 14px rgba(11, 37, 69, .07);
    --font-head: 'Barlow Condensed', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --sidebar: 262px;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
    font-size: 14.5px;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); color: var(--navy-800); letter-spacing: .3px; font-weight: 700; }
a { text-decoration: none; }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
    position: relative; overflow: hidden;
}
.login-wrap::before {
    content: ''; position: absolute; inset: 0; opacity: .08;
    background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0); background-size: 28px 28px;
}
.login-card {
    position: relative; z-index: 2; width: 100%; max-width: 430px; background: #fff;
    border-radius: 16px; padding: 42px 38px; box-shadow: 0 30px 70px rgba(0, 0, 0, .32);
    border-top: 4px solid var(--gold-500);
}
.login-card .logo { width: 62px; height: 62px; border-radius: 14px; }
.login-card h1 { font-size: 27px; text-transform: uppercase; margin: 16px 0 2px; }
.login-card .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 26px; }
.demo-hint {
    background: #FBF6E6; border: 1px dashed var(--gold-500); border-radius: 10px;
    padding: 12px 14px; font-size: 13px; color: #7A6210; margin-top: 20px;
}

/* ---------- Layout ---------- */
.admin-sidebar {
    position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: var(--navy-900);
    color: rgba(255, 255, 255, .72); padding: 22px 0; overflow-y: auto; z-index: 1045;
    transition: transform .3s ease;
}
.admin-sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 22px 20px; border-bottom: 1px solid rgba(255,255,255,.09); }
.admin-sidebar .brand img { width: 40px; height: 40px; border-radius: 9px; }
.admin-sidebar .brand .nm { font-family: var(--font-head); font-size: 21px; color: #fff; line-height: 1.05; }
.admin-sidebar .brand .tg { font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--gold-500); }
.admin-sidebar .grp { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.35); padding: 22px 22px 8px; }
.admin-sidebar a.item {
    display: flex; align-items: center; gap: 13px; padding: 11px 22px; color: rgba(255,255,255,.72);
    font-size: 14.5px; font-weight: 500; border-left: 3px solid transparent; transition: all .25s;
}
.admin-sidebar a.item i { width: 20px; text-align: center; color: rgba(255,255,255,.5); }
.admin-sidebar a.item:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-sidebar a.item.active { background: rgba(201,162,39,.14); color: #fff; border-left-color: var(--gold-500); }
.admin-sidebar a.item.active i { color: var(--gold-500); }
.admin-sidebar .badge-count { margin-left: auto; background: var(--gold-500); color: #17233A; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 9px; }

.admin-main { margin-left: var(--sidebar); min-height: 100vh; }
.admin-topbar {
    background: #fff; box-shadow: var(--shadow); padding: 14px 26px; position: sticky; top: 0; z-index: 1030;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.admin-topbar h1 { font-size: 23px; margin: 0; text-transform: uppercase; }
.admin-topbar .sub { font-size: 12.5px; color: var(--muted); }
.admin-content { padding: 26px; }

.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .av {
    width: 38px; height: 38px; border-radius: 50%; background: var(--navy-800); color: var(--gold-400);
    display: grid; place-items: center; font-family: var(--font-head); font-size: 17px;
}
.user-chip .nm { font-weight: 600; font-size: 14px; line-height: 1.2; }
.user-chip .rl { font-size: 11.5px; color: var(--muted); }

/* ---------- Cards & stats ---------- */
.card-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.card-panel .head {
    padding: 16px 20px; border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-panel .head h2 { font-size: 18px; margin: 0; text-transform: uppercase; }
.card-panel .body { padding: 20px; }

.stat-card {
    background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 20px; display: flex; align-items: center; gap: 16px; height: 100%;
    position: relative; overflow: hidden; transition: transform .25s;
}
.stat-card:hover { transform: translateY(-4px); }
.stat-card .ico { width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; color: #fff; flex-shrink: 0; }
.stat-card .num { font-family: var(--font-head); font-size: 30px; line-height: 1; color: var(--navy-800); }
.stat-card .lbl { font-size: 12px; letter-spacing: 1.3px; text-transform: uppercase; color: var(--muted); }
.ico-navy { background: linear-gradient(135deg, #0B2545, #1D4E89); }
.ico-gold { background: linear-gradient(135deg, #C9A227, #E0C35A); color: #17233A !important; }
.ico-green { background: linear-gradient(135deg, #1B7A46, #34A166); }
.ico-slate { background: linear-gradient(135deg, #44566C, #6B7A8C); }

/* ---------- Tables ---------- */
.table { margin: 0; font-size: 14px; }
.table > :not(caption) > * > * { padding: 12px 14px; vertical-align: middle; }
.table thead th {
    background: #F7F9FC; color: var(--navy-700); font-size: 11.5px; letter-spacing: 1.2px;
    text-transform: uppercase; font-weight: 700; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table tbody tr:hover { background: #FAFBFD; }
.table img.thumb { width: 62px; height: 46px; object-fit: cover; border-radius: 6px; }

.badge-soft { font-size: 11px; font-weight: 700; letter-spacing: .8px; padding: 5px 10px; border-radius: 20px; text-transform: uppercase; }
.bs-new { background: #E8F1FD; color: #1D4E89; }
.bs-progress { background: #FBF3DF; color: #8A6D0B; }
.bs-closed { background: #E8F6EE; color: #1B7A46; }
.bs-available { background: #E8F6EE; color: #1B7A46; }
.bs-sold { background: #FDECEC; color: #B02A2A; }
.bs-featured { background: #FBF3DF; color: #8A6D0B; }
.bs-off { background: #EEF1F5; color: #6B7A8C; }

/* ---------- Forms ---------- */
.form-label { font-size: 13px; font-weight: 600; color: var(--navy-700); margin-bottom: 4px; }
.form-control, .form-select { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; font-size: 14.5px; }
.form-control:focus, .form-select:focus { border-color: var(--gold-500); box-shadow: 0 0 0 .17rem rgba(201,162,39,.16); }
.form-text { font-size: 12.5px; color: var(--muted); }

.btn { border-radius: 8px; font-weight: 600; font-size: 14px; padding: .6rem 1.3rem; }
.btn-navy { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn-navy:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: #17233A; }
.btn-gold:hover { background: var(--gold-400); border-color: var(--gold-400); color: #17233A; }
.btn-sm { padding: .34rem .7rem; font-size: 12.5px; }

.alert { border: none; border-radius: 10px; font-size: 14px; }

/* ---------- Mobile ---------- */
.sidebar-toggle { display: none; background: none; border: 0; font-size: 20px; color: var(--navy-800); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(7,26,51,.5); z-index: 1040; }

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