/* Guiding Angels Staff Hub — teal + purple brand */
:root {
  --brand: #0d6e73;        /* deep teal */
  --brand-dark: #095055;
  --brand-light: #1a9ba1;  /* bright teal */
  --accent: #6b21a8;       /* purple */
  --accent-light: #8b3fd0;
  --bg: #f6fbfb;           /* very light teal-tinted */
  --surface: #ffffff;
  --surface-2: #eef7f8;
  --border: #d5e8ea;
  --text: #14252a;
  --text-muted: #5a6d72;
  --success: #0d8a5b;
  --warn: #b56d1b;
  --danger: #b3261e;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20,20,20,0.05);
  --shadow: 0 4px 16px rgba(20,20,20,0.06);
  --shadow-lg: 0 20px 40px rgba(20,20,20,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* ─── Layout ─── */
.container { max-width: 720px; margin: 0 auto; padding: 24px 20px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

.topbar {
  background: var(--brand);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.topbar .brand svg { flex-shrink: 0; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.topbar-actions button, .topbar-actions a {
  background: transparent; color: white; border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 12px; border-radius: 20px; font-size: 13px; cursor: pointer; text-decoration: none;
}
.topbar-actions button:hover, .topbar-actions a:hover { background: rgba(255,255,255,0.1); }

/* ─── Typography ─── */
h1 { font-size: 28px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.15; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; margin-bottom: 4px; }
h3 { font-size: 17px; font-weight: 700; }
p  { color: var(--text-muted); }
.muted { color: var(--text-muted); font-size: 14px; }
.mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 13px; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 12px; }
.card-lg { padding: 28px; border-radius: var(--radius-lg); }

/* ─── Forms ─── */
.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--text); margin-bottom: 6px;
}
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=date], input[type=time], input[type=number], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;  /* 16px prevents iOS zoom on focus */
  background: white;
  color: var(--text);
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,110,115,0.15);
}
textarea { min-height: 90px; resize: vertical; }
#incidentMore[hidden] { display: none !important; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row { grid-template-columns: 1fr; } }

/* ─── Buttons ─── */
button, .btn {
  font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 12px 20px; border-radius: var(--radius-sm);
  border: none; cursor: pointer; transition: all 0.15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none;
  min-height: 44px;  /* mobile tap target */
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { background: var(--text-muted); cursor: not-allowed; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: white; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; min-height: 36px; }

/* ─── State selector chips ─── */
.state-chips { display: flex; gap: 10px; margin: 20px 0; }
.state-chip {
  flex: 1;
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: white;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.state-chip:hover { border-color: var(--brand-light); }
.state-chip.selected {
  border-color: var(--brand);
  background: linear-gradient(135deg, rgba(26,155,161,0.08), rgba(107,33,168,0.08));
  box-shadow: 0 4px 14px rgba(13,110,115,0.12);
}
.state-chip .chip-logo { display: flex; justify-content: center; margin-bottom: 8px; }
.state-chip .chip-logo img { width: 56px; height: 56px; object-fit: contain; }
.state-chip .name { font-weight: 700; font-size: 16px; color: var(--brand-dark); }
.state-chip .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── Progress ─── */
.progress-header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.progress-bar {
  height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--brand-light), var(--brand));
  transition: width 0.4s ease;
}

/* ─── Step list ─── */
.step-item {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius);
  background: white; border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s;
  margin-bottom: 8px;
}
.step-item:hover { border-color: var(--brand-light); transform: translateY(-1px); box-shadow: var(--shadow); }
.step-icon {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--text-muted);
}
.step-item.complete .step-icon { background: var(--success); color: white; }
.step-item.in_progress .step-icon { background: var(--warn); color: white; }
.step-item.pending .step-icon { background: var(--surface-2); color: var(--text-muted); }
.step-info { flex: 1; }
.step-title { font-weight: 600; font-size: 15px; }
.step-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.step-arrow { color: var(--text-muted); }

