    :root {
      --primary: #2563eb;
      --primary-dark: #1e40af;
      --dark: #0f172a;
      --muted: #64748b;
      --soft: #f1f5f9;
      --card: #ffffff;
      --border: #e2e8f0;
      --success: #16a34a;
      --warning: #f59e0b;
      --danger: #dc2626;
      --sidebar: #111827;
    }

    * { box-sizing: border-box; }

    body {
      margin: 0;
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background: #eef3fb;
      color: #0f172a;
    }

.portal-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(30, 64, 175, .62)),
    url('./Login.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  padding: 32px;
  display: flex;
  align-items: center;
}

    .portal-shell {
      width: min(1180px, 100%);
      margin: auto;
      display: grid;
      grid-template-columns: 1.15fr .85fr;
      gap: 28px;
      align-items: stretch;
    }

    .hero-card,
    .login-card {
      border-radius: 28px;
      background: rgba(255, 255, 255, .92);
      box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
      border: 1px solid rgba(255,255,255,.55);
      overflow: hidden;
    }

    .hero-card {
      padding: 44px;
      background:
        linear-gradient(160deg, rgba(15, 23, 42, .92), rgba(30, 64, 175, .92)),
        url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?q=80&w=1600&auto=format&fit=crop');
      background-size: cover;
      background-position: center;
      color: white;
      position: relative;
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      border: 1px solid rgba(255,255,255,.25);
      background: rgba(255,255,255,.12);
      border-radius: 999px;
      padding: 8px 14px;
      font-size: 13px;
      margin-bottom: 24px;
    }

    .hero-title {
      font-size: clamp(34px, 5vw, 58px);
      line-height: 1.03;
      font-weight: 800;
      letter-spacing: -1.5px;
      margin-bottom: 18px;
    }

    .hero-subtitle {
      font-size: 17px;
      color: rgba(255,255,255,.82);
      max-width: 620px;
      margin-bottom: 28px;
    }

    .feature-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 14px;
      margin-top: 30px;
    }

    .feature-box {
      background: rgba(255,255,255,.12);
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 20px;
      padding: 18px;
      backdrop-filter: blur(8px);
    }

    .feature-box i { font-size: 24px; }
    .feature-box h6 { margin: 10px 0 4px; font-weight: 800; }
    .feature-box p { margin: 0; font-size: 13px; color: rgba(255,255,255,.72); }

    .login-card { padding: 34px; }

    .brand-mini {
      display: flex;
      gap: 14px;
      align-items: center;
      margin-bottom: 22px;
    }

    .logo-circle {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: #ffffff;
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(37,99,235,.18);
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

    .form-control,
    .form-select {
      border-radius: 14px;
      border-color: var(--border);
      padding: 11px 13px;
    }

    .btn-main {
      border: 0;
      border-radius: 14px;
      padding: 12px 18px;
      background: linear-gradient(135deg, var(--primary), var(--primary-dark));
      color: white;
      font-weight: 700;
      box-shadow: 0 14px 28px rgba(37, 99, 235, .28);
    }

    .app-layout {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 292px 1fr;
      background: #eef3fb;
    }

    .sidebar {
      background: linear-gradient(180deg, #0f172a, #111827);
      color: white;
      padding: 22px;
      position: sticky;
      top: 0;
      height: 100vh;
      overflow-y: auto;
    }

    .app-brand {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 6px 24px;
      border-bottom: 1px solid rgba(255,255,255,.1);
      margin-bottom: 18px;
    }

    .app-brand .logo-circle {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      font-size: 18px;
    }

    .user-panel {
      background: rgba(255,255,255,.08);
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 20px;
      padding: 16px;
      margin-bottom: 18px;
    }

    .avatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: #dbeafe;
      color: #1e40af;
      display: grid;
      place-items: center;
      font-weight: 900;
    }

    .nav-menu { display: grid; gap: 6px; }

    .nav-btn {
      width: 100%;
      border: 0;
      color: rgba(255,255,255,.78);
      background: transparent;
      padding: 12px 14px;
      border-radius: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
      text-align: left;
      font-weight: 650;
    }

    .nav-btn:hover,
    .nav-btn.active {
      color: white;
      background: rgba(37, 99, 235, .95);
    }

    .main-content {
      padding: 26px;
      overflow-x: hidden;
    }

    .topbar {
      background: rgba(255,255,255,.86);
      border: 1px solid rgba(226,232,240,.9);
      border-radius: 24px;
      padding: 18px 22px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      box-shadow: 0 14px 32px rgba(15,23,42,.08);
      margin-bottom: 22px;
      backdrop-filter: blur(10px);
    }

    .page-title h3 { margin: 0; font-weight: 850; letter-spacing: -.4px; }
    .page-title p { margin: 4px 0 0; color: var(--muted); }

    .stat-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 20px;
    }

    .stat-card,
    .content-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 24px;
      box-shadow: 0 14px 30px rgba(15,23,42,.07);
    }

    .stat-card { padding: 20px; }

    .stat-icon {
      width: 42px;
      height: 42px;
      border-radius: 14px;
      display: grid;
      place-items: center;
      background: #dbeafe;
      color: var(--primary);
      margin-bottom: 12px;
    }

    .stat-value { font-size: 30px; font-weight: 850; line-height: 1; }
    .stat-label { color: var(--muted); font-size: 13px; margin-top: 5px; }

.content-card { padding: 24px; margin-bottom: 20px; }

/* ===== Premium Dashboard ===== */
.dashboard-hero {
  display: grid;
  grid-template-columns: 1.45fr .95fr;
  gap: 18px;
  background:
    radial-gradient(circle at top right, rgba(96,165,250,.28), transparent 34%),
    linear-gradient(135deg, #0f172a 0%, #1d4ed8 52%, #2563eb 100%);
  color: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(37, 99, 235, .22);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  background: rgba(255,255,255,.08);
  border-radius: 50%;
  filter: blur(2px);
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
}

.dashboard-hero-content h2 {
  margin: 0 0 10px;
  font-size: 34px;
  font-weight: 850;
  letter-spacing: -.6px;
  line-height: 1.1;
}

.dashboard-hero-content p {
  margin: 0;
  color: rgba(255,255,255,.86);
  font-size: 15px;
  line-height: 1.7;
  max-width: 760px;
}

.dashboard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,.14);
}

.mini-badge.primary {
  background: rgba(219,234,254,.16);
  color: #eff6ff;
}

.mini-badge.success {
  background: rgba(16,185,129,.16);
  color: #ecfdf5;
}

.mini-badge.dark {
  background: rgba(15,23,42,.24);
  color: #f8fafc;
}

.dashboard-hero-side {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
}

.hero-ring {
  width: 150px;
  height: 150px;
  margin: 4px auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(255,255,255,.92) 0 55%, transparent 56% 100%),
    conic-gradient(#34d399 0deg, #34d399 var(--percent, 0deg), rgba(255,255,255,.14) var(--percent, 0deg), rgba(255,255,255,.14) 360deg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

.hero-ring-value {
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  line-height: 1;
}

.hero-ring-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-top: 4px;
}

