/* ==========================================================================
   Laboratorium Informatika Digital — SMP Negeri 4 Sungai Pinyuh
   Desain Responsif Modern, Ceria, Ramah Peserta Didik SMP
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-soft: #eef2ff;
  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --success: #10b981;
  --success-soft: #d1fae5;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --bg-canvas: #f3f6fc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 18px 40px rgba(79, 70, 229, 0.14);
  --sidebar-width: 276px;
  --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: 'Cascadia Code', Consolas, 'Courier New', monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--bg-canvas);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5rem;
  color: var(--text-main);
  line-height: 1.3;
  font-weight: 700;
}

p {
  margin: 0 0 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

code,
.mono {
  font-family: var(--font-mono);
}

.hidden {
  display: none !important;
}

.mt-1 { margin-top: 0.35rem; }
.mt-2 { margin-top: 0.75rem; }
.mt-3 { margin-top: 1.15rem; }
.mt-4 { margin-top: 1.6rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.35rem; }
.mb-2 { margin-bottom: 0.75rem; }
.mb-3 { margin-bottom: 1.15rem; }
.mb-4 { margin-bottom: 1.6rem; }
.ml-2 { margin-left: 0.5rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.78rem; }
.text-muted { color: var(--text-muted); }
.text-success { color: #047857; }
.text-warning { color: #b45309; }
.req { color: var(--danger); }

.icon-svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ==========================================================================
   Shell Layout (Sidebar + Main Column)
   ========================================================================== */

.layout-frame {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
}

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 60%, #1e293b 100%);
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  padding: 1.15rem 0.9rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 40;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.35rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #1e1b4b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.brand-logo .icon-svg {
  width: 24px;
  height: 24px;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  color: #ffffff;
}

.brand-school {
  font-size: 0.75rem;
  color: #c7d2fe;
}

