/* ==========================================================================
   Five-Star Products: Forever Home in a Box — Master Design System
   Universal Senior-First Ergonomics • 00_Master_Product_Template Standard
   100% Offline Air-Gapped Living in Place Operating System
   ========================================================================== */

:root {
  --font-base-size: 18px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Georgia", Cambria, "Times New Roman", Times, serif;

  /* Executive Palette */
  --color-bg: #f8fafc;
  --color-card-bg: #ffffff;
  --color-header-bg: #0f172a;
  --color-header-border: #1e293b;
  --color-text-main: #0f172a;
  --color-text-muted: #475569;
  --color-border: #cbd5e1;
  --color-border-subtle: #e2e8f0;

  /* Universal Actionable Button Theme (Exclusively Blue for All Clickable Buttons) */
  --color-action-blue: #1d4ed8;       /* Royal Blue - Senior-accessible 5.9:1 contrast */
  --color-action-blue-hover: #1e40af; /* Deep Royal Navy Hover */
  --color-action-blue-shadow: rgba(29, 78, 216, 0.25);
  --color-action-gold: #f59e0b;

  /* Product Jewel Accent: Living in Place Emerald */
  --color-accent-jewel: #15803d;
  --color-accent-jewel-light: #ecfdf5;

  /* Secondary & Utility */
  --color-secondary-bg: #334155;
  --color-secondary-hover: #1e293b;
  --color-success: #059669;
  --color-warning: #b45309;
  --color-danger: #dc2626;

  /* Senior Tap Geometry */
  --min-tap-target: 48px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
}

/* Scalable Text Sizes for Senior Eyes */
body.font-size-large {
  --font-base-size: 21px;
}
body.font-size-xlarge {
  --font-base-size: 24px;
}

/* AAA High-Contrast Accessibility Mode */
body.high-contrast {
  --color-bg: #000000;
  --color-card-bg: #0f172a;
  --color-header-bg: #000000;
  --color-header-border: #fde047;
  --color-text-main: #ffffff;
  --color-text-muted: #fde047;
  --color-border: #ffffff;
  --color-border-subtle: #475569;
  --color-action-blue: #2563eb;
  --color-action-blue-hover: #1d4ed8;
}

body.high-contrast .sidebar-nav {
  background-color: #0f172a;
  border-right-color: #ffffff;
}
body.high-contrast .tab-btn {
  background-color: #2563eb;
  color: #ffffff;
  border: 2px solid #ffffff;
}
body.high-contrast .tab-btn:hover {
  background-color: #1d4ed8;
}
body.high-contrast .tab-btn.active {
  background-color: #1e40af;
  border-color: #fde047;
  color: #ffffff;
  box-shadow: 0 0 0 2px #fde047;
}
body.high-contrast .tab-btn.active .tab-num {
  background-color: #fde047;
  color: #000000;
}
body.high-contrast .btn-action,
body.high-contrast .btn-secondary,
body.high-contrast .btn-outline,
body.high-contrast .btn-video-header,
body.high-contrast .btn-guide-header,
body.high-contrast .btn-sidebar-action,
body.high-contrast .btn-sidebar-print,
body.high-contrast .btn-primary,
body.high-contrast .btn-placard {
  background-color: #2563eb;
  color: #ffffff;
  border: 2px solid #ffffff;
}

html {
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-base-size);
  background-color: var(--color-bg);
  color: var(--color-text-main);
  line-height: 1.6;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* ================= 1. WATERMARK LAYER ================= */
