* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; background: #f3f6fb; color: #1f2937; font-size: 15px; line-height: 1.5; }
a { color: #155eef; text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 24px; }
.nav { background: #1e40af; color: #fff; }
.nav .container { display: flex; align-items: center; gap: 18px; padding-top: 14px; padding-bottom: 14px; }
.nav a { color: #e0e7ff; font-weight: 600; }
.brand { font-size: 18px; font-weight: 800; color: #fff; margin-right: auto; }
.card { background: #fff; border-radius: 14px; padding: 20px; box-shadow: 0 8px 30px rgba(15,23,42,.08); margin-bottom: 18px; overflow-x: auto; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: #334155; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; font-size: 14px; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
button, .btn { display: inline-block; border: 0; border-radius: 12px; padding: 12px 16px; font-weight: 700; cursor: pointer; background: #155eef; color: #fff; font-size: 15px; }
.btn-secondary { background: #475569; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-light { background: #e2e8f0; color: #0f172a; }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid #e2e8f0; text-align: left; font-size: 14px; vertical-align: top; }
th { background: #e2e8f0; color: #0f172a; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.flash { padding: 12px 14px; border-radius: 10px; background: #dcfce7; color: #166534; margin-bottom: 18px; font-weight: 700; }
.small { font-size: 12px; color: #64748b; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { background: #fff; border-radius: 14px; padding: 18px; box-shadow: 0 8px 30px rgba(15,23,42,.08); }
.stat strong { display: block; font-size: 28px; margin-bottom: 6px; }

.user-menu { display: inline-flex; align-items: center; gap: 8px; color: #e0e7ff; font-weight: 700; }
.user-avatar { width: 34px; height: 34px; border-radius: 999px; object-fit: cover; border: 2px solid rgba(255,255,255,.75); background: #dbeafe; color: #1e40af; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; }
.user-avatar-placeholder { text-transform: uppercase; }

@media (max-width: 800px) { .grid, .grid-3, .stats { grid-template-columns: 1fr; } .nav .container { flex-wrap: wrap; } }

.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 22px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    color: #fff;
    border-radius: 22px;
    padding: 28px;
    margin-bottom: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}
.dashboard-hero h1 { margin: 4px 0 8px; font-size: 32px; line-height: 1.1; }
.dashboard-hero p { margin: 0; color: #dbeafe; max-width: 680px; }
.eyebrow { display: inline-block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #bfdbfe; font-weight: 800; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.stats-expanded { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.stat-link { color: #0f172a; transition: transform .15s ease, box-shadow .15s ease; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 14px 35px rgba(15,23,42,.12); }
.stat span { display: block; color: #475569; font-weight: 700; }
.stat small { color: #64748b; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 18px; align-items: start; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 0 0 4px; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick-action { display: block; padding: 16px; border: 1px solid #dbe3ef; border-radius: 16px; background: #f8fafc; color: #0f172a; }
.quick-action strong { display: block; margin-bottom: 4px; }
.quick-action span { color: #64748b; font-size: 13px; }
.quick-action.featured { border-color: #93c5fd; background: #eff6ff; }
.mini-stats { display: grid; gap: 12px; }
.mini-stats div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.mini-stats div:last-child { border-bottom: 0; }
.mini-stats span { color: #475569; }
.mini-stats strong { font-size: 20px; }
.inner-card { margin-top: 18px; box-shadow: none; border: 1px solid #e2e8f0; }
.table-wrap { overflow-x: auto; }
.form-checkline { display: flex; flex-direction: column; justify-content: center; }
.checkbox-label { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.checkbox-label input { width: auto; }
.form-actions { margin-top: 18px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: #e2e8f0; color: #334155; font-weight: 800; font-size: 12px; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-muted { background: #f1f5f9; color: #64748b; }
.row-muted { opacity: .72; }

@media (max-width: 960px) {
    .dashboard-hero { flex-direction: column; align-items: flex-start; }
    .hero-actions { justify-content: flex-start; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .stats-expanded { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .dashboard-hero h1 { font-size: 26px; }
    .quick-actions-grid, .stats-expanded { grid-template-columns: 1fr; }
    .section-heading { flex-direction: column; }
}
