:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #18202f;
  --muted: #687386;
  --line: #dbe2ec;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #14b8a6;
  --sidebar: #111827;
  --shadow: 0 24px 70px rgba(24, 32, 47, 0.14);
  --soft-shadow: 0 14px 38px rgba(24, 32, 47, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.22), transparent 30%),
    linear-gradient(135deg, #eef5ff 0%, var(--bg) 48%, #f7fbff 100%);
  display: grid;
  place-items: center;
  padding: 24px;
}

img,
svg {
  max-width: 100%;
}

.login-shell {
  width: min(980px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  background: var(--panel);
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.brand-panel {
  position: relative;
  min-width: 0;
  padding: 48px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.9)),
    #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 18px;
  font-weight: 700;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border: 1px solid rgba(37, 99, 235, 0.18);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.brand-image {
  display: grid;
  place-items: center;
  min-height: 230px;
}

.brand-image img {
  width: min(100%, 440px);
  height: auto;
  display: block;
  object-fit: contain;
}

.brand-copy {
  max-width: 430px;
}

.brand-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.brand-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.login-panel {
  min-width: 0;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel h2 {
  margin: 0 0 10px;
  font-size: 30px;
  letter-spacing: 0;
}

.login-panel .subtitle {
  margin: 0 0 34px;
  color: var(--muted);
  line-height: 1.6;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  max-width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: #fbfdff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: #fbfdff;
  font-size: 15px;
  outline: none;
}

textarea {
  width: 100%;
  max-width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  background: #fbfdff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 6px 0 24px;
  font-size: 14px;
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  white-space: nowrap;
}

.remember input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--primary);
}

a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  width: 100%;
  max-width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(37, 99, 235, 0.28);
}

