:root {
  --bg: #070909;
  --panel: #0e1110;
  --surface: #131715;
  --surface-2: #191e1b;
  --surface-3: #202622;
  --text: #f4f7f5;
  --text-2: #cbd3ce;
  --muted: #7f8b84;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --accent: #4fd096;
  --accent-soft: rgba(79, 208, 150, .12);
  --accent-strong: #73e3b0;
  --danger: #ff806d;
  --danger-soft: rgba(255, 128, 109, .12);
  --warning: #e9bd60;
  --blue: #78aefb;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 85% -15%, rgba(79,208,150,.12), transparent 34rem), radial-gradient(circle at -10% 90%, rgba(66,109,86,.1), transparent 28rem), var(--bg); }
button, input, select, textarea { font: inherit; }
button { min-height: 38px; border: 1px solid transparent; border-radius: 10px; padding: 0 14px; background: var(--accent); color: #07100c; cursor: pointer; font-weight: 750; transition: transform .14s ease, background-color .14s ease, border-color .14s ease, box-shadow .14s ease; }
button:hover { background: var(--accent-strong); box-shadow: 0 8px 22px rgba(0,0,0,.2); transform: translateY(-1px); }
button:active { transform: translateY(0) scale(.985); }
button:disabled { cursor: not-allowed; opacity: .45; transform: none; box-shadow: none; }
button.secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text-2); }
button.secondary:hover { border-color: rgba(79,208,150,.35); background: var(--surface-2); color: var(--text); }
button.danger { border-color: rgba(255,128,109,.28); background: var(--danger-soft); color: #ffab9e; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden], .student[hidden] { display: none !important; }
.wrap { width: min(1480px, calc(100% - 44px)); margin: 0 auto; padding: 26px 0 54px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; margin-bottom: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.identity { display: flex; align-items: center; gap: 13px; }
.mark, #setup::before, #login::before { display: grid; width: 43px; height: 43px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(79,208,150,.3); border-radius: 13px; background: linear-gradient(145deg, #183b2b, #10251b); color: var(--accent); content: 'D'; font-size: 17px; font-weight: 850; box-shadow: inset 0 1px rgba(255,255,255,.06), 0 10px 30px rgba(0,0,0,.24); }
.brand { margin: 1px 0 2px; font-size: 19px; font-weight: 780; letter-spacing: -.03em; }
.eyebrow { margin-bottom: 4px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.greeting { font-size: 12px; }
.top-actions, .access-actions, .payment-workspace-actions, .payment-history-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.icon-button { display: grid; width: 38px; min-width: 38px; place-items: center; padding: 0 !important; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.section-tabs { display: none; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; border: 1px solid var(--line); border-radius: 12px; padding: 4px; background: rgba(14,17,16,.85); }
.section-tab { border-color: transparent; background: transparent; color: var(--muted); }
.section-tab.active { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.card { position: relative; overflow: hidden; min-height: 122px; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; background: linear-gradient(145deg, rgba(21,26,23,.96), rgba(13,16,14,.96)); box-shadow: inset 0 1px rgba(255,255,255,.025), 0 14px 35px rgba(0,0,0,.12); }
.card:first-child { border-color: rgba(79,208,150,.25); background: linear-gradient(145deg, #173326, #0e1914); }
.card:first-child::after { position: absolute; right: -40px; bottom: -65px; width: 130px; height: 130px; border: 22px solid rgba(79,208,150,.08); border-radius: 50%; content: ''; }
.card .muted { display: flex; align-items: center; color: var(--muted); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.card b { position: relative; z-index: 1; display: block; margin-top: 22px; font-size: clamp(20px, 2.1vw, 29px); line-height: 1; letter-spacing: -.045em; }
.metric-dot { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(79,208,150,.1); }
.layout { display: grid; grid-template-columns: minmax(300px, 335px) minmax(0, 1fr); gap: 16px; align-items: start; }
.layout > aside { position: sticky; top: 18px; }
form, .panel, .edit-form { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(14,17,16,.94); box-shadow: 0 20px 45px rgba(0,0,0,.17); }
#student-form { display: grid; gap: 11px; padding: 19px; }
h1, h2, h3, p { text-wrap: pretty; }
h2 { margin: 0 0 3px; font-size: 18px; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 15px; }
.form-note { margin: 0 0 5px; font-size: 12px; }
.optional { color: var(--muted); font-weight: 500; }
.modality { color: var(--accent-strong); font-weight: 700; }
label { display: grid; gap: 6px; color: var(--text-2); font-size: 11px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 41px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 11px; background: #0a0d0c; color: var(--text); transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease; }
textarea { padding: 10px 11px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #505a54; }
input:hover, select:hover, textarea:hover { border-color: rgba(255,255,255,.2); }
input:focus, select:focus, textarea:focus { border-color: rgba(79,208,150,.62); background: #0d110f; box-shadow: 0 0 0 3px rgba(79,208,150,.08); outline: 0; }
.form-grid, .details-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-details { border-top: 1px solid var(--line); padding-top: 12px; }
.form-details summary { color: var(--text-2); cursor: pointer; font-size: 12px; font-weight: 750; }
.details-fields { padding-top: 12px; }
.wide { grid-column: 1 / -1; }
.panel { min-width: 0; padding: 19px; }
.panel-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.panel-head > div:first-child { margin-right: auto; }
.student-search { flex: 1 1 230px; max-width: 360px; }
.filter-bar { display: flex; gap: 5px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: #090c0a; }
.filter, .modality-filter { min-height: 31px; border-color: transparent; padding: 0 10px; background: transparent; color: var(--muted); font-size: 11px; }
.filter:hover, .modality-filter:hover { box-shadow: none; transform: none; }
.filter.active, .modality-filter.active { border-color: var(--line-strong); background: var(--surface-3); color: var(--text); }
.month-pill { border: 1px solid rgba(79,208,150,.18); border-radius: 999px; padding: 7px 10px; background: var(--accent-soft); color: var(--accent-strong); font-size: 11px; font-weight: 750; text-transform: capitalize; }
.students { display: grid; max-height: calc(100vh - 327px); gap: 18px; overflow: auto; padding: 12px 5px 2px 0; scrollbar-color: #34413a transparent; scrollbar-width: thin; }
.modality-group { display: grid; gap: 8px; }
.modality-group + .modality-group { border-top: 1px solid var(--line-strong); padding-top: 18px; }
.modality-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-left: 3px solid var(--accent); border-radius: 9px; padding: 9px 11px; background: linear-gradient(90deg, var(--accent-soft), transparent 72%); }
.modality-group-head h3 { margin-top: 2px; color: var(--text); font-size: 16px; }
.modality-group-kicker { color: var(--accent); font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.modality-group-count { border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 8px; color: var(--text-2); font-size: 10px; font-weight: 750; }
.modality-students { display: grid; gap: 8px; }
.modality-group-muay .modality-group-head { border-left-color: var(--warning); background: linear-gradient(90deg, rgba(233,189,96,.12), transparent 72%); }
.modality-group-muay .modality-group-kicker { color: var(--warning); }
.modality-group-tkd .student { border-left: 2px solid rgba(79,208,150,.42); }
.modality-group-muay .student { border-left: 2px solid rgba(233,189,96,.48); }
.student { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 78px; border: 1px solid var(--line); border-radius: 13px; padding: 12px; background: #0c100e; transition: border-color .14s ease, background-color .14s ease, transform .14s ease; }
.student:hover { border-color: rgba(79,208,150,.2); background: #111713; transform: translateY(-1px); }
.student-main { display: flex; min-width: 0; align-items: flex-start; gap: 11px; }
.avatar { display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(79,208,150,.2); border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 800; }
.student b { display: block; overflow: hidden; font-size: 13px; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.student .muted { margin-top: 3px; font-size: 11px; }
.student-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.student-actions button, .student-actions .whatsapp { min-height: 32px; padding: 0 10px; font-size: 10.5px; }
.payment-date { margin-top: 5px; color: var(--accent-strong); font-size: 11px; font-weight: 700; }
.payment-advance, .debt-banner { width: fit-content; margin-top: 6px; border-radius: 7px; padding: 4px 7px; font-size: 10px; font-weight: 750; }
.payment-advance { border: 1px solid rgba(120,174,251,.28); background: rgba(120,174,251,.09); color: #aecdfc; }
.debt-banner { border: 1px solid rgba(255,128,109,.25); background: var(--danger-soft); color: #ffac9f; }
.whatsapp { display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(79,208,150,.28); border-radius: 9px; background: var(--accent); color: #06110b; font-weight: 800; text-decoration: none; transition: transform .14s ease, background-color .14s ease; }
.whatsapp:hover { background: var(--accent-strong); transform: translateY(-1px); }
.tag { display: inline-flex; align-items: center; min-height: 27px; border-radius: 999px; padding: 0 9px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; }
.paid { background: var(--accent-soft); color: var(--accent-strong); }
.debt { background: var(--danger-soft); color: #ffab9e; }
.privacy-hidden .student-main { filter: blur(7px); user-select: none; pointer-events: none; }
.privacy-hidden .avatar { filter: blur(9px); }
.privacy-hidden .student-actions { visibility: hidden; pointer-events: none; }
.notice { margin: 12px 0 0; border: 1px dashed var(--line-strong); border-radius: 11px; padding: 14px; color: var(--muted); text-align: center; }
.modal-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; overflow: auto; padding: 22px; background: rgba(2,4,3,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.edit-form { width: min(720px, 100%); display: grid; max-height: min(90vh, 900px); gap: 12px; overflow: auto; margin: auto; padding: 22px; }
.edit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.edit-head h2 { margin: 0; }
.payment-workspace { width: min(780px, 100%); }
.payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.payment-summary > div { display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 11px; padding: 12px; background: #0a0e0c; }
.payment-summary span, .payment-history-head span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.payment-summary b { color: var(--text); font-size: 15px; }
.payment-history { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }
.payment-history-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.payment-history-row, .access-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: #0a0e0c; }
.payment-history-row.reversed { border-color: rgba(255,128,109,.22); opacity: .78; }
.payment-history-actions button { min-height: 31px; font-size: 10.5px; }
.access-manager { max-height: min(90vh, 900px); }
.access-list { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.access-row code { color: var(--accent-strong); }
.exam-workspace { width: min(900px, 100%); }
.exam-criteria-card { display: grid; gap: 5px; border: 1px solid rgba(79,208,150,.2); border-radius: 11px; padding: 12px; background: var(--accent-soft); }
.exam-criteria-card span, .exam-list-head span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.exam-criteria-card b { color: var(--accent-strong); font-size: 12px; line-height: 1.5; }
.exam-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.exam-select-all, .exam-student-row { display: flex; align-items: center; grid-template-columns: none; cursor: pointer; }
.exam-select-all { flex-direction: row; gap: 8px; font-size: 12px; }
.exam-select-all input, .exam-student-row input { width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 0; accent-color: var(--accent); }
.exam-student-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 42vh; gap: 8px; overflow: auto; padding-right: 3px; }
.exam-student-row { gap: 10px; border: 1px solid var(--line); border-radius: 11px; padding: 11px; background: #0a0e0c; transition: border-color .14s ease, background-color .14s ease; }
.exam-student-row:hover { border-color: rgba(79,208,150,.3); background: #101612; }
.exam-student-row:has(input:checked) { border-color: rgba(79,208,150,.45); background: var(--accent-soft); }
.exam-student-row span { display: grid; min-width: 0; gap: 2px; }
.exam-student-row b { overflow: hidden; color: var(--text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.exam-student-row small { color: var(--muted); font-size: 10px; }
.exam-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
#setup, #login { width: min(430px, calc(100% - 28px)); display: grid; gap: 13px; margin: 8vh auto; border-radius: 20px; padding: 29px; background: rgba(14,17,16,.96); box-shadow: 0 30px 90px rgba(0,0,0,.45); animation: enter .32s ease-out both; }
#setup::before, #login::before { margin-bottom: 4px; }
#setup h1, #login h1 { margin: 0; font-size: 26px; line-height: 1.05; letter-spacing: -.045em; }
#setup p, #login p { margin: -2px 0 7px; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1180px) { .grid { grid-template-columns: repeat(3, 1fr); } .card:nth-child(4), .card:nth-child(5) { min-height: 100px; } .student { align-items: flex-start; flex-direction: column; } .student-actions { width: 100%; justify-content: flex-start; padding-left: 47px; } }
@media (max-width: 899px) { .wrap { width: min(100% - 28px, 1480px); padding-top: 18px; } .section-tabs { display: grid; } .grid { grid-template-columns: repeat(2, 1fr); } .grid .card:last-child { grid-column: 1 / -1; } .layout { grid-template-columns: 1fr; } .layout > aside { position: static; } .students { max-height: none; overflow: visible; } }
@media (max-width: 560px) { .wrap { width: min(100% - 20px, 1480px); } .top { align-items: flex-start; flex-direction: column; } .top-actions { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; } .top-actions .icon-button { width: 100%; } .card { min-height: 102px; padding: 14px; } .card b { margin-top: 17px; font-size: 21px; } .panel, #student-form { padding: 15px; } .panel-head { align-items: stretch; } .student-search { max-width: none; flex-basis: 100%; } .filter-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; } .filter, .modality-filter { padding: 0 5px; } .student-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding-left: 47px; } .student-actions > * { width: 100%; } .form-grid, .details-fields, .payment-summary, .exam-student-list { grid-template-columns: 1fr; } .payment-history-row, .access-row { align-items: flex-start; flex-direction: column; } .access-actions, .payment-history-actions { width: 100%; justify-content: flex-start; } .modal-backdrop { align-items: start; padding: 10px; } .edit-form { padding: 16px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