.hero-side-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-side-item {
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.12);
  padding: 14px;
  text-align: center;
}

.hero-side-item strong {
  display: block;
  font-size: 24px;
  font-weight: 850;
  line-height: 1;
  margin-bottom: 6px;
}

.hero-side-item span {
  font-size: 12px;
  color: rgba(255,255,255,.84);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 34px rgba(15,23,42,.06);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--kpi-color, #2563eb);
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.kpi-title {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--kpi-bg, #dbeafe);
  color: var(--kpi-color, #2563eb);
}

.kpi-value {
  font-size: 30px;
  font-weight: 850;
  color: #0f172a;
  line-height: 1;
  margin-bottom: 6px;
}

.kpi-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.kpi-card.primary { --kpi-color:#2563eb; --kpi-bg:#dbeafe; }
.kpi-card.emerald { --kpi-color:#059669; --kpi-bg:#d1fae5; }
.kpi-card.amber { --kpi-color:#d97706; --kpi-bg:#fef3c7; }
.kpi-card.violet { --kpi-color:#7c3aed; --kpi-bg:#ede9fe; }
.kpi-card.sky { --kpi-color:#0284c7; --kpi-bg:#e0f2fe; }
.kpi-card.danger { --kpi-color:#dc2626; --kpi-bg:#fee2e2; }

.dashboard-panels {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-panel {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid #dbe7f5;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 14px 34px rgba(15,23,42,.06);
}

.dashboard-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-panel-head h5 {
  margin: 0;
  font-size: 20px;
  font-weight: 850;
  color: #0f172a;
}

.dashboard-panel-head small {
  color: #64748b;
  font-size: 13px;
}

.progress-card {
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 20px;
  padding: 18px;
  margin-bottom: 16px;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.progress-top strong {
  font-size: 16px;
  color: #0f172a;
}

.progress-top span {
  font-size: 14px;
  font-weight: 800;
  color: #2563eb;
}

.progress-track {
  width: 100%;
  height: 14px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb 0%, #34d399 100%);
  border-radius: inherit;
  transition: width .35s ease;
}

.progress-note {
  margin-top: 10px;
  color: #64748b;
  font-size: 13px;
}

.class-list {
  display: grid;
  gap: 10px;
}

.class-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 16px;
  padding: 12px 14px;
}

.class-item strong {
  color: #0f172a;
  font-size: 14px;
}

.class-item span {
  color: #64748b;
  font-size: 12px;
}

.class-status {
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: 999px;
}

.class-status.success {
  background: #dcfce7;
  color: #166534;
}

.class-status.pending {
  background: #fee2e2;
  color: #991b1b;
}

.activity-list {
  display: grid;
  gap: 12px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 18px;
  padding: 14px;
}

.activity-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: #2563eb;
  flex: 0 0 auto;
}

.activity-main strong {
  display: block;
  font-size: 14px;
  color: #0f172a;
  margin-bottom: 4px;
}

.activity-main span {
  display: block;
  font-size: 12px;
  color: #64748b;
  line-height: 1.6;
}

.gender-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.gender-card {
  border-radius: 18px;
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  padding: 18px;
}

.gender-card .label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.gender-card .value {
  font-size: 30px;
  font-weight: 850;
  color: #0f172a;
  line-height: 1;
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f8fbff;
  border: 1px solid #e5edf7;
  border-radius: 16px;
  padding: 14px 16px;
}

.info-item span {
  color: #64748b;
  font-size: 13px;
}

.info-item strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  text-align: right;
}

.dashboard-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fbff;
  color: #64748b;
  font-size: 13px;
  padding: 16px;
  text-align: center;
}

@media (max-width: 1400px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .dashboard-hero,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .dashboard-hero {
    padding: 20px;
  }

  .dashboard-hero-content h2 {
    font-size: 28px;
  }

  .dashboard-kpi-grid,
  .gender-grid,
  .hero-side-summary {
    grid-template-columns: 1fr;
  }
}

    .card-title-line {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 16px;
      margin-bottom: 18px;
    }

    .card-title-line h5 { margin: 0; font-weight: 820; }
.card-title-line small { color: var(--muted); }

/* ===== Premium Master Data ===== */
#pageMaster .content-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

#pageMaster .card-title-line {
  margin-bottom: 24px;
}

#pageMaster .card-title-line h5 {
  font-size: 30px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.4px;
}

#pageMaster .card-title-line small {
  font-size: 15px;
  color: #64748b;
}

#masterTabs {
  gap: 10px;
}

#masterTabs .nav-link {
  border: 1px solid #dbe7f5;
  background: #f8fbff;
  color: #2563eb;
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .25s ease;
}

#masterTabs .nav-link:hover {
  background: #eef5ff;
  transform: translateY(-1px);
}

#masterTabs .nav-link.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .28);
}

#pageMaster h5.fw-bold.mb-3 {
  font-size: 18px;
  font-weight: 800 !important;
  color: #0f172a;
  margin-bottom: 18px !important;
}

#pageMaster .form-label {
  font-size: 14px;
  font-weight: 700 !important;
  color: #0f172a;
  margin-bottom: 8px;
}

#pageMaster .form-control,
#pageMaster .form-select {
  height: 46px;
  border-radius: 16px;
  border: 1px solid #d9e4f2;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
  transition: all .2s ease;
}

#pageMaster .form-control:focus,
#pageMaster .form-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

#pageMaster .btn-main {
  border-radius: 16px;
  padding: 12px 22px;
  font-weight: 800;
  letter-spacing: .2px;
}

#pageMaster .section-title {
  margin-top: 30px;
  margin-bottom: 14px;
  font-size: 18px;
}

#pageMaster .section-title::before {
  width: 6px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
}

#pageMaster .table-responsive {
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  overflow: hidden;
  background: white;
}

#pageMaster .table {
  margin-bottom: 0;
}

#pageMaster .table thead th {
  background: linear-gradient(180deg, #89a4cf 0%, #7f9bc8 100%) !important;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  border-color: #6e89b1;
  padding: 14px 12px;
}

#pageMaster .table tbody td {
  padding: 12px;
  border-color: #e5edf7;
}

#pageMaster .table tbody tr:nth-child(even) {
  background: #f8fbff;
}

#pageMaster .table tbody tr:hover {
  background: #eef5ff;
}

#pageMaster .badge.text-bg-primary,
#pageMaster .badge.text-bg-success,
#pageMaster .badge.text-bg-secondary {
  color: #fff !important;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  text-transform: lowercase;
  letter-spacing: .2px;
}

#pageMaster .badge.text-bg-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

#pageMaster .badge.text-bg-success {
  background: linear-gradient(135deg, #10b981, #059669) !important;
}

#pageMaster .badge.text-bg-secondary {
  background: linear-gradient(135deg, #64748b, #475569) !important;
}