.register {
  margin: 28px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.school-contact {
  margin-top: 28px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.school-contact-toggle {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.school-contact-toggle::after {
  content: '+';
  float: right;
  color: var(--primary);
}

.school-contact-toggle[aria-expanded="true"]::after {
  content: '-';
}

.school-contact-detail {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #f8fafc;
}

.school-contact-detail p {
  margin: 0 0 12px;
}

.school-contact-detail dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.school-contact-detail dl > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.school-contact-detail dt {
  color: var(--text);
  font-weight: 600;
}

.school-contact-detail dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.alert {
  margin-bottom: 20px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 14px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 14px;
  line-height: 1.5;
}

.alert-success {
  border-color: #bbf7d0;
  color: #166534;
  background: #f0fdf4;
}

.dashboard-shell {
  width: min(760px, 100%);
}

.dashboard-panel {
  background: var(--panel);
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
}

.dashboard-panel h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.dashboard-panel p {
  margin: 0 0 24px;
  color: var(--muted);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 10px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--primary);
}

.logout-button:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.app-body {
  display: block;
  padding: 0;
  place-items: initial;
  overflow-x: hidden;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: stretch;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  color: #ffffff;
  background: var(--sidebar);
  padding: 24px 18px;
}

.sidebar-brand {
  margin-bottom: 28px;
  font-size: 22px;
  font-weight: 700;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-nav a {
  display: block;
  border-radius: 10px;
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
  line-height: 1.35;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.content {
  min-width: 0;
  padding: 24px;
  width: 100%;
}

.topbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 16px;
  padding: 14px 18px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.topbar > div {
  min-width: 0;
}

.topbar strong {
  overflow-wrap: anywhere;
}

.topbar-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 10px;
  padding: 0 18px;
  color: var(--primary);
  background: #eff6ff;
  white-space: nowrap;
}

.profile-button:hover {
  color: var(--primary-dark);
  background: #dbeafe;
  text-decoration: none;
}

.content-panel {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 18px;
  padding: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.content > .content-panel + .content-panel {
  margin-top: 20px;
}

.attendance-page {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.62fr);
  gap: 18px;
  align-items: start;
}

.attendance-page .topbar,
.attendance-page .attendance-entry-panel,
.attendance-page .history-session-panel {
  grid-column: 1 / -1;
}

.attendance-page .open-session-panel {
  grid-column: 1;
}

.attendance-page .open-session-panel.has-projector-qr {
  grid-column: 1 / -1;
}

.attendance-page .today-session-panel {
  grid-column: 2;
  grid-row: 2;
}

.attendance-page .today-session-panel.after-projector-qr {
  grid-row: auto;
}

.attendance-page.content > .content-panel + .content-panel {
  margin-top: 0;
}

.attendance-page .content-panel {
  border-color: #e2e8f0;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(24, 32, 47, 0.07);
}

.attendance-page .panel-heading {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.attendance-page .panel-heading p {
  max-width: 720px;
  margin-top: 2px;
  font-size: 13px;
  line-height: 1.5;
}

.attendance-page .section-kicker {
  display: none;
}

.attendance-page .panel-heading h1,
.attendance-page .panel-heading h2 {
  margin-top: 0;
  margin-bottom: 4px;
  font-size: 21px;
  line-height: 1.25;
}

.attendance-page .attendance-form {
  gap: 14px;
}

.attendance-page .open-session-panel .attendance-form,
.attendance-page .filter-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  background: #f8fafc;
}

.attendance-page .compact-open-session {
  grid-template-columns: minmax(220px, 1fr) 170px;
  gap: 12px;
}

.attendance-page .form-group {
  margin-bottom: 0;
}

.attendance-page label {
  margin-bottom: 6px;
  font-size: 13px;
}

.attendance-page input,
.attendance-page select {
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
}

.attendance-page .form-action-button {
  width: auto;
  min-width: 150px;
  min-height: 44px;
  justify-self: start;
  border-radius: 10px;
  padding: 0 18px;
  font-size: 14px;
  box-shadow: none;
}

.attendance-page .save-attendance-button {
  margin-top: 4px;
  justify-self: end;
  min-width: 190px;
}

.attendance-page .attendance-save-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.attendance-page .checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: min(100%, 430px);
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #f8fafc;
}

.attendance-page .checkbox-option input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: var(--primary);
}

.attendance-page .checkbox-option span {
  display: grid;
  gap: 3px;
  line-height: 1.4;
}

.attendance-page .checkbox-option strong {
  color: #1f2937;
  font-size: 13px;
}

.attendance-page .checkbox-option small {
  color: var(--muted);
  font-size: 12px;
}

.notify-choice-group {
  width: min(100%, 620px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notify-choice {
  position: relative;
  display: block;
  margin: 0;
}

.notify-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.notify-choice span {
  position: relative;
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px 12px 42px;
  color: #344054;
  background: #f8fafc;
  cursor: pointer;
  line-height: 1.35;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.notify-choice span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #ffffff;
  transform: translateY(-50%);
}

.notify-choice span::after {
  content: "";
  position: absolute;
  left: 19px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transform: translateY(-50%) scale(0.65);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notify-choice strong {
  color: #1f2937;
  font-size: 13px;
}

.notify-choice small {
  color: var(--muted);
  font-size: 12px;
}

.notify-choice input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.notify-choice input:checked + span {
  border-color: rgba(37, 99, 235, 0.42);
  background: #eff6ff;
}

.notify-choice input:checked + span::before {
  border-color: var(--primary);
}

.notify-choice input:checked + span::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.attendance-page .data-table th,
.attendance-page .data-table td {
  padding: 11px 12px;
}

.attendance-page .data-table th {
  font-size: 12px;
  background: #f8fafc;
}

.attendance-page .table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.attendance-page .table-wrap .data-table {
  min-width: 760px;
}

.attendance-page .data-table tbody tr:hover {
  background: #f8fafc;
}

.attendance-page .attendance-table {
  min-width: 920px;
}

.student-detail-table {
  min-width: 1220px;
}

.student-detail-table td:nth-child(8) {
  min-width: 220px;
  line-height: 1.5;
}

.attendance-page .attendance-table tbody tr:hover {
  background: #f8fafc;
}

.attendance-page .attendance-table select,
.attendance-page .attendance-table input {
  min-height: 38px;
}

.attendance-page .attendance-table input[type="radio"] {
  min-height: 0;
}

.status-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 292px;
}

.status-choice {
  position: relative;
  display: block;
  margin: 0;
}

.status-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.status-choice span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0 6px;
  color: #344054;
  background: #fbfdff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.status-choice input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.status-choice.status-hadir input:checked + span {
  border-color: #86efac;
  color: #166534;
  background: #dcfce7;
}

.status-choice.status-izin input:checked + span {
  border-color: #93c5fd;
  color: #1e40af;
  background: #dbeafe;
}

.status-choice.status-sakit input:checked + span {
  border-color: #fcd34d;
  color: #92400e;
  background: #fef3c7;
}

.status-choice.status-alpha input:checked + span {
  border-color: #fca5a5;
  color: #991b1b;
  background: #fee2e2;
}

.attendance-page .status-choice-group {
  align-items: start;
  gap: 10px;
  min-width: 232px;
}

.attendance-page .status-choice span {
  width: 48px;
  height: 64px;
  display: grid;
  place-items: center;
  grid-template-rows: 20px 28px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: #344054;
  background: transparent;
}

.attendance-page .status-choice strong {
  font-size: 12px;
  line-height: 1;
}

.attendance-page .status-choice i {
  width: 26px;
  height: 26px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 0 0 6px #ffffff;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.attendance-page .status-choice input:focus-visible + span {
  box-shadow: none;
}

.attendance-page .status-choice input:focus-visible + span i {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14), inset 0 0 0 6px #ffffff;
}

.attendance-page .status-choice.status-hadir input:checked + span,
.attendance-page .status-choice.status-izin input:checked + span,
.attendance-page .status-choice.status-sakit input:checked + span,
.attendance-page .status-choice.status-alpha input:checked + span {
  background: transparent;
}

.attendance-page .status-choice.status-hadir input:checked + span {
  color: #166534;
}

.attendance-page .status-choice.status-sakit input:checked + span {
  color: #92400e;
}

.attendance-page .status-choice.status-izin input:checked + span {
  color: #1e40af;
}

.attendance-page .status-choice.status-alpha input:checked + span {
  color: #991b1b;
}

.attendance-page .status-choice.status-hadir input:checked + span i {
  border-color: #16a34a;
  background: #16a34a;
}

.attendance-page .status-choice.status-sakit input:checked + span i {
  border-color: #d97706;
  background: #d97706;
}

.attendance-page .status-choice.status-izin input:checked + span i {
  border-color: #2563eb;
  background: #2563eb;
}

.attendance-page .status-choice.status-alpha input:checked + span i {
  border-color: #dc2626;
  background: #dc2626;
}

.content-panel h1 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.content-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.teacher-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 20px;
  padding: 28px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  box-shadow: var(--soft-shadow);
}

