/**
 * Beca MMP — Admin Stylesheet
 * Designed inhouse for Beca MMP
 * Taino Resource Group LLC
 */

:root {
    --admin-sidebar-width: 260px;
    --admin-sidebar-collapsed: 0px;
    --admin-primary: #1a3c6e;
    --admin-primary-dark: #122b50;
    --admin-accent: #c8a951;
    --admin-bg: #f0f2f5;
    --admin-sidebar-bg: #1a3c6e;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
}

/* ===========================
   Admin Layout
   =========================== */
body.admin-body {
    background: var(--admin-bg);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

/* ===========================
   Sidebar
   =========================== */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    color: rgba(255,255,255,.85);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .3s ease;
    display: flex;
    flex-direction: column;
}

.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

.admin-sidebar .sidebar-brand span {
    color: var(--admin-accent);
}

.admin-sidebar .sidebar-nav {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
    flex: 1;
}

.admin-sidebar .sidebar-nav .nav-header {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,.4);
    padding: 1rem 1.5rem .5rem;
    font-weight: 600;
}

.admin-sidebar .sidebar-nav a {
    display: flex;
    align-items: center;
    padding: .6rem 1.5rem;
    color: rgba(255,255,255,.7);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar .sidebar-nav a:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.admin-sidebar .sidebar-nav a.active {
    background: rgba(255,255,255,.1);
    color: #fff;
    border-left-color: var(--admin-accent);
}

.admin-sidebar .sidebar-nav a i {
    width: 20px;
    margin-right: .75rem;
    font-size: 1rem;
    text-align: center;
}

.admin-sidebar .sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    font-size: .82rem;
}

.admin-sidebar .sidebar-footer a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
}

.admin-sidebar .sidebar-footer a:hover {
    color: var(--admin-accent);
}

/* ===========================
   Main Content
   =========================== */
.admin-main {
    margin-left: var(--admin-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.admin-topbar {
    background: #fff;
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.admin-topbar .sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--admin-text);
    cursor: pointer;
    padding: .25rem;
    display: none;
}

.admin-topbar .user-menu {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .88rem;
}

.admin-topbar .user-menu .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--admin-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .8rem;
}

/* Content Area */
.admin-content {
    padding: 1.5rem;
    flex: 1;
}

/* Admin Footer */
.admin-footer {
    padding: 1rem 1.5rem;
    text-align: center;
    font-size: .8rem;
    color: var(--admin-text-muted);
    border-top: 1px solid #e2e8f0;
}

/* ===========================
   Dashboard Stats
   =========================== */
.stat-card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    transition: all .3s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-text);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: .8rem;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ===========================
   Admin Tables
   =========================== */
.admin-content .table {
    font-size: .88rem;
}

.admin-content .table th {
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--admin-text-muted);
    border-bottom-width: 1px;
}

.admin-content .table td {
    vertical-align: middle;
}

/* ===========================
   Admin Cards
   =========================== */
.admin-content .card {
    border-radius: .75rem;
}

.admin-content .card-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* ===========================
   Forms
   =========================== */
.admin-content .form-label {
    font-weight: 500;
    font-size: .88rem;
    color: var(--admin-text);
}

.admin-content .form-control,
.admin-content .form-select {
    border-radius: .5rem;
    border-color: #d1d5db;
    font-size: .88rem;
    padding: .5rem .75rem;
}

.admin-content .form-control:focus,
.admin-content .form-select:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 .2rem rgba(26, 60, 110, .12);
}

/* ===========================
   Badges
   =========================== */
.badge {
    font-weight: 500;
    font-size: .75rem;
    padding: .3em .6em;
    border-radius: .35rem;
}

/* ===========================
   Responsive Sidebar
   =========================== */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-topbar .sidebar-toggle {
        display: block;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.4);
        z-index: 1035;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* ===========================
   Print
   =========================== */
@media print {
    .admin-sidebar,
    .admin-topbar {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
    }
}
