:root {
    --primary: #006195;
    --primary-grad: linear-gradient(to right, #1296E2, #0B4F94);
    --dark: #1C1B1B;
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    margin: 0;
    color: #333;
}

/* ── Login Page ──────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0B4F94 0%, #1296E2 100%);
}
.login-card {
    background: #fff;
    border-radius: 4px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo h2 {
    font-size: 20px;
    letter-spacing: 3px;
    color: var(--dark);
    margin: 0;
    font-weight: 800;
}
.login-logo small {
    color: var(--primary);
    font-size: 11px;
    letter-spacing: 2px;
    display: block;
    margin-top: 4px;
}

/* ── Sidebar ──────────────────────────────────── */
.admin-sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: var(--dark);
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform .3s;
}
.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand h4 {
    color: #fff;
    margin: 0;
    font-size: 14px;
    letter-spacing: 2.5px;
    font-weight: 800;
}
.sidebar-brand small {
    color: rgba(255,255,255,.5);
    font-size: 10px;
    letter-spacing: 1.5px;
}
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    font-size: 13px;
    letter-spacing: .5px;
    transition: all .2s;
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
    border-left: 3px solid #1296E2;
    padding-left: 17px;
}
.sidebar-nav a svg { flex-shrink: 0; opacity: .7; }
.sidebar-nav a:hover svg,
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav .nav-section {
    padding: 16px 20px 6px;
    color: rgba(255,255,255,.3);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-footer a {
    color: rgba(255,255,255,.5);
    text-decoration: none;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-footer a:hover { color: #fff; }

/* ── Main Content Area ───────────────────────── */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.topbar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: .5px;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}
.topbar-user .avatar {
    width: 34px;
    height: 34px;
    background: var(--primary-grad);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}
.admin-content {
    padding: 28px 24px;
    flex: 1;
}

/* ── Stat Cards ───────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 4px;
    padding: 24px;
    border-left: 4px solid var(--primary);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.stat-card .stat-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-card .stat-label {
    font-size: 12px;
    color: #999;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 6px;
}
.stat-card.orange { border-left-color: #fd7e14; }
.stat-card.orange .stat-num { color: #fd7e14; }
.stat-card.green { border-left-color: #198754; }
.stat-card.green .stat-num { color: #198754; }
.stat-card.red { border-left-color: #dc3545; }
.stat-card.red .stat-num { color: #dc3545; }

/* ── Cards ────────────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    overflow: hidden;
}
.admin-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-card-header h5 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--dark);
}
.admin-card-body { padding: 0; }

/* ── Tables ───────────────────────────────────── */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.admin-table th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    font-weight: 700;
    border-bottom: 1px solid #eee;
}
.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #f4f4f4;
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafbff; }
.admin-table img.thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 3px;
}

/* ── Status Badges ────────────────────────────── */
.badge-new { background: #e8f4fd; color: #0b6fba; }
.badge-progress { background: #fff3cd; color: #856404; }
.badge-responded { background: #d1e7dd; color: #0a5c36; }
.badge-closed { background: #f5f5f5; color: #888; }
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}

/* ── Forms ────────────────────────────────────── */
.form-label-sm {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 700;
    color: #888;
    margin-bottom: 6px;
}
.form-control, .form-select {
    border-radius: 3px;
    border-color: #ddd;
    font-size: 14px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,97,149,.1);
}

/* ── Buttons ──────────────────────────────────── */
.btn-primary-admin {
    background: var(--primary-grad);
    color: #fff;
    border: none;
    padding: 9px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity .2s;
}
.btn-primary-admin:hover { opacity: .9; color: #fff; }
.btn-outline-admin {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    padding: 8px 18px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all .2s;
}
.btn-outline-admin:hover { background: var(--primary); color: #fff; }

/* ── Image Preview ────────────────────────────── */
.img-preview {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #eee;
    display: block;
    margin-top: 8px;
}

/* ── Inquiry Detail ───────────────────────────── */
.inq-meta td:first-child { font-weight: 700; color: #888; width: 130px; font-size: 12px; }
.inq-meta td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }

/* ── Mobile Sidebar Toggle ────────────────────── */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.4);
        z-index: 99;
    }
    .sidebar-overlay.open { display: block; }
}