.teacher-hero h1 {
  margin: 6px 0 10px;
  font-size: 34px;
  line-height: 1.18;
}

.teacher-hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.7;
}

.section-kicker {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.76;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  padding: 0 18px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 800;
  white-space: nowrap;
}

.primary-action:hover {
  color: #0f172a;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  min-width: 0;
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 16px;
  padding: 20px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 34px;
  line-height: 1;
}

.stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 20px;
  margin-bottom: 20px;
}

.attendance-chart-panel {
  margin-bottom: 20px;
  overflow: hidden;
  border-color: rgba(37, 99, 235, 0.18);
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.attendance-curve {
  display: grid;
  gap: 16px;
}

.attendance-curve svg {
  width: 100%;
  min-height: 260px;
  display: block;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.curve-surface {
  fill: #ffffff;
}

.curve-axis {
  stroke: #cbd5e1;
  stroke-width: 1.4;
}

.curve-grid {
  stroke: #dde6f1;
  stroke-width: 1;
}

.curve-area {
  fill: url(#attendanceCurveFill);
}

.curve-line {
  fill: none;
  stroke: #f97316;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 10px rgba(249, 115, 22, 0.18));
}

.curve-point {
  fill: #ffffff;
  stroke: #f97316;
  stroke-width: 3;
  filter: drop-shadow(0 5px 8px rgba(249, 115, 22, 0.22));
}

.curve-scale {
  fill: #475569;
  font-size: 11px;
  font-weight: 800;
  text-anchor: end;
}

.curve-label {
  fill: #475569;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.curve-value {
  fill: #ea580c;
  font-size: 13px;
  font-weight: 900;
  text-anchor: end;
}

.attendance-curve-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.attendance-curve-summary span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 9px 12px;
  background: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.attendance-curve-summary span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}

.attendance-curve-summary .status-hadir {
  color: #166534;
}

.attendance-curve-summary .status-izin {
  color: #1e40af;
}

.attendance-curve-summary .status-sakit {
  color: #92400e;
}

.attendance-curve-summary .status-alpha {
  color: #991b1b;
}

.chart-filter-form {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-left: auto;
}

.chart-filter-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-filter-form input {
  min-height: 38px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 0 10px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  background: #ffffff;
}

.chart-filter-form button {
  min-height: 38px;
  border: 0;
  border-radius: 10px;
  padding: 0 13px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  cursor: pointer;
}

.chart-filter-form button:hover {
  background: var(--primary-dark);
}

.curve-chart {
  display: block;
  width: 100%;
  min-height: 170px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.curve-chart.mini {
  min-height: 110px;
}

.curve-chart .curve-line {
  stroke-width: 4;
}

.curve-chart.mini .curve-line {
  stroke-width: 2.8;
}

.curve-chart .curve-point {
  stroke: #f97316;
}

.class-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.class-chart-card {
  display: grid;
  gap: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.class-chart-card.active {
  border-color: rgba(37, 99, 235, 0.48);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.12);
}

.class-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.class-chart-header div {
  min-width: 0;
}

.class-chart-header strong,
.student-chart-name strong {
  display: block;
  color: var(--text);
}

.class-chart-header span,
.student-chart-name span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.class-chart-header a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 10px;
  padding: 0 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.class-chart-header a:hover {
  background: #dbeafe;
  text-decoration: none;
}

.stacked-chart {
  display: flex;
  width: 100%;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.stacked-chart.small {
  height: 12px;
}

.chart-segment {
  display: block;
  min-width: 4px;
  height: 100%;
}

.chart-segment.status-hadir {
  background: #16a34a;
}

.chart-segment.status-izin {
  background: #2563eb;
}

.chart-segment.status-sakit {
  background: #d97706;
}

.chart-segment.status-alpha {
  background: #dc2626;
}

.attendance-curve-summary.compact {
  gap: 7px;
}

.attendance-curve-summary.compact span {
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 11px;
  box-shadow: none;
}

.student-chart-detail {
  display: grid;
  gap: 14px;
  margin-top: 22px;
  border-top: 1px solid #e2e8f0;
  padding-top: 20px;
}

.student-chart-list {
  display: grid;
  gap: 10px;
}

.student-chart-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(180px, 1.4fr) 48px;
  gap: 14px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  background: #fbfdff;
}

.student-chart-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.student-chart-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-chart-total {
  justify-self: end;
  color: var(--text);
  font-size: 22px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
}

.panel-heading a {
  white-space: nowrap;
}

.panel-heading.compact {
  margin-bottom: 14px;
}

.class-list,
.schedule-list {
  display: grid;
  gap: 12px;
}

.class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdff;
}

.class-item div,
.schedule-item div {
  min-width: 0;
}

.class-item strong,
.schedule-item strong {
  display: block;
  margin-bottom: 5px;
}

.class-item span,
.schedule-item span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.class-item a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 10px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--primary);
  white-space: nowrap;
}