/* ─── Badges ─── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-success { background: rgba(47,125,60,0.12); color: var(--success); }
.badge-warn { background: rgba(181,109,27,0.12); color: var(--warn); }
.badge-danger { background: rgba(179,38,30,0.12); color: var(--danger); }
.badge-neutral { background: var(--surface-2); color: var(--text-muted); }
.badge-brand { background: rgba(13,110,115,0.12); color: var(--brand); }
.badge-purple { background: rgba(107,33,168,0.12); color: var(--accent); }

/* ─── Tables ─── */
.card table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; white-space: nowrap; }
th { font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover { background: var(--surface-2); }

/* ─── Utility ─── */
.stack { display: flex; flex-direction: column; gap: 12px; }
.hstack { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; } .mb-4 { margin-bottom: 32px; }
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ─── Alerts / toasts ─── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 12px;
  border-left: 4px solid; font-size: 14px;
}
.alert-info { background: rgba(13,110,115,0.08); border-color: var(--brand); color: var(--brand-dark); }
.alert-warn { background: rgba(181,109,27,0.08); border-color: var(--warn); color: var(--warn); }
.alert-danger { background: rgba(179,38,30,0.06); border-color: var(--danger); color: var(--danger); }
.alert-success { background: rgba(47,125,60,0.08); border-color: var(--success); color: var(--success); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--brand-dark); color: white; padding: 12px 20px;
  border-radius: 24px; font-size: 14px; z-index: 100; box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ─── Hero (login page) ─── */
.hero {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(circle at 15% 15%, rgba(26,155,161,0.12), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(107,33,168,0.10), transparent 45%),
    var(--bg);
}
.hero-logo-img { max-width: 260px; width: 100%; height: auto; }
.hero-card {
  width: 100%; max-width: 460px;
  background: white; border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.hero-logo { display: flex; justify-content: center; margin-bottom: 20px; }
.hero-title { text-align: center; margin-bottom: 8px; }
.hero-sub { text-align: center; margin-bottom: 28px; color: var(--text-muted); font-size: 14px; }
.hero-tabs { display: flex; background: var(--surface-2); border-radius: var(--radius-sm); padding: 4px; margin-bottom: 24px; }
.hero-tabs button {
  flex: 1; background: transparent; color: var(--text-muted);
  padding: 8px; font-size: 14px; font-weight: 600; border-radius: 6px; min-height: 36px;
}
.hero-tabs button.active { background: white; color: var(--brand); box-shadow: var(--shadow-sm); }

/* ─── Topbar logo image ─── */
.topbar .brand-logo { height: 32px; width: auto; display: block; }
.topbar { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%); }

/* ─── Admin dashboard ─── */
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px;
}
.stat-card {
  background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.stat-value { font-size: 28px; font-weight: 900; margin-top: 4px; letter-spacing: -0.02em; }

/* ─── File cards ─── */
.file-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: white; margin-bottom: 8px;
}
.file-icon {
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── Signature pad style typed sig ─── */
.sig-preview {
  font-family: 'Segoe Script', 'Brush Script MT', cursive;
  font-size: 28px; padding: 20px; text-align: center;
  border: 2px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--brand-dark);
  min-height: 68px;
}

/* ─── Empty states ─── */
.empty {
  text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

/* ─── Modal ─── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,37,42,0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 20px; overflow-y: auto; z-index: 200;
  animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  background: white; border-radius: var(--radius-lg);
  max-width: 620px; width: 100%; padding: 28px 24px;
  box-shadow: var(--shadow-lg); margin: 20px auto;
}
.modal-box.modal-lg { max-width: 900px; }
.lesson-body { font-size: 15px; line-height: 1.65; color: var(--text); max-height: 60vh; overflow-y: auto; padding-right: 8px; }

/* ─── Quiz ─── */
.quiz-q {
  padding: 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2);
}
.quiz-num {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--brand); text-transform: uppercase; margin-bottom: 4px;
}
.quiz-text { font-weight: 600; font-size: 15px; margin-bottom: 12px; color: var(--text); }
.quiz-opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  background: white; border: 1.5px solid var(--border); margin-bottom: 6px;
  transition: all 0.12s;
}
.quiz-opt:hover { border-color: var(--brand-light); }
.quiz-opt input { margin-top: 3px; accent-color: var(--brand); }
.quiz-opt span { font-size: 14px; }
.quiz-opt:has(input:checked) { border-color: var(--brand); background: rgba(26,155,161,0.06); }

