:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --primary-soft: #eff6ff;
  --teal: #0d9488;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --success: #059669;
  --success-soft: #ecfdf5;
  --info: #0284c7;
  --info-soft: #f0f9ff;
  --radius: 14px;
  --shadow: 0 6px 22px rgba(15, 23, 42, 0.06);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Top Navigation */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.03);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 1.05rem;
}

.brand-text small {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.45rem 0.75rem;
  border-radius: 9px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

.nav-divider {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 0.25rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Admin Pill & Notification Bell */
.admin-pill {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.45rem 0.3rem 0.65rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.admin-role-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.admin-name-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.admin-name-wrap strong {
  font-size: 0.82rem;
}

.admin-name-wrap small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.notif-wrapper {
  position: relative;
}

.notif-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notif-btn:hover {
  background: var(--surface-alt);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

.notif-badge.visible {
  display: inline-flex;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 360px;
  max-width: calc(100vw - 2rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
  z-index: 80;
  overflow: hidden;
}

.notif-dropdown-head {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.notif-dropdown-head small {
  display: block;
  font-size: 0.75rem;
}

.notif-list {
  max-height: 340px;
  overflow-y: auto;
}

.notif-item {
  display: block;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  transition: background 0.15s;
}

.notif-item:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.notif-item.unread {
  background: #eff6ff;
}

.notif-item-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.notif-item strong {
  display: block;
  font-size: 0.86rem;
}

.notif-item p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.notif-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.notif-dropdown-foot {
  padding: 0.7rem 1rem;
  background: var(--surface-alt);
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Main Layout */
.main-content {
  flex: 1;
  padding: 1.5rem 0 2.5rem;
}

/* Hero Banner */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%);
  color: #fff;
  border-radius: 18px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-pill {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero-banner h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 3vw, 2.05rem);
  line-height: 1.25;
}

.hero-banner p {
  margin: 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.92);
}

.hero-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.hero-badge-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.hero-badge-item strong {
  display: block;
  font-size: 0.92rem;
}

.hero-badge-item span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.86);
}

/* Cards & Sections */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}

.card-header {
  margin-bottom: 1.1rem;
}

.card-header h2,
.card-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.card-header p {
  margin: 0;
}

.card-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.card-header-row h2 {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
}

.card-header-row p {
  margin: 0;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.9fr);
  gap: 1.25rem;
  align-items: start;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.95fr);
  gap: 1.25rem;
  align-items: start;
}

.sticky-card {
  position: sticky;
  top: 86px;
}

.narrow-section {
  max-width: 780px;
  margin: 0 auto;
}

.auth-section {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0;
}

.auth-card {
  width: 100%;
  max-width: 470px;
}

.auth-header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.auth-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.auth-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.demo-credentials {
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--surface-alt);
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 0.85rem;
}

.demo-title {
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.demo-grid {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.45rem;
}

/* Forms */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
}

.req {
  color: var(--danger);
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="date"],
input[type="file"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

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

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.choice-card {
  display: flex;
  cursor: pointer;
}

.choice-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-card-inner {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--surface-alt);
  transition: border-color 0.15s, background 0.15s;
}

.choice-card-inner strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.choice-card-inner small {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.35;
  display: block;
}

.choice-card input:checked + .choice-card-inner {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.choice-card input:focus-visible + .choice-card-inner {
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.25);
}

.student-picker-box {
  display: none;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
}

.student-picker-box.open {
  display: block;
}

.search-input {
  margin-bottom: 0.45rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.62rem 1.05rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-lg {
  padding: 0.82rem 1.4rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.42rem 0.8rem;
  font-size: 0.84rem;
}

.btn-xs {
  padding: 0.28rem 0.58rem;
  font-size: 0.78rem;
  border-radius: 7px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary-outline {
  background: #fff;
  border-color: var(--primary);
  color: var(--primary);
}

.btn-primary-outline:hover {
  background: var(--primary-soft);
}

.btn-neutral {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: var(--text);
}

.btn-neutral:hover {
  background: #e2e8f0;
}

.btn-outline-danger {
  background: #fff;
  border-color: #fca5a5;
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger-soft);
}

.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.btn-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.inline-form {
  display: inline;
}

/* Alerts */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid transparent;
}