.class-item a:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.schedule-item {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: start;
  border-left: 3px solid var(--primary);
  padding: 2px 0 2px 12px;
}

.schedule-item time {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.schedule-item.done {
  border-left-color: var(--accent);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.quick-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid rgba(219, 226, 236, 0.85);
  border-radius: 14px;
  padding: 12px;
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  text-align: center;
}

.quick-actions a:hover {
  border-color: rgba(37, 99, 235, 0.35);
  text-decoration: none;
}

.attendance-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 12px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.open {
  color: #166534;
  background: #dcfce7;
}

.status-badge.closed {
  color: #991b1b;
  background: #fee2e2;
}

.status-badge.admin {
  color: #1e40af;
  background: #dbeafe;
}

.status-badge.guru {
  color: #065f46;
  background: #d1fae5;
}

.status-badge.siswa {
  color: #92400e;
  background: #fef3c7;
}

.inline-form {
  margin: 0;
  display: inline-block;
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
}

.actions-cell {
  text-align: right;
}

.table-actions form {
  margin: 0;
  display: flex;
}

.small-button {
  min-height: 34px !important;
  min-width: 80px;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  width: auto !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none !important;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.small-button.danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.small-button.danger:hover {
  background: #fecaca;
  transform: none;
}

.small-button:not(.danger) {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.small-button:not(.danger):hover {
  background: #dbeafe;
  transform: none;
}

.small-button:disabled,
.small-button:disabled:hover {
  border-color: var(--line);
  color: var(--muted);
  background: #f8fafc;
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.session-qr-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 190px;
}

.session-qr-actions .small-button {
  min-width: 86px;
}

.session-qr-link {
  border: 1px solid rgba(37, 99, 235, 0.2);
  color: var(--primary);
  background: #eff6ff;
}

.projector-qr-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(239, 246, 255, 0.96), rgba(240, 253, 250, 0.92)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 44px rgba(37, 99, 235, 0.12);
}

.projector-qr-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 12px;
}

.projector-qr-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 26px;
  line-height: 1.16;
  letter-spacing: 0;
}

.projector-qr-copy p {
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.projector-qr-copy strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.projector-qr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.projector-qr-actions .small-link,
.projector-qr-actions .small-button {
  min-height: 40px !important;
  min-width: 126px;
  box-shadow: none;
}

.projector-qr-actions .show-qr-button {
  min-width: 160px;
}

.projector-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.82);
}

.projector-qr-stage {
  position: relative;
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 0.9fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  border-radius: 18px;
  padding: 34px;
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
}

.projector-qr-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: auto;
  min-height: 38px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0 14px;
  color: #334155;
  background: #f8fafc;
  box-shadow: none;
  font-size: 13px;
}

.projector-qr-close:hover {
  background: #e2e8f0;
  transform: none;
  box-shadow: none;
}

.projector-qr-stage-copy {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.projector-qr-stage-copy span {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 12px;
  color: #166534;
  background: #dcfce7;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.projector-qr-stage-copy h2 {
  margin: 0;
  color: #0f172a;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: 0;
}

.projector-qr-stage-copy p {
  margin: 0;
  color: #334155;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.38;
}

.projector-qr-stage-copy strong {
  color: #0f172a;
  font-size: 26px;
  line-height: 1.35;
}

.projector-qr-stage-image {
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 20px;
  background: #f8fbff;
}

.projector-qr-stage-image img {
  width: min(100%, 460px);
  aspect-ratio: 1;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.projector-qr-stage-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.projector-qr-stage-actions a,
.projector-qr-stage-actions button {
  width: auto;
  min-height: 42px;
  border-radius: 10px;
  padding: 0 16px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 800;
}

.projector-qr-stage-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--primary);
  background: #eff6ff;
}