#pageMaster .btn-warning,
#pageMaster .btn-danger,
#pageMaster .btn-success,
#pageMaster .btn-secondary {
  border: 0;
  border-radius: 10px;
  color: #fff;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12);
  transition: all .2s ease;
}

#pageMaster .btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

#pageMaster .btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

#pageMaster .btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
}

#pageMaster .btn-secondary {
  background: linear-gradient(135deg, #64748b, #475569);
}

#pageMaster .btn-warning:hover,
#pageMaster .btn-danger:hover,
#pageMaster .btn-success:hover,
#pageMaster .btn-secondary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

/* ===== Lebar kolom tabel Tahun Pelajaran ===== */
#tabelMasterTahunPelajaranTable {
  table-layout: fixed;
  width: 100%;
}

#tabelMasterTahunPelajaranTable th:nth-child(1),
#tabelMasterTahunPelajaranTable td:nth-child(1) {
  width: 60px;
}

#tabelMasterTahunPelajaranTable th:nth-child(2),
#tabelMasterTahunPelajaranTable td:nth-child(2) {
  width: 180px;
}

#tabelMasterTahunPelajaranTable th:nth-child(3),
#tabelMasterTahunPelajaranTable td:nth-child(3) {
  width: 130px;
}

#tabelMasterTahunPelajaranTable th:nth-child(4),
#tabelMasterTahunPelajaranTable td:nth-child(4) {
  width: 130px;
}

#tabelMasterTahunPelajaranTable th:nth-child(5),
#tabelMasterTahunPelajaranTable td:nth-child(5) {
  width: 330px;
}

#tabelMasterTahunPelajaranTable td:nth-child(5) .d-flex {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

    .section-title {
      font-weight: 800;
      color: #1e293b;
      margin: 24px 0 12px;
      display: flex;
      align-items: center;
      gap: 9px;
    }

    .section-title::before {
      content: '';
      width: 8px;
      height: 24px;
      background: var(--primary);
      border-radius: 10px;
    }

    .table {
      overflow: hidden;
      border-radius: 14px;
      margin-bottom: 0;
    }

    .table thead th {
      background: #8eaadb !important;
      color: #0f172a;
      vertical-align: middle;
      border-color: #1f2937;
      font-size: 13px;
    }

    .table td {
      vertical-align: middle;
      border-color: #cbd5e1;
      font-size: 13px;
    }

    .number-input {
      min-width: 76px;
      text-align: center;
    }

    .tab-page { display: none; }
    .tab-page.active { display: block; }

.mobile-menu { display: none; }

/* ===== Premium Input Draft & Konsistensi Tab ===== */
#pageInput .input-panel-card {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  border-radius: 24px;
  padding: 20px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .07);
}

#pageInput .input-panel-header {
  padding: 14px 16px;
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
  margin-bottom: 16px;
}

#pageInput .input-panel-header h5 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -.2px;
  color: #0f172a;
}

#pageInput .input-panel-header h5 i {
  color: #2563eb;
}

#pageInput .input-panel-header small {
  font-size: 13px;
  color: #64748b;
}

.btn-draft-save,
.btn-draft-load,
.btn-draft-delete {
  border: 0;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .2s ease;
  white-space: nowrap;
}

.btn-draft-save {
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .18);
}

.btn-draft-load {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(16, 185, 129, .18);
}

.btn-draft-delete {
  background: linear-gradient(135deg, #f97316, #dc2626);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(220, 38, 38, .16);
}

.btn-draft-save:hover,
.btn-draft-load:hover,
.btn-draft-delete:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

#pageInput .input-modern-table {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid #dbe7f5;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

#pageInput .input-modern-table thead th {
  background: linear-gradient(180deg, #dbeafe 0%, #bfdbfe 100%) !important;
  color: #0f172a;
  font-weight: 900;
  border-color: #93c5fd;
}

#pageInput .input-modern-table tbody td {
  background: #ffffff;
  border-color: #e5edf7;
}

#pageInput .input-modern-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

#pageInput .input-modern-table tfoot th,
#pageInput .input-modern-table tfoot td {
  background: #e0f2fe !important;
  border-color: #bae6fd;
  font-weight: 900;
}

#pageInput .input-number {
  height: 40px;
  border-radius: 14px;
  font-weight: 900;
  border: 1px solid #d9e4f2;
  background: #ffffff;
}

#pageInput .input-number:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

#pageInput .input-action-bar {
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  border: 1px solid #dbe7f5;
  border-radius: 24px;
}

#pageInput .status-text {
  font-weight: 700;
}

/* ===== Premium Input Data ===== */
#pageInput .content-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

#pageInput .card-title-line h5 {
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -.4px;
}

#pageInput .card-title-line small {
  color: #64748b;
  font-size: 15px;
}

.input-summary-grid {
  display: grid;
  grid-template-columns: 1.2fr 1.4fr 1fr;
  gap: 14px;
  margin-bottom: 22px;
}