/* ─── Certificate ─── */
.cert {
  background: white;
  border: 12px double var(--brand);
  border-radius: 6px;
  padding: 8px;
  box-shadow: var(--shadow-lg);
  max-width: 820px; margin: 0 auto;
}
.cert-inner { border: 2px solid var(--accent); border-radius: 4px; padding: 32px; }
.cert-header { text-align: center; margin-bottom: 20px; }
.cert-logo { max-width: 220px; height: auto; }
.cert-body { text-align: center; }
.cert-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.24em;
  color: var(--accent); margin-bottom: 8px;
}
.cert-title {
  font-size: 26px; font-weight: 900; color: var(--brand-dark);
  letter-spacing: -0.01em; margin-bottom: 4px; line-height: 1.15;
}
.cert-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.cert-name-block { margin: 24px 0; }
.cert-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }
.cert-name {
  font-family: 'Segoe Script','Brush Script MT','Snell Roundhand',cursive;
  font-size: 42px; color: var(--brand-dark); margin: 6px 0 4px;
  border-bottom: 1px solid var(--border); padding-bottom: 8px;
}
.cert-desc { font-size: 13px; color: var(--text); line-height: 1.6; margin: 16px 24px; }
.cert-dates {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 24px 0; padding: 16px; background: var(--surface-2);
  border-radius: var(--radius-sm);
}
.cert-dates > div { text-align: center; }
.cert-value { font-size: 13px; font-weight: 600; color: var(--brand-dark); margin-top: 4px; }
.cert-sigs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  margin: 32px 20px 20px;
}
.cert-sig { text-align: center; }
.cert-sig-line { border-bottom: 1px solid var(--text); min-height: 32px; margin-bottom: 6px; }
.cert-footer {
  font-size: 10px; color: var(--text-muted);
  border-top: 1px solid var(--border); padding-top: 12px; margin-top: 20px;
  line-height: 1.5;
}
@media (max-width: 480px) {
  .cert-title { font-size: 20px; }
  .cert-name { font-size: 32px; }
  .cert-dates { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .cert-sigs { grid-template-columns: 1fr; gap: 20px; }
}

/* ─── Mobile-first responsive polish ─── */
@media (max-width: 720px) {
  .container, .container-wide { padding: 16px 14px; }

  /* Topbar: stack brand above scrollable tab row so nothing gets cut off */
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }
  .topbar .brand { justify-content: flex-start; }
  .topbar-actions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .topbar-actions::-webkit-scrollbar { display: none; }
  .topbar-actions button, .topbar-actions a {
    flex-shrink: 0;
    font-size: 13px;
    padding: 7px 14px;
    min-height: 36px;
  }

  /* Typography scale down */
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 15px; }

  /* Cards use less padding on small screens */
  .card { padding: 16px; }
  .card-lg { padding: 18px; border-radius: var(--radius); }

  /* Buttons: larger tap targets */
  .btn, button.btn, .btn-primary, .btn-secondary {
    min-height: 44px;
    font-size: 15px;
  }

  /* Form inputs: prevent iOS zoom-on-focus */
  input, select, textarea {
    font-size: 16px !important;
  }

  /* Form action rows stack vertically */
  .form-actions, .btn-row {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }
  .form-actions .btn, .btn-row .btn { width: 100%; }

  /* Hide non-critical table columns on the smallest screens */
  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  h1 { font-size: 20px; }
  h2 { font-size: 16px; }
  .card { padding: 14px; }

  /* Tables: shrink padding and font so they fit better before scroll */
  th, td { padding: 8px 10px; font-size: 13px; }
  th { font-size: 11px; }
}

/* ─── Fillable form controls ─── */
.radio-row, .checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 8px; margin-bottom: 6px;
  background: var(--surface-2); border: 1.5px solid var(--border);
  cursor: pointer; font-size: 14px; line-height: 1.45;
  transition: all 0.12s;
}
.radio-row:hover, .checkbox-row:hover { border-color: var(--brand-light); }
.radio-row input, .checkbox-row input { margin-top: 3px; accent-color: var(--brand); flex-shrink: 0; }
.radio-row:has(input:checked), .checkbox-row:has(input:checked) {
  border-color: var(--brand); background: rgba(26,155,161,0.06);
}
fieldset { border: none; padding: 0; margin: 0; }
fieldset legend { font-weight: 600; font-size: 14px; color: var(--text); padding: 0 0 8px 0; }