.projector-qr-stage-actions a:hover {
  background: #dbeafe;
  text-decoration: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  width: 100%;
  max-width: 500px;
  background: var(--panel);
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow);
  animation: modalScale 0.3s ease-out;
}

@keyframes modalScale {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.modal-content p {
  margin: 0 0 24px;
  color: var(--muted);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
}

.modal-actions button {
  width: auto;
  min-width: 120px;
}

.ghost-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}

.ghost-button:hover {
  background: var(--bg);
  box-shadow: none;
}

.primary-button {
  width: auto;
  min-width: 140px;
  padding: 0 20px;
}

.student-summary,
.empty-state,
.session-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fbfdff;
}

.student-summary {
  display: grid;
  gap: 5px;
  margin-bottom: 16px;
}

.student-summary span,
.saved-note {
  color: var(--muted);
}

.student-attendance-page {
  width: min(980px, 100%);
  margin: 0 auto;
}

.student-attendance-page .content-panel {
  border-color: #e5eaf2;
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(24, 32, 47, 0.06);
}

.student-attendance-page .panel-heading {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.student-attendance-page .section-kicker {
  display: none;
}

.student-attendance-page .panel-heading h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.student-attendance-page .student-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 14px;
  margin-bottom: 14px;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fafc;
}

.student-attendance-page .student-summary strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-attendance-page .student-summary span {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.student-attendance-page .session-list {
  gap: 12px;
}

.student-attendance-page .empty-state,
.student-attendance-page .session-card {
  border-color: #e5eaf2;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(24, 32, 47, 0.05);
}

.student-attendance-page .empty-state {
  color: var(--muted);
  text-align: center;
}

.student-attendance-page .session-card {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 16px;
  padding: 14px;
}

.student-attendance-page .session-card-highlight {
  border-color: rgba(37, 99, 235, 0.38);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.12);
}

.student-attendance-page .qr-session-note {
  display: inline-flex;
  margin-right: 6px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #075985;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.student-attendance-page .session-card h2 {
  margin: 8px 0 6px;
  font-size: 18px;
  line-height: 1.25;
}

.student-attendance-page .session-card p {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.45;
}

.student-attendance-page .saved-note {
  display: inline-flex;
  margin-top: 4px;
  border-radius: 999px;
  padding: 5px 9px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.student-attendance-page .compact-form {
  gap: 10px;
}

.student-attendance-page .location-check {
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.student-attendance-page .location-check-pending {
  color: #1e40af;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.student-attendance-page .location-check-valid {
  color: #166534;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.student-attendance-page .location-check-invalid {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.student-attendance-page .form-group {
  margin-bottom: 0;
}

.student-attendance-page label {
  margin-bottom: 6px;
  font-size: 13px;
}

.student-attendance-page input {
  min-height: 42px;
  border-radius: 8px;
  font-size: 14px;
}

.student-attendance-page .status-choice-group {
  min-width: 0;
}

.student-attendance-page button[type="submit"] {
  min-height: 42px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: none;
}

.student-attendance-page button[type="submit"]:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.profile-actions,
.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-actions a {
  text-decoration: none;
}

.profile-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  background: #fbfdff;
  margin-bottom: 18px;
}

.profile-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.profile-identity strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

.profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-detail {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.profile-detail span {
  color: var(--muted);
  font-size: 13px;
}

.profile-detail strong {
  font-size: 15px;
  overflow-wrap: anywhere;
}

.profile-detail.wide {
  grid-column: span 2;
}

.profile-edit-form {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  background: #f8fafc;
  margin-top: 18px;
}

.profile-edit-form .panel-heading {
  margin-bottom: 0;
}

.profile-form-actions button {
  width: auto;
  min-width: 150px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 16px;
  color: var(--text);
  background: transparent;
  text-decoration: none;
  font-weight: 700;
}

.ghost-link:hover {
  background: var(--bg);
  text-decoration: none;
}

.session-list {
  display: grid;
  gap: 14px;
}

.session-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 18px;
  align-items: start;
}

.session-card h2 {
  margin: 10px 0 6px;
  font-size: 22px;
}

.session-card p {
  margin: 0 0 8px;
}

.compact-form {
  gap: 12px;
}

.filter-form {
  margin-bottom: 22px;
}

.compact-grid {
  grid-template-columns: minmax(240px, 360px);
}

.compact-open-session {
  grid-template-columns: minmax(280px, 1fr) minmax(180px, 240px);
}

.semester-calendar,
.upcoming-sessions {
  margin-bottom: 24px;
}

.schedule-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  border-left: 3px solid var(--primary);
  padding: 10px 14px;
  background: #f8fafc;
}

.schedule-identity div {
  display: grid;
  gap: 2px;
}

.schedule-identity span {
  color: var(--muted);
  font-size: 13px;
}

