:root {
    --brand: #0f766e;
    --brand-dark: #115e59;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f1f5f9;
    --panel: #ffffff;
    --border: #e2e8f0;
    --danger: #b91c1c;
    --success: #15803d;
    --warning: #b45309;
    --uat: #fbbf24;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.uat-banner {
    background: var(--uat);
    color: #1c1917;
    font-weight: 600;
    text-align: center;
    padding: 8px 16px;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.topbar {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}

.topbar .brand {
    font-size: 18px;
    font-weight: 700;
    color: var(--brand-dark);
}

.topbar .brand small {
    display: block;
    font-weight: 400;
    font-size: 12px;
    color: var(--muted);
}

.nav {
    background: var(--brand-dark);
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 0 16px;
}

.nav a {
    color: #e2f0ee;
    padding: 12px 14px;
    display: inline-block;
    font-size: 14px;
    text-decoration: none;
}

.nav a:hover,
.nav a.active { background: var(--brand); color: #fff; }

.wrap {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 24px;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-head h1 { font-size: 22px; margin: 0; }
.page-head h2 { font-size: 18px; margin: 0 0 4px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
}

.stat .value { font-size: 30px; font-weight: 700; color: var(--brand-dark); }
.stat .label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: #e2e8f0;
    color: #334155;
}
.badge.success { background: #dcfce7; color: var(--success); }
.badge.danger { background: #fee2e2; color: var(--danger); }
.badge.warning { background: #fef3c7; color: var(--warning); }
.badge.info { background: #dbeafe; color: #1d4ed8; }

form .field { margin-bottom: 14px; }
label { display: block; font-weight: 600; margin-bottom: 4px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=date],
select, textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
textarea { min-height: 120px; }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.secondary { background: #e2e8f0; color: var(--ink); }
.btn.secondary:hover { background: #cbd5e1; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #7f1d1d; }
.btn.small { padding: 5px 10px; font-size: 13px; }

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}
.alert.success { background: #dcfce7; color: var(--success); border: 1px solid #bbf7d0; }
.alert.error { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.mt { margin-top: 12px; }
.mb { margin-bottom: 12px; }
dl { display: grid; grid-template-columns: 180px 1fr; row-gap: 8px; }
dt { color: var(--muted); font-weight: 600; }
dd { margin: 0; }

.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
}
.pagination .active { background: var(--brand); color: #fff; border-color: var(--brand); }

.sim-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.login-wrap { max-width: 400px; margin: 80px auto; }
