/* ═══ ADMIN INDEX PAGE ══════════════════════════════════════════ */
:root {
    --or: #F97316;
    --or-dk: #EA580C;
    --yellow: #F59E0B;
    --navy: #0F172A;
    --navy-md: #334155;
    --indigo: #4F46E5;
    --green: #10B981;
    --red: #EF4444;
    --blue: #3B82F6;
    --purple: #8B5CF6;
    --bg: #0F172A;
    --surface: #1E293B;
    --surface-2: #263248;
    --border: #334155;
    --border-lt: #3D4F68;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    --r: .55rem;
    --r-lg: .9rem;
    --r-xl: 1.3rem;
    --sh-sm: 0 2px 8px rgba(0, 0, 0, .25);
    --sh-md: 0 6px 24px rgba(0, 0, 0, .35);
    --tr: .17s cubic-bezier(.4, 0, .2, 1);
}

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

body {
    font-family: 'Be Vietnam Pro', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

button {
    cursor: pointer;
    font-family: inherit;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--navy);
}

::-webkit-scrollbar-thumb {
    background: var(--navy-md);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--indigo);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sb-header {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: .6rem;
}

.sb-logo {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--or), var(--yellow));
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    flex-shrink: 0;
}

.sb-brand {
    font-weight: 900;
    font-size: .9rem;
    letter-spacing: -.3px;
    color: var(--text);
}

.sb-brand .rio {
    color: var(--or);
}

.sb-admin-badge {
    background: rgba(79, 70, 229, .22);
    border: 1px solid rgba(79, 70, 229, .38);
    color: #A5B4FC;
    border-radius: 99px;
    font-size: .6rem;
    font-weight: 800;
    padding: .12rem .5rem;
    letter-spacing: .4px;
    margin-top: .2rem;
    display: inline-block;
}

.sb-sep {
    font-size: .6rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: .75rem 1rem .2rem;
}

.sb-item {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .48rem .85rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--tr);
    border-left: 2px solid transparent;
    margin: 1px .3rem;
    border-radius: 0 .45rem .45rem 0;
}

.sb-item:hover {
    background: rgba(255, 255, 255, .05);
    color: var(--text);
}

.sb-item.active {
    background: rgba(79, 70, 229, .16);
    color: #A5B4FC;
    border-left-color: var(--indigo);
}

.sb-item .bi {
    font-size: .85rem;
    flex-shrink: 0;
}

.sb-cnt {
    margin-left: auto;
    border-radius: 99px;
    font-size: .6rem;
    font-weight: 800;
    padding: .08rem .38rem;
}

.sb-cnt-red {
    background: var(--red);
    color: #fff;
    animation: pulse 2s infinite;
}

.sb-footer {
    margin-top: auto;
    padding: .8rem 1rem;
    border-top: 1px solid var(--border);
}

.sb-user {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.sb-user-av {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, var(--indigo), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .66rem;
    color: #fff;
    flex-shrink: 0;
}

.sb-user-name {
    font-weight: 700;
    font-size: .78rem;
    color: var(--text);
}

.sb-user-role {
    font-size: .65rem;
    color: var(--text-dim);
}

/* MAIN */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    height: 50px;
    display: flex;
    align-items: center;
    padding: 0 1.3rem;
    gap: .8rem;
    position: sticky;
    top: 0;
    z-index: 800;
    flex-shrink: 0;
}

.topbar-title {
    font-weight: 800;
    font-size: .88rem;
    color: var(--text);
}

.topbar-sub {
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: .1rem;
}

.topbar-icon-btn {
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--border);
    border-radius: .45rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: var(--text-muted);
    transition: all var(--tr);
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--text);
}

.time-chip {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: .4rem;
    padding: .25rem .65rem;
    font-size: .7rem;
    color: var(--text-muted);
    font-family: monospace;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .35rem;
}

.live-dot-sm {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s infinite;
}

.content {
    flex: 1;
    padding: 1.3rem;
    overflow-x: hidden;
}

/* SEC HEAD */
.sec-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
    gap: .6rem;
}

.sec-head h5 {
    font-weight: 900;
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}

.sec-head p {
    font-size: .76rem;
    color: var(--text-muted);
    margin: .15rem 0 0;
}

/* BUTTONS */
.btnx {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    border-radius: var(--r);
    font-weight: 700;
    font-size: .78rem;
    padding: .4rem .85rem;
    transition: all var(--tr);
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.btn-indigo {
    background: var(--indigo);
    color: #fff;
    box-shadow: 0 2px 8px rgba(79, 70, 229, .28);
}

.btn-indigo:hover {
    background: #4338CA;
    transform: translateY(-1px);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, .1);
    color: var(--text);
}

