:root {
    --ink: #172e2a;
    --muted: #74817e;
    --green: #174b40;
    --green-dark: #103c33;
    --line: #e8eeeb;
    --paper: #f5f8f6;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 258px; display: flex; flex-direction: column; padding: 28px 20px 20px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { flex: 0 0 48px; width: 48px; height: 48px; padding: 3px; border: 1px solid #e8eeeb; border-radius: 50%; background: #fff; object-fit: contain; }
.app-identity { display: flex; align-items: center; gap: 8px; margin: 14px 0 0 2px; color: var(--green); font-size: 9px; font-weight: 700; line-height: 1.35; }
.app-identity img { flex: 0 0 82px; width: 82px; height: 28px; padding: 3px 6px; border-radius: 6px; background: #fff; object-fit: contain; }
.brand strong, .brand small, .student-mini strong, .student-mini span { display: block; }
.brand strong { font: 800 12px/1.35 Manrope, sans-serif; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.student-mini { display: flex; align-items: center; gap: 11px; margin: 36px 0 26px; padding: 15px 11px; border-radius: 14px; background: #f4f7f5; }
.student-mini strong { overflow: hidden; max-width: 150px; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.student-mini span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #dcece5; color: var(--green); font: 700 15px Manrope, sans-serif; }
.navigation { display: grid; gap: 6px; }
.navigation a, .logout-form button { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 0; border-radius: 10px; background: transparent; color: #667570; font-weight: 600; text-align: left; transition: .2s ease; }
.navigation a > span, .logout-form button > span { width: 20px; font-size: 17px; text-align: center; }
.navigation a:hover, .navigation a.active { background: #eaf3ef; color: var(--green); }
.logout-form { margin-top: auto; }
.logout-form button { width: 100%; cursor: pointer; }
.logout-form button:hover { background: #fff0ef; color: #b5473b; }
.main-content { width: calc(100% - 258px); max-width: 1600px; margin-left: 258px; padding: 34px clamp(24px, 5vw, 72px) 60px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; }
.topbar h1 { margin: 5px 0 0; font: 800 26px Manrope, sans-serif; letter-spacing: -.7px; }
.eyebrow { color: #768a82; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; }
.topbar-date { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #687871; font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.install-app-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 13px; border: 1px solid #d6e5dc; border-radius: 9px; background: #fff; color: var(--green); font-size: 12px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.install-app-button:hover { border-color: #9dc4ad; background: #f0f7f3; }
.install-app-button[hidden] { display: none; }
.report-error-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 9px; background: #16834a; color: #fff; font-size: 12px; font-weight: 700; transition: background .2s ease; }
.report-error-button:hover { background: #106b3b; color: #fff; }
.report-error-button span { font-size: 16px; }
.welcome-card { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; min-height: 168px; padding: 30px 34px; border-radius: 18px; background: linear-gradient(110deg, #194c41, #2e7060); color: #fff; }
.welcome-card .eyebrow { color: #b8d5ca; }
.welcome-card h2 { margin: 11px 0 6px; font: 800 25px Manrope, sans-serif; letter-spacing: -.6px; }
.welcome-card p { margin: 0; color: #d5e5de; }
.welcome-copy { position: relative; z-index: 1; }
.welcome-app { display: flex; align-items: center; gap: 9px; margin-top: 15px; color: #fff; font-size: 10px; font-weight: 700; }
.welcome-app img { width: 78px; height: 26px; padding: 3px 5px; border-radius: 5px; background: #fff; object-fit: contain; }
.welcome-logo { flex: 0 0 92px; width: 92px; height: 92px; margin-right: 5%; border: 4px solid #ffffffbd; border-radius: 50%; background: #fff; object-fit: contain; box-shadow: 0 8px 24px #0e30264d; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin: 20px 0; }
.stat-card, .content-card { border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.stat-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 185px; padding: 19px; }
.stat-icon, .quick-icon { display: grid; place-items: center; border-radius: 12px; font-size: 18px; }
.stat-icon { width: 38px; height: 38px; }
.mint { background: #e5f3ed; color: #2f8063; }
.peach { background: #fff0e7; color: #c47542; }
.lilac { background: #f0edff; color: #7866bb; }
.blue { background: #e9f2ff; color: #527cb1; }
.stat-label { margin-top: 17px; color: var(--muted); font-size: 12px; }
.stat-card > strong { margin-top: 5px; font: 800 19px Manrope, sans-serif; }
.stat-card > strong.stat-text { font-size: 13px; }
.stat-card > a { margin-top: auto; padding-top: 16px; color: var(--green); font-size: 12px; font-weight: 700; }
.stat-card > a span { padding-left: 5px; }
.content-card { padding: 24px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-heading h2 { margin: 5px 0; font: 800 19px Manrope, sans-serif; letter-spacing: -.3px; }
.section-heading p { margin: 7px 0 0; }
.muted { color: var(--muted); }
.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quick-links > a { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 15px; border: 1px solid var(--line); border-radius: 13px; transition: .2s ease; }
.quick-links > a:hover { border-color: #b4d2c4; transform: translateY(-2px); }
.quick-icon { width: 36px; height: 36px; margin-bottom: 15px; }
.quick-links strong { font-size: 12px; }
.quick-links small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.quick-arrow { position: absolute; top: 17px; right: 15px; color: #91a29a; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.button-primary { background: var(--green); color: #fff; }
.button-primary:hover { background: var(--green-dark); }
.button-outline { border-color: #dce6e0; background: #fff; color: var(--green); }
.button-outline:hover { background: #f1f7f4; }
.button-wide { width: 100%; min-height: 48px; margin-top: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
th { padding: 12px 13px; background: #f6f8f7; color: #75827d; font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; }
td { padding: 14px 13px; border-bottom: 1px solid #edf1ef; color: #53625c; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
.strong { color: var(--ink); font-weight: 700; }
.amount { color: #a45b33; font-weight: 700; }
.status { display: inline-block; padding: 5px 9px; border-radius: 99px; background: #f0f3f1; color: #697670; font-size: 10px; font-weight: 700; text-transform: capitalize; }
.status-hadir, .status-lunas { background: #e8f5ed; color: #2e805c; }
.status-izin, .status-cicil, .status-terlambat { background: #fff4e6; color: #a66a1e; }
.status-sakit { background: #edf2ff; color: #596fae; }
.status-alpa, .status-bolos, .status-belum { background: #fff0ef; color: #b45047; }
.empty-state { padding: 48px 20px; text-align: center; }
.empty-state > span { display: inline-grid; width: 45px; height: 45px; place-items: center; border-radius: 14px; background: #edf4f0; color: var(--green); font-size: 20px; }
.empty-state h2, .empty-state h3 { margin: 14px 0 5px; font: 800 16px Manrope, sans-serif; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.info-item { min-width: 0; padding: 15px 16px 15px 0; border-bottom: 1px solid var(--line); }
.info-item:nth-child(odd) { margin-right: 20px; }
.info-item span, .info-item strong { display: block; overflow-wrap: anywhere; }
.info-item span { margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.info-item strong { color: #33423c; font-size: 12px; font-weight: 600; }
.document-card { display: flex; align-items: center; gap: 15px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.document-icon { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border-radius: 13px; background: #f0edff; color: #7866bb; font-size: 20px; }
.document-card > div { flex: 1; }
.document-card strong, .document-card small { display: block; }
.document-card small { margin-top: 5px; color: var(--muted); font-size: 11px; }
.alert { padding: 12px 14px; border-radius: 10px; font-size: 12px; }
.alert-error { border: 1px solid #f0d2cf; background: #fff5f4; color: #a23e38; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); min-height: 100vh; background: #fff; }
.login-intro { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; min-height: 100vh; padding: 38px clamp(35px, 8vw, 118px); background: linear-gradient(140deg, #123f37, #1d5e4d); color: #fff; }
.login-intro::after { position: absolute; right: -120px; bottom: -180px; width: 540px; height: 540px; border: 1px solid #ffffff20; border-radius: 50%; box-shadow: 0 0 0 50px #ffffff08, 0 0 0 100px #ffffff08; content: ""; }
.brand-stack { position: relative; z-index: 1; display: grid; justify-items: start; gap: 12px; }
.brand-light { position: relative; z-index: 1; color: #fff; }
.brand-light .brand-logo { width: 64px; height: 64px; flex-basis: 64px; padding: 4px; border: 2px solid #ffffffbf; box-shadow: 0 6px 24px #092f2726; }
.brand-light small { color: #c0d8ce; }
.brand-light strong { font-size: 15px; }
.intro-copy { position: relative; z-index: 1; max-width: 550px; margin: auto 0; padding: 65px 0; }
.intro-copy .eyebrow { color: #bbd5ca; }
.intro-copy h1 { margin: 16px 0; font: 800 clamp(38px, 5vw, 62px)/1.12 Manrope, sans-serif; letter-spacing: -2px; }
.intro-copy h1 em { color: #a9dbc2; font-style: normal; }
.intro-copy p { max-width: 390px; color: #cbded6; font-size: 15px; line-height: 1.7; }
.intro-bottom { position: relative; z-index: 1; color: #b3cec3; font-size: 11px; }
.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(100%, 390px); }
.login-app-identity { display: grid; justify-items: center; gap: 8px; margin-bottom: 25px; text-align: center; }
.login-app-identity img { display: block; width: min(100%, 225px); height: 76px; object-fit: contain; }
.login-app-identity span { color: var(--green); font: 700 12px Manrope, sans-serif; letter-spacing: .2px; }
.login-card h2 { margin: 8px 0 12px; font: 800 27px Manrope, sans-serif; letter-spacing: -.8px; text-align: center; }
.login-card > p { margin: 0 0 25px; font-size: 13px; }
.login-form { display: grid; gap: 10px; }
.login-form label { margin-top: 5px; color: #3a4b44; font-size: 12px; font-weight: 700; }
.login-form input { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #dfe7e2; border-radius: 9px; outline: 0; background: #fff; color: var(--ink); }
.login-form input:focus { border-color: #5a9077; box-shadow: 0 0 0 3px #4c96731c; }
.login-form input::placeholder { color: #a7b2ad; }
.login-form .button span { margin-left: auto; }
.login-hint { display: flex; align-items: center; gap: 9px; margin-top: 19px; color: #788780; font-size: 11px; }
.login-hint span { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #cbd8d0; border-radius: 50%; font-size: 10px; }
.install-app-button-login { width: 100%; margin-top: 16px; }
.install-dialog { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 18px; color: var(--ink); box-shadow: 0 20px 70px #102f2633; }
.install-dialog::backdrop { background: #0c211bb3; backdrop-filter: blur(3px); }
.install-dialog-content { padding: 26px; }
.install-dialog h2 { margin: 7px 0 8px; font: 800 22px Manrope, sans-serif; }
.install-dialog p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.install-dialog ol { display: grid; gap: 12px; margin: 20px 0 24px; padding-left: 22px; color: #4f6259; font-size: 13px; line-height: 1.55; }
.install-dialog .button { min-width: 110px; }

@media (max-width: 980px) {
    .sidebar { width: 220px; padding-right: 14px; padding-left: 14px; }
    .main-content { width: calc(100% - 220px); margin-left: 220px; padding-right: 25px; padding-left: 25px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card:last-child { grid-column: span 2; }
    .login-layout { grid-template-columns: minmax(0, .9fr) minmax(390px, 1.1fr); }
    .login-intro { padding-right: 40px; padding-left: 45px; }
}
@media (max-width: 700px) {
    .app-shell { display: block; padding-bottom: 67px; }
    .sidebar { position: fixed; z-index: 5; inset: auto 0 0; width: 100%; height: 64px; flex-direction: row; justify-content: center; padding: 5px 8px; border-top: 1px solid var(--line); border-right: 0; }
    .sidebar > .brand, .student-mini { display: none; }
    .navigation { display: flex; flex: 1; width: auto; justify-content: space-around; gap: 2px; }
    .navigation a { flex: 1; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px; font-size: 9px; }
    .navigation a > span { width: auto; font-size: 16px; }
    .logout-form { display: block; margin-top: 0; }
    .logout-form button { flex-direction: column; gap: 3px; width: auto; padding: 7px; font-size: 9px; }
    .logout-form button > span { width: auto; font-size: 16px; }
    .main-content { width: 100%; margin: 0; padding: 22px 16px 35px; }
    .topbar { margin-bottom: 20px; }
    .topbar h1 { font-size: 22px; }
    .topbar-actions { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
    .topbar-date { padding: 6px 8px; font-size: 10px; }
    .topbar-actions .install-app-button { min-height: 34px; padding: 0 9px; font-size: 10px; }
    .report-error-button { min-height: 34px; padding: 0 9px; font-size: 10px; }
    .report-error-button span { font-size: 14px; }
    .welcome-card { min-height: 150px; padding: 23px; }
    .welcome-card h2 { max-width: 245px; font-size: 21px; }
    .welcome-logo { flex-basis: 64px; width: 64px; height: 64px; margin-right: 0; border-width: 3px; }
    .welcome-app { gap: 7px; font-size: 9px; }
    .welcome-app img { width: 68px; height: 23px; }
    .stat-grid { gap: 10px; margin: 12px 0; }
    .stat-card { min-height: 165px; padding: 14px; }
    .stat-card > strong { font-size: 16px; }
    .content-card { padding: 17px 14px; }
    .section-heading { align-items: flex-start; }
    .section-heading h2 { font-size: 17px; }
    .section-heading .button { flex-shrink: 0; min-height: 36px; padding: 0 10px; font-size: 10px; }
    .quick-links { grid-template-columns: 1fr; }
    .quick-links > a { min-height: 92px; padding: 13px 13px 13px 58px; justify-content: center; }
    .quick-icon { position: absolute; left: 12px; top: 25px; margin: 0; }
    .quick-links small { font-size: 10px; }
    .info-grid { grid-template-columns: 1fr; }
    .info-item:nth-child(odd) { margin-right: 0; }
    .document-card { flex-wrap: wrap; }
    .document-card > div { min-width: calc(100% - 65px); }
    .document-card .button { width: 100%; }
    .login-layout { display: block; }
    .login-intro { min-height: 255px; padding: 23px 24px; }
    .brand-stack { gap: 0; }
    .brand-light .brand-logo { width: 50px; height: 50px; flex-basis: 50px; }
    .brand-light strong { font-size: 13px; }
    .intro-copy { padding: 36px 0 15px; }
    .intro-copy h1 { max-width: 410px; font-size: 35px; letter-spacing: -1.3px; }
    .intro-copy p { margin-bottom: 0; font-size: 12px; }
    .intro-bottom { display: none; }
    .login-panel { min-height: calc(100vh - 255px); align-items: start; padding: 37px 24px; }
    .login-card h2 { font-size: 24px; }
    .login-app-identity { margin-bottom: 19px; }
    .login-app-identity img { height: 64px; }
}