.watermark-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  overflow: hidden;
  opacity: 0.035;
  user-select: none;
}
.watermark-line {
  font-size: 2.2rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ================= 2. ULTRA-THIN SENIOR STICKY HEADER (44PX) ================= */
.senior-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-header-bg);
  border-bottom: 1.5px solid var(--color-header-border);
  color: #ffffff;
  padding: 6px 16px;
  box-shadow: var(--shadow-sm);
  min-height: 44px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow-x: hidden;
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.app-brand-badge {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--color-action-gold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-title-separator {
  color: #475569;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.app-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1;
  flex-shrink: 0;
}

.jewel-pill {
  font-size: 0.72rem;
  font-family: var(--font-sans);
  background-color: var(--color-accent-jewel);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.app-subtitle .dynamic-owner-name {
  color: #ffffff;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (max-width: 1120px) {
  .app-subtitle,
  .app-title-separator:last-of-type {
    display: none;
  }
}
@media (max-width: 860px) {
  .jewel-pill {
    display: none;
  }
}

.btn-fullscreen-header,
.btn-video-header,
.btn-guide-header {
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  min-height: 32px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
}

.btn-fullscreen-header:hover,
.btn-video-header:hover,
.btn-guide-header:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateY(-1px);
}

/* Fullscreen Welcome Prompt Banner (Hides automatically in full screen) */
.fullscreen-banner-prompt {
  background: #1e293b;
  color: #f8fafc;
  border-bottom: 2px solid var(--color-action-gold);
  padding: 8px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  position: relative;
  z-index: 99;
  cursor: pointer;
  transition: background 0.15s ease;
}
.fullscreen-banner-prompt:hover {
  background: #0f172a;
}
.fullscreen-banner-pill {
  background: var(--color-action-blue);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* ================= 3. BUTTON SYSTEM (UNIFIED ACTIONABLE BLUE THEME) ================= */
.btn-action,
.btn-primary {
  background-color: var(--color-action-blue);
  color: #ffffff !important;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 10px 20px;
  min-height: var(--min-tap-target);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: background-color 0.15s, transform 0.1s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-action:hover,
.btn-primary:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px var(--color-action-blue-shadow);
}

.btn-secondary {
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 8px 16px;
  min-height: var(--min-tap-target);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: background-color 0.15s, transform 0.1s;
}
.btn-secondary:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: none;
  font-weight: 700;
  padding: 8px 16px;
  min-height: var(--min-tap-target);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: background-color 0.15s, transform 0.1s;
}
.btn-outline:hover {
  background-color: var(--color-action-blue-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ================= 4. 2-COLUMN LAYOUT & LOCKED SIDEBAR ================= */
.layout-wrapper {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  max-width: 100vw;
  flex: 1;
  align-items: flex-start;
  position: relative;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Locked Left-Hand Sidebar (275px responsive) */
.sidebar-nav {
  width: 275px;
  min-width: 240px;
  max-width: 275px;
  background-color: #ffffff;
  border-right: 1.5px solid var(--color-border);
  position: sticky;
  top: 44px; /* Directly below 44px senior-header */
  height: calc(100vh - 44px);
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.04);
  z-index: 50;
  flex-shrink: 0;
  box-sizing: border-box;
}

.sidebar-header {
  padding: 4px 10px 14px 10px;
  border-bottom: 1.5px solid var(--color-border-subtle);
  margin-bottom: 8px;
}
.sidebar-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.sidebar-action-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.btn-sidebar-action,
.btn-sidebar-print {
  width: 100%;
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 8px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}
.btn-sidebar-action:hover,
.btn-sidebar-print:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateY(-1px);
}

.btn-sidebar-option {
  width: 100%;
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 10px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
  margin-bottom: 8px;
}
.btn-sidebar-option:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateY(-1px);
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* Sidebar Tab Buttons (Universal Royal Blue Action Signature) */
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 10px;
  min-height: 44px;
  background-color: var(--color-action-blue);
  color: #ffffff;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: all 0.15s ease-in-out;
  width: 100%;
}

.tab-btn:hover {
  background-color: var(--color-action-blue-hover);
  transform: translateX(2px);
  box-shadow: 0 3px 6px var(--color-action-blue-shadow);
}

/* Active Tab: Royal Blue background + 2.5px Gold/Amber Border & Badge */
.tab-btn.active {
  background-color: var(--color-action-blue);
  border: 2.5px solid var(--color-action-gold);
  box-shadow: 0 4px 10px var(--color-action-blue-shadow), 0 0 0 1px var(--color-action-gold);
  transform: translateX(3px);
}

.tab-btn .tab-num {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tab-btn.active .tab-num {
  background-color: var(--color-action-gold);
  color: #0f172a;
}

.tab-btn .tab-label {
  flex: 1;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
  color: #ffffff;
}

/* ================= 5. MAIN CONTENT CANVAS ================= */
.app-container {
  flex: 1;
  min-width: 0;
  max-width: calc(100% - 240px);
  padding: 24px 28px 60px 28px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
  animation: fadeIn 0.15s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0.8; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* COMPANION PLACARDS QUICK NAVIGATION STRIP */
.companion-strip {
  background: #fdfbf7;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.companion-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--color-header-bg);
  margin-bottom: 8px;
}
.companion-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-placard {
  background: var(--color-action-blue);
  color: #ffffff !important;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px var(--color-action-blue-shadow);
  transition: all 0.15s ease;
}
.btn-placard:hover {
  background: var(--color-action-blue-hover);
  transform: translateY(-1px);
}

/* CARDS & CONTAINERS */
.card {
  background-color: var(--color-card-bg);
  border: 1.5px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  border-bottom: 1.5px solid var(--color-border-subtle);
  padding-bottom: 12px;
  gap: 16px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-header-bg);
  line-height: 1.3;
}

.card-subtitle {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1024px) {
  .app-container {
    padding: 16px 14px 40px 14px;
    max-width: calc(100% - 240px);
  }
  .card {
    padding: 18px 14px;
  }
  .grid-2, .grid-4 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
@media (max-width: 900px) {
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
}

/* FORMS & INPUTS */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--color-header-bg);
}
.input-text, .search-input, .form-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--color-header-bg);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-text:focus, .search-input:focus, .form-input:focus {
  outline: none;
  border-color: var(--color-action-blue);
  box-shadow: 0 0 0 3px var(--color-action-blue-shadow);
}