/* NAV CARDS */
.nav-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .85rem;
    margin-bottom: 1.2rem;
}

.nav-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 1.2rem 1.3rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    text-decoration: none;
    transition: all var(--tr);
    animation: fadeUp .3s ease both;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.nc-indigo::before {
    background: linear-gradient(90deg, var(--indigo), var(--purple));
}

.nc-or::before {
    background: linear-gradient(90deg, var(--or), var(--yellow));
}

.nc-green::before {
    background: linear-gradient(90deg, var(--green), #059669);
}

.nc-blue::before {
    background: linear-gradient(90deg, var(--blue), var(--indigo));
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
    border-color: var(--border-lt);
}

.nav-card-icon {
    width: 40px;
    height: 40px;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.nav-card-title {
    font-weight: 800;
    font-size: .9rem;
    color: var(--text);
}

.nav-card-desc {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .15rem;
    line-height: 1.4;
}

.nav-card-arrow {
    margin-left: auto;
    font-size: .85rem;
    color: var(--text-dim);
}

/* CARD */
.cardx {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    animation: fadeUp .35s ease both;
}

.cardx-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 1.15rem;
    border-bottom: 1px solid var(--border);
}

.cardx-head h6 {
    font-weight: 800;
    font-size: .84rem;
    color: var(--text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.cardx-body {
    padding: .9rem 1.15rem;
}

/* TABLE */
.rtable {
    width: 100%;
    border-collapse: collapse;
}

.rtable thead th {
    background: rgba(255, 255, 255, .025);
    font-size: .68rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: .58rem .85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.rtable thead th:first-child {
    padding-left: 1.15rem;
}

.rtable thead th:last-child {
    padding-right: 1.15rem;
    text-align: right;
}

.rtable tbody td {
    padding: .68rem .85rem;
    border-bottom: 1px solid rgba(255, 255, 255, .04);
    font-size: .81rem;
    vertical-align: middle;
}

.rtable tbody td:first-child {
    padding-left: 1.15rem;
}

.rtable tbody td:last-child {
    padding-right: 1.15rem;
    text-align: right;
}

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

.rtable tbody tr:hover td {
    background: rgba(255, 255, 255, .025);
}

/* BADGES */
.xbadge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .15rem .52rem;
    border-radius: 99px;
    font-size: .67rem;
    font-weight: 700;
    white-space: nowrap;
}

.xb-green {
    background: rgba(16, 185, 129, .14);
    color: #34D399;
    border: 1px solid rgba(16, 185, 129, .22);
}

.xb-yellow {
    background: rgba(245, 158, 11, .14);
    color: #FCD34D;
    border: 1px solid rgba(245, 158, 11, .22);
}

.xb-red {
    background: rgba(239, 68, 68, .14);
    color: #F87171;
    border: 1px solid rgba(239, 68, 68, .22);
}

.xb-gray {
    background: rgba(255, 255, 255, .06);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ROLE CHIP */
.role-chip {
    background: rgba(79, 70, 229, .18);
    border: 1px solid rgba(79, 70, 229, .28);
    color: #A5B4FC;
    border-radius: var(--r);
    padding: .35rem .8rem;
    font-size: .8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

/* VERIFY TABLE */
code {
    color: #A5B4FC;
    font-size: .82rem;
}

.btn-approve-verify {
    background: var(--indigo);
    color: #fff;
    border: none;
    border-radius: .4rem;
    padding: .28rem .7rem;
    font-size: .75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    transition: all var(--tr);
}

.btn-approve-verify:hover {
    background: #4338CA;
}

.btn-approve-verify:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: .82rem;
}

/* TOAST */
#rh-toast-wrap {
    position: fixed;
    bottom: 1.2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    align-items: center;
    pointer-events: none;
}

.rh-toast {
    background: var(--surface-2, #263248);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: .5rem 1.1rem;
    font-size: .79rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .45rem;
    box-shadow: var(--sh-md);
    animation: fadeUp .22s ease;
    pointer-events: all;
}

.rh-toast-s {
    background: rgba(16, 185, 129, .18);
    border-color: rgba(16, 185, 129, .28);
    color: #34D399;
}

.rh-toast-e {
    background: rgba(239, 68, 68, .18);
    border-color: rgba(239, 68, 68, .28);
    color: #F87171;
}

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

    .sb-item span:not(.sb-cnt):not(.sb-cnt-red) {
        display: none;
    }

    .sb-sep,
    .sb-admin-badge,
    .sb-brand,
    .sb-user-name,
    .sb-user-role {
        display: none;
    }
}

@media(max-width:768px) {
    .nav-cards {
        grid-template-columns: 1fr;
    }

    .content {
        padding: .9rem;
    }
}
