:root {
  --navy: #0b2440;
  --navy-2: #123858;
  --blue: #246fa8;
  --cyan: #10a6a6;
  --ink: #16283b;
  --muted: #687789;
  --line: #dfe6ec;
  --surface: #ffffff;
  --canvas: #f2f5f8;
  --danger: #c83b4d;
  --shadow: 0 18px 45px rgba(13, 35, 57, .12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-size: 16px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 .45rem; color: var(--cyan); font-size: .76rem; font-weight: 800; letter-spacing: .14em; }
.muted { color: var(--muted); }
.auth-page { min-height: 100vh; padding: 2rem; display: grid; place-items: center; background: radial-gradient(circle at 10% 10%, #1d577d 0, transparent 34%), linear-gradient(135deg, #081a2c 0%, #0e304e 54%, #0d6870 130%); }
.auth-shell { width: min(1050px, 100%); min-height: 650px; display: grid; grid-template-columns: 1.12fr .88fr; overflow: hidden; border: 1px solid rgba(255,255,255,.15); border-radius: 28px; background: rgba(255,255,255,.08); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.auth-brand { position: relative; padding: clamp(2.2rem, 6vw, 5rem); display: flex; flex-direction: column; justify-content: center; color: white; overflow: hidden; }
.auth-brand::after { content: ""; position: absolute; width: 320px; height: 320px; border: 70px solid rgba(255,255,255,.07); border-radius: 50%; right: -140px; bottom: -170px; }
.brand-mark { width: 62px; height: 62px; margin-bottom: 2rem; display: grid; place-items: center; border-radius: 18px; color: #062637; background: linear-gradient(135deg, #49d8cf, #c8fbf2); font-weight: 900; box-shadow: 0 12px 30px rgba(21,184,178,.28); }
.auth-brand h1 { max-width: 640px; margin: .25rem 0 1.25rem; font-size: clamp(2.25rem, 5vw, 4.3rem); line-height: 1.02; letter-spacing: -.045em; }
.auth-brand > p:not(.eyebrow) { max-width: 560px; margin: 0; color: rgba(255,255,255,.72); font-size: 1.05rem; line-height: 1.7; }
.brand-points { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .65rem; }
.brand-points span { padding: .55rem .8rem; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; color: rgba(255,255,255,.84); background: rgba(255,255,255,.07); font-size: .78rem; }
.auth-card { padding: clamp(2rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; background: white; }
.auth-card h2 { margin: 0 0 .5rem; color: var(--ink); font-size: 2rem; letter-spacing: -.035em; }
.auth-card > .muted { margin: 0 0 1.7rem; line-height: 1.6; }
.form-stack { display: grid; gap: 1rem; }
.form-stack hr { width: 100%; margin: .35rem 0; border: 0; border-top: 1px solid var(--line); }
label { display: grid; gap: .45rem; color: #35475a; font-size: .85rem; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 46px; padding: .72rem .85rem; border: 1px solid #cfd9e2; border-radius: 10px; outline: none; color: var(--ink); background: #fff; transition: border .18s, box-shadow .18s; }
textarea { min-height: 100px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,111,168,.13); }
.btn { min-height: 43px; padding: .65rem 1rem; border: 0; border-radius: 10px; cursor: pointer; font-weight: 800; transition: transform .15s, filter .15s; }
.btn:hover { filter: brightness(.97); transform: translateY(-1px); }
.btn-primary { color: white; background: linear-gradient(135deg, #176b9c, #0d8d91); box-shadow: 0 8px 20px rgba(22,112,147,.2); }
.btn-secondary { color: #2c475e; border: 1px solid var(--line); background: white; }
.btn-block { width: 100%; margin-top: .35rem; text-align: center; text-decoration: none; display: grid; place-items: center; }
.form-note { margin: 1.4rem 0 0; text-align: center; color: var(--muted); font-size: .78rem; line-height: 1.55; }
.alert { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 10px; font-size: .86rem; line-height: 1.5; }
.alert-error { color: #92283a; border: 1px solid #f1bdc5; background: #fff0f2; }
.success-icon { width: 58px; height: 58px; margin-bottom: 1.25rem; display: grid; place-items: center; color: white; border-radius: 18px; background: var(--cyan); font-size: 1.8rem; }
.install-shell { width: min(1120px, 100%); }
.install-shell .auth-card { overflow-y: auto; }
.install-steps { margin-top: 2rem; display: grid; gap: .8rem; }
.install-steps span { display: flex; align-items: center; gap: .7rem; color: rgba(255,255,255,.82); }
.install-steps b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(71,218,207,.18); color: #9af3e9; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.field-grid.two { grid-template-columns: 1.5fr .5fr; }
.field-grid .wide, .field-grid label:has(textarea) { grid-column: 1 / -1; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 276px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; z-index: 20; display: flex; flex-direction: column; color: white; background: linear-gradient(180deg, #091e34 0%, #0d2b47 62%, #0b424f 125%); box-shadow: 10px 0 34px rgba(15,39,62,.08); }
.sidebar-brand { height: 88px; padding: 1.15rem 1.25rem; display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-mark.small { width: 42px; height: 42px; margin: 0; flex: 0 0 auto; border-radius: 12px; font-size: .9rem; }
.sidebar-brand > span:last-child, .sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }
.sidebar-brand b { letter-spacing: .12em; }
.sidebar-brand small, .sidebar-user small { margin-top: .12rem; color: rgba(255,255,255,.52); font-size: .68rem; letter-spacing: .08em; }
.nav-scroll { flex: 1; padding: .9rem .75rem 1.5rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.nav-group { margin: 1.25rem .75rem .45rem; color: rgba(255,255,255,.37); font-size: .66rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.nav-item { width: 100%; padding: .62rem .68rem; display: flex; align-items: center; gap: .72rem; border: 0; border-radius: 9px; color: rgba(255,255,255,.71); background: transparent; cursor: pointer; text-align: left; font-size: .81rem; font-weight: 650; }
.nav-item span { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; color: rgba(255,255,255,.65); background: rgba(255,255,255,.07); font-size: .62rem; font-weight: 900; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: linear-gradient(90deg, rgba(33,154,168,.34), rgba(43,121,171,.16)); box-shadow: inset 3px 0 #3bd2ca; }
.nav-item.active span { color: #06283a; background: #72e6dc; }
.sidebar-user { min-height: 78px; padding: .9rem 1rem; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: .65rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-user b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78rem; }
.sidebar-user a { color: rgba(255,255,255,.65); text-decoration: none; font-size: 1.2rem; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #06283a; background: #79e3db; font-weight: 900; }
.workspace { min-width: 0; }
.topbar { min-height: 88px; padding: 1.15rem clamp(1.1rem, 3vw, 2.4rem); display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: clamp(1.45rem, 2.5vw, 2rem); letter-spacing: -.035em; }
.top-actions { display: flex; align-items: center; gap: .65rem; }
.date-chip { padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 9px; color: #546679; background: #fff; font-size: .78rem; font-weight: 700; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: #3b5368; background: white; cursor: pointer; font-size: 1.15rem; }
.mobile-only { display: none; }
.content-view { padding: clamp(1.1rem, 3vw, 2.4rem); }
.stats-grid { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 1rem; }
.stat-card { position: relative; min-height: 145px; padding: 1.1rem; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 7px 20px rgba(18,44,68,.04); }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; bottom: -38px; border-radius: 50%; background: currentColor; opacity: .06; }
.stat-card p { min-height: 36px; margin: .85rem 0 .15rem; color: #596a7b; font-size: .77rem; font-weight: 700; }
.stat-card strong { display: block; color: var(--ink); font-size: 1.7rem; letter-spacing: -.04em; }
.stat-card small { color: #94a1ad; font-size: .68rem; }
.stat-dot { width: 9px; height: 9px; display: block; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 13%, transparent); }
.stat-card.blue { color: #2777ae; } .stat-card.green { color: #18a06e; } .stat-card.orange { color: #dc8128; }
.stat-card.violet { color: #7b61b9; } .stat-card.cyan { color: #159da7; } .stat-card.red { color: #cf5061; }
.loading-card { padding: 2rem; grid-column: 1/-1; color: var(--muted); border: 1px solid var(--line); border-radius: 16px; background: white; }
.dashboard-grid { margin-top: 1rem; display: grid; grid-template-columns: .85fr 1.15fr; gap: 1rem; }
.panel { border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 8px 24px rgba(18,44,68,.04); }
.panel-head { padding: 1.15rem 1.25rem; display: flex; justify-content: space-between; border-bottom: 1px solid #edf1f4; }
.panel h2 { margin: 0; font-size: 1rem; }
.attendance-summary { min-height: 310px; padding: 1.4rem; display: grid; grid-template-columns: .7fr 1.3fr; align-items: center; gap: 1.5rem; }
.attendance-total { aspect-ratio: 1; display: grid; place-content: center; text-align: center; border: 18px solid #def1f0; border-top-color: var(--cyan); border-radius: 50%; }
.attendance-total strong { font-size: 2rem; letter-spacing: -.05em; }
.attendance-total span { color: var(--muted); font-size: .68rem; }
.attendance-bars { display: grid; gap: 1rem; }
.attendance-bars > div > span { display: flex; justify-content: space-between; font-size: .78rem; }
.attendance-bars em { color: var(--muted); font-style: normal; }
.attendance-bars i { height: 7px; margin-top: .38rem; display: block; overflow: hidden; border-radius: 99px; background: #edf2f5; }
.attendance-bars u { height: 100%; display: block; border-radius: inherit; text-decoration: none; background: var(--cyan); }
.attendance-bars .sakit { background: #e3a33c; } .attendance-bars .izin { background: #687fc2; } .attendance-bars .alfa { background: #d75162; }
.activity-list { max-height: 360px; padding: .35rem 1.25rem; overflow-y: auto; }
.activity-item { padding: .9rem 0; display: grid; grid-template-columns: 38px 1fr; gap: .75rem; border-bottom: 1px solid #eef2f5; }
.activity-item:last-child { border: 0; }
.activity-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; color: #11646f; background: #dff4f2; font-size: .66rem; font-weight: 900; }
.activity-item b { font-size: .78rem; } .activity-item p { margin: .2rem 0; color: #596b7d; font-size: .75rem; line-height: 1.45; } .activity-item small { color: #9aa5af; font-size: .66rem; }
.module-toolbar { margin-bottom: 1rem; display: flex; justify-content: flex-end; gap: .7rem; }
.search-wrap { max-width: 430px; min-width: 240px; margin-right: auto; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }
.search-wrap span { padding-left: .8rem; color: #718191; font-size: 1.2rem; }
.search-wrap input { border: 0; box-shadow: none; background: transparent; }
.table-panel { overflow: hidden; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: .85rem 1rem; color: #657486; background: #f7f9fb; border-bottom: 1px solid var(--line); text-align: left; font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; }
td { max-width: 320px; padding: .85rem 1rem; overflow: hidden; border-bottom: 1px solid #edf1f4; color: #34495d; text-overflow: ellipsis; font-size: .78rem; }
tbody tr:hover { background: #fafdff; }
.actions-col { text-align: right; }
.row-actions { text-align: right; }
.table-btn { padding: .35rem .55rem; border: 1px solid #d9e2e9; border-radius: 7px; color: #345268; background: white; cursor: pointer; font-size: .69rem; font-weight: 800; }
.table-btn + .table-btn { margin-left: .3rem; }
.table-btn.danger { color: #b33748; border-color: #efcbd0; background: #fff7f8; }
.status-badge { padding: .3rem .55rem; border-radius: 999px; color: #126c70; background: #e0f4f2; font-size: .67rem; font-weight: 800; }
.file-link { color: #176b9c; font-weight: 750; text-decoration: none; }
.file-link:hover { text-decoration: underline; }
.table-footer { padding: .8rem 1rem; display: flex; justify-content: space-between; color: #84919d; background: #fafcfd; font-size: .7rem; }
.loading-row { padding: 3rem; text-align: center; }
.empty-state { min-height: 120px; display: grid; place-content: center; gap: .25rem; color: #87939e; text-align: center; white-space: normal; }
.empty-state b { color: #526679; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; padding: 1.25rem; display: grid; place-items: center; background: rgba(4,20,34,.68); backdrop-filter: blur(5px); }
.modal { width: min(820px, 100%); max-height: calc(100vh - 2.5rem); overflow: hidden; border-radius: 18px; background: white; box-shadow: var(--shadow); }
.modal > header { padding: 1rem 1.25rem; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: 1.15rem; }
.modal form { max-height: calc(100vh - 130px); overflow-y: auto; }
.modal .field-grid { padding: 1.25rem; }
.modal footer { position: sticky; bottom: 0; padding: .9rem 1.25rem; display: flex; justify-content: flex-end; gap: .7rem; border-top: 1px solid var(--line); background: white; }
.check-field { min-height: 62px; padding: .65rem .8rem; grid-template-columns: auto 1fr; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.check-field input { width: 20px; min-height: 20px; }
.check-field span { display: grid; gap: .15rem; }
.check-field small { color: var(--muted); font-weight: 400; }
.modal-open { overflow: hidden; }
.toast-stack { position: fixed; z-index: 100; right: 1.2rem; bottom: 1.2rem; display: grid; gap: .65rem; }
.toast { max-width: 380px; padding: .85rem 1rem; transform: translateY(15px); opacity: 0; border-left: 4px solid var(--cyan); border-radius: 10px; color: #263e50; background: white; box-shadow: var(--shadow); font-size: .82rem; transition: .22s; }
.toast.error { border-color: var(--danger); }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 1250px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: grid; }
  .topbar { justify-content: flex-start; }
  .top-actions { margin-left: auto; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { min-height: 300px; padding: 2rem; }
  .auth-brand h1 { font-size: 2.5rem; }
  .brand-mark { margin-bottom: 1.2rem; }
}
@media (max-width: 650px) {
  .auth-page { padding: 0; }
  .auth-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .auth-brand { min-height: 260px; }
  .auth-card { padding: 1.5rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card { min-height: 130px; }
  .attendance-summary { grid-template-columns: 1fr; }
  .attendance-total { width: 160px; margin: 0 auto; }
  .module-toolbar { flex-wrap: wrap; }
  .search-wrap { max-width: none; min-width: 100%; }
  .field-grid, .field-grid.two { grid-template-columns: 1fr; }
  .date-chip { display: none; }
  .topbar .eyebrow { display: none; }
  .content-view { padding: 1rem; }
}