.schedule-filter {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(170px, 240px) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.schedule-filter .form-group {
  gap: 5px;
}

.schedule-filter button,
.schedule-filter .ghost-link {
  min-height: 40px;
}

.schedule-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.schedule-section-heading h2 {
  margin: 2px 0 0;
  font-size: 18px;
}

.session-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.session-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.legend-dot.open {
  background: #16a34a;
}

.legend-dot.closed {
  background: #dc2626;
}

.calendar-scroll {
  overflow-x: auto;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}

.calendar-head {
  padding: 8px;
  color: var(--muted);
  background: #f8fafc;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.calendar-head:nth-child(7) {
  border-right: 0;
}

.calendar-cell {
  min-height: 98px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.calendar-cell:nth-child(7n) {
  border-right: 0;
}

.calendar-cell.muted {
  background: #f8fafc;
  color: var(--muted);
}

.calendar-cell.past .calendar-event {
  opacity: 0.65;
}

.calendar-cell.today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.42);
}

.calendar-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  margin-bottom: 5px;
}

.calendar-date strong {
  font-size: 15px;
}

.calendar-date span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.calendar-events {
  display: grid;
  gap: 4px;
}

.calendar-event {
  display: grid;
  gap: 1px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 6px;
  padding: 5px 6px;
  color: var(--text);
  background: #eff6ff;
  text-decoration: none;
}

.calendar-event:hover {
  border-color: rgba(37, 99, 235, 0.42);
  background: #dbeafe;
  text-decoration: none;
}

.calendar-event.inactive {
  color: var(--text);
  background: #f8fafc;
  border-color: var(--line);
}

.calendar-event.inactive strong {
  color: var(--muted);
}

.calendar-event.session-open {
  border-color: #86efac;
  background: #f0fdf4;
}

.calendar-event.session-open strong,
.calendar-event.session-open small {
  color: #15803d;
}

.calendar-event.session-closed {
  border-color: #fecaca;
  background: #fff7f7;
}

.calendar-event.session-closed strong,
.calendar-event.session-closed small {
  color: #b91c1c;
}

.calendar-event strong {
  color: var(--primary);
  font-size: 12px;
}

.calendar-event span {
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.calendar-event small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.compact-list {
  margin-bottom: 0;
}

.schedule-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 22px;
}

.schedule-cards {
  display: grid;
  gap: 8px;
}

