:root {
    --navy: #183a78;
    --navy-dark: #102956;
    --violet: #7348b2;
    --mauve: #b65f91;
    --bg: #f2f5fa;
    --card: #fff;
    --border: #dce5f0;
    --text: #243656;
    --muted: #6f7f9a;
    --success: #4aa977;
    --danger: #d95363;
    --shadow: 0 12px 34px rgba(37, 62, 105, .1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--navy); }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
    radial-gradient(circle at 16% 18%, rgba(190,96,136,.09), transparent 28%),
    radial-gradient(circle at 86% 78%, rgba(92,72,184,.1), transparent 30%), var(--bg); }
.login-card { width: min(430px, 100%); padding: 38px 40px 34px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.98); box-shadow: var(--shadow); }
.login-logo { display: block; width: min(310px, 100%); height: 195px; object-fit: contain; margin: 0 auto 4px; }
.login-subtitle { margin: 0 0 26px; text-align: center; color: var(--muted); font-size: 14px; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; letter-spacing: .55px; text-transform: uppercase; }
input, select, textarea { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(115,72,178,.12); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 10px 16px; border: 0; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy-dark); }
.btn-block { width: 100%; }
.btn-soft { background: #edf2fb; color: var(--navy); border: 1px solid #cfdbed; }
.btn-soft:hover { background: #dfe9f7; }
.btn-danger { background: var(--danger); }
.alert { margin-bottom: 17px; padding: 11px 13px; border-radius: 8px; font-size: 13px; }
.alert-error { color: #a32639; background: #fff0f2; border: 1px solid #f3c8d0; }
.alert-success { color: #236844; background: #edf9f2; border: 1px solid #c8ead6; }
.login-links { display: flex; justify-content: center; margin-top: 20px; font-size: 12px; }
.page-shell { width: min(1180px, calc(100% - 28px)); margin: 18px auto; padding: 18px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(110deg, #f7f2f5, #f5f1fb 58%, #eef3fb); }
.app-logo { width: 250px; height: 120px; object-fit: contain; background: #fff; border-radius: 10px; }
.header-nav { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.header-nav a, .header-nav button { border: 0; background: transparent; color: var(--navy); font: inherit; font-size: 13px; font-weight: 650; text-decoration: none; cursor: pointer; }
.content { padding: 22px 0 4px; }
.content h1 { margin: 0 0 8px; color: var(--navy); font-size: 27px; }
.lead { margin: 0 0 22px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat, .panel { padding: 18px; border: 1px solid var(--border); border-radius: 11px; background: var(--card); box-shadow: 0 5px 16px rgba(44,71,112,.06); }
.stat small { display: block; color: var(--muted); font-weight: 650; }
.stat strong { display: block; margin-top: 6px; color: var(--navy); font-size: 25px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel h2 { margin: 0; color: var(--navy); font-size: 19px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 10px; border-bottom: 1px solid #e3eaf3; text-align: left; white-space: nowrap; }
th { color: #536685; font-size: 11px; letter-spacing: .35px; text-transform: uppercase; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #edf2fb; color: var(--navy); font-size: 11px; font-weight: 700; }
.badge-success { background: #e8f7ee; color: #28764c; }
.badge-warning { background: #fff5df; color: #8b6117; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
@media (max-width: 720px) {
    .login-card { padding: 28px 22px; }
    .login-logo { height: 160px; }
    .page-shell { width: calc(100% - 12px); margin: 6px auto; padding: 8px; border-radius: 11px; }
    .app-header { flex-direction: column; padding: 10px; background: #fff; }
    .app-logo { width: 100%; height: 145px; }
    .header-nav { width: 100%; justify-content: center; }
    .stats, .form-grid { grid-template-columns: 1fr; }
}