.input-summary-card {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.input-summary-card .label {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 7px;
}

.input-summary-card .value {
  font-weight: 850;
  color: #0f172a;
  font-size: 16px;
  min-height: 24px;
}

.input-tabs {
  gap: 10px;
  border-bottom: 0;
  margin-bottom: 18px;
}

.input-tabs .nav-link {
  border: 1px solid #dbe7f5;
  background: #ffffff;
  color: #2563eb;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.input-tabs .nav-link.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .26);
}

.input-tab-panel {
  display: none;
}

.input-tab-panel.active {
  display: block;
}

.input-panel-card {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}

.input-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.input-panel-header h5 {
  margin: 0;
  font-weight: 850;
  color: #0f172a;
}

.input-panel-header small {
  color: #64748b;
}

.input-modern-table {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #dbe7f5;
}

.input-modern-table table {
  margin-bottom: 0;
}

.input-modern-table thead th {
  background: linear-gradient(180deg, #89a4cf 0%, #7f9bc8 100%) !important;
  color: #0f172a;
  font-weight: 900;
  font-size: 16px;
  border-color: #6e89b1;
  padding: 14px 12px;
}

.input-modern-table tbody td {
  border-color: #e5edf7;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
}

.input-modern-table tbody tr:nth-child(even) {
  background: #f8fbff;
}

.input-modern-table tfoot th,
.input-modern-table tfoot td {
  background: #eef5ff;
  font-weight: 900;
  color: #0f172a;
  border-color: #c9dcf5;
  padding: 13px 12px;
  font-size: 13px;
}

.input-number {
  max-width: 110px;
  margin: auto;
  text-align: center;
  border-radius: 12px;
  font-weight: 900;
  font-size: 13px;
}

.input-action-bar {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  background: #ffffff;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.input-action-bar .status-text {
  color: #64748b;
  font-size: 14px;
}

.btn-main:disabled {
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* ===== Review Input Modal ===== */
.review-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(7px);
  z-index: 10002;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.review-overlay.show {
  display: flex;
}

.review-card {
  width: min(980px, 100%);
  max-height: 88vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
  border: 1px solid #e2e8f0;
}

.review-header {
  padding: 24px 26px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.review-header h4 {
  margin: 0;
  font-weight: 900;
  color: #0f172a;
}

.review-header p {
  margin: 6px 0 0;
  color: #64748b;
}

.review-body {
  padding: 22px 26px;
}

.review-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.review-meta .item {
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  padding: 12px;
  background: #f8fbff;
}

.review-meta .item small {
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 11px;
}

.review-meta .item div {
  font-weight: 850;
  color: #0f172a;
  margin-top: 4px;
}

.review-footer {
  padding: 18px 26px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fbff;
}

.btn-review-back,
.btn-review-save {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 850;
}

.btn-review-back {
  background: #e2e8f0;
  color: #334155;
}

.btn-review-save {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .24);
}

@media (max-width: 991px) {
  .input-summary-grid,
  .review-meta {
    grid-template-columns: 1fr 1fr;
  }

  .input-action-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 576px) {
  .input-summary-grid,
  .review-meta {
    grid-template-columns: 1fr;
  }
}

/* ===== Premium Rekap & Cetak ===== */
#pageRekap .content-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

#pageRekap .card-title-line h5 {
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -.4px;
}

#pageRekap .card-title-line small {
  color: #64748b;
  font-size: 15px;
}

.rekap-filter-card {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
  margin-bottom: 20px;
}

.rekap-filter-card .form-label {
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
}

.rekap-filter-card .form-control,
.rekap-filter-card .form-select {
  height: 46px;
  border-radius: 16px;
  border: 1px solid #d9e4f2;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03);
}

.rekap-action-card {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-rekap-primary,
.btn-rekap-print {
  border: 0;
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 850;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-rekap-primary {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 14px 28px rgba(37, 99, 235, .24);
}

.btn-rekap-print {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 14px 28px rgba(16, 185, 129, .22);
}

.rekap-empty-state {
  border: 1px dashed #b8c9e4;
  background: #f8fbff;
  border-radius: 24px;
  padding: 34px;
  text-align: center;
  color: #64748b;
}

.rekap-empty-state i {
  font-size: 42px;
  color: #2563eb;
  margin-bottom: 12px;
}

.rekap-print-sheet {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
}

.rekap-kop {
  display: grid;
  grid-template-columns: 82px 1fr 82px;
  align-items: center;
  gap: 14px;
  border-bottom: 4px double #0f172a;
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.rekap-logo {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
}

.rekap-kop h4 {
  margin: 0;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: .3px;
}

.rekap-kop p {
  margin: 3px 0 0;
  color: #475569;
  font-size: 13px;
}

.rekap-title {
  text-align: center;
  margin: 0 0 18px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #eaf4ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  width: 100%;
  box-sizing: border-box;
}

.rekap-title h4 {
  font-size: 22px;
  letter-spacing: .3px;
  margin: 0 0 6px 0;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
}

.rekap-title .text-muted {
  margin: 0;
  font-size: 14px;
  font-weight: 900 !important;
  text-transform: uppercase;
  color: #1e3a8a !important;
  letter-spacing: .4px;
  opacity: 1 !important;
}

.rekap-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.rekap-meta-item {
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  padding: 12px;
  background: #f8fbff;
}

.rekap-meta-item small {
  display: block;
  font-size: 11px;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
}

.rekap-meta-item b {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.rekap-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.rekap-summary-card {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid #dbe7f5;
  background: #ffffff;
}

.rekap-summary-card .label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.rekap-summary-card .value {
  font-size: 28px;
  font-weight: 900;
  color: #0f172a;
  margin-top: 4px;
}

.rekap-print-sheet .section-title {
  margin-top: 22px;
}

.rekap-print-sheet .table {
  margin-bottom: 0;
}

.rekap-print-sheet .table thead th {
  background: linear-gradient(180deg, #89a4cf 0%, #7f9bc8 100%) !important;
  color: #0f172a;
  font-weight: 850;
  text-align: center;
}

.rekap-print-sheet .table tfoot th,
.rekap-print-sheet .table tfoot td {
  background: #eef5ff;
  font-weight: 900;
}

.rekap-all-title {
  font-weight: 900;
  margin: 22px 0 8px;
  color: #0f172a;
  font-size: 14px;
}

.rekap-all-wrap {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 22px;
}

.rekap-all-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse !important;
  font-size: 11px;
  margin-bottom: 0;
  border-radius: 12px;
  overflow: hidden;
}

.rekap-all-table th,
.rekap-all-table td {
  border: 1px solid #1f2937 !important;
  padding: 4px 5px !important;
  vertical-align: middle !important;
  text-align: center;
  line-height: 1.15;
}

.rekap-all-table thead th {
  background: #8eaadb !important;
  color: #000 !important;
  font-weight: 900;
  text-align: center;
}

.rekap-all-table tbody td {
  background: #ffffff;
}

.rekap-all-table .kelas-col {
  width: 120px;
  text-align: left !important;
  white-space: nowrap;
}

.rekap-all-table .no-col {
  width: 38px;
}

.rekap-all-table .mini-col {
  width: 42px;
}

.rekap-all-table .jumlah-col {
  width: 52px;
}

.rekap-all-table .row-total td,
.rekap-all-table .row-total th,
.rekap-all-table .row-jumlah td,
.rekap-all-table .row-jumlah th {
  background: #8eaadb !important;
  font-weight: 900;
}

.rekap-all-table .total-label {
  text-align: center !important;
  font-weight: 900;
}

.rekap-all-table.age-table {
  font-size: 10px;
}

.rekap-all-table.age-table th,
.rekap-all-table.age-table td {
  padding: 3px 4px !important;
}

.rekap-all-table.age-table .kelas-col {
  width: 95px;
}

.rekap-all-table.age-table .mini-col {
  width: 32px;
}

.rekap-all-table.mutasi-table .kelas-col {
  width: 130px;
}

.rekap-all-table.mutasi-table .mutasi-head {
  min-width: 120px;
}

@media print {
  .rekap-all-wrap {
    overflow: visible !important;
    page-break-inside: avoid;
  }

  .rekap-all-title {
    font-size: 12px;
    margin: 14px 0 5px;
  }

  .rekap-all-table {
    font-size: 8.5px;
  }

  .rekap-all-table th,
  .rekap-all-table td {
    padding: 2px 3px !important;
  }

  .rekap-all-table.age-table {
    font-size: 7px;
  }

  .rekap-all-table.age-table th,
  .rekap-all-table.age-table td {
    padding: 1.5px 2px !important;
  }

  .rekap-print-sheet {
    transform-origin: top left;
  }
}

.ttd-area {
  margin-top: 36px;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
}

.ttd-box {
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
  color: #0f172a;
}

.ttd-box div,
.ttd-box b {
  font-size: 11px;
}

.ttd-box b {
  font-weight: 900;
  text-transform: none;
}

.ttd-space {
  height: 64px;
}

/* Aturan print lama dihapus agar tidak memaksa landscape */

/* ===== Premium Rekap Table Final ===== */
.rekap-print-sheet {
  font-family: Inter, Arial, sans-serif !important;
  color: #0f172a;
  padding: 2cm !important;
  box-sizing: border-box;
}

.rekap-kop {
  display: none;
}

.rekap-logo {
  background: #ffffff !important;
  border: 1px solid #dbe7f5;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.rekap-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.rekap-title h4 {
  font-size: 22px;
  letter-spacing: .3px;
  margin: 0 0 6px 0;
  font-weight: 900;
  color: #0f172a;
  text-transform: uppercase;
}

.rekap-badge-row,
.rekap-all-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 14px 0 10px;
}

.rekap-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 850;
}

.rekap-badge.success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.rekap-badge.dark {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #334155;
}

.rekap-section-card {
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.rekap-section-title {
  padding: 8px 12px;
  background: linear-gradient(135deg, #eff6ff, #f8fbff);
  border-bottom: 1px solid #dbe7f5;
  font-size: 11px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.rekap-section-title::before {
  content: '';
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
}

.rekap-print-table {
  width: 100%;
  border-collapse: collapse !important;
  margin: 0;
  font-size: 11px;
}

.rekap-print-table th,
.rekap-print-table td {
  border: 1px solid #cbd5e1 !important;
  padding: 5px 6px !important;
  text-align: center;
  vertical-align: middle;
  line-height: 1.2;
  font-size: 11px;
}

.rekap-print-table thead th {
  background: linear-gradient(180deg, #dbeafe, #bfdbfe) !important;
  color: #0f172a !important;
  font-weight: 900;
}

.rekap-print-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.rekap-print-table tfoot th,
.rekap-print-table tfoot td {
  background: #e0f2fe !important;
  font-weight: 900;
}

.rekap-print-table .text-start {
  text-align: left !important;
}

.rekap-all-wrap {
  border: 1px solid #dbe7f5;
  border-radius: 16px;
  overflow-x: auto;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .05);
}

.rekap-all-title {
  font-size: 11px;
  font-weight: 900;
  margin: 16px 0 6px;
  color: #0f172a;
}

.rekap-all-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 11px;
  margin-bottom: 0;
}

.rekap-all-table th,
.rekap-all-table td {
  border: 1px solid #cbd5e1 !important;
  padding: 3px 4px !important;
  vertical-align: middle !important;
  text-align: center;
  line-height: 1.15;
  font-size: 11px;
}

.rekap-all-table thead th {
  background: linear-gradient(180deg, #dbeafe, #bfdbfe) !important;
  color: #0f172a !important;
  font-weight: 900;
}

.rekap-all-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.rekap-all-table .row-total td,
.rekap-all-table .row-total th,
.rekap-all-table .row-jumlah td,
.rekap-all-table .row-jumlah th {
  background: #e0f2fe !important;
  font-weight: 900;
}

.rekap-all-table .kelas-col {
  width: 105px;
  text-align: left !important;
  white-space: nowrap;
}

.rekap-all-table .no-col {
  width: 34px;
}

.rekap-all-table.age-table {
  font-size: 11px;
}

.rekap-all-table.age-table th,
.rekap-all-table.age-table td {
  padding: 3px 3px !important;
}

@media print {
  .rekap-section-title,
  .rekap-all-title {
    font-size: 11px !important;
  }

  .rekap-print-table,
  .rekap-all-table,
  .rekap-all-table.age-table {
    font-size: 11px !important;
  }

  .rekap-print-table th,
  .rekap-print-table td,
  .rekap-all-table th,
  .rekap-all-table td,
  .rekap-all-table.age-table th,
  .rekap-all-table.age-table td {
    font-size: 11px !important;
    padding: 3px 4px !important;
  }

  body.print-landscape .rekap-all-table,
  body.print-landscape .rekap-all-table.age-table {
    font-size: 11px !important;
  }

  body.print-landscape .rekap-all-title {
    font-size: 11px !important;
    margin: 12px 0 5px;
  }

  .rekap-badge {
    font-size: 10px;
    padding: 5px 8px;
  }
}

/* ===== Premium Loading, Toast, Modal ===== */
.app-loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .50);
  backdrop-filter: blur(7px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.app-loading-overlay.show {
  display: flex;
}

.loading-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 26px 30px;
  min-width: 280px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .32);
  text-align: center;
  border: 1px solid rgba(226, 232, 240, .9);
}

.loading-spinner-premium {
  width: 48px;
  height: 48px;
  border: 4px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 999px;
  margin: 0 auto 16px;
  animation: premiumSpin .75s linear infinite;
}

@keyframes premiumSpin {
  to { transform: rotate(360deg); }
}

.loading-title {
  font-weight: 850;
  font-size: 18px;
  color: #0f172a;
  margin-bottom: 4px;
}

.loading-text {
  color: #64748b;
  font-size: 14px;
}

.toast-container-premium {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 10000;
  display: grid;
  gap: 12px;
  width: min(380px, calc(100vw - 32px));
}

.toast-premium {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px 18px;
  display: flex;
  gap: 13px;
  align-items: flex-start;
  box-shadow: 0 22px 48px rgba(15, 23, 42, .18);
  border: 1px solid #e2e8f0;
  animation: toastSlideIn .25s ease;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(18px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-icon-premium {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  flex-shrink: 0;
}

.toast-premium.success .toast-icon-premium {
  background: linear-gradient(135deg, #10b981, #059669);
}

.toast-premium.error .toast-icon-premium {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-premium.warning .toast-icon-premium {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.toast-premium.info .toast-icon-premium {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.toast-title-premium {
  font-weight: 850;
  color: #0f172a;
  line-height: 1.2;
  margin-bottom: 4px;
}

.toast-message-premium {
  color: #64748b;
  font-size: 14px;
  line-height: 1.35;
}

.confirm-overlay-premium {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(7px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  padding: 18px;
}

.confirm-overlay-premium.show {
  display: flex;
}

.confirm-card-premium {
  width: min(430px, 100%);
  background: #ffffff;
  border-radius: 26px;
  padding: 26px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .35);
  border: 1px solid #e2e8f0;
  animation: modalPop .22s ease;
}

@keyframes modalPop {
  from {
    transform: scale(.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.confirm-icon-premium {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  margin-bottom: 16px;
  font-size: 24px;
}

.confirm-title-premium {
  font-weight: 900;
  font-size: 22px;
  color: #0f172a;
  margin-bottom: 8px;
}

.confirm-message-premium {
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 22px;
}

.confirm-actions-premium {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-premium-muted,
.btn-premium-danger {
  border: 0;
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 800;
}

.btn-premium-muted {
  background: #f1f5f9;
  color: #334155;
}

.btn-premium-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  box-shadow: 0 12px 24px rgba(220, 38, 38, .24);
}

.btn-loading {
  opacity: .8;
  pointer-events: none;
}

    @media (max-width: 991px) {
      .portal-page { padding: 16px; align-items: flex-start; }
      .portal-shell { grid-template-columns: 1fr; }
      .feature-grid { grid-template-columns: 1fr; }
      .app-layout { grid-template-columns: 1fr; }
      .sidebar { display: none; position: fixed; inset: 0 auto 0 0; width: 292px; z-index: 99; }
      .sidebar.show { display: block; }
      .mobile-menu { display: inline-flex; }
      .stat-grid { grid-template-columns: 1fr 1fr; }
      .main-content { padding: 14px; }
    }

    @media (max-width: 576px) {
      .stat-grid { grid-template-columns: 1fr; }
      .topbar { align-items: flex-start; flex-direction: column; }
    }

    @media print {
      .sidebar, .topbar, .no-print, .mobile-menu { display: none !important; }
      .app-layout { display: block; }
      .main-content { padding: 0; }
      body { background: white; }
      .content-card { box-shadow: none; border: none; padding: 0; }
      .tab-page { display: none !important; }
      #pageRekap { display: block !important; }
    }

    /* ===== Final Print Mode Override ===== */
@page rekapPortrait {
  size: A4 portrait;
  margin: 6mm;
}

@page rekapLandscape {
  size: A4 landscape;
  margin: 7mm;
}

body.print-portrait .rekap-print-sheet {
  page: rekapPortrait;
}

body.print-landscape .rekap-print-sheet {
  page: rekapLandscape;
}

@media print {
  html,
  body {
    width: 100%;
    background: #ffffff !important;
    font-family: Inter, Arial, sans-serif !important;
    color: #0f172a !important;
  }

  .no-print,
  .sidebar,
  .topbar,
  .mobile-menu,
  .rekap-filter-card,
  .rekap-action-card {
    display: none !important;
  }

  .app-layout,
  .main-content,
  #pageRekap,
  #pageRekap .content-card {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  .tab-page {
    display: none !important;
  }

  #pageRekap {
    display: block !important;
  }

  .rekap-print-sheet {
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
  }

  body.print-portrait .rekap-print-sheet {
    max-width: none !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  body.print-landscape .rekap-print-sheet {
    max-width: none !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .rekap-kop,
  .rekap-title,
  .rekap-meta-grid,
  .rekap-summary-grid,
  .rekap-all-badges {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .rekap-section-card {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  .rekap-all-wrap {
    page-break-inside: auto;
    break-inside: auto;
  }

  .rekap-print-table th,
  .rekap-print-table td,
  .rekap-all-table th,
  .rekap-all-table td {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  table thead {
    display: table-header-group !important;
  }

  table tfoot {
    display: table-footer-group !important;
  }

  table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* ===== Cetak Rekap Per Kelas Full Page 1 Halaman ===== */
@media print {
  body.print-one-page .rekap-print-sheet {
  zoom: 1.02;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box;
  }

  body.print-one-page .rekap-title {
    padding: 8px 12px !important;
    margin-bottom: 8px !important;
    border-radius: 10px !important;
  }

  body.print-one-page .rekap-title h4 {
  font-size: 16px !important;
  margin-bottom: 3px !important;
}

  body.print-one-page .rekap-title .text-muted {
    font-size: 11px !important;
  }

  body.print-one-page .rekap-badge-row {
    margin: 6px 0 8px !important;
    gap: 5px !important;
  }

  body.print-one-page .rekap-badge {
    font-size: 8px !important;
    padding: 3px 6px !important;
  }

  body.print-one-page .rekap-section-card {
  margin-bottom: 4px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

  body.print-one-page .rekap-section-title {
    font-size: 11px !important;
    padding: 5px 8px !important;
  }

  body.print-one-page .rekap-section-title::before {
    width: 4px !important;
    height: 14px !important;
  }

  body.print-one-page .rekap-print-table,
  body.print-one-page .rekap-print-table th,
  body.print-one-page .rekap-print-table td {
    font-size: 11px !important;
  }

body.print-one-page .rekap-print-table th,
body.print-one-page .rekap-print-table td {
  padding: 2px 4px !important;
  line-height: 1.04 !important;
}

  body.print-one-page .ttd-area {
  margin-top: 24px !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

body.print-one-page .ttd-space {
  height: 36px !important;
}

  body.print-one-page .ttd-box,
  body.print-one-page .ttd-box div,
  body.print-one-page .ttd-box b {
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
}

/* Rekap keseluruhan portrait dinonaktifkan karena kembali memakai landscape */
/* ===== Rekap Keseluruhan Landscape Final ===== */
@media print {
  body.print-landscape .rekap-print-sheet {
    page: rekapLandscape;
    zoom: 1 !important;
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box;
  }

  body.print-landscape .rekap-title {
    padding: 8px 12px !important;
    margin: 0 0 8px !important;
    border-radius: 10px !important;
  }

  body.print-landscape .rekap-title h4 {
    font-size: 16px !important;
    margin-bottom: 3px !important;
  }

  body.print-landscape .rekap-title .text-muted {
    font-size: 11px !important;
  }

  body.print-landscape .rekap-badge-row {
    margin: 6px 0 10px !important;
    gap: 6px !important;
  }

  body.print-landscape .rekap-badge {
    font-size: 8px !important;
    padding: 3px 6px !important;
  }

  body.print-landscape .rekap-all-title {
    font-size: 11px !important;
    margin: 10px 0 5px !important;
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  body.print-landscape .rekap-all-wrap {
    width: 100% !important;
    overflow: visible !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    margin-bottom: 9px !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  body.print-landscape .rekap-all-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    font-size: 8.2px !important;
    page-break-inside: auto !important;
    break-inside: auto !important;
  }

  body.print-landscape .rekap-all-table th,
  body.print-landscape .rekap-all-table td {
    font-size: 8.2px !important;
    padding: 2px 3px !important;
    line-height: 1.05 !important;
    word-break: break-word !important;
    white-space: normal !important;
  }

  body.print-landscape .rekap-all-table.age-table,
  body.print-landscape .rekap-all-table.age-table th,
  body.print-landscape .rekap-all-table.age-table td {
    font-size: 6.8px !important;
    padding: 1.4px 2px !important;
    line-height: 1.02 !important;
  }

  body.print-landscape .rekap-all-table .no-col {
    width: 22px !important;
  }

  body.print-landscape .rekap-all-table .kelas-col {
    width: 64px !important;
    white-space: normal !important;
    text-align: left !important;
  }

  body.print-landscape .rekap-all-table thead {
    display: table-header-group !important;
  }

  body.print-landscape .rekap-all-table tfoot {
    display: table-footer-group !important;
  }

  body.print-landscape .rekap-all-table tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-landscape .ttd-area {
    margin-top: 10px !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  body.print-landscape .ttd-space {
    height: 36px !important;
  }

  body.print-landscape .ttd-box,
  body.print-landscape .ttd-box div,
  body.print-landscape .ttd-box b {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }
}

/* ===== Final Font Size Input Data Tables ===== */
#pageInput .input-modern-table thead th {
  font-size: 16px !important;
  font-weight: 900 !important;
}

#pageInput .input-modern-table tbody td {
  font-size: 13px !important;
  font-weight: 700 !important;
}

#pageInput .input-modern-table .input-number {
  font-size: 13px !important;
  font-weight: 900 !important;
}

#pageInput .input-modern-table tfoot th,
#pageInput .input-modern-table tfoot td {
  font-size: 13px !important;
  font-weight: 900 !important;
}

/* ===== Kelas Input Admin/Wali ===== */
#kelasWaliDisplay {
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

#inputKelasAdmin {
  height: 44px;
  border-radius: 14px;
  border: 1px solid #d9e4f2;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  background-color: #ffffff;
}

#inputKelasAdmin:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

/* ===== Tombol Edit Rekap ===== */
.btn-edit-rekap {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 14px 28px rgba(245, 158, 11, .24);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-edit-rekap:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

/* ===== Final Tanda Tangan ===== */
.ttd-box b {
  text-transform: none !important;
}

.ttd-box {
  font-size: 11px;
}

/* ===== Final Mobile Responsive App ===== */
.mobile-backdrop {
  display: none;
}

@media (max-width: 991px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  .portal-page {
    min-height: 100dvh;
    padding: 14px;
    align-items: flex-start;
    background:
      radial-gradient(circle at top left, rgba(37, 99, 235, .22), transparent 34%),
      linear-gradient(180deg, #0f172a 0%, #1e3a8a 34%, #eef3fb 34%, #eef3fb 100%);
  }

  .portal-shell {
    grid-template-columns: 1fr !important;
    gap: 16px;
    width: 100%;
  }

  .hero-card {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-title {
    font-size: 32px;
    letter-spacing: -.8px;
  }

  .hero-subtitle {
    font-size: 14px;
    line-height: 1.6;
  }

  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin-top: 18px;
  }

  .feature-box {
    padding: 14px;
    border-radius: 16px;
  }

  .login-card {
    padding: 22px;
    border-radius: 24px;
  }

  .app-layout {
    display: block !important;
    min-height: 100dvh;
    width: 100%;
  }

  .sidebar {
    display: block !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: min(82vw, 292px) !important;
    height: 100dvh !important;
    z-index: 10020 !important;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 24px 0 60px rgba(15, 23, 42, .32);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .mobile-backdrop {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(15, 23, 42, .54);
    backdrop-filter: blur(4px);
    z-index: 10010;
  }

  .mobile-backdrop.show {
    display: block;
  }

  .main-content {
    padding: 12px !important;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .topbar {
    position: sticky;
    top: 8px;
    z-index: 30;
    padding: 12px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    align-items: flex-start;
    gap: 12px;
  }

  .mobile-menu {
    display: inline-flex !important;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    flex: 0 0 auto;
  }

  .page-title h3 {
    font-size: 22px;
    line-height: 1.15;
  }

  .page-title p {
    font-size: 13px;
    line-height: 1.35;
  }

  .content-card,
  #pageInput .content-card,
  #pageMaster .content-card,
  #pageRekap .content-card {
    padding: 16px !important;
    border-radius: 22px !important;
    margin-bottom: 14px;
  }

  .card-title-line {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 14px;
  }

  #pageInput .card-title-line h5,
  #pageMaster .card-title-line h5,
  #pageRekap .card-title-line h5,
  .card-title-line h5 {
    font-size: 22px !important;
    line-height: 1.2;
  }

  #pageInput .card-title-line small,
  #pageMaster .card-title-line small,
  #pageRekap .card-title-line small,
  .card-title-line small {
    font-size: 13px !important;
    line-height: 1.45;
  }

  .dashboard-hero {
    grid-template-columns: 1fr !important;
    padding: 18px !important;
    border-radius: 24px !important;
    gap: 14px !important;
  }

  .dashboard-hero-content h2 {
    font-size: 26px !important;
    line-height: 1.15;
  }

  .dashboard-hero-content p {
    font-size: 13px !important;
  }

  .dashboard-meta {
    gap: 8px;
  }

  .mini-badge {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 8px 10px;
  }

  .dashboard-hero-side {
    padding: 16px !important;
  }

  .hero-ring {
    width: 128px !important;
    height: 128px !important;
    margin-bottom: 14px !important;
  }

  .hero-ring-value {
    font-size: 24px !important;
  }

  .hero-side-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .hero-side-item {
    padding: 12px 8px !important;
    border-radius: 16px !important;
  }

  .hero-side-item strong {
    font-size: 22px !important;
  }

  .hero-side-item span {
    font-size: 11px !important;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .kpi-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .kpi-title {
    font-size: 10.5px !important;
  }

  .kpi-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 12px !important;
  }

  .kpi-value {
    font-size: 26px !important;
  }

  .kpi-desc {
    font-size: 12px !important;
  }

  .dashboard-panels {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
  }

  .dashboard-panel {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .dashboard-panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .dashboard-panel-head h5 {
    font-size: 18px !important;
  }

  .gender-grid {
    grid-template-columns: 1fr !important;
  }

  .input-summary-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .input-summary-card {
    padding: 14px !important;
    border-radius: 18px !important;
  }

  .input-tabs,
  #masterTabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding-bottom: 8px;
    margin-left: -2px;
    margin-right: -2px;
    scrollbar-width: thin;
  }

  .input-tabs .nav-item,
  #masterTabs .nav-item {
    flex: 0 0 auto;
  }

  .input-tabs .nav-link,
  #masterTabs .nav-link {
    white-space: nowrap;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
  }

  .input-panel-card {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .input-panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .input-panel-header h5 {
    font-size: 17px !important;
  }

  .btn-draft-save,
  .btn-draft-load,
  .btn-draft-delete,
  .btn-main {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .input-action-bar {
    position: sticky;
    bottom: 8px;
    z-index: 20;
    padding: 14px !important;
    border-radius: 20px !important;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  }

  .input-action-bar .status-text {
    font-size: 12.5px;
    line-height: 1.45;
  }

  .input-action-bar .d-flex {
    width: 100%;
  }

  .input-modern-table {
    overflow-x: auto !important;
    border-radius: 18px;
    -webkit-overflow-scrolling: touch;
  }

  .input-modern-table table {
    min-width: 620px;
  }

  #pageInput .input-modern-table thead th {
    font-size: 13px !important;
    padding: 10px 8px !important;
  }

  #pageInput .input-modern-table tbody td,
  #pageInput .input-modern-table tfoot th,
  #pageInput .input-modern-table tfoot td {
    font-size: 12.5px !important;
    padding: 8px !important;
  }

  #pageInput .input-modern-table .input-number {
    width: 86px;
    max-width: 86px;
    height: 36px;
    font-size: 13px !important;
  }

  .rekap-filter-card {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  .rekap-filter-card .row > [class*="col-"] {
    width: 100%;
  }

  .rekap-action-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn-rekap-primary,
  .btn-rekap-print {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .rekap-empty-state {
    padding: 22px 14px !important;
    border-radius: 20px !important;
  }

  .rekap-print-sheet {
    padding: 14px !important;
    border-radius: 20px !important;
    overflow-x: auto;
  }

  .rekap-meta-grid,
  .rekap-summary-grid {
    grid-template-columns: 1fr !important;
  }

  .rekap-all-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .rekap-all-table {
    min-width: 960px;
  }

  .rekap-print-table {
    min-width: 620px;
  }

  #pageMaster .table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #pageMaster table {
    min-width: 760px;
  }

  #tabelMasterTahunPelajaranTable {
    min-width: 900px;
  }

  #pageMaster .btn-warning,
  #pageMaster .btn-danger,
  #pageMaster .btn-success,
  #pageMaster .btn-secondary {
    min-width: 38px;
    height: 38px;
  }

  .review-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px;
  }

  .review-header,
  .review-body,
  .review-footer {
    padding: 16px;
  }

  .review-meta {
    grid-template-columns: 1fr !important;
  }

  .review-footer {
    flex-direction: column-reverse;
  }

  .btn-review-back,
  .btn-review-save {
    width: 100%;
  }

  .toast-container-premium {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .confirm-card-premium {
    border-radius: 22px;
    padding: 22px;
  }

  .confirm-actions-premium {
    flex-direction: column-reverse;
  }

  .btn-premium-muted,
  .btn-premium-danger {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 10px !important;
  }

  .topbar {
    border-radius: 18px;
    padding: 10px 12px;
  }

  .topbar > .d-flex:first-child {
    width: 100%;
  }

  .page-title h3 {
    font-size: 20px;
  }

  .page-title p {
    font-size: 12px;
  }

  .dashboard-kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .hero-side-summary {
    grid-template-columns: 1fr !important;
  }

  .kpi-card,
  .dashboard-panel,
  .content-card,
  #pageInput .content-card,
  #pageMaster .content-card,
  #pageRekap .content-card {
    border-radius: 18px !important;
  }

  .portal-page {
    padding: 10px;
  }

  .hero-card {
    padding: 20px;
  }

  .hero-title {
    font-size: 28px;
  }

  .login-card {
    padding: 18px;
  }

  .brand-mini {
    align-items: flex-start;
  }

  .logo-circle {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .sidebar {
    width: min(86vw, 292px) !important;
  }

  .input-modern-table table {
    min-width: 560px;
  }

  .rekap-print-table {
    min-width: 560px;
  }

  .rekap-all-table {
    min-width: 900px;
  }
}

/* ===== Tombol Lihat Keseluruhan Dashboard ===== */
.btn-dashboard-overall {
  border: 1px solid rgba(255,255,255,.20);
  background: rgba(255,255,255,.14);
  color: #ffffff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .16);
  transition: all .2s ease;
}

.btn-dashboard-overall:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.20);
}

.btn-dashboard-overall.active {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #ffffff;
}

@media (max-width: 991px) {
  .btn-dashboard-overall {
    width: 100%;
    justify-content: center;
    font-size: 12px;
    padding: 9px 10px;
  }
}

/* ===== Premium Riwayat Pengisian ===== */
#pageRiwayat .content-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

#pageRiwayat .card-title-line h5 {
  font-size: 28px;
  font-weight: 850;
  color: #0f172a;
  letter-spacing: -.4px;
}

#pageRiwayat .card-title-line small {
  color: #64748b;
  font-size: 15px;
}

.riwayat-filter-card {
  background: #ffffff;
  border: 1px solid #dbe7f5;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
  margin-bottom: 18px;
}

.riwayat-filter-card .form-label {
  font-weight: 800;
  color: #0f172a;
  font-size: 13px;
}

.riwayat-filter-card .form-control,
.riwayat-filter-card .form-select {
  height: 46px;
  border-radius: 16px;
  border: 1px solid #d9e4f2;
}

.riwayat-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.riwayat-summary-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid #dbe7f5;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .06);
}

.riwayat-summary-card .label {
  font-size: 12px;
  font-weight: 850;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 8px;
}

.riwayat-summary-card .value {
  font-size: 30px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.riwayat-table-wrap {
  border: 1px solid #dbe7f5;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .05);
}

.riwayat-table {
  margin-bottom: 0;
}

.riwayat-table thead th {
  background: linear-gradient(180deg, #89a4cf 0%, #7f9bc8 100%) !important;
  color: #0f172a;
  font-weight: 900;
  font-size: 13px;
  border-color: #6e89b1;
  padding: 13px 10px;
  vertical-align: middle;
}

.riwayat-table tbody td {
  font-size: 13px;
  border-color: #e5edf7;
  padding: 11px 10px;
  vertical-align: middle;
}

.riwayat-table tbody tr:nth-child(even) td {
  background: #f8fbff;
}

.riwayat-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 850;
  background: #dcfce7;
  color: #166534;
}

.btn-riwayat-refresh,
.btn-riwayat-primary,
.btn-riwayat-view,
.btn-riwayat-edit,
.btn-riwayat-print {
  border: 0;
  border-radius: 14px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: all .2s ease;
}

.btn-riwayat-refresh,
.btn-riwayat-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  padding: 11px 16px;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .20);
}

.btn-riwayat-view {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  width: 36px;
  height: 36px;
}

.btn-riwayat-edit {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  width: 36px;
  height: 36px;
}

.btn-riwayat-print {
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #059669);
  width: 36px;
  height: 36px;
}

.btn-riwayat-refresh:hover,
.btn-riwayat-primary:hover,
.btn-riwayat-view:hover,
.btn-riwayat-edit:hover,
.btn-riwayat-print:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

@media (max-width: 991px) {
  .riwayat-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .riwayat-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .riwayat-table {
    min-width: 1040px;
  }

  .btn-riwayat-refresh,
  .btn-riwayat-primary {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .riwayat-summary-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Pagination Riwayat Pengisian ===== */
.riwayat-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.riwayat-page-info {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.riwayat-page-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-riwayat-page {
  border: 1px solid #dbe7f5;
  background: #ffffff;
  color: #2563eb;
  border-radius: 12px;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-riwayat-page:hover {
  background: #eff6ff;
}

.btn-riwayat-page.active {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border-color: transparent;
}

.btn-riwayat-page:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 576px) {
  .riwayat-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .riwayat-page-buttons {
    justify-content: center;
  }

  .riwayat-page-info {
    text-align: center;
  }
}

/* ===== Info Otomatis Riwayat ===== */
.riwayat-auto-info {
  width: 100%;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .10);
}

.riwayat-auto-info i {
  font-size: 16px;
}

@media (max-width: 991px) {
  .riwayat-auto-info {
    width: 100%;
  }
}