:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #0f172a;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --border: #e2e8f0;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

.print-only {
  display: none;
}

/* =========================================================
   LUCIDE ICON SIZING & 3D DEPTH STYLING
   ========================================================= */
.lucide-3d-hero {
  width: 36px;
  height: 36px;
  stroke-width: 2.2;
  color: #ffffff;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35));
}

.lucide-kpi {
  width: 28px;
  height: 28px;
  stroke-width: 2.3;
  filter: drop-shadow(0 3px 5px rgba(15, 23, 42, 0.16));
}

.blue-3d .lucide-kpi,
.blue-3d .lucide-md {
  color: #1d4ed8;
}

.green-3d .lucide-kpi {
  color: #15803d;
}

.amber-3d .lucide-kpi {
  color: #b45309;
}

.purple-3d .lucide-kpi,
.purple-3d .lucide-md {
  color: #7e22ce;
}

.indigo-3d .lucide-md {
  color: #4338ca;
}

.lucide-md {
  width: 22px;
  height: 22px;
  stroke-width: 2.3;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.14));
}

.lucide-icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.lucide-sm {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
}

.lucide-xs {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.lucide-inline {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
  color: #60a5fa;
  vertical-align: -2px;
  margin-right: 3px;
}

.lucide-avatar {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
  color: #1d4ed8;
}

.lucide-avatar-sm {
  width: 16px;
  height: 16px;
  stroke-width: 2.3;
  color: #7e22ce;
}

.lucide-status {
  width: 15px;
  height: 15px;
  stroke-width: 2.5;
}

.lucide-empty {
  width: 42px;
  height: 42px;
  stroke-width: 1.8;
  color: #64748b;
}

.th-lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.3;
  vertical-align: -2px;
  margin-right: 4px;
  color: #3b82f6;
}

.select-lucide-icon {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 16px;
  stroke-width: 2.2;
  color: var(--primary);
  pointer-events: none;
}

/* Screen-reader / hidden helper */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header — Apple White Glassmorphism Style */
.app-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.04);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
}

/* Apple 3D Squircle Logo */
.apple-logo-3d {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: linear-gradient(145deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.08),
    0 1px 2px rgba(15, 23, 42, 0.06),
    inset 0 1px 1px #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  cursor: pointer;
}

.apple-logo-3d:hover {
  transform: scale(1.06) translateY(-1px);
  box-shadow:
    0 8px 18px rgba(37, 99, 235, 0.14),
    inset 0 1px 1px #ffffff;
}

.lucide-brand-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2.2;
  color: #0f172a;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Apple Glass Icon-Only Topbar Buttons */
.apple-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.05),
    0 1px 2px rgba(15, 23, 42, 0.04),
    inset 0 1px 0 #ffffff;
  color: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.apple-icon-btn:hover {
  background: #ffffff;
  transform: translateY(-2px) scale(1.04);
  box-shadow:
    0 8px 16px rgba(15, 23, 42, 0.09),
    inset 0 1px 0 #ffffff;
  color: #0f172a;
}

.apple-icon-btn:active {
  transform: translateY(0) scale(0.97);
}

.apple-icon-btn.accent-green {
  color: #059669;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(236, 253, 245, 0.85) 100%);
  border-color: rgba(16, 185, 129, 0.22);
}

.apple-icon-btn.accent-green:hover {
  background: #ecfdf5;
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.15), inset 0 1px 0 #ffffff;
}

.apple-icon-btn.accent-blue {
  color: #2563eb;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92) 0%, rgba(239, 246, 255, 0.85) 100%);
  border-color: rgba(37, 99, 235, 0.22);
}

.apple-icon-btn.accent-blue:hover {
  background: #eff6ff;
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.15), inset 0 1px 0 #ffffff;
}

.lucide-topbar-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2.1;
}

