/* ── ADMIN SHELL ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, sans-serif; background: #F3F6FA; color: #1A2332; font-size: 14px; }
a { color: inherit; text-decoration: none; }

.adm-shell { display: flex; min-height: 100vh; }

/* ── SIDEBAR ───────────────────────────────────────────────── */
.adm-sidebar {
    width: 220px; flex-shrink: 0;
    background: #042C53; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.adm-logo {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 16px;
    font-size: 18px; font-weight: 700; color: #5DCAA5;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.adm-logo .ti { font-size: 22px; }
.adm-logo span { color: #fff; font-size: 15px; font-weight: 600; }
.adm-logo span span { color: #5DCAA5; }

.adm-nav { padding: 16px 12px; flex: 1; }
.adm-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px; margin-bottom: 2px;
    font-size: 13px; font-weight: 500; color: #A8C4E0;
    transition: background .15s, color .15s; cursor: pointer;
}
.adm-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.adm-nav-link.active { background: rgba(93,202,165,.15); color: #5DCAA5; font-weight: 600; }
.adm-nav-link.disabled { opacity: .45; cursor: default; }
.adm-nav-link .ti { font-size: 16px; }
.adm-soon { margin-left: auto; font-size: 9px; background: rgba(255,255,255,.1); color: #7BA9CC; padding: 1px 5px; border-radius: 3px; }

.adm-user {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}
.adm-logout-btn {
    background: none; border: none; cursor: pointer;
    color: #7BA9CC; font-size: 16px; padding: 4px;
    border-radius: 4px; transition: color .15s;
}
.adm-logout-btn:hover { color: #fff; }

/* ── MAIN AREA ─────────────────────────────────────────────── */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 28px 0; background: #F3F6FA;
}
.adm-page-title { margin: 0; font-size: 20px; font-weight: 700; color: #0D1B2A; }
.adm-content { padding: 20px 28px 40px; }

/* ── TOAST (inline) ────────────────────────────────────────── */
.adm-toast-inline {
    display: flex; align-items: center; gap: 6px;
    background: #E8F8F2; color: #18A16B; border: 1px solid #B6E8D4;
    border-radius: 6px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}

/* ── STATS GRID ────────────────────────────────────────────── */
.adm-stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.adm-stat-card {
    background: #fff; border: 1px solid #E2EAF2; border-radius: 10px;
    padding: 18px; display: flex; align-items: center; gap: 14px;
}
.adm-stat-icon {
    width: 44px; height: 44px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 20px;
}
.adm-stat-value { font-size: 24px; font-weight: 700; color: #0D1B2A; line-height: 1.1; }
.adm-stat-label { font-size: 11px; color: #6B8AAA; font-weight: 500; margin-top: 2px; }

/* ── SECTIONS ──────────────────────────────────────────────── */
.adm-section { }
.adm-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.adm-section-title { font-size: 14px; font-weight: 700; color: #0D1B2A; margin: 0; }

/* ── TOOLBAR ───────────────────────────────────────────────── */
.adm-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.adm-filter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.adm-count { font-size: 12px; color: #6B8AAA; font-weight: 500; }

/* ── INPUTS / SELECTS ──────────────────────────────────────── */
.adm-input {
    padding: 7px 10px; border: 1px solid #D4DFE9; border-radius: 6px;
    font-size: 13px; font-family: inherit; background: #fff;
    min-width: 220px;
}
.adm-input:focus { outline: none; border-color: #1A6EA8; }
.adm-select {
    padding: 7px 10px; border: 1px solid #D4DFE9; border-radius: 6px;
    font-size: 13px; font-family: inherit; background: #fff;
}
.adm-select:focus { outline: none; border-color: #1A6EA8; }

/* ── BUTTONS ───────────────────────────────────────────────── */
.adm-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 6px; font-size: 13px;
    font-weight: 600; font-family: inherit; border: 1px solid transparent;
    cursor: pointer; text-decoration: none; transition: all .15s;
}
.adm-btn-primary { background: #042C53; color: #fff; border-color: #042C53; }
.adm-btn-primary:hover { background: #073A6C; }
.adm-btn-outline { background: #fff; color: #042C53; border-color: #D4DFE9; }
.adm-btn-outline:hover { border-color: #042C53; }
.adm-btn-success { background: #18A16B; color: #fff; border-color: #18A16B; }
.adm-btn-success:hover { background: #14896C; }
.adm-btn-danger { background: #fff; color: #DC2626; border-color: #FCA5A5; }
.adm-btn-danger:hover { background: #FEF2F2; }
.adm-btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── TABLE ─────────────────────────────────────────────────── */
.adm-table-wrap { background: #fff; border: 1px solid #E2EAF2; border-radius: 10px; overflow: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-table th {
    padding: 10px 14px; text-align: left; font-size: 11px; font-weight: 700;
    color: #6B8AAA; text-transform: uppercase; letter-spacing: .4px;
    background: #F8FAFC; border-bottom: 1px solid #E2EAF2;
}
.adm-table td { padding: 11px 14px; border-bottom: 1px solid #F0F4F8; vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tr:hover td { background: #FAFCFF; }

.adm-biz-name { font-weight: 600; color: #042C53; }
.adm-biz-name:hover { color: #1A6EA8; }
.adm-biz-slug { font-size: 11px; color: #6B8AAA; margin-top: 2px; }
.adm-owner-email { font-size: 12px; color: #6B8AAA; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-date { font-size: 12px; color: #6B8AAA; white-space: nowrap; }
.adm-empty { text-align: center; padding: 32px; color: #6B8AAA; }
.adm-actions { display: flex; gap: 6px; align-items: center; }

/* ── BADGES ────────────────────────────────────────────────── */
.adm-badge {
    display: inline-block; padding: 2px 8px; border-radius: 20px;
    font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
}
.adm-badge-green { background: #DCFCE7; color: #15803D; }
.adm-badge-red   { background: #FEE2E2; color: #B91C1C; }
.adm-badge-amber { background: #FEF3C7; color: #92400E; }
.adm-vbadge {
    display: inline-flex; align-items: center; gap: 2px;
    font-size: 11px; color: #7C3AED; margin-right: 4px;
}
.adm-vbadge-teal { color: #18A16B; }
.adm-vbadge-blue { color: #1A6EA8; }

/* ── PAGINATION ────────────────────────────────────────────── */
.adm-pagination { display: flex; gap: 4px; margin-top: 14px; }
.adm-page-btn {
    padding: 5px 10px; border: 1px solid #D4DFE9; border-radius: 5px;
    font-size: 12px; font-weight: 500; color: #042C53; background: #fff;
}
.adm-page-btn:hover { background: #F0F4F8; }
.adm-page-active { background: #042C53; color: #fff; border-color: #042C53; }

/* ── DETAIL PAGE ───────────────────────────────────────────── */
.adm-detail-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.adm-card { background: #fff; border: 1px solid #E2EAF2; border-radius: 10px; padding: 20px; }
.adm-card-header { font-size: 12px; font-weight: 700; color: #6B8AAA; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid #F0F4F8; }
.adm-info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.adm-info-table td { padding: 8px 0; border-bottom: 1px solid #F5F7FA; vertical-align: top; }
.adm-info-table td:first-child { color: #6B8AAA; font-weight: 500; width: 120px; white-space: nowrap; }
.adm-info-table tr:last-child td { border-bottom: none; }
code { background: #F3F6FA; padding: 2px 5px; border-radius: 4px; font-size: 12px; }

/* ── TOGGLE LIST ───────────────────────────────────────────── */
.adm-toggle-list { display: flex; flex-direction: column; gap: 0; }
.adm-toggle-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid #F0F4F8; cursor: pointer;
    gap: 12px;
}
.adm-toggle-row:last-child { border-bottom: none; }
.adm-toggle-label { font-size: 13px; font-weight: 600; color: #1A2332; display: flex; align-items: center; gap: 5px; }
.adm-toggle-desc { font-size: 11px; color: #6B8AAA; margin-top: 2px; }
.adm-toggle {
    appearance: none; width: 38px; height: 20px; border-radius: 20px;
    background: #D4DFE9; cursor: pointer; flex-shrink: 0; position: relative;
    transition: background .2s;
}
.adm-toggle::after {
    content: ""; position: absolute; top: 3px; left: 3px;
    width: 14px; height: 14px; border-radius: 50%; background: #fff;
    transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.adm-toggle:checked { background: #18A16B; }
.adm-toggle:checked::after { transform: translateX(18px); }

/* ── LOGIN PAGE ────────────────────────────────────────────── */
.adm-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #F3F6FA; }
.adm-login-card { background: #fff; border: 1px solid #E2EAF2; border-radius: 12px; padding: 36px; width: 100%; max-width: 380px; }
.adm-login-logo { display: flex; align-items: center; gap: 10px; font-size: 18px; color: #042C53; margin-bottom: 6px; }
.adm-login-logo .ti { font-size: 24px; color: #5DCAA5; }
.adm-login-sub { font-size: 12px; color: #6B8AAA; margin-bottom: 24px; }
.adm-form-group { margin-bottom: 14px; }
.adm-form-group label { display: block; font-size: 12px; font-weight: 600; color: #374151; margin-bottom: 5px; }
.adm-form-group .adm-input { width: 100%; }
.adm-alert { border-radius: 6px; padding: 10px 14px; font-size: 12px; margin-bottom: 14px; }
.adm-alert-error { background: #FEF2F2; color: #B91C1C; border: 1px solid #FCA5A5; }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 900px) {
    .adm-sidebar { width: 180px; }
    .adm-detail-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .adm-sidebar { display: none; }
    .adm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