.alert-success {
  background: var(--success-soft);
  border-color: #a7f3d0;
  color: #065f46;
}

.alert-error {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: #991b1b;
}

.alert-warning {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: #92400e;
}

.alert-info {
  background: var(--info-soft);
  border-color: #bae6fd;
  color: #075985;
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.error-list {
  margin: 0.35rem 0 0;
  padding-left: 1.2rem;
}

/* Ticket Success Card */
.ticket-success-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  border-color: #6ee7b7;
  background: #f0fdf4;
}

.ticket-success-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ticket-success-body h2 {
  margin: 0 0 0.35rem;
  color: #065f46;
}

.ticket-code-box {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;
  border: 2px dashed #10b981;
  border-radius: 12px;
  padding: 0.55rem 0.9rem;
  margin: 0.65rem 0 1rem;
}

.ticket-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

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

/* Sidebar & Steps */
.side-card h3 {
  margin: 0 0 0.85rem;
  font-size: 1.05rem;
}

.side-accent {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.step-list li strong {
  display: block;
  font-size: 0.92rem;
}

.step-list li span {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* Page Head & KPIs */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.page-head h1 {
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
}

.page-head p {
  margin: 0;
}

.page-head-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.back-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.kpi-card small {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
}

.kpi-card strong {
  font-size: 1.75rem;
  line-height: 1.15;
}

.kpi-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Notification Cards in Dashboard */
.notif-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.85rem;
}

.notif-alert-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--text);
  transition: transform 0.12s, box-shadow 0.12s;
}

.notif-alert-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(29, 78, 216, 0.1);
  text-decoration: none;
}

.notif-alert-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.notif-alert-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.notif-open-cta {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.2rem;
}