/* Modern & 3D Tactile Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-3d {
  box-shadow:
    0 6px 14px rgba(15, 23, 42, 0.18),
    inset 0 1px 1px rgba(255, 255, 255, 0.35),
    inset 0 -3px 0 rgba(0, 0, 0, 0.2);
}

.btn-3d:hover {
  transform: translateY(-2px);
}

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

.btn-primary {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-secondary {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  color: #fff;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #059669 0%, #047857 100%);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-3d-glass {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
}

.modal-box .btn-outline {
  background: #f8fafc;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.modal-box .btn-outline:hover {
  background: #e2e8f0;
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px dashed #93c5fd;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 9px;
  transition: all 0.15s;
}

.btn-link:hover {
  background: #dbeafe;
  border-color: #60a5fa;
}

/* Action Buttons in Table */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
  color: #334155;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), inset 0 1px 0 #fff;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-action:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: translateY(-1px);
}

.btn-action.add-comp {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  color: #1d4ed8;
  border-color: #93c5fd;
}

.btn-action.add-comp:hover {
  background: #bfdbfe;
}

.btn-action.danger {
  background: linear-gradient(180deg, #fef2f2 0%, #fee2e2 100%);
  color: #dc2626;
  border-color: #fca5a5;
}

.btn-action.danger:hover {
  background: #fecaca;
}

.action-lucide {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

/* Main Content */
.main-content {
  padding-top: 24px;
  padding-bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* KPI Grid & 3D Floating Containers */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
}

.kpi-icon-3d {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.kpi-card:hover .kpi-icon-3d {
  transform: scale(1.08) rotate(-4deg);
}

.blue-3d {
  background: linear-gradient(135deg, #eff6ff 0%, #bfdbfe 100%);
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.22), inset 0 2px 2px #ffffff, inset 0 -3px 5px rgba(37, 99, 235, 0.2);
  border: 1px solid #93c5fd;
}

.green-3d {
  background: linear-gradient(135deg, #f0fdf4 0%, #bbf7d0 100%);
  box-shadow: 0 8px 16px rgba(22, 163, 74, 0.22), inset 0 2px 2px #ffffff, inset 0 -3px 5px rgba(22, 163, 74, 0.2);
  border: 1px solid #86efac;
}

.amber-3d {
  background: linear-gradient(135deg, #fffbeb 0%, #fde68a 100%);
  box-shadow: 0 8px 16px rgba(217, 119, 6, 0.22), inset 0 2px 2px #ffffff, inset 0 -3px 5px rgba(217, 119, 6, 0.2);
  border: 1px solid #fcd34d;
}

.purple-3d {
  background: linear-gradient(135deg, #faf5ff 0%, #e9d5ff 100%);
  box-shadow: 0 8px 16px rgba(147, 51, 234, 0.22), inset 0 2px 2px #ffffff, inset 0 -3px 5px rgba(147, 51, 234, 0.2);
  border: 1px solid #d8b4fe;
}

.indigo-3d {
  background: linear-gradient(135deg, #eef2ff 0%, #c7d2fe 100%);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.2), inset 0 2px 2px #ffffff, inset 0 -2px 4px rgba(79, 70, 229, 0.16);
  border: 1px solid #a5b4fc;
}

.mini-icon-3d {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  margin: 2px 0;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.text-success {
  color: var(--success);
}

.text-warning {
  color: var(--warning);
}

.text-muted {
  color: var(--text-muted);
  font-size: 13px;
}

.text-right {
  text-align: right;
}

.ref-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
}

.quick-add-card {
  padding: 22px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-header h2 {
  font-size: 17px;
  font-weight: 700;
}

/* Forms */
.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.flex-1 {
  flex: 1;
  min-width: 150px;
}

.flex-2 {
  flex: 2;
  min-width: 240px;
}

.form-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.form-group label svg {
  color: var(--primary);
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.checkbox-col {
  justify-content: center;
  padding-bottom: 8px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--success);
  cursor: pointer;
}

.check-icon-decor {
  width: 16px;
  height: 16px;
  color: var(--success);
}

.companion-inline-section {
  margin-top: 4px;
  margin-bottom: 12px;
}

.inline-companion-box {
  margin-top: 12px;
  padding: 16px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

/* Toolbar */
.toolbar-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: #64748b;
}

.search-box input {
  padding-left: 38px;
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.select-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.select-with-icon select {
  padding-left: 34px;
  width: auto;
  min-width: 185px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: #f8fafc;
  padding: 13px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  vertical-align: middle;
}

.seq-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12.5px;
}

.seq-badge.comp-seq {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}

.row-student {
  background: #ffffff;
}

.row-student:hover {
  background: #f8fafc;
}

.row-companion {
  background: #f8fafc;
}

.row-companion td {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 13.5px;
  color: #334155;
}

.participant-name {
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-3d {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.student-avatar {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  box-shadow: 0 3px 6px rgba(37, 99, 235, 0.16), inset 0 1px 0 #fff;
}

.comp-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
  border: 1px solid #e9d5ff;
  box-shadow: 0 2px 5px rgba(147, 51, 234, 0.14), inset 0 1px 0 #fff;
}

.companion-indent {
  padding-left: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #334155;
}

.tree-branch-icon {
  width: 16px;
  height: 16px;
  color: #94a3b8;
}

.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.type-student {
  background: #dbeafe;
  color: #1e40af;
}

.type-companion {
  background: #f3e8ff;
  color: #6b21a8;
}

.class-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  color: #334155;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  border: 1px solid #e2e8f0;
}

.status-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.status-toggle-btn:hover {
  transform: translateY(-1px) scale(1.03);
}

.status-toggle-btn.paid {
  background: linear-gradient(180deg, #dcfce7 0%, #bbf7d0 100%);
  color: #15803d;
  border-color: #86efac;
}

.status-toggle-btn.pending {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
  color: #b45309;
  border-color: #fcd34d;
}

.actions-cell {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-icon-3d {
  margin-bottom: 12px;
  display: inline-flex;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: inset 0 2px 2px #fff, 0 8px 20px rgba(15, 23, 42, 0.08);
}

/* Modals */
.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: 20px;
  z-index: 1000;
}

.modal-box {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
}

.modal-box form {
  padding: 20px 22px;
}

.student-ref-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 14px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.backup-section {
  margin-top: 16px;
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.backup-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.backup-hint {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.4;
}

.backup-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2000;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   ESTILOS DE IMPRESSÃO — FOLHA A4 OFICIAL
   ========================================================= */
@page {
  size: A4 portrait;
  margin: 12mm;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 10.5pt;
  }

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

  .print-only {
    display: block !important;
  }

  .a4-sheet {
    width: 100%;
    max-width: 100%;
  }

  .a4-header {
    border-bottom: 2px solid #000;
    padding-bottom: 10px;
    margin-bottom: 12px;
  }

  .a4-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
  }

  .a4-school {
    font-size: 9.5pt;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #333;
  }

  .a4-title {
    font-size: 15pt;
    font-weight: 800;
    margin-top: 2px;
  }

  .a4-meta-box {
    text-align: right;
    font-size: 9.5pt;
    line-height: 1.4;
  }

  .a4-summary-strip {
    display: flex;
    justify-content: space-between;
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    border: 1px solid #94a3b8;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 9.5pt;
  }

  .a4-stat span {
    color: #334155;
    margin-right: 4px;
  }

  .a4-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
  }

  .a4-table th,
  .a4-table td {
    border: 1px solid #334155;
    padding: 5px 7px;
    text-align: left;
  }

  .a4-table th {
    background: #e2e8f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 8.5pt;
  }

  .a4-table tr {
    page-break-inside: avoid;
  }

  .a4-comp-row td {
    background: #f8fafc !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .a4-footer {
    margin-top: 32px;
    display: flex;
    justify-content: space-between;
    gap: 40px;
    page-break-inside: avoid;
  }

  .signature-line {
    flex: 1;
    border-top: 1px solid #000;
    padding-top: 6px;
    text-align: center;
    font-size: 9pt;
    color: #333;
  }
}