/* Signature canvas */
.sig-box {
  border: 2px dashed var(--brand-light);
  border-radius: var(--radius);
  background: #fafcfc;
  padding: 4px;
  margin-top: 6px;
}
.sig-box canvas {
  display: block; width: 100%; height: 140px;
  touch-action: none;
  background: repeating-linear-gradient(0deg, transparent 0, transparent 138px, rgba(13,110,115,0.25) 138px, rgba(13,110,115,0.25) 140px);
  cursor: crosshair;
  border-radius: calc(var(--radius) - 2px);
}
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* Chips inline */
.chip {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 12px;
  background: var(--surface-2); color: var(--brand-dark);
  border: 1px solid var(--border); margin-left: 8px;
  vertical-align: middle;
}

/* Warning alert */
.alert-warn {
  background: #fff8e6; border-color: #f2c94c; color: #7a5b00;
}

/* Row layout */
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .col { flex: 1 1 200px; min-width: 0; }
.spacer { flex: 1; }
.hstack { display: flex; align-items: center; gap: 10px; }
.stack > * + * { margin-top: 8px; }
.hidden { display: none !important; }

/* ─── Patriot export card ─── */
.patriot-card {
  border: 2px solid var(--brand);
  background: linear-gradient(180deg, rgba(26,155,161,0.04) 0%, transparent 100%);
}
.patriot-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 12px 14px; background: var(--surface-2); border-radius: 8px;
}
.patriot-section {
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px; background: white;
}
.patriot-section h3 {
  font-size: 15px; font-weight: 700; color: var(--brand-dark);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.patriot-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.patriot-table th {
  text-align: left; padding: 8px 12px 8px 0; font-weight: 500;
  color: var(--text-muted); vertical-align: top; width: 44%;
  border-bottom: 1px solid var(--surface-2);
}
.patriot-table td {
  padding: 8px 0; color: var(--text); vertical-align: top;
  border-bottom: 1px solid var(--surface-2);
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
}
.patriot-table .mono {
  font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px; word-break: break-all;
}
.btn-copy-mini {
  background: var(--brand); color: white; border: none;
  padding: 3px 10px; border-radius: 6px; font-size: 11px;
  font-weight: 600; cursor: pointer; flex-shrink: 0;
  transition: background 0.12s;
}
.btn-copy-mini:hover { background: var(--brand-dark); }
.patriot-raw {
  background: #0f2528; color: #d0e8ea; padding: 16px;
  border-radius: 8px; overflow-x: auto; font-size: 12px;
  white-space: pre; margin-top: 8px;
}

/* ─── Inline PDF viewer modal ─── */
.pdf-modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.pdf-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(13, 40, 44, 0.72);
  backdrop-filter: blur(2px);
}
.pdf-modal-panel {
  position: relative;
  width: min(1100px, 96vw);
  height: min(92vh, 900px);
  background: white; border-radius: 12px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pdf-modal-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--brand); color: white;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.pdf-modal-title {
  font-weight: 700; font-size: 15px;
  flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdf-modal-actions {
  display: flex; gap: 8px; align-items: center; flex-shrink: 0;
}
.pdf-modal-actions .btn-secondary {
  background: rgba(255,255,255,0.15) !important;
  color: white !important;
  border-color: rgba(255,255,255,0.3) !important;
}
.pdf-modal-actions .btn-secondary:hover {
  background: rgba(255,255,255,0.25) !important;
}
.pdf-modal-frame {
  flex: 1; width: 100%; border: none;
  background: #eef4f5;
}
@media (max-width: 640px) {
  .pdf-modal-panel { width: 100vw; height: 100vh; border-radius: 0; }
  .pdf-modal-head { padding: 10px 12px; }
  .pdf-modal-title { font-size: 13px; }
  .pdf-modal-actions .btn-sm { padding: 6px 8px; font-size: 12px; }
  .admin-file-card { flex-wrap: wrap; }
  .admin-file-card .file-info { flex-basis: calc(100% - 60px) !important; }
  .admin-file-card .file-name { white-space: normal; overflow-wrap: anywhere; }
  .admin-file-card [data-file-download] { margin-left: auto; }
}
