/* ==========================================================================
   Design tokens & Stylesheet
   Palette: Indigo #3730A3 / Violet #7C3AED · Gold #F59E0B
   Emerald #10B981 (approved) · Coral #FB7185 (rejected)
   Warm paper #FFFCF7 background. Display face: Poppins. Body: Inter.
   ========================================================================== */

* { box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #ffffff;
    color: #1F2333;
    margin: 0;
    padding: 0;
}

h1, h2, .sidebar-brand, .stat-number {
    font-family: 'Poppins', 'Inter', sans-serif;
}

/* ---------- Simple pages (login/register/client dashboard) ---------- */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 32px 40px;
}
.page-hero {
    background: linear-gradient(135deg, #3730A3 0%, #7C3AED 55%, #9333EA 100%);
    margin: 0 0 -30px;
    padding: 46px 32px 60px;
    text-align: center;
    border-radius: 0 0 28px 28px;
    width: 100%;
}
.page-hero h1 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.page-hero .eyebrow {
    display: inline-block;
    background: #F59E0B;
    color: #3B2400;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.page-hero p { color: #E9E4FF; font-size: 14px; margin: 0; }

.card {
    background: #fff;
    border: 1px solid #EFE9DD;
    border-radius: 14px;
    padding: 28px;
    margin: 24px 0 20px 0;
    box-shadow: 0 6px 20px rgba(55, 48, 163, 0.06);
    width: 100%;
    max-width: 100%;
}
.card.wide { width: 100%; max-width: 100%; }

h1 { font-size: 22px; margin-top: 0; letter-spacing: -0.01em; }
h2 { font-size: 16px; margin-top: 0; font-weight: 700; color: #3730A3; }

label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: #4B4F63; }
input[type=text], input[type=email], input[type=password], textarea {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid #E3DFF0;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    font-family: inherit;
    transition: border-color .15s;
}
input:focus, textarea:focus {
    outline: none;
    border-color: #7C3AED;
}
textarea { min-height: 100px; resize: vertical; }

button, .btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s, box-shadow .15s;
    font-family: inherit;
}
button:hover, .btn:hover { transform: translateY(-1px); }

.btn-primary { background: linear-gradient(135deg, #7C3AED, #4F46E5); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,.3); }
.btn-approve { background: linear-gradient(135deg, #10B981, #059669); color: #fff; }
.btn-reject  { background: linear-gradient(135deg, #FB7185, #E11D48); color: #fff; }
.btn-secondary { background: #F1EEFB; color: #3730A3; }
.btn-small { padding: 7px 13px; font-size: 13px; margin-right: 6px; }

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }

.request-item { border-bottom: 1px solid #F1EEE4; padding: 16px 0; }
.request-item:last-child { border-bottom: none; }
.request-title { font-weight: 700; margin-bottom: 4px; color: #1F2333; }
.meta { color: #8A8FA3; font-size: 13px; margin-bottom: 8px; }

.status { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-pending  { background: #FEF3C7; color: #92400E; }
.status-approved { background: #D1FAE5; color: #065F46; }
.status-rejected { background: #FFE4E6; color: #9F1239; }

.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.flash-success { background: #D1FAE5; color: #065F46; }
.flash-error   { background: #FFE4E6; color: #9F1239; }

.actions { margin-top: 10px; }
a.logout { font-size: 13px; color: #8A8FA3; }

/* ---------- Admin sidebar layout ---------- */
.admin-layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 232px;
    background: linear-gradient(180deg, #2E2A7A 0%, #4C1D95 100%);
    color: #D9D3F5;
    display: flex;
    flex-direction: column;
    padding: 0;
    flex-shrink: 0;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 14px;
}
.sidebar-brand .mark {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, #F59E0B, #FB923C);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #3B2400;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
}
.sidebar nav { display: flex; flex-direction: column; flex: 1; padding: 0 12px; gap: 3px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    color: #C9C3EB;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: 9px;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.active { background: linear-gradient(135deg, #F59E0B, #EA8A1F); color: #3B2400; font-weight: 700; }
.nav-link.active svg { opacity: 1; }
.logout-link { margin: 14px 12px 20px; color: #B7ADE0; padding: 10px 14px; }
.logout-link:hover { background: rgba(255,255,255,0.08); color: #fff; }

.content { flex: 1; padding: 32px 36px; width: 100%; max-width: 100%; }
.card {
    background: #fff;
    border: 1px solid #EFE9DD;
    border-radius: 14px;
    padding: 28px;
    margin: 24px 0 20px 0;
    box-shadow: 0 6px 20px rgba(55, 48, 163, 0.06);
    width: 100%;
    max-width: 100%;
}
.content h1 { margin-top: 0; }

.table-responsive {
    width: calc(100% + 56px);
    margin-left: -28px;
    margin-right: -28px;
    margin-top: 12px;
    margin-bottom: -28px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}
.data-table { width: 100%; min-width: 100%; border-collapse: separate; border-spacing: 0; background: #ffffff; }
.data-table th, .data-table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid #e2e8f0; font-size: 14px; vertical-align: middle; }
.data-table th { background: #f8fafc; color: #475569; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 2px solid #cbd5e1; }
.data-table tr:hover td { background: #f8fafc; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.badge-active { background: #D1FAE5; color: #065F46; }
.badge-inactive { background: #F1EEE4; color: #8A8FA3; }

/* ---------- Colorful stat cards ---------- */
.stat-grid { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.stat-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px 18px 20px;
    min-width: 150px;
    box-shadow: 0 4px 16px rgba(55,48,163,0.07);
    border-left: 5px solid #7C3AED;
    overflow: hidden;
}
.stat-box .stat-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.stat-number { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12.5px; color: #8A8FA3; margin-top: 4px; font-weight: 600; }

.stat-pending  { border-left-color: #F59E0B; }
.stat-pending  .stat-number { color: #B45309; }
.stat-approved { border-left-color: #10B981; }
.stat-approved .stat-number { color: #047857; }
.stat-rejected { border-left-color: #FB7185; }
.stat-rejected .stat-number { color: #E11D48; }
.stat-services { border-left-color: #7C3AED; }
.stat-services .stat-number { color: #6D28D9; }
.stat-users    { border-left-color: #3730A3; }
.stat-users    .stat-number { color: #3730A3; }

@media (max-width: 700px) {
    .admin-layout { flex-direction: column; }
    .sidebar { width: 100%; flex-direction: row; align-items: center; padding: 10px 12px; }
    .sidebar-brand { border: none; margin: 0; padding: 0 12px 0 0; }
    .sidebar nav { flex-direction: row; padding: 0; overflow-x: auto; }
    .nav-link span.label { display: none; }
    .logout-link { margin: 0 0 0 8px; }
    .content { padding: 20px; }
}