.schedule-card {
  display: grid;
  grid-template-columns: minmax(120px, 155px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fbfdff;
}

.schedule-card h2,
.schedule-card h3 {
  margin: 0 0 3px;
  font-size: 15px;
}

.schedule-card p,
.schedule-date span {
  margin: 0;
  color: var(--muted);
}

.schedule-date {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.schedule-status {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.schedule-status.open {
  color: #15803d;
}

.schedule-status.closed {
  color: #b91c1c;
}

.schedule-session-time {
  grid-column: 3;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.35;
  text-align: right;
}

.small-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  padding: 0 14px;
  color: #ffffff;
  background: var(--primary);
  white-space: nowrap;
}

.small-link:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

.small-link.disabled {
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
}

.bk-page,
.absensi-admin-page {
  width: min(1240px, 100%);
  margin: 0 auto;
}

.bk-page .content-panel,
.absensi-admin-page .content-panel {
  border-color: #e5eaf2;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(24, 32, 47, 0.07);
}

.bk-overview-panel .panel-heading,
.absensi-overview-panel .panel-heading {
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.bk-overview-panel .panel-heading h1,
.absensi-overview-panel .panel-heading h1 {
  margin-bottom: 6px;
  font-size: 26px;
}

.bk-overview-panel .panel-heading p,
.bk-table-header p,
.absensi-overview-panel .panel-heading p,
.absensi-table-header p {
  max-width: 720px;
  font-size: 14px;
  line-height: 1.55;
}

.bk-filter-button,
.absensi-filter-button {
  min-height: 42px;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: none;
}

.bk-filter-summary,
.absensi-filter-summary {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1.35fr;
  gap: 10px;
  margin-bottom: 16px;
}

.bk-filter-summary > div,
.absensi-filter-summary > div {
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px 14px;
  background: #f8fbff;
}

.bk-filter-summary span,
.absensi-filter-summary span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.bk-filter-summary strong,
.absensi-filter-summary strong {
  display: block;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bk-stats,
.absensi-stats {
  gap: 10px;
  margin-bottom: 18px;
}

.bk-stats .stat-card,
.absensi-stats .stat-card {
  border-radius: 12px;
  padding: 16px;
  box-shadow: none;
}

.bk-stats .stat-card strong,
.absensi-stats .stat-card strong {
  margin: 8px 0 5px;
  font-size: 30px;
}

.bk-stat-total {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.bk-stat-izin {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.bk-stat-sakit {
  border-color: #fde68a;
  background: #fffbeb;
}

.bk-stat-alpha {
  border-color: #fecaca;
  background: #fef2f2;
}

.absensi-stat-total {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.absensi-stat-hadir {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.absensi-stat-izin {
  border-color: #bae6fd;
  background: #f0f9ff;
}

.absensi-stat-alpha {
  border-color: #fecaca;
  background: #fef2f2;
}

.bk-table-header,
.absensi-table-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 4px 0 10px;
}

.bk-table-header h2,
.absensi-table-header h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.bk-table-wrap,
.absensi-table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.bk-table,
.absensi-table {
  min-width: 920px;
}

.bk-table th,
.absensi-table th {
  background: #f8fafc;
  font-size: 12px;
}

.bk-table td:first-child strong,
.absensi-table td:nth-child(2) strong,
.absensi-recap-panel .data-table td:first-child strong {
  display: block;
  margin-bottom: 3px;
}

.bk-table td:first-child span,
.absensi-table td:nth-child(2) span,
.absensi-subtext {
  color: var(--muted);
  font-size: 12px;
}

.bk-table tbody tr:hover,
.absensi-table tbody tr:hover,
.absensi-recap-panel .data-table tbody tr:hover {
  background: #f8fafc;
}

.bk-table th:last-child,
.bk-table td:last-child,
.absensi-table th:last-child,
.absensi-table td:last-child,
.absensi-recap-panel .data-table th:last-child,
.absensi-recap-panel .data-table td:last-child {
  text-align: right;
}

.bk-actions,
.absensi-actions {
  justify-content: flex-end;
}

.bk-count-pill,
.absensi-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
}

.absensi-count-pill.hadir {
  color: #166534;
  background: #dcfce7;
}

.bk-count-pill.izin {
  color: #075985;
  background: #e0f2fe;
}

.bk-count-pill.sakit,
.absensi-count-pill.sakit {
  color: #92400e;
  background: #fef3c7;
}

.bk-count-pill.alpha,
.absensi-count-pill.alpha {
  color: #991b1b;
  background: #fee2e2;
}

.absensi-count-pill.izin {
  color: #075985;
  background: #e0f2fe;
}

.bk-muted-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.bk-history-panel .data-table,
.absensi-recap-panel .data-table {
  min-width: 840px;
}

.empty-table-cell {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.bk-filter-modal,
.bk-followup-modal,
.absensi-filter-modal,
.absensi-edit-modal {
  max-width: 760px;
}

.bk-modal-grid,
.absensi-modal-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 0;
}

.absensi-search-field {
  grid-column: 1 / -1;
}

.simple-report-form {
  display: block;
  max-width: 760px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  background: #f8fafc;
}

.simple-report-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.simple-report-form .form-group {
  margin-bottom: 0;
}

.simple-report-form label {
  margin-bottom: 7px;
}

.simple-report-form input,
.simple-report-form select {
  min-height: 44px;
  border-radius: 10px;
  background: #ffffff;
}

.simple-report-form button[type="submit"] {
  width: auto;
  min-width: 170px;
  min-height: 44px;
  border-radius: 10px;
  padding: 0 18px;
  box-shadow: none;
}

.status-badge.status-hadir {
  color: #166534;
  background: #dcfce7;
}

.status-badge.status-izin {
  color: #1e40af;
  background: #dbeafe;
}

.status-badge.status-sakit {
  color: #92400e;
  background: #fef3c7;
}

.status-badge.status-alpha {
  color: #991b1b;
  background: #fee2e2;
}

.report-stats {
  margin-top: 6px;
}

@media (max-width: 1024px) {
  .attendance-page {
    display: block;
  }

  .attendance-page.content > .content-panel + .content-panel {
    margin-top: 20px;
  }

  .app-shell {
    grid-template-columns: 220px 1fr;
  }

  .sidebar {
    padding: 22px 14px;
  }

  .content {
    padding: 20px;
  }

  .stats-grid,
  .quick-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .teacher-layout {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .bk-filter-summary,
  .absensi-filter-summary {
    grid-template-columns: 1fr;
  }

  .attendance-page .compact-open-session {
    grid-template-columns: minmax(0, 1fr) 160px;
  }

  .attendance-page .attendance-table {
    min-width: 760px;
  }

  .projector-qr-panel {
    grid-template-columns: 1fr;
  }

  .projector-qr-copy h2 {
    font-size: 24px;
  }

  .projector-qr-actions {
    justify-content: flex-start;
  }

  .projector-qr-stage {
    grid-template-columns: 1fr;
    min-height: 0;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }

  .projector-qr-stage-copy h2 {
    font-size: 38px;
  }

  .projector-qr-stage-copy p {
    font-size: 20px;
  }

  .projector-qr-stage-copy strong {
    font-size: 22px;
  }

  .session-card {
    grid-template-columns: 1fr;
  }

  .status-choice-group {
    min-width: 0;
  }

  .student-attendance-page .student-summary,
  .student-attendance-page .session-card {
    grid-template-columns: 1fr;
  }

  .schedule-card {
    grid-template-columns: 1fr auto;
  }

  .schedule-date {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  body {
    padding: 16px;
  }

  .app-body {
    padding: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 18px;
  }

  .sidebar-brand {
    margin-bottom: 16px;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  }

  .sidebar-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 18px;
    padding: 16px;
  }

  .topbar .logout-button {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions a {
    flex: 1;
  }

  .attendance-page .form-action-button {
    width: 100%;
    justify-self: stretch;
  }

  .attendance-page .open-session-panel .attendance-form,
  .attendance-page .filter-form,
  .attendance-page .compact-open-session {
    grid-template-columns: 1fr;
  }

  .student-chart-row {
    grid-template-columns: 1fr;
  }

  .student-chart-total {
    justify-self: start;
  }

  .projector-qr-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .projector-qr-copy h2 {
    font-size: 24px;
  }

  .projector-qr-copy p,
  .projector-qr-copy strong {
    font-size: 16px;
  }

  .projector-qr-actions .small-link,
  .projector-qr-actions .small-button {
    flex: 1;
  }

  .projector-qr-modal {
    padding: 14px;
  }

  .projector-qr-stage {
    padding: 22px;
  }

  .projector-qr-stage-copy h2 {
    font-size: 30px;
  }

  .projector-qr-stage-copy p,
  .projector-qr-stage-copy strong {
    font-size: 17px;
  }

  .projector-qr-stage-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .projector-qr-stage-actions a,
  .projector-qr-stage-actions button {
    width: 100%;
  }

  .attendance-page .attendance-save-row {
    justify-content: stretch;
  }

  .notify-choice-group {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 18px;
  }

  .brand-panel {
    min-height: 260px;
    padding: 28px;
  }

  .login-panel {
    padding: 34px 24px;
  }

  .content-panel {
    padding: 24px;
  }

  .content-panel h1 {
    font-size: 26px;
  }

  .teacher-hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }

  .teacher-hero h1 {
    font-size: 28px;
  }

  .primary-action {
    width: 100%;
  }
}

@media (max-width: 430px) {
  body {
    padding: 12px;
  }

  .app-body {
    padding: 0;
  }

  .login-shell {
    border-radius: 14px;
  }

  .brand-panel {
    min-height: 220px;
    padding: 22px;
  }

  .brand-copy h1 {
    font-size: 30px;
  }

  .login-panel {
    padding: 28px 18px;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .sidebar {
    padding: 14px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .sidebar-nav a {
    padding: 10px;
    font-size: 13px;
  }

  .content {
    padding: 14px;
  }

  .content-panel {
    border-radius: 14px;
    padding: 18px;
  }

  .content-panel h1 {
    font-size: 23px;
  }

  .role-badge {
    display: flex;
    width: fit-content;
    margin: 8px 0 0;
  }

  .teacher-hero {
    border-radius: 14px;
    padding: 18px;
  }

  .teacher-hero h1 {
    font-size: 24px;
  }

  .stats-grid,
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .status-choice-group {
    gap: 7px;
  }

  .status-choice span {
    width: 52px;
    height: 52px;
    font-size: 11px;
  }

  .stat-card {
    padding: 16px;
  }

  .class-item {
    align-items: stretch;
    flex-direction: column;
  }

  .class-item a {
    width: 100%;
  }

  .class-chart-header {
    flex-direction: column;
  }

  .class-chart-header a {
    width: 100%;
  }

  .chart-filter-form {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .chart-filter-form input,
  .chart-filter-form button {
    width: 100%;
  }

  .panel-heading {
    flex-direction: column;
  }

  .bk-overview-panel .panel-heading,
  .absensi-overview-panel .panel-heading {
    align-items: flex-start;
  }

  .bk-filter-button,
  .absensi-filter-button {
    width: 100%;
  }

  .bk-modal-grid,
  .absensi-modal-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions,
  .profile-form-actions {
    width: 100%;
  }

  .profile-actions a,
  .profile-form-actions button,
  .profile-form-actions .ghost-link {
    flex: 1;
  }

  .profile-detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-detail.wide {
    grid-column: auto;
  }

  .profile-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-table {
    min-width: 560px;
  }

  .attendance-page .attendance-table {
    min-width: 700px;
  }

  .student-detail-table {
    min-width: 980px;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
    min-width: 826px;
  }

  .schedule-filter,
  .schedule-columns {
    grid-template-columns: 1fr;
  }

  .schedule-filter {
    align-items: stretch;
  }

  .schedule-section-heading,
  .schedule-identity {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-grid,
  .compact-open-session,
  .schedule-card {
    grid-template-columns: 1fr;
  }

  .small-link {
    width: 100%;
  }
}