/* Filter Bar & Tables */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.filter-bar input,
.filter-bar select {
  flex: 1 1 160px;
  width: auto;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.data-table th,
.data-table td {
  padding: 0.78rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tr.row-unread {
  background: #f0f7ff;
}

.code-cell {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot-new {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
}

.summary-cell {
  max-width: 300px;
}

.action-group {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-lg {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.badge-danger {
  background: var(--danger-soft);
  color: #b91c1c;
}

.badge-orange {
  background: #fff7ed;
  color: #c2410c;
}

.badge-warning {
  background: var(--warning-soft);
  color: #b45309;
}

.badge-info {
  background: var(--info-soft);
  color: #0369a1;
}

.badge-success {
  background: var(--success-soft);
  color: #047857;
}

.badge-neutral {
  background: #f1f5f9;
  color: #475569;
}

/* Detail & Timeline */
.search-ticket-form {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.ticket-input {
  flex: 1 1 240px;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
}

.status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.status-head h2 {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.85rem;
}

.meta-grid small {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 1.2rem 0;
}

.report-content-box h3,
.attachment-box h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.report-content-box p {
  margin: 0;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 10px;
}

.attachment-preview {
  margin: 0.75rem 0;
}

.attachment-preview img {
  max-width: 100%;
  max-height: 380px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.timeline {
  position: relative;
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -1.4rem;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #dbeafe;
}

.timeline-content {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.timeline-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.timeline-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.timeline-note {
  margin: 0.55rem 0 0;
  font-size: 0.92rem;
}

.public-note-chip {
  margin-top: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  font-size: 0.83rem;
}

.public-note-chip small {
  display: block;
  color: #065f46;
  font-weight: 700;
}

.mini-timeline {
  margin: 0;
  padding-left: 1rem;
  font-size: 0.83rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.empty-state {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state.compact {
  padding: 1rem;
}

/* Text Utilities */
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }
.text-success { color: var(--success); }
.text-center { text-align: center; }
.mt-xs { margin-top: 0.25rem; }

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.15rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.print-only-header {
  display: none;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
  .form-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .sticky-card {
    position: static;
  }

  .hero-badges {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-divider {
    width: 100%;
    height: 1px;
    margin: 0.35rem 0;
  }

  .notif-dropdown {
    position: fixed;
    top: 74px;
    left: 1rem;
    right: 1rem;
    width: auto;
    max-width: none;
  }

  .form-row.two-col,
  .choice-grid.two-col {
    grid-template-columns: 1fr;
  }

  .hero-banner {
    padding: 1.35rem;
  }

  .card {
    padding: 1rem;
  }
}

/* Print Stylesheet untuk Laporan Tindak Lanjut */
@media print {
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .no-print {
    display: none !important;
  }

  .print-only-header {
    display: block;
    border-bottom: 2px solid #000;
    padding-bottom: 0.6rem;
    margin-bottom: 1rem;
  }

  .print-only-header h1 {
    margin: 0 0 0.25rem;
    font-size: 14pt;
  }

  .print-only-header p {
    margin: 0.1rem 0;
    font-size: 9.5pt;
  }

  .card {
    box-shadow: none;
    border: 1px solid #cbd5e1;
    padding: 0.75rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .data-table th,
  .data-table td {
    font-size: 9pt;
    padding: 0.45rem;
  }
}

/* QR Code Studio & Cetak Massal A4 */
.qr-studio-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.qr-url-helpers {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.qr-meta-summary {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.85rem;
  font-weight: 600;
}

.qr-preview-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.qr-sheet {
  --qr-accent: #1d4ed8;
  display: grid;
  gap: 1rem;
}

.qr-sheet.layout-grid-6 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-sheet.layout-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-sheet.layout-poster-1 {
  grid-template-columns: 1fr;
}

.qr-print-card {
  background: #fff;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  break-inside: avoid;
  page-break-inside: avoid;
}

.qr-card-ribbon {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--qr-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.qr-card-title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  line-height: 1.25;
  color: var(--qr-accent);
}

.qr-svg-wrap {
  width: 175px;
  max-width: 100%;
  padding: 0.55rem;
  background: #fff;
  border: 2px solid var(--qr-accent);
  border-radius: 14px;
  margin-bottom: 0.7rem;
}

.qr-svg-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.qr-card-desc {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #334155;
  line-height: 1.4;
}

.qr-card-loc {
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.qr-card-footer {
  width: 100%;
  border-top: 1px solid #e2e8f0;
  padding-top: 0.45rem;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #0f172a;
}

.qr-card-url {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 400;
  color: #64748b;
  word-break: break-all;
}

/* Poster 1 per halaman ukuran besar */
.qr-sheet.layout-poster-1 .qr-print-card {
  padding: 2.25rem 2rem;
  border-style: solid;
  border-color: var(--qr-accent);
  border-width: 3px;
}

.qr-sheet.layout-poster-1 .qr-card-ribbon {
  font-size: 0.95rem;
  padding: 0.4rem 1.1rem;
  margin-bottom: 1rem;
}

.qr-sheet.layout-poster-1 .qr-card-title {
  font-size: 1.9rem;
  margin-bottom: 1.3rem;
}

.qr-sheet.layout-poster-1 .qr-svg-wrap {
  width: 320px;
  padding: 0.9rem;
  border-width: 3px;
  margin-bottom: 1.25rem;
}

.qr-sheet.layout-poster-1 .qr-card-desc {
  font-size: 1.1rem;
  max-width: 560px;
  margin-bottom: 1rem;
}

.qr-sheet.layout-poster-1 .qr-card-loc {
  font-size: 1.05rem;
  padding: 0.45rem 1rem;
}

/* 2 Flyer per halaman */
.qr-sheet.layout-grid-2 .qr-svg-wrap {
  width: 220px;
}

@media (max-width: 960px) {
  .qr-studio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .qr-sheet.layout-grid-6,
  .qr-sheet.layout-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .main-content {
    padding: 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .qr-studio-layout {
    display: block;
  }

  .qr-sheet {
    gap: 8mm;
  }

  .qr-sheet.layout-grid-6 {
    grid-template-columns: repeat(2, 1fr);
    gap: 6mm;
  }

  .qr-sheet.layout-grid-6 .qr-print-card {
    padding: 5mm;
    min-height: 82mm;
  }

  .qr-sheet.layout-grid-6 .qr-svg-wrap {
    width: 36mm;
    padding: 2mm;
  }

  .qr-sheet.layout-grid-2 {
    grid-template-columns: 1fr;
    gap: 8mm;
  }

  .qr-sheet.layout-grid-2 .qr-print-card {
    min-height: 128mm;
    justify-content: center;
  }

  .qr-sheet.layout-poster-1 .qr-print-card {
    min-height: 268mm;
    justify-content: center;
    page-break-after: always;
  }

  .qr-print-card {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
