:root {
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #ccfbf1;
  --accent: #f59e0b;
  --danger: #dc2626;
  --success: #16a34a;
  --info: #0284c7;
  --warning: #d97706;
  --dark: #334155;
  --muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --bg: #f1f5f9;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: #0f172a; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 278px; background: linear-gradient(180deg, #064e3b 0%, #0f766e 48%, #134e4a 100%); color: white; z-index: 40; display: flex; flex-direction: column; box-shadow: 12px 0 30px rgba(15,23,42,.14); }
.brand { display: flex; gap: 12px; align-items: center; padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.14); }
.brand strong { display: block; font-size: 17px; line-height: 1.2; }
.brand small { display: block; margin-top: 5px; opacity: .78; }
.brand-logo, .brand-logo-fallback { width: 48px; height: 48px; border-radius: 14px; object-fit: contain; background: white; padding: 5px; flex: 0 0 auto; }
.brand-logo-fallback { display: grid; place-items: center; color: var(--primary); font-weight: 900; font-size: 19px; }
.nav-menu { padding: 18px 14px; display: grid; gap: 7px; overflow-y: auto; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 13px; color: rgba(255,255,255,.85); font-weight: 650; transition: .2s; }
.nav-link span { width: 24px; text-align: center; font-size: 18px; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.14); color: white; transform: translateX(2px); }
.sidebar-footer { margin-top: auto; padding: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.user-mini { margin-bottom: 12px; }
.user-mini strong, .user-mini small { display: block; }
.user-mini small { opacity: .75; margin-top: 3px; }
.main-content { margin-left: 278px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 92px; padding: 19px 30px; display: flex; align-items: center; gap: 16px; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 25; }
.topbar h1 { margin: 0; font-size: 24px; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.topbar-user { margin-left: auto; text-align: right; }
.topbar-user strong, .topbar-user span { display: block; }
.topbar-user span { color: var(--muted); font-size: 13px; margin-top: 3px; }
.menu-button { display: none; border: 0; border-radius: 11px; background: var(--primary-soft); color: var(--primary-dark); width: 42px; height: 42px; cursor: pointer; }
.page-content { padding: 28px; flex: 1; }
.page-footer { padding: 18px 28px 26px; color: var(--muted); font-size: 13px; text-align: center; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.card { background: var(--surface); border: 1px solid rgba(226,232,240,.9); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-header { padding: 19px 21px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.card-header h2, .card-header h3 { margin: 0; font-size: 18px; }
.card-body { padding: 21px; }
.card-footer { padding: 16px 21px; border-top: 1px solid var(--border); background: #f8fafc; }
.stat-card { padding: 20px; display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 23px; background: var(--primary-soft); color: var(--primary-dark); }
.stat-content strong { display: block; font-size: 26px; }
.stat-content span { color: var(--muted); font-size: 14px; }
.hero { background: linear-gradient(135deg, #0f766e, #0f4c5c); color: white; border-radius: 24px; padding: 26px; box-shadow: var(--shadow); display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.hero h2 { margin: 0 0 8px; font-size: 25px; }
.hero p { margin: 0; opacity: .84; line-height: 1.6; }
.hero-badge { background: rgba(255,255,255,.14); padding: 13px 16px; border-radius: 15px; text-align: center; min-width: 160px; }
.hero-badge strong { display: block; font-size: 21px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 18px; }
.toolbar .form-group { margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.form-control { width: 100%; border: 1px solid #cbd5e1; border-radius: 12px; padding: 11px 13px; background: white; color: #0f172a; outline: none; transition: .2s; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15,118,110,.12); }
textarea.form-control { min-height: 110px; resize: vertical; }
.help { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.45; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 12px; padding: 10px 15px; font-weight: 750; cursor: pointer; transition: .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-info { background: var(--info); color: white; }
.btn-dark { background: var(--dark); color: white; }
.btn-outline { background: transparent; border-color: currentColor; color: inherit; }
.btn-light { background: white; color: var(--primary-dark); }
.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.actions { display: flex; gap: 7px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 760px; background: white; }
th, td { padding: 13px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f8fafc; color: #334155; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; position: sticky; top: 0; }
td { font-size: 14px; }
tr:last-child td { border-bottom: 0; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-secondary { background: #e2e8f0; color: #475569; }
.badge-dark { background: #334155; color: white; }
.alert { padding: 14px 16px; border-radius: 13px; margin-bottom: 16px; transition: .4s; border: 1px solid transparent; }
.alert.fade { opacity: .15; }
.alert-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.schedule-list { display: grid; gap: 14px; }
.schedule-item { display: grid; grid-template-columns: 92px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: white; }
.schedule-time { font-weight: 850; color: var(--primary-dark); }
.schedule-main strong { display: block; font-size: 16px; }
.schedule-main span { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.camera-box { background: #0f172a; border-radius: 18px; overflow: hidden; aspect-ratio: 4/3; position: relative; }
.camera-box video, .camera-box img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camera-box img[hidden] { display: none; }
.camera-overlay { position: absolute; inset: auto 12px 12px; padding: 9px 12px; border-radius: 10px; color: white; background: rgba(15,23,42,.65); font-size: 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.tab { padding: 9px 13px; border-radius: 999px; background: white; border: 1px solid var(--border); color: var(--muted); font-weight: 700; white-space: nowrap; }
.tab.active { background: var(--primary); color: white; border-color: var(--primary); }
.kpi-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.kpi-chip { border: 1px solid var(--border); background: white; border-radius: 12px; padding: 10px 12px; }
.kpi-chip strong { margin-left: 6px; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: #ecfdf5; }
.login-visual { background: linear-gradient(145deg, rgba(6,78,59,.96), rgba(15,118,110,.91)), radial-gradient(circle at 20% 20%, #5eead4, transparent 35%); color: white; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.login-visual::after { content: ''; position: absolute; width: 420px; height: 420px; border: 70px solid rgba(255,255,255,.06); border-radius: 50%; right: -150px; bottom: -130px; }
.login-visual h1 { font-size: clamp(34px, 5vw, 66px); line-height: 1.04; margin: 0 0 18px; max-width: 780px; }
.login-visual p { font-size: 18px; line-height: 1.65; max-width: 640px; opacity: .85; }
.login-points { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 28px; max-width: 620px; }
.login-point { padding: 13px 14px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 14px; }
.login-panel { padding: 30px; display: grid; place-items: center; }
.login-card { width: min(440px,100%); background: white; border-radius: 24px; padding: 30px; box-shadow: 0 25px 70px rgba(15,23,42,.14); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-brand .brand-logo-fallback { box-shadow: 0 8px 20px rgba(15,118,110,.18); }
.login-card h2 { margin: 0 0 7px; }
.login-card > p { margin: 0 0 22px; color: var(--muted); }
.text-muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }.mt-1 { margin-top: 8px; }.mt-2 { margin-top: 16px; }.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }.mb-1 { margin-bottom: 8px; }.mb-2 { margin-bottom: 16px; }.mb-3 { margin-bottom: 24px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 35; }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: .25s; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.show { display: block; }
  .main-content { margin-left: 0; }
  .menu-button { display: inline-grid; place-items: center; }
  .topbar { padding: 15px 17px; }
  .topbar-user { display: none; }
  .page-content { padding: 18px 14px; }
  .grid-2, .grid-3, .grid-4, .form-grid { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column; }
  .hero-badge { width: 100%; }
  .schedule-item { grid-template-columns: 78px minmax(0,1fr); }
  .schedule-item .actions { grid-column: 1/-1; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { padding: 34px 24px; min-height: 320px; }
  .login-visual h1 { font-size: 37px; }
  .login-points { grid-template-columns: 1fr 1fr; }
  .login-panel { padding: 20px 14px 35px; }
}
@media (max-width: 520px) {
  .topbar h1 { font-size: 19px; }
  .topbar p { font-size: 12px; }
  .card-body, .card-header { padding: 16px; }
  .stat-card { padding: 16px; }
  .schedule-item { grid-template-columns: 1fr; gap: 8px; }
  .schedule-item .actions { grid-column: auto; }
  .login-points { grid-template-columns: 1fr; }
  .login-card { padding: 22px 18px; border-radius: 20px; }
}
@media print {
  .sidebar, .topbar, .page-footer, .toolbar, .btn, .sidebar-overlay { display: none !important; }
  .main-content { margin: 0; }
  .page-content { padding: 0; }
  .card { box-shadow: none; border: 0; }
}


/* =========================================================
   LOGIN PROFESIONAL — KOMPATIBEL DENGAN INDEX.PHP
   ========================================================= */

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 10% 10%, rgba(45, 212, 191, .22), transparent 32%),
    radial-gradient(circle at 90% 90%, rgba(14, 165, 233, .13), transparent 34%),
    linear-gradient(145deg, #ecfdf5 0%, #f0fdfa 46%, #f8fafc 100%);
}

.login-body .login-page {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  background: transparent;
}

.login-bg-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(2px);
}

.login-bg-shape-one {
  width: 340px;
  height: 340px;
  top: -170px;
  right: -110px;
  background: rgba(20, 184, 166, .14);
}

.login-bg-shape-two {
  width: 420px;
  height: 420px;
  bottom: -230px;
  left: -180px;
  background: rgba(14, 165, 233, .09);
}

.login-body .login-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.login-body .login-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 32px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .96);
  box-shadow:
    0 26px 70px rgba(15, 118, 110, .15),
    0 8px 24px rgba(15, 23, 42, .07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.login-body .login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 25px;
}

.login-body .login-brand .brand-logo,
.login-body .login-brand .brand-logo-fallback {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 15px;
  box-shadow: 0 9px 22px rgba(15, 118, 110, .15);
}

.login-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.login-brand-copy strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-brand-copy small {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.login-heading {
  margin-bottom: 23px;
}

.login-badge {
  display: inline-flex;
  margin-bottom: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #115e59;
  background: #ccfbf1;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.login-body .login-card h1 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -.5px;
}

.login-heading p {
  margin: 0;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.login-alert {
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
}

.login-form-group {
  margin-bottom: 17px;
}

.login-form-group label {
  margin-bottom: 8px;
  color: #25324a;
  font-size: 13px;
  font-weight: 800;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 14px;
  display: flex;
  color: #94a3b8;
  transform: translateY(-50%);
  pointer-events: none;
}

.login-control {
  min-height: 50px;
  padding: 12px 14px 12px 46px;
  border: 1.5px solid #dbe5e4;
  border-radius: 13px;
  background: #fbfefd;
  font-size: 14px;
  font-weight: 550;
}

.login-control::placeholder {
  color: #a3afbd;
  font-weight: 450;
}

.login-control:focus {
  border-color: #0f766e;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, .12);
}

.login-input-wrap:focus-within .login-input-icon {
  color: #0f766e;
}

.login-password-control {
  padding-right: 50px;
}

.login-password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 7px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: #64748b;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  color: #0f766e;
  background: #ecfdf5;
  outline: none;
}

.login-submit {
  min-height: 52px;
  margin-top: 6px;
  border-radius: 13px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 12px 24px rgba(15, 118, 110, .24);
  font-size: 14px;
}

.login-submit:hover {
  background: linear-gradient(135deg, #115e59, #0f766e);
  box-shadow: 0 15px 28px rgba(15, 118, 110, .28);
}

.login-roles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
}

.login-roles span {
  padding: 5px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: #526174;
  background: #f8fafc;
  font-size: 10px;
  font-weight: 700;
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 20px 0 0;
  padding-top: 16px;
  border-top: 1px solid #edf2f1;
  color: #8a97a7;
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 600px) {
  .login-body .login-page {
    padding:
      max(14px, env(safe-area-inset-top))
      max(12px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(12px, env(safe-area-inset-left));
  }

  .login-body .login-card {
    max-width: 100%;
    padding: 24px 20px;
    border-radius: 20px;
  }

  .login-body .login-brand {
    margin-bottom: 21px;
  }

  .login-body .login-brand .brand-logo,
  .login-body .login-brand .brand-logo-fallback {
    width: 47px;
    height: 47px;
    flex-basis: 47px;
    border-radius: 13px;
  }

  .login-brand-copy strong {
    font-size: 14px;
  }

  .login-brand-copy small {
    font-size: 11px;
  }

  .login-body .login-card h1 {
    font-size: 25px;
  }

  .login-heading p {
    font-size: 13px;
  }

  .login-control {
    min-height: 50px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .login-body .login-card {
    padding: 21px 16px;
    border-radius: 18px;
  }

  .login-body .login-brand {
    gap: 10px;
  }

  .login-body .login-card h1 {
    font-size: 23px;
  }

  .login-roles span {
    padding: 4px 7px;
    font-size: 9px;
  }
}

@media (max-height: 700px) {
  .login-body .login-page {
    align-items: flex-start;
    overflow-y: auto;
  }

  .login-body .login-card {
    margin-top: 2px;
    margin-bottom: 2px;
  }
}


/* =========================================================
   LOGIN DENGAN FOTO GEDUNG SEKOLAH — VERSI 1.1.8
   ========================================================= */
.login-page-has-photo {
  display: grid !important;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 460px);
  gap: 28px;
  align-items: stretch;
  max-width: 1240px;
  margin: 0 auto;
}

.login-visual-panel {
  position: relative;
  min-height: 640px;
  display: block;
}

.login-visual-photo {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 640px;
  border-radius: 30px;
  overflow: hidden;
  background-color: #dbeafe;
  background-position: center center;
  background-size: cover;
  box-shadow:
    0 28px 80px rgba(15, 23, 42, .18),
    0 10px 28px rgba(15, 118, 110, .12);
}

.login-visual-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 23, 31, .15) 0%, rgba(8, 31, 42, .30) 28%, rgba(7, 35, 44, .68) 100%),
    linear-gradient(135deg, rgba(15, 118, 110, .26), rgba(2, 132, 199, .10));
}

.login-visual-content {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 34px 34px 32px;
  color: #fff;
}

.login-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  backdrop-filter: blur(10px);
}

.login-visual-content h1 {
  margin: 0 0 12px;
  max-width: 620px;
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.12;
  font-weight: 850;
  text-wrap: balance;
}

.login-visual-content p {
  margin: 0;
  max-width: 640px;
  color: rgba(255,255,255,.92);
  font-size: 15px;
  line-height: 1.7;
}

.login-visual-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.login-visual-points span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.login-page-has-photo .login-panel {
  align-self: center;
}

.login-page-has-photo .login-card {
  max-width: 460px;
}

@media (max-width: 1080px) {
  .login-page-has-photo {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 20px;
  }

  .login-visual-panel,
  .login-visual-photo {
    min-height: 580px;
  }

  .login-visual-content {
    padding: 28px;
  }
}

@media (max-width: 860px) {
  .login-body .login-page.login-page-has-photo {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 100%;
  }

  .login-visual-panel {
    min-height: auto;
  }

  .login-visual-photo {
    min-height: 250px;
    border-radius: 24px;
    background-position: center 38%;
  }

  .login-visual-content {
    padding: 22px 20px 20px;
  }

  .login-visual-content h1 {
    font-size: 24px;
  }

  .login-visual-content p {
    font-size: 13px;
    line-height: 1.6;
  }

  .login-page-has-photo .login-panel {
    margin-top: -34px;
    padding: 0;
  }

  .login-page-has-photo .login-card {
    position: relative;
    z-index: 3;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .login-body .login-page.login-page-has-photo {
    padding:
      max(12px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(14px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
    gap: 12px;
  }

  .login-visual-photo {
    min-height: 220px;
    border-radius: 20px;
  }

  .login-visual-content {
    padding: 18px 16px 16px;
  }

  .login-visual-badge {
    margin-bottom: 10px;
    padding: 6px 10px;
    font-size: 10px;
  }

  .login-visual-content h1 {
    font-size: 21px;
    margin-bottom: 8px;
  }

  .login-visual-content p {
    font-size: 12px;
  }

  .login-visual-points {
    gap: 7px;
    margin-top: 14px;
  }

  .login-visual-points span {
    min-height: 30px;
    padding: 6px 10px;
    font-size: 10px;
  }

  .login-page-has-photo .login-panel {
    margin-top: -28px;
  }
}

@media (max-width: 420px) {
  .login-visual-photo {
    min-height: 205px;
  }

  .login-page-has-photo .login-panel {
    margin-top: -22px;
  }
}


/* =========================================================
   JADWAL MENGAJAR GURU — VERSI 1.2.0
   ========================================================= */
.teacher-weekly-hero {
  align-items: center;
}

.teacher-weekly-kicker {
  display: inline-flex;
  margin-bottom: 9px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .025em;
  text-transform: uppercase;
}

.teacher-weekly-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.teacher-weekly-hero-actions .hero-badge {
  margin-right: 4px;
}

.btn-light {
  color: #0f4c5c;
  border-color: rgba(255,255,255,.85);
  background: #fff;
}

.btn-light:hover {
  color: #0f4c5c;
  background: #ecfeff;
}

.btn-outline-light {
  color: #fff;
  border-color: rgba(255,255,255,.48);
  background: transparent;
}

.btn-outline-light:hover {
  color: #0f4c5c;
  border-color: #fff;
  background: #fff;
}

.teacher-weekly-stats {
  margin-bottom: 20px;
}

.teacher-weekly-card,
.teacher-subject-summary-card {
  margin-bottom: 20px;
}

.teacher-weekly-header {
  align-items: center;
}

.teacher-weekly-header h2 {
  margin-bottom: 4px;
}

.teacher-weekly-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.teacher-weekly-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 14px;
  align-items: start;
}

.teacher-day-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #dfe9e8;
  border-radius: 18px;
  background: #f8fbfb;
}

.teacher-day-card.has-schedule {
  background: #fff;
  box-shadow: 0 8px 22px rgba(15,23,42,.055);
}

.teacher-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 16px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0f4c5c);
}

.teacher-day-card.is-empty .teacher-day-header {
  color: #334155;
  background: #e8efef;
}

.teacher-day-header span {
  display: block;
  margin-bottom: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  opacity: .75;
  text-transform: uppercase;
}

.teacher-day-header h3 {
  margin: 0;
  font-size: 17px;
}

.teacher-day-header > strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.16);
  font-size: 14px;
}

.teacher-day-card.is-empty .teacher-day-header > strong {
  background: rgba(15,118,110,.08);
}

.teacher-day-list {
  display: grid;
  gap: 10px;
  padding: 11px;
}

.teacher-schedule-item {
  position: relative;
  padding: 12px;
  border: 1px solid #e6eeee;
  border-radius: 13px;
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.teacher-schedule-item:hover {
  z-index: 2;
  border-color: #9bd8d2;
  box-shadow: 0 9px 20px rgba(15,118,110,.10);
  transform: translateY(-2px);
}

.teacher-schedule-time {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 9px;
  color: #0f766e;
  font-size: 12px;
}

.teacher-schedule-time span {
  color: #94a3b8;
}

.teacher-schedule-subject {
  margin-bottom: 9px;
}

.teacher-subject-code {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #115e59;
  background: #ccfbf1;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .02em;
}

.teacher-schedule-subject h4 {
  margin: 0;
  color: #172033;
  font-size: 13px;
  line-height: 1.35;
}

.teacher-schedule-meta {
  display: grid;
  gap: 5px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.35;
}

.teacher-schedule-note {
  margin: 9px 0 0;
  padding-top: 8px;
  border-top: 1px dashed #dce7e6;
  color: #64748b;
  font-size: 10px;
  line-height: 1.45;
}

.teacher-day-empty {
  min-height: 150px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 20px 12px;
  color: #64748b;
  text-align: center;
}

.teacher-day-empty > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 50%;
  color: #0f766e;
  background: #dff7f3;
  font-weight: 900;
}

.teacher-day-empty strong {
  color: #334155;
  font-size: 12px;
}

.teacher-day-empty small {
  max-width: 160px;
  font-size: 10px;
  line-height: 1.45;
}

.teacher-subject-summary-table {
  min-width: 820px;
}

.teacher-subject-summary-table td:first-child,
.teacher-subject-summary-table th:first-child {
  width: 56px;
  text-align: center;
}

.teacher-inline-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.teacher-inline-badges span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 8px;
  color: #334155;
  background: #edf4f4;
  font-size: 10px;
  font-weight: 700;
}

@media (max-width: 1380px) {
  .teacher-weekly-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .teacher-weekly-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

  .teacher-weekly-hero-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .teacher-weekly-grid {
    grid-template-columns: 1fr;
  }

  .teacher-weekly-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .teacher-weekly-hero-actions .hero-badge {
    grid-column: 1 / -1;
    margin: 0;
  }

  .teacher-weekly-hero-actions .btn {
    justify-content: center;
  }

  .teacher-schedule-item:hover {
    transform: none;
  }
}

@media print {
  .sidebar,
  .topbar,
  .page-footer,
  .sidebar-overlay,
  .teacher-print-button,
  .teacher-weekly-hero-actions .btn-outline-light,
  .teacher-subject-summary-card {
    display: none !important;
  }

  .main-content,
  .page-content {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .teacher-weekly-hero {
    margin: 0 0 14px;
    padding: 16px;
    color: #111827;
    border: 1px solid #d1d5db;
    background: #fff !important;
    box-shadow: none;
  }

  .teacher-weekly-hero .hero-badge,
  .teacher-weekly-kicker {
    color: #111827;
    border-color: #d1d5db;
    background: #f3f4f6;
  }

  .teacher-weekly-stats {
    display: none;
  }

  .teacher-weekly-card {
    border: 0;
    box-shadow: none;
  }

  .teacher-weekly-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
  }

  .teacher-day-card,
  .teacher-schedule-item {
    break-inside: avoid;
    box-shadow: none;
  }

  .teacher-day-header {
    color: #111827;
    border-bottom: 1px solid #d1d5db;
    background: #e5e7eb !important;
  }
}


/* =========================================================
   PRESENSI TERPANDU & BATAS ABSEN 5 MENIT — VERSI 1.2.1
   ========================================================= */
.checkin-help-card {
  margin: 18px 0;
  padding: 15px 17px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
  color: #1e3a5f;
}

.checkin-help-card strong {
  display: block;
  margin-bottom: 7px;
}

.checkin-help-card ol {
  margin: 0;
  padding-left: 22px;
  line-height: 1.75;
}

.checkin-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.checkin-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #dbe5e4;
  border-radius: 13px;
  color: #64748b;
  background: #f8fafc;
  transition: .2s ease;
}

.checkin-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 999px;
  color: #64748b;
  background: #e2e8f0;
  font-weight: 850;
}

.checkin-step b {
  font-size: 13px;
}

.checkin-step.is-active {
  border-color: #2dd4bf;
  color: #115e59;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .08);
}

.checkin-step.is-active span {
  color: #fff;
  background: #0f766e;
}

.checkin-step.is-complete {
  border-color: #86efac;
  color: #166534;
  background: #f0fdf4;
}

.checkin-step.is-complete span {
  color: #fff;
  background: #16a34a;
}

.camera-box.is-captured {
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .22);
}

.camera-overlay.is-success {
  color: #fff;
  background: rgba(21, 128, 61, .90);
  font-weight: 800;
}

.camera-capture-status {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 15px;
  border: 1px solid #86efac;
  border-radius: 14px;
  color: #166534;
  background: #f0fdf4;
  box-shadow: 0 8px 22px rgba(22, 163, 74, .08);
}

.camera-capture-status[hidden] {
  display: none;
}

.camera-status-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 999px;
  color: #fff;
  background: #16a34a;
  font-size: 18px;
  font-weight: 900;
}

.camera-capture-status strong,
.camera-capture-status small {
  display: block;
}

.camera-capture-status small {
  margin-top: 4px;
  color: #3f6f4e;
  line-height: 1.5;
}

.checkin-action-buttons {
  align-items: stretch;
}

.checkin-submit-ready {
  animation: checkin-ready-pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(15, 118, 110, .30);
}

@keyframes checkin-ready-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 0 0 0 rgba(15, 118, 110, .28); }
  50% { transform: translateY(-1px); box-shadow: 0 0 0 7px rgba(15, 118, 110, 0); }
}

.schedule-checkin-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.schedule-checkin-locked:disabled {
  cursor: not-allowed;
  opacity: .72;
  color: #64748b;
  background: #f8fafc;
}

@media (max-width: 640px) {
  .checkin-steps {
    grid-template-columns: 1fr;
  }

  .checkin-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checkin-action-buttons .btn {
    width: 100%;
    min-height: 48px;
  }
}

/* =========================================================
   REKAP ABSENSI SISWA & BUKTI PRESENSI — VERSI 1.2.2
   ========================================================= */
.attendance-recap-kicker,
.attendance-proof-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,.12);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.attendance-recap-table td,
.attendance-recap-table th {
  vertical-align: middle;
}

.attendance-needs-attention {
  background: #fffdf7;
}

.attendance-number,
.attendance-total-absence {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 10px;
  font-weight: 850;
}

.attendance-number.is-present { color: #166534; background: #dcfce7; }
.attendance-number.is-permit { color: #075985; background: #e0f2fe; }
.attendance-number.is-sick { color: #854d0e; background: #fef3c7; }
.attendance-number.is-absent { color: #991b1b; background: #fee2e2; }
.attendance-total-absence { color: #fff; background: #b91c1c; }

.attendance-detail-card .card-header p,
.attendance-proof-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.attendance-proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.attendance-proof-card {
  overflow: hidden;
}

.attendance-proof-header {
  align-items: flex-start;
}

.attendance-proof-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 14px;
}

.attendance-proof-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
}

.attendance-proof-meta strong {
  color: #0f172a;
}

.attendance-proof-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.attendance-photo-box {
  overflow: hidden;
  border: 1px solid #dbe5e4;
  border-radius: 14px;
  background: #fff;
}

.attendance-photo-box > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.attendance-photo-box > header strong {
  font-size: 12px;
}

.attendance-photo-box > header span {
  color: #64748b;
  font-size: 10px;
}

.attendance-photo-box img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: #e2e8f0;
}

.attendance-photo-empty {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

.attendance-photo-empty > span {
  font-size: 32px;
}

.attendance-photo-empty strong {
  color: #334155;
  font-size: 13px;
}

.attendance-photo-empty small {
  max-width: 250px;
  line-height: 1.5;
}

.attendance-student-proof {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-top: 1px solid #e2e8f0;
  font-size: 11px;
}

.attendance-student-proof span {
  color: #64748b;
}

@media (max-width: 1100px) {
  .attendance-proof-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .attendance-proof-photos,
  .attendance-proof-meta { grid-template-columns: 1fr; }
  .attendance-photo-box img,
  .attendance-photo-empty { height: auto; min-height: 210px; }
  .attendance-student-proof { align-items: flex-start; flex-direction: column; }
}

@media print {
  .attendance-proof-grid { grid-template-columns: 1fr; }
  .attendance-proof-card,
  .attendance-photo-box { break-inside: avoid; box-shadow: none; }
  .attendance-photo-box img { height: 180px; }
  .attendance-recap-card { box-shadow: none; }
}

/* =========================================================
   KELOLA JADWAL GURU ADMIN - VERSI 1.2.3
   ========================================================= */
.teacher-search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.teacher-search-result {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #dbe7e5;
  border-radius: 13px;
  background: #fbfefd;
  color: #0f172a;
  text-decoration: none;
}

.teacher-search-result:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.teacher-search-result span {
  color: #64748b;
  font-size: 12px;
}

.hero-compact {
  min-height: auto;
  padding-top: 20px;
  padding-bottom: 20px;
}

.schedule-admin-grid {
  grid-template-columns: minmax(320px, .85fr) minmax(0, 1.65fr);
}

.schedule-admin-grid .span-2 {
  grid-column: auto;
}

.teacher-week-schedule {
  display: grid;
  gap: 16px;
}

.week-day-block {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.week-day-block h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-size: 15px;
}

.week-day-block h3 span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.admin-schedule-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
}

.admin-schedule-row:last-child {
  border-bottom: 0;
}

.admin-schedule-row.is-inactive {
  opacity: .62;
  background: #f8fafc;
}

.admin-schedule-time,
.admin-schedule-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-schedule-time strong {
  color: #0f766e;
}

.admin-schedule-time small,
.admin-schedule-main span,
.admin-schedule-main small {
  color: #64748b;
  font-size: 11px;
}

.admin-schedule-row form {
  margin: 0;
}

.stat-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid #dbe7e5;
  border-radius: 13px;
  background: #f8fafc;
}

.stat-inline strong {
  color: #0f766e;
  font-size: 24px;
}

.stat-inline span {
  color: #64748b;
  font-size: 13px;
}

.empty-state.compact {
  padding: 16px;
}

@media (max-width: 1000px) {
  .schedule-admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .admin-schedule-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .admin-schedule-row .actions {
    justify-content: flex-start;
  }
}

/* =========================================================
   KONTROL JAM MENGAJAR KURIKULUM - VERSI 1.2.5
   ========================================================= */
.teaching-control-day-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.teaching-control-day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 62px;
  padding: 9px 10px;
  border: 1px solid #dbe5e4;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
  text-decoration: none;
}

.teaching-control-day-tab:hover {
  border-color: #0f766e;
  background: #ecfdf5;
}

.teaching-control-day-tab.active {
  border-color: #0f766e;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 9px 20px rgba(15,118,110,.18);
}

.teaching-control-day-tab strong { font-size: 13px; }
.teaching-control-day-tab span { font-size: 11px; opacity: .82; }
.teaching-control-teacher-filter { min-width: 270px; }

.teaching-control-teachers {
  display: grid;
  gap: 18px;
}

.teaching-control-teacher-card {
  overflow: hidden;
}

.teaching-control-teacher-header {
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #f8fafc, #f0fdfa);
}

.teaching-control-teacher-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.teaching-control-avatar {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15,118,110,.18);
}

.teaching-control-teacher-identity h2 {
  margin: 0;
  font-size: 17px;
}

.teaching-control-teacher-identity p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.teaching-control-teacher-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.teaching-control-session-list {
  display: grid;
}

.teaching-control-session {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: 16px;
  padding: 16px;
  border-top: 1px solid #edf2f7;
  border-left: 4px solid #cbd5e1;
}

.teaching-control-session:first-child { border-top: 0; }
.teaching-control-status-on_time { border-left-color: #16a34a; }
.teaching-control-status-late { border-left-color: #dc2626; background: #fffafa; }
.teaching-control-status-empty { border-left-color: #334155; background: #f8fafc; }
.teaching-control-status-not_checked_in { border-left-color: #f59e0b; }
.teaching-control-status-upcoming { border-left-color: #0ea5e9; }

.teaching-control-session-main {
  display: grid;
  grid-template-columns: 125px minmax(0, 1fr);
  gap: 12px 16px;
  align-content: start;
}

.teaching-control-session-time,
.teaching-control-session-subject,
.teaching-control-session-status {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.teaching-control-session-time strong {
  color: #0f766e;
  font-size: 16px;
}

.teaching-control-session-time span,
.teaching-control-session-subject span,
.teaching-control-session-status span,
.teaching-control-session-status small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.teaching-control-session-subject strong { color: #0f172a; }
.teaching-control-session-status { grid-column: 1 / -1; }
.teaching-control-session-status .badge { align-self: flex-start; }

.teaching-control-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.teaching-control-photo-box {
  overflow: hidden;
  border: 1px solid #dbe5e4;
  border-radius: 12px;
  background: #fff;
}

.teaching-control-photo-box > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.teaching-control-photo-box > header strong { font-size: 11px; }
.teaching-control-photo-box > header span { color: #64748b; font-size: 9px; }

.teaching-control-photo-box img {
  display: block;
  width: 100%;
  height: 125px;
  object-fit: cover;
  background: #e2e8f0;
}

.teaching-control-photo-empty {
  min-height: 125px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

.teaching-control-photo-empty span { font-size: 25px; }
.teaching-control-photo-empty small { line-height: 1.35; }

.teaching-control-validation-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-top: 1px solid #e2e8f0;
  font-size: 10px;
}

.teaching-control-validation-meta span { color: #64748b; }
.teaching-control-validation-meta small { font-size: 9px; }

@media (max-width: 1050px) {
  .teaching-control-session { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .teaching-control-day-tabs {
    grid-template-columns: repeat(5, minmax(72px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .teaching-control-day-tab { min-width: 72px; }
  .teaching-control-teacher-header { align-items: flex-start; flex-direction: column; }
  .teaching-control-teacher-summary { justify-content: flex-start; }
  .teaching-control-photo-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .teaching-control-session { padding: 13px 11px; }
  .teaching-control-session-main { grid-template-columns: 1fr; }
  .teaching-control-session-status { grid-column: auto; }
  .teaching-control-photo-grid { grid-template-columns: 1fr; }
  .teaching-control-photo-box img,
  .teaching-control-photo-empty { height: auto; min-height: 170px; }
  .teaching-control-teacher-filter { min-width: 100%; }
}

@media print {
  .teaching-control-filter-card,
  .sidebar,
  .topbar,
  .page-footer,
  .menu-button,
  .sidebar-overlay { display: none !important; }
  .main-content { margin: 0 !important; width: 100% !important; }
  .page-content { padding: 0 !important; }
  .teaching-control-teacher-card,
  .teaching-control-session { break-inside: avoid; box-shadow: none; }
  .teaching-control-photo-box img { height: 110px; }
}


/* =========================================================
   PRATINJAU PERANGKAT AJAR — VERSI 1.2.9
   ========================================================= */
.document-view-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0f766e;
  background: #ecfdf5;
  border-color: #99f6e4;
}
.document-view-button:hover {
  color: #fff;
  background: #0f766e;
  border-color: #0f766e;
}
.document-preview-shell {
  display: grid;
  gap: 16px;
}
.document-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.document-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}
.document-preview-meta span {
  padding: 6px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
}
.document-preview-frame {
  width: 100%;
  height: min(76vh, 920px);
  min-height: 620px;
  border: 1px solid #dbe5e4;
  border-radius: 16px;
  background: #f8fafc;
}
.document-preview-image-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  overflow: auto;
}
.document-preview-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 10px 35px rgba(15,23,42,.12);
}
.document-preview-content {
  padding: clamp(18px, 3vw, 38px);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  color: #172033;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.document-preview-content h2,
.document-preview-content h3 {
  margin-top: 1.4em;
}
.document-preview-content p {
  margin: 0 0 12px;
}
.document-preview-content .preview-table-wrap {
  margin: 16px 0;
  overflow: auto;
  border: 1px solid #dbe5e4;
  border-radius: 12px;
}
.document-preview-content table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
}
.document-preview-content th,
.document-preview-content td {
  min-width: 80px;
  padding: 8px 10px;
  border: 1px solid #dbe5e4;
  vertical-align: top;
  white-space: pre-wrap;
}
.document-preview-content th {
  position: sticky;
  top: 0;
  background: #ecfdf5;
  color: #115e59;
}
.document-preview-content pre {
  margin: 0;
  padding: 16px;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}
.document-preview-note {
  padding: 12px 14px;
  border-left: 4px solid #0d9488;
  border-radius: 10px;
  background: #ecfdf5;
  color: #115e59;
  font-size: 13px;
  line-height: 1.55;
}
.document-preview-empty {
  padding: 38px 20px;
  text-align: center;
  color: #64748b;
}
@media (max-width: 720px) {
  .document-preview-frame {
    min-height: 65vh;
    height: 70vh;
    border-radius: 12px;
  }
  .document-preview-content {
    padding: 15px;
    border-radius: 12px;
  }
  .document-preview-toolbar .actions {
    width: 100%;
  }
  .document-preview-toolbar .actions .btn {
    flex: 1 1 auto;
  }
}
