@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');

:root {
    --navy: #0b2f33;
    --navy-2: #123f43;
    --teal: #1f746f;
    --teal-soft: #dff1ee;
    --gold: #c09a5b;
    --gold-soft: #f4ead8;
    --bg: #f5f7f6;
    --surface: #ffffff;
    --text: #1c2929;
    --muted: #6d7a79;
    --line: #dfe7e5;
    --danger: #b44343;
    --danger-soft: #fbe8e8;
    --success: #237357;
    --success-soft: #e1f3eb;
    --warning: #9a681b;
    --warning-soft: #fff1d8;
    --info: #285d8a;
    --info-soft: #e6f1fb;
    --shadow: 0 14px 40px rgba(20, 50, 51, .08);
    --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 14px;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    padding: 24px 18px;
    background: linear-gradient(180deg, #0b2f33 0%, #123a3d 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 28px; }
.brand-mark {
    width: 42px; height: 42px; border-radius: 14px;
    display: grid; place-items: center;
    background: linear-gradient(145deg, var(--gold), #e4c997);
    color: var(--navy); font: 800 21px 'Manrope', sans-serif;
    box-shadow: inset 0 1px rgba(255,255,255,.5);
}
.brand strong { display: block; font: 800 19px 'Manrope', sans-serif; letter-spacing: -.4px; }
.brand small { color: rgba(255,255,255,.58); font-size: 10px; letter-spacing: .9px; text-transform: uppercase; }
.nav-menu { display: grid; gap: 6px; }
.nav-menu a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    color: rgba(255,255,255,.72); font-weight: 600;
    transition: .2s ease;
}
.nav-menu a span { width: 20px; text-align: center; font-size: 17px; color: rgba(255,255,255,.62); }
.nav-menu a:hover, .nav-menu a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-menu a.active { box-shadow: inset 3px 0 var(--gold); }
.sidebar-user {
    margin-top: auto; padding: 14px; border-radius: 15px;
    background: rgba(255,255,255,.08); display: flex; align-items: center; gap: 11px;
}
.sidebar-user .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font-weight: 800; }
.sidebar-user strong, .sidebar-user small { display: block; }
.sidebar-user small { color: rgba(255,255,255,.58); font-size: 11px; margin-top: 2px; }

.main-area { margin-left: 264px; width: calc(100% - 264px); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    min-height: 92px; padding: 18px 34px;
    display: flex; align-items: center; justify-content: space-between;
    background: rgba(245,247,246,.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.topbar h1 { margin: 2px 0 0; font: 800 23px 'Manrope', sans-serif; letter-spacing: -.6px; }
.eyebrow { color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.logout-link { padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; color: var(--muted); }
.logout-link:hover { color: var(--danger); border-color: #efcaca; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; }
.content { padding: 28px 34px 38px; flex: 1; }
.footer { padding: 18px 34px 25px; color: var(--muted); font-size: 12px; }

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

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(30,64,64,.045);
}
.card-body { padding: 22px; }
.card-header { padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; font: 750 16px 'Manrope', sans-serif; }
.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.stat-card { padding: 21px; position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; background: var(--teal-soft); right: -33px; top: -35px; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-value { margin-top: 8px; font: 800 25px 'Manrope', sans-serif; letter-spacing: -.7px; }
.stat-note { margin-top: 8px; color: var(--muted); font-size: 11px; }
.stat-icon { width: 37px; height: 37px; border-radius: 12px; display: grid; place-items: center; background: var(--teal-soft); color: var(--teal); margin-bottom: 16px; font-size: 18px; }

.hero-card {
    padding: 26px; color: #fff; border: 0;
    background: radial-gradient(circle at 90% 5%, rgba(214,184,126,.35), transparent 33%), linear-gradient(135deg, #0b2f33, #18545a);
}
.hero-card h2 { margin: 0 0 7px; font: 800 23px 'Manrope', sans-serif; }
.hero-card p { margin: 0; color: rgba(255,255,255,.7); max-width: 650px; line-height: 1.7; }
.hero-actions { margin-top: 19px; display: flex; gap: 10px; flex-wrap: wrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.toolbar h2 { margin: 0; font: 800 19px 'Manrope', sans-serif; }
.toolbar p { margin: 4px 0 0; color: var(--muted); }
.toolbar-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

.btn {
    border: 0; border-radius: 11px; padding: 10px 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-weight: 750; transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-light { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 7px 10px; border-radius: 8px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 10px; letter-spacing: .7px; text-transform: uppercase; background: #fafcfb; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfc; }
.cell-title { font-weight: 750; }
.cell-subtitle { color: var(--muted); font-size: 11px; margin-top: 3px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #edf0ef; color: var(--muted); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.form-group { display: grid; gap: 7px; }
.form-group.full { grid-column: 1 / -1; }
label { font-weight: 750; font-size: 12px; }
.required { color: var(--danger); }
.input, select, textarea {
    width: 100%; border: 1px solid #d6e0de; background: #fff; color: var(--text);
    border-radius: 11px; padding: 11px 12px; outline: none; transition: .18s ease;
}
.input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31,116,111,.11); }
textarea { min-height: 100px; resize: vertical; }
.help-text { color: var(--muted); font-size: 11px; line-height: 1.5; }
.form-actions { margin-top: 21px; display: flex; justify-content: flex-end; gap: 9px; }
.checkbox-row { display: flex; align-items: center; gap: 9px; }
.checkbox-row input { width: 17px; height: 17px; }

.alert { margin-bottom: 17px; padding: 12px 14px; border-radius: 11px; border: 1px solid; }
.alert-success { background: var(--success-soft); border-color: #bfe2d2; color: var(--success); }
.alert-error { background: var(--danger-soft); border-color: #f0caca; color: var(--danger); }
.alert-warning { background: var(--warning-soft); border-color: #efd7a8; color: var(--warning); }
.alert-info { background: var(--info-soft); border-color: #c8deef; color: var(--info); }

.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state .empty-icon { font-size: 32px; margin-bottom: 10px; }
.empty-state h3 { margin: 0 0 6px; color: var(--text); }

.summary-list { display: grid; gap: 12px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.summary-row:last-child { padding-bottom: 0; border-bottom: 0; }
.summary-row span { color: var(--muted); }
.summary-row strong { text-align: right; }

.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 24px;
    background: radial-gradient(circle at 15% 15%, rgba(192,154,91,.18), transparent 29%), radial-gradient(circle at 88% 80%, rgba(31,116,111,.17), transparent 27%), #f2f6f4;
}
.login-shell { width: min(960px, 100%); display: grid; grid-template-columns: 1.05fr .95fr; overflow: hidden; border-radius: 25px; background: #fff; box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.7); }
.login-visual { padding: 50px; min-height: 610px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; background: radial-gradient(circle at 80% 10%, rgba(192,154,91,.4), transparent 28%), linear-gradient(145deg, #0b2f33, #164c50); }
.login-logo { display: flex; align-items: center; gap: 12px; font: 800 21px 'Manrope', sans-serif; }
.login-copy h1 { margin: 0 0 14px; font: 800 38px/1.12 'Manrope', sans-serif; letter-spacing: -1.5px; }
.login-copy p { margin: 0; color: rgba(255,255,255,.68); line-height: 1.8; }
.login-points { display: grid; gap: 12px; margin-top: 27px; }
.login-point { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.8); }
.login-point span { width: 25px; height: 25px; border-radius: 50%; background: rgba(255,255,255,.12); display: grid; place-items: center; color: #e7ca98; }
.login-form { padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.login-form h2 { margin: 0; font: 800 27px 'Manrope', sans-serif; }
.login-form > p { color: var(--muted); margin: 8px 0 28px; line-height: 1.6; }
.login-form .form-group { margin-bottom: 16px; }
.login-footnote { text-align: center; color: var(--muted); font-size: 11px; margin-top: 22px; }

.install-wrap { width: min(920px, 100%); margin: 40px auto; padding: 0 20px; }
.install-head { text-align: center; margin-bottom: 25px; }
.install-head h1 { margin: 8px 0; font: 800 31px 'Manrope', sans-serif; }
.install-head p { color: var(--muted); }
.code-note { padding: 12px; border-radius: 10px; background: #f4f7f6; font-family: monospace; font-size: 12px; overflow-wrap: anywhere; }

.progress-track { height: 9px; background: #edf1f0; border-radius: 999px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--teal), #43a099); border-radius: inherit; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
    .sidebar-overlay.show { display: block; }
    .main-area { margin-left: 0; width: 100%; }
    .menu-toggle { display: block; }
    .topbar { padding: 15px 18px; min-height: 78px; justify-content: flex-start; gap: 14px; }
    .topbar .logout-link { margin-left: auto; }
    .content { padding: 20px 16px 30px; }
    .footer { padding: 15px 16px 24px; }
    .grid-3 { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; max-width: 520px; }
    .login-visual { min-height: auto; padding: 32px; }
    .login-copy h1 { font-size: 29px; }
    .login-points { display: none; }
    .login-form { padding: 34px 28px; }
}
@media (max-width: 620px) {
    .grid-2, .grid-4, .form-grid { grid-template-columns: 1fr; }
    .toolbar { align-items: flex-start; flex-direction: column; }
    .toolbar-actions, .toolbar-actions .btn { width: 100%; }
    .form-group.full { grid-column: auto; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .topbar h1 { font-size: 18px; }
    .eyebrow { display: none; }
    .logout-link { font-size: 12px; padding: 8px 10px; }
    .hero-card { padding: 22px; }
    .hero-card h2 { font-size: 20px; }
    .card-body { padding: 18px; }
    .card-header { padding: 16px 18px; }
}
