:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #0b1830;
  --blue: #2366e8;
  --blue-soft: #eaf1ff;
  --surface: #ffffff;
  --border: #dfe6f0;
  --muted: #697386;
  --success: #15835e;
  --warning: #b76a00;
  --danger: #c33b4a;
  --shadow: 0 14px 38px rgba(23, 32, 51, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.boot-screen { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; padding: 28px; }
.boot-screen h1 { margin: 0; font-size: clamp(26px, 4vw, 42px); color: var(--navy); }
.boot-screen p { margin: 0; color: var(--muted); }
.brand-mark { width: 56px; height: 56px; margin: 0 auto 4px; display: grid; place-items: center; border-radius: 18px; background: linear-gradient(135deg, #2366e8, #59a1ff); color: white; font-weight: 800; font-size: 28px; box-shadow: var(--shadow); }
.loader { width: 34px; height: 34px; margin: 10px auto 0; border-radius: 50%; border: 3px solid #d9e4f7; border-top-color: var(--blue); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; background: var(--surface); }
.login-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 48px; color: white; background: radial-gradient(circle at 20% 20%, #2f76ff 0, transparent 32%), linear-gradient(145deg, #081326 0%, #10274f 72%, #174a9b 100%); }
.login-hero::after { content: ""; position: absolute; inset: auto -120px -120px auto; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.035), 0 0 0 140px rgba(255,255,255,.025); }
.login-brand { display: flex; align-items: center; gap: 14px; font-weight: 750; position: relative; z-index: 1; }
.login-brand .brand-mark { margin: 0; width: 46px; height: 46px; border-radius: 14px; }
.login-copy { position: relative; z-index: 1; max-width: 650px; padding: 60px 0; }
.login-copy h1 { margin: 0 0 18px; font-size: clamp(38px, 6vw, 76px); line-height: .98; letter-spacing: -.045em; }
.login-copy p { max-width: 570px; margin: 0; color: rgba(255,255,255,.76); font-size: 18px; line-height: 1.65; }
.login-note { position: relative; z-index: 1; color: rgba(255,255,255,.56); font-size: 13px; }
.login-panel { display: grid; place-items: center; padding: 38px; }
.login-card { width: min(430px, 100%); }
.login-card h2 { margin: 0 0 8px; color: var(--navy); font-size: 34px; letter-spacing: -.03em; }
.login-card > p { color: var(--muted); margin: 0 0 30px; line-height: 1.55; }
.form-group { margin-bottom: 17px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: #3e4a5c; }
.form-control { width: 100%; height: 48px; border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; outline: none; background: #fbfcfe; transition: .2s; }
.form-control:focus { background: white; border-color: #75a1f4; box-shadow: 0 0 0 4px rgba(35,102,232,.11); }
.btn-primary { width: 100%; height: 49px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #1f5fd9, #347cf4); color: white; font-weight: 750; box-shadow: 0 10px 22px rgba(35,102,232,.22); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.message { margin-top: 14px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.45; }
.message.error { color: #922a39; background: #fff0f2; border: 1px solid #ffd1d8; }
.message.info { color: #1b4f96; background: #eef5ff; border: 1px solid #cfe0ff; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--navy); color: white; padding: 24px 18px; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; font-weight: 760; }
.sidebar-brand .brand-mark { margin: 0; width: 38px; height: 38px; border-radius: 12px; font-size: 20px; }
.nav-list { display: grid; gap: 7px; }
.nav-button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 10px; padding: 12px 13px; color: rgba(255,255,255,.72); background: transparent; text-align: left; font-weight: 650; }
.nav-button:hover, .nav-button.active { color: white; background: rgba(65,124,244,.22); }
.nav-icon { width: 22px; text-align: center; }
.sidebar-bottom { margin-top: auto; padding-top: 20px; }
.user-mini { padding: 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(255,255,255,.045); }
.user-mini strong { display: block; font-size: 14px; }
.user-mini span { color: rgba(255,255,255,.56); font-size: 12px; text-transform: uppercase; }
.logout-btn { width: 100%; margin-top: 10px; border: 0; border-radius: 10px; padding: 10px; background: rgba(255,255,255,.09); color: white; }
.main { min-width: 0; }
.topbar { height: 74px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; background: rgba(255,255,255,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 20; }
.topbar-title { font-size: 20px; font-weight: 780; color: var(--navy); }
.status-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 999px; background: #edf9f4; color: var(--success); font-size: 12px; font-weight: 720; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(21,131,94,.1); }
.content { padding: 28px 30px 42px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 0; font-size: 30px; letter-spacing: -.035em; color: var(--navy); }
.page-heading p { margin: 7px 0 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 18px; box-shadow: 0 5px 18px rgba(23,32,51,.035); }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 680; }
.stat-card strong { display: block; margin-top: 8px; font-size: 28px; color: var(--navy); letter-spacing: -.03em; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 8px 28px rgba(23,32,51,.045); overflow: hidden; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; border-bottom: 1px solid var(--border); }
.panel-header h2 { margin: 0; font-size: 16px; color: var(--navy); }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.recent-list { padding: 6px 19px 17px; }
.recent-item { display: grid; grid-template-columns: 1fr auto; gap: 15px; padding: 13px 0; border-bottom: 1px solid #edf1f6; }
.recent-item:last-child { border-bottom: 0; }
.recent-item strong { display: block; font-size: 14px; color: #273247; }
.recent-item small { color: var(--muted); }
.status-summary { padding: 20px; display: grid; gap: 13px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.status-row div { display: flex; align-items: center; gap: 10px; color: #425068; font-size: 14px; }
.color-dot { width: 9px; height: 9px; border-radius: 50%; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-input { min-width: 250px; height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 12px; outline: none; }
.search-input:focus { border-color: #7fa9f7; box-shadow: 0 0 0 3px rgba(35,102,232,.09); }
.select-input { height: 40px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; background: #f8fafd; border-bottom: 1px solid var(--border); color: #697386; text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid #edf1f6; font-size: 13px; color: #334057; white-space: nowrap; }
tbody tr:hover { background: #fbfcff; }
.badge { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.badge.success { background: #e9f8f2; color: var(--success); }
.badge.warning { background: #fff4df; color: var(--warning); }
.badge.danger { background: #fff0f2; color: var(--danger); }
.badge.neutral { background: #eef2f7; color: #5e6878; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 18px; color: var(--muted); font-size: 12px; }
.page-controls { display: flex; gap: 7px; }
.page-btn { min-width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 9px; background: white; color: #3e4a5c; }
.page-btn:disabled { opacity: .45; cursor: default; }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.skeleton { position: relative; overflow: hidden; background: #edf1f6; border-radius: 7px; min-height: 15px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.85), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 22px; }
@media (max-width: 1050px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 360px; padding: 30px; }
  .login-copy { padding: 44px 0 24px; }
  .login-panel { padding: 32px 22px 48px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 50; transform: translateX(-100%); transition: .22s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: block; }
  .content { padding: 22px 16px 35px; }
  .topbar { padding: 0 16px; }
  .page-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .toolbar { width: 100%; }
  .search-input, .select-input { width: 100%; min-width: 0; }
  .pagination { align-items: flex-start; flex-direction: column; }
}
