* {
    box-sizing: border-box;
}

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #101828;
    --muted: #64748b;
    --muted-light: #94a3b8;
    --border: #e5e7eb;
    --primary: #2563eb;
    --primary-soft: #dbeafe;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}

a {
    color: inherit;
}

/* =========================
   LAYOUT
========================= */





.page-shell {
    max-width: 1380px;
    margin: 0 auto;
}

/* =========================
   HERO / HEADER
========================= */

.hero {
    margin-bottom: 24px;
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.hero h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    color: #0f172a;
}

.hero p {
    margin: 10px 0 0;
    font-size: 15px;
    color: var(--muted);
    line-height: 1.6;
}

.welcome-badge {
    white-space: nowrap;
    padding: 12px 16px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #dbeafe;
    font-weight: 700;
    font-size: 14px;
}

/* =========================
   WORKSPACE
========================= */

.workspace-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.workspace-heading h2 {
    margin: 0;
    font-size: 24px;
    color: #0f172a;
}

.workspace-heading p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.6;
}

.workspace-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.workspace-badge {
    background: var(--surface);
    border: 1px solid var(--border);
    color: #0f172a;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
}

.alert-pill {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   DASHBOARD
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.section-title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.section-subtext {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 18px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.mini-box {
    text-decoration: none;
    background: var(--surface-soft);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px;
    transition: all 0.2s ease;
}

.mini-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.mini-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.mini-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.danger-text { color: var(--danger); }
.warning-text { color: var(--warning); }
.success-text { color: var(--success); }

/* =========================
   QUICK LINKS
========================= */

.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.quick-card {
    text-decoration: none;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 22px;
    transition: all 0.2s ease;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.03);
}

.quick-card:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.quick-title {
    font-size: 17px;
    font-weight: 800;
}

.quick-desc {
    font-size: 14px;
    color: var(--muted);
}

/* =========================
   CONTENT
========================= */

.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.page-title {
    margin: 0 0 8px;
    font-size: 28px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--muted);
}

/* =========================
   TABLES / FORMS
========================= */

.table-wrap {
    width: 100%;
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f7;
    font-size: 14px;
}

th {
    background: #f8fafc;
    font-weight: 700;
}

input, select, textarea, button {
    font: inherit;
}

input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

input:focus, select:focus, textarea:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.15);
}

/* =========================
   BUTTONS
========================= */

.btn {
    border: none;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #e2e8f0;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.topbar {
    height: 56px;
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.topbar-search {
    width: 60%;
    max-width: 400px;
    padding: 8px 12px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.topbar-search::placeholder {
    color: rgba(255,255,255,0.5);
}

.topbar-user {
    font-size: 13px;
    opacity: 0.85;
}

.topbar-logout {
    color: #f87171;
    text-decoration: none;
    font-size: 13px;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .dashboard-grid,
    .quick-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .layout {
        flex-direction: column;
    }

    .main {
        padding: 18px;
    }

    .hero-top,
    .workspace-header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .hero-top {
        padding: 22px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .card,
    .quick-card,
    .content-card {
        padding: 18px;
    }
}