/* CHECKLISTS & CHECK-BOXES */
.check-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid var(--color-border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s;
}
.check-box:hover {
  background: #f1f5f9;
}
.check-box input[type="checkbox"] {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  accent-color: var(--color-action-blue);
  cursor: pointer;
}
.check-box span {
  font-size: 1rem;
  color: var(--color-header-bg);
  line-height: 1.5;
}

/* TABLES */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border-radius: var(--radius-sm);
}

.app-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  table-layout: auto;
  word-break: break-word;
}
.app-table th, .app-table td {
  border: 1.5px solid var(--color-border);
  padding: 10px 12px;
  font-size: 0.95rem;
  text-align: left;
}
.app-table th {
  background: #f1f5f9;
  color: var(--color-header-bg);
  font-weight: 800;
}

/* DOMAIN-SPECIFIC SPECIAL SECTIONS */
.pledge-card {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 20px;
}
.cert-card {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
}
.rules-card {
  background: #f0fdfa;
  border: 1.5px solid #ccfbf1;
  border-radius: var(--radius-md);
  padding: 22px;
  margin-bottom: 20px;
}
.sig-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}
.sig-line {
  border-bottom: 2px solid var(--color-header-bg);
  height: 36px;
  margin-bottom: 6px;
}

.dest-badge {
  padding: 12px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  text-align: center;
  font-size: 0.95rem;
  border: 1.5px solid var(--color-border);
  background: #ffffff;
}
.dest-keep { color: #15803d; border-color: #86efac; }
.dest-gift { color: #0284c7; border-color: #7dd3fc; }
.dest-sell { color: #b45309; border-color: #fcd34d; }
.dest-donate { color: #7c3aed; border-color: #d8b4fe; }

.comp-box {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border);
}
.comp-bad { background: #fef2f2; border-color: #fecaca; }
.comp-good { background: #f0fdf4; border-color: #bbf7d0; }
.cost-num { font-size: 1.6rem; font-weight: 900; margin: 6px 0 12px 0; }

.tone-btns { display: flex; gap: 8px; margin-bottom: 12px; }
.tone-pill {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-action-blue);
  background: #ffffff;
  color: var(--color-action-blue);
  cursor: pointer;
  transition: all 0.15s;
}
.tone-pill.active {
  background: var(--color-action-blue);
  color: #ffffff;
}

textarea.letter-box {
  width: 100%;
  min-height: 200px;
  padding: 14px;
  font-size: 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  line-height: 1.6;
  color: var(--color-header-bg);
}

/* ================= 6. MODALS ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  position: relative;
}
.modal-card h2 {
  color: var(--color-header-bg);
  margin: 8px 0 12px 0;
  font-size: 1.5rem;
  font-family: var(--font-serif);
}
.modal-card p {
  font-size: 1rem;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}
.modal-header-sticky {
  position: sticky;
  top: -32px;
  background: #ffffff;
  z-index: 10;
  padding-top: 32px;
  margin-top: -32px;
}
body.high-contrast .modal-header-sticky {
  background: #000000;
}

/* Video Modal */
.video-modal-card {
  background: #0f172a;
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid #334155;
}
.video-player-wrap {
  background: #000000;
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orientation-video {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

/* Companion Placards Modal */
.placards-modal-card {
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
}
.placards-modal-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.placard-card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-header-bg);
  transition: all 0.15s ease-in-out;
}
.placard-card-link:hover {
  border-color: var(--color-action-blue);
  background: #eff6ff;
  transform: translateY(-1px);
}
.placard-card-icon {
  font-size: 2rem;
  min-width: 44px;
  text-align: center;
}
.placard-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.placard-card-body strong {
  font-size: 1rem;
  color: var(--color-header-bg);
}
.placard-card-body span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.placard-open-pill {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--color-action-blue);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* MASTER PRINT CONSOLE MODAL */
.print-modal-card {
  max-width: 720px;
  max-height: 88vh;
  overflow-y: auto;
}
.print-status-box {
  background: #f8fafc;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}
.progress-bar-track {
  width: 100%;
  height: 10px;
  background-color: var(--color-border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 14px;
}
.progress-bar-fill {
  height: 100%;
  background-color: var(--color-accent-jewel);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}
.tab-verification-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 600px) {
  .tab-verification-grid { grid-template-columns: 1fr; }
}
.tab-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  border: 1px solid var(--color-border-subtle);
  background: #ffffff;
}
.tab-status-item.verified {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}
.tab-status-item.pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #854d0e;
}
.print-option-card {
  background: #ffffff;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.15s;
}
.print-option-card:hover {
  border-color: var(--color-action-blue);
}
.print-option-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

/* MASTER BACKUP CONSOLE MODAL */
.backup-modal-card {
  max-width: 760px;
  max-height: 88vh;
  overflow-y: auto;
}
.backup-info-box {
  background: #f8fafc;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.backup-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  font-size: 0.82rem;
  color: #334155;
  margin-top: 8px;
  background: #ffffff;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-subtle);
}
@media (max-width: 640px) {
  .backup-data-grid { grid-template-columns: 1fr; }
}
.backup-data-item {
  line-height: 1.4;
}
.backup-dest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 640px) {
  .backup-dest-grid { grid-template-columns: 1fr; }
}
.backup-dest-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-border);
  background: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}
.backup-dest-card:hover {
  border-color: var(--color-action-blue);
  background: #f0f7ff;
}
.backup-dest-card.active {
  border-color: var(--color-action-blue);
  background: #eff6ff;
  box-shadow: 0 0 0 1px var(--color-action-blue);
}

/* ================= 7. PRINT MEDIA STYLES & GUARDS ================= */
.print-tab-placard {
  display: none;
}
.print-cover-page {
  display: none;
}

@media print {
  /* Guard to prevent Chromium print engine animation freeze */
  *, *::before, *::after {
    animation-play-state: paused !important;
    transition: none !important;
  }
}