.sidebar-close-mobile {
  display: none;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #ffffff;
  border-radius: 8px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-student-chip {
  margin-top: 0.85rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-student-chip.is-guest .chip-avatar {
  background: rgba(255, 255, 255, 0.18);
}

.chip-meta {
  min-width: 0;
}

.chip-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-sub {
  font-size: 0.74rem;
  color: #cbd5e1;
}

.sidebar-progress {
  margin-top: 0.85rem;
  padding: 0.55rem 0.4rem;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #e0e7ff;
  margin-bottom: 0.35rem;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  overflow: hidden;
}

.main-content .progress-track {
  background: #e2e8f0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.65rem;
  flex: 1;
}

.nav-divider {
  margin: 0.7rem 0.5rem 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  font-weight: 700;
}

.nav-item {
  width: 100%;
  min-height: 44px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.58rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, transform 0.15s ease, color 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateX(2px);
}

.nav-item.is-active {
  background: linear-gradient(90deg, #4f46e5, #0d9488);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}

.nav-label {
  flex: 1;
  min-width: 0;
}

.nav-done-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-done-badge .icon-svg {
  width: 13px;
  height: 13px;
}

.sidebar-footer {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  color: #cbd5e1;
  text-align: center;
}

.main-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-header {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

.main-content {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1.75rem 2.5rem;
  flex: 1;
  animation: fadeSlideIn 0.22s ease;
}

.app-footer {
  padding: 1rem 1.75rem;
  border-top: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Cards, Headers & Grids
   ========================================================================== */

.page-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.page-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.2rem;
}

.page-title {
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.45rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.9rem;
}

.card-header h2 {
  font-size: 1.15rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.card-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid-2 > *,
.grid-3 > * {
  min-width: 0;
}

.align-center { align-items: center; }
.align-start { align-items: start; }

/* ==========================================================================
   Hero Beranda & Deep Learning Pills
   ========================================================================== */

.hero-card {
  background: linear-gradient(135deg, #4338ca 0%, #3b82f6 52%, #0d9488 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 1.8rem 1.85rem;
  box-shadow: var(--shadow-lg);
}

.hero-top {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  flex-wrap: wrap;
}

.school-emblem {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fde68a;
  flex-shrink: 0;
}

.school-emblem .icon-svg {
  width: 38px;
  height: 38px;
}

.hero-school {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fde68a;
  letter-spacing: 0.03em;
}

.hero-title {
  color: #ffffff;
  font-size: 1.95rem;
  font-weight: 800;
  margin: 0.15rem 0 0.55rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.tag-light {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.tag-accent {
  background: #fef3c7;
  color: #92400e;
}

.hero-welcome {
  margin-top: 1.1rem;
  font-size: 1.02rem;
  color: #f1f5f9;
  max-width: 78ch;
}

.hero-actions {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dl-pill-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
}

.dl-pill-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.dl-pill-card p {
  font-size: 0.86rem;
}

.dl-indigo { background: #eef2ff; border-color: #c7d2fe; color: #312e81; }
.dl-teal { background: #ccfbf1; border-color: #99f6e4; color: #134e4a; }
.dl-amber { background: #fef3c7; border-color: #fde68a; color: #78350f; }

/* ==========================================================================
   Buttons, Badges, Pills & Callouts
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.58rem 1.1rem;
  border-radius: 11px;
  border: 1.5px solid transparent;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-sm {
  min-height: 36px;
  padding: 0.38rem 0.8rem;
  font-size: 0.84rem;
  border-radius: 9px;
}

.btn-lg {
  min-height: 48px;
  padding: 0.72rem 1.35rem;
  font-size: 0.98rem;
}

.btn-primary { background: var(--primary); color: #ffffff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }

.btn-secondary { background: #e2e8f0; color: #1e293b; }
.btn-secondary:hover:not(:disabled) { background: #cbd5e1; }

.btn-teal { background: var(--teal); color: #ffffff; }
.btn-teal:hover:not(:disabled) { background: #0f766e; }

.btn-amber { background: var(--amber); color: #1e293b; }
.btn-amber:hover:not(:disabled) { background: #d97706; color: #ffffff; }

.btn-success { background: var(--success); color: #ffffff; }
.btn-success:hover:not(:disabled) { background: #059669; }

.btn-danger { background: var(--danger); color: #ffffff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }

.btn-outline { background: #ffffff; color: var(--primary); border-color: #c7d2fe; }
.btn-outline:hover:not(:disabled) { background: var(--primary-soft); }

.btn-glass {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-glass:hover:not(:disabled) { background: rgba(255, 255, 255, 0.28); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill .icon-svg { width: 14px; height: 14px; }
.pill-success { background: var(--success-soft); color: #065f46; }
.pill-warning { background: var(--amber-soft); color: #92400e; }
.pill-danger { background: var(--danger-soft); color: #991b1b; }
.pill-indigo { background: var(--primary-soft); color: var(--primary-dark); }
.pill-teal { background: var(--teal-soft); color: #115e59; }
.pill-amber { background: var(--amber-soft); color: #92400e; }
.pill-muted { background: #f1f5f9; color: #475569; }

.callout {
  padding: 0.95rem 1.1rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  font-size: 0.92rem;
}

.callout-indigo { background: #eef2ff; border-color: #4f46e5; color: #312e81; }
.callout-teal { background: #ecfeff; border-color: #0d9488; color: #134e4a; }
.callout-amber { background: #fffbeb; border-color: #f59e0b; color: #78350f; }

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ==========================================================================
   Student Identity Banner & Forms
   ========================================================================== */

.identity-banner {
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
  border: 1.5px solid;
}

.identity-banner-empty {
  background: #fffbeb;
  border-color: #fcd34d;
}

.identity-banner-active {
  background: #ffffff;
  border-color: #c7d2fe;
  box-shadow: var(--shadow-sm);
}

.identity-banner-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.identity-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f46e5, #0d9488);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.identity-avatar.empty {
  background: #f59e0b;
}

.identity-title {
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.identity-sub {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.identity-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-main);
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea.form-control {
  min-height: 82px;
  resize: vertical;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.16);
}

.form-control.input-correct {
  border-color: var(--success);
  background: #f0fdf4;
}

.form-control.input-wrong {
  border-color: var(--danger);
  background: #fef2f2;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 0.85rem;
}

.form-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.form-error {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--danger-soft);
  color: #991b1b;
  font-size: 0.88rem;
  font-weight: 600;
}

/* ==========================================================================
   Activity Grid, Lists & Tables
   ========================================================================== */

.activity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.activity-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  background: #ffffff;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #a5b4fc;
}

.activity-card.is-done {
  border-color: #a7f3d0;
  background: #f7fefb;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.activity-num {
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 0.18rem 0.5rem;
  border-radius: 7px;
}

.activity-card h3 {
  font-size: 1.02rem;
  margin: 0;
}

.activity-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  flex: 1;
}

.check-list,
.step-guide-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.check-list li::marker {
  color: var(--teal);
  font-weight: 800;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: #ffffff;
}

.data-table th {
  background: #f1f5f9;
  color: var(--text-main);
  font-weight: 700;
  text-align: left;
  padding: 0.72rem 0.8rem;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 0.68rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr.row-active {
  background: #eef2ff;
}

.data-table th.text-center,
.data-table td.text-center {
  text-align: center;
}

/* ==========================================================================
   Materi Page Components
   ========================================================================== */

.quick-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.anchor-pill {
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.anchor-pill:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.badge-step {
  background: var(--primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: 8px;
}

.mini-feature-card {
  display: flex;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border);
}

.mini-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal);
  color: #ffffff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mini-feature-card h4 {
  font-size: 0.96rem;
  margin-bottom: 0.25rem;
}

.mini-feature-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.symbols-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.symbol-card {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f8fafc;
}

.symbol-preview {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
}

.symbol-svg {
  width: 118px;
  height: auto;
}

.symbol-info h4 {
  font-size: 0.96rem;
  margin-bottom: 0.2rem;
}

.symbol-shape {
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.symbol-info p {
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
}

.symbol-example {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.var-card {
  border-radius: var(--radius-md);
  padding: 1rem;
  border: 1px solid #c7d2fe;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.var-symbol {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--primary);
}

.var-role {
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.25rem;
}

.var-type {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.var-card p {
  font-size: 0.85rem;
}

.ipo-diagram {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
}

.ipo-box {
  flex: 1;
  border-radius: var(--radius-md);
  padding: 0.95rem;
  border: 1.5px solid;
}

.ipo-tag {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

.ipo-in { background: #ecfeff; border-color: #06b6d4; }
.ipo-in .ipo-tag { color: #0e7490; }

.ipo-proc { background: #eef2ff; border-color: #6366f1; }
.ipo-proc .ipo-tag { color: #3730a3; }

.ipo-out { background: #ecfdf5; border-color: #10b981; }
.ipo-out .ipo-tag { color: #065f46; }

.ipo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.formula-banner {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(90deg, #4f46e5, #0d9488);
  padding: 0.6rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 0.85rem;
}

.illustration-box,
.flowchart-preview-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.examples-stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.example-box {
  min-width: 0;
}

.example-box h4 {
  font-size: 0.98rem;
  color: var(--primary-dark);
}

.qc-item {
  padding: 0.95rem;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border);
  margin-bottom: 0.9rem;
}

.qc-item:last-child {
  margin-bottom: 0;
}

.qc-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.qc-opt-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
}

.qc-opt-btn.is-correct { border-color: var(--success); background: #ecfdf5; color: #065f46; font-weight: 700; }
.qc-opt-btn.is-wrong { border-color: var(--danger); background: #fef2f2; color: #991b1b; }

.summary-card {
  border-color: #a5b4fc;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
}

/* ==========================================================================
   Simulasi Flowchart Page
   ========================================================================== */

.sim-inputs-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.15rem;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.chip-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text-main);
  border-radius: 999px;
  padding: 0.28rem 0.72rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

.pi-toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.pi-btn {
  min-height: 44px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.pi-btn.is-selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.sim-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.sim-workspace {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 1.15rem;
  align-items: start;
}

.flowchart-stage {
  display: flex;
  justify-content: center;
  background: #f8fafc;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 0.75rem;
}

.flowchart-main-svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

.fc-node {
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fc-node-upcoming {
  opacity: 0.72;
}

.sim-details-col {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

.step-explainer-card.is-running {
  border-color: #818cf8;
  background: linear-gradient(180deg, #ffffff 0%, #eef2ff 100%);
}

.step-desc {
  font-size: 0.98rem;
  color: var(--text-main);
}

.circle-result-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.circle-preview-svg {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.calc-summary-box {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.calc-row-total {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  font-size: 1rem;
}

/* ==========================================================================
   LKPD, Kuis & Evaluasi Components
   ========================================================================== */

.table-input {
  width: 100%;
  min-width: 90px;
  min-height: 38px;
  padding: 0.35rem 0.5rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.table-input.input-correct { border-color: var(--success); background: #ecfdf5; }
.table-input.input-wrong { border-color: var(--danger); background: #fef2f2; }

.fixed-cell {
  background: #f8fafc;
  color: var(--text-muted);
}

.cell-feedback {
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.cell-feedback.ok { color: #059669; }
.cell-feedback.bad { color: #dc2626; }

.question-block {
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f8fafc;
  margin-bottom: 0.9rem;
}

.question-block:last-child {
  margin-bottom: 0;
}

.question-text {
  font-size: 0.96rem;
  color: var(--text-main);
  margin-bottom: 0.65rem;
  display: block;
}

.options-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.radio-option:hover {
  border-color: var(--primary);
  background: #f8faff;
}

.radio-option input[type="radio"] {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-option.is-correct {
  border-color: var(--success);
  background: #ecfdf5;
}

.radio-option.is-wrong {
  border-color: var(--danger);
  background: #fef2f2;
}

.opt-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feedback-box {
  margin-top: 0.65rem;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  font-size: 0.88rem;
  border: 1px solid;
}

.feedback-success { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.feedback-danger { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

.feedback-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

.rubric-details {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.rubric-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
}

.sticky-action-bar {
  position: sticky;
  bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid #c7d2fe;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  z-index: 20;
}

/* Score Stat Cards */
.score-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.score-stat-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.stat-box-highlight {
  background: linear-gradient(135deg, #eef2ff 0%, #ecfeff 100%);
  border-color: #818cf8;
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.2rem 0;
}

.stat-max {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Quiz Specific */
.quiz-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.q-nav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.q-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
}

.q-nav-btn.is-current { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.25); }
.q-nav-btn.is-correct { background: var(--success); border-color: var(--success); color: #ffffff; }
.q-nav-btn.is-wrong { background: var(--danger); border-color: var(--danger); color: #ffffff; }

.quiz-q-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-question-title {
  font-size: 1.12rem;
  margin-bottom: 1rem;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quiz-option-btn {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.quiz-option-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: #f5f7ff;
}

.quiz-option-btn.is-correct { border-color: var(--success); background: #ecfdf5; font-weight: 700; }
.quiz-option-btn.is-wrong { border-color: var(--danger); background: #fef2f2; }

.quiz-nav-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.quiz-footer-right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.diff-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.84rem;
  margin-top: 0.25rem;
}

.review-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.review-item {
  padding: 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid;
}

.review-ok { background: #f0fdf4; border-color: #bbf7d0; }
.review-bad { background: #fef2f2; border-color: #fecaca; }

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* ==========================================================================
   Certificate Page
   ========================================================================== */

.cert-req-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cert-req-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid;
}

.cert-req-item.is-passed { background: #f0fdf4; border-color: #a7f3d0; }
.cert-req-item.is-pending { background: #fffbeb; border-color: #fde68a; }

.cert-req-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cert-req-item.is-passed .cert-req-icon { color: var(--success); }
.cert-req-item.is-pending .cert-req-icon { color: var(--amber-dark); }

.cert-req-label { font-weight: 700; color: var(--text-main); }
.cert-req-detail { font-size: 0.84rem; color: var(--text-muted); }

.cert-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cert-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.certificate-sheet-wrap {
  width: 100%;
  overflow-x: auto;
}

.certificate-sheet {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow-lg);
  min-width: 680px;
}

.cert-border-outer {
  border: 6px solid #1e1b4b;
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #fffdf7 0%, #ffffff 55%, #f5f8ff 100%);
}

.cert-border-inner {
  border: 2.5px solid #d97706;
  padding: 2rem 2.4rem;
  text-align: center;
  border-radius: 6px;
}

.cert-emblem {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #312e81, #4f46e5);
  color: #fde68a;
  margin: 0 auto 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cert-emblem .icon-svg { width: 32px; height: 32px; }
.cert-school-title { font-weight: 800; letter-spacing: 0.08em; color: #1e1b4b; font-size: 0.95rem; }
.cert-app-sub { font-size: 0.85rem; color: #475569; margin-bottom: 0.85rem; }
.cert-main-heading { font-size: 2rem; font-weight: 900; letter-spacing: 0.06em; color: #312e81; margin-bottom: 0.25rem; }
.cert-number { font-family: var(--font-mono); font-size: 0.82rem; color: #64748b; margin-bottom: 1.1rem; }
.cert-given-to { font-size: 0.95rem; color: #475569; margin-bottom: 0.25rem; }
.cert-recipient-name {
  font-size: 1.95rem;
  font-weight: 800;
  color: #0f172a;
  border-bottom: 2px solid #f59e0b;
  display: inline-block;
  padding: 0 1.4rem 0.25rem;
  margin-bottom: 0.4rem;
}
.cert-recipient-meta { font-size: 0.92rem; font-weight: 600; color: #334155; margin-bottom: 1rem; }
.cert-body-text { max-width: 60ch; margin: 0 auto 0.55rem; font-size: 0.95rem; }
.cert-topic-box {
  display: inline-block;
  background: #eef2ff;
  border: 1.5px solid #c7d2fe;
  color: #312e81;
  font-weight: 800;
  padding: 0.45rem 1.15rem;
  border-radius: 10px;
  margin-bottom: 1.2rem;
}

.cert-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  max-width: 580px;
  margin: 0 auto 1.4rem;
}

.cert-metric {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 0.55rem;
}
.cert-metric span { display: block; font-size: 0.76rem; color: #64748b; }
.cert-metric strong { font-size: 1.05rem; color: #1e1b4b; }

.cert-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 0.65rem;
}

.cert-sign-col { text-align: left; }
.cert-date, .cert-role { font-size: 0.86rem; color: #334155; }
.cert-sign-line { width: 200px; border-bottom: 1.5px solid #334155; margin: 2.3rem 0 0.3rem; }
.cert-sign-caption { font-size: 0.82rem; font-weight: 700; color: #1e1b4b; }

.cert-seal-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.seal-ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3px double #d97706;
  background: #fef3c7;
  color: #b45309;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seal-ring .icon-svg { width: 28px; height: 28px; }
.cert-seal-badge span { font-size: 0.68rem; font-weight: 800; color: #92400e; letter-spacing: 0.05em; }

/* ==========================================================================
   Teacher Dashboard
   ========================================================================== */

.teacher-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.teacher-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  flex: 1;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 210px;
}

.search-wrap .icon-svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-wrap .form-control {
  padding-left: 2.35rem;
}

#guru-filter-class {
  width: auto;
  min-width: 150px;
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.table-actions {
  display: inline-flex;
  gap: 0.4rem;
}

.detail-summary-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  margin-bottom: 0.9rem;
}

.detail-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.mini-metric {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem;
  text-align: center;
}

.mini-metric span { display: block; font-size: 0.75rem; color: var(--text-muted); }
.mini-metric strong { font-size: 0.9rem; color: var(--text-main); }

.detail-section {
  margin-top: 1rem;
}

.detail-section h4 {
  font-size: 0.95rem;
  margin-bottom: 0.45rem;
}

.qa-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  font-size: 0.88rem;
}

.student-answer-pre {
  white-space: pre-wrap;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin-top: 0.25rem;
}

.teacher-grade-form {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 0.95rem;
}

.switcher-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-height: 300px;
  overflow-y: auto;
}

.switcher-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.switcher-item.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
}

/* ==========================================================================
   Modals & Toasts
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  animation: fadeSlideIn 0.16s ease;
}

.modal-card {
  width: 100%;
  max-width: 490px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-card-lg {
  max-width: 780px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.modal-header-success { background: #ecfdf5; color: #065f46; }
.modal-header-warning { background: #fffbeb; color: #92400e; }
.modal-header-danger { background: #fef2f2; color: #991b1b; }
.modal-header-info { background: #eef2ff; color: #312e81; }

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.modal-title {
  font-size: 1.06rem;
  margin: 0;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 1.15rem 1.25rem;
  overflow-y: auto;
}

.modal-footer {
  padding: 0.85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  background: #f8fafc;
}

.toast-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 120;
  max-width: calc(100vw - 2rem);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.78rem 1rem;
  border-radius: 12px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-warning { background: #d97706; }
.toast-info { background: #4f46e5; }
.toast-hide { opacity: 0; transform: translateY(8px); }

/* ==========================================================================
   Responsive Rules (Tablet & Mobile HP — Tanpa Horizontal Scroll)
   ========================================================================== */

@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform 0.24s ease;
    box-shadow: 12px 0 30px rgba(15, 23, 42, 0.3);
  }

  .layout-frame.sidebar-mobile-open .sidebar {
    transform: translateX(0);
  }

  .layout-frame.sidebar-mobile-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 35;
  }

  .sidebar-close-mobile {
    display: inline-flex;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
    background: #1e1b4b;
    color: #ffffff;
    padding: 0.7rem 1rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
  }

  .mobile-menu-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
  }

  .mobile-header-title {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  .mobile-app-name {
    font-size: 0.74rem;
    color: #fde68a;
    font-weight: 700;
  }

  .mobile-page-name {
    font-size: 0.98rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sim-workspace {
    grid-template-columns: 1fr;
  }

  .activity-grid,
  .dl-grid,
  .score-stat-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .main-content {
    padding: 1rem 0.9rem 2rem;
  }

  .card {
    padding: 1rem;
  }

  .hero-card {
    padding: 1.25rem 1.1rem;
  }

  .hero-title {
    font-size: 1.45rem;
  }

  .page-title {
    font-size: 1.32rem;
  }

  .grid-2,
  .grid-3,
  .dl-grid,
  .activity-grid,
  .symbols-grid,
  .sim-inputs-grid,
  .qc-options,
  .score-stat-grid,
  .score-stat-grid-4,
  .circle-result-grid,
  .form-row-2,
  .form-row-3,
  .detail-metrics-grid {
    grid-template-columns: 1fr;
  }

  .ipo-diagram {
    flex-direction: column;
  }

  .ipo-arrow {
    transform: rotate(90deg);
  }

  .symbol-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .certificate-sheet {
    min-width: 0;
  }

  .cert-border-inner {
    padding: 1.25rem 0.95rem;
  }

  .cert-main-heading {
    font-size: 1.35rem;
  }

  .cert-recipient-name {
    font-size: 1.35rem;
  }

  .cert-metrics-row {
    grid-template-columns: 1fr;
  }

  .cert-footer-row {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .cert-sign-col {
    text-align: center;
  }

  .cert-sign-line {
    margin-left: auto;
    margin-right: auto;
  }
}
