/* The Board Room - Executive Healthcare Governance & Document Portal
   St. Joseph Medical Center Texas | ClinOps365
   Secured with Cloudflare Edge Security & DRM Copy Protection */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --board-navy-dark: #061325;
  --board-navy: #0a1f3d;
  --board-navy-light: #132d56;
  --board-gold: #f59e0b;
  --board-gold-dark: #d97706;
  --board-gold-light: #fef3c7;
  --board-blue: #0284c7;
  --board-blue-dark: #0369a1;
  --board-emerald: #059669;
  --board-emerald-light: #d1fae5;
  --board-rose: #e11d48;
  --board-rose-light: #ffe4e6;
  --board-slate-50: #f8fafc;
  --board-slate-100: #f1f5f9;
  --board-slate-200: #e2e8f0;
  --board-slate-300: #cbd5e1;
  --board-slate-400: #94a3b8;
  --board-slate-600: #475569;
  --board-slate-700: #334155;
  --board-slate-800: #1e293b;
  --board-slate-900: #0f172a;

  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px -2px rgba(10, 31, 61, 0.08), 0 2px 6px -1px rgba(10, 31, 61, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(10, 31, 61, 0.12), 0 4px 12px -2px rgba(10, 31, 61, 0.06);
  --shadow-xl: 0 24px 48px -12px rgba(6, 19, 37, 0.25);
}

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

body {
  font-family: var(--font-body);
  background-color: #f1f5f9;
  color: var(--board-slate-900);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* ANTI-COPY & DRM SELECTION RESTRICTIONS (Viewers cannot select/copy confidential docs) */
.drm-protected,
.confidential-content,
.doc-canvas-wrapper,
.document-reader-body {
  user-select: none !important;
  -webkit-user-select: none !important;
  -moz-user-select: none !important;
  -ms-user-select: none !important;
  -webkit-touch-callout: none !important;
}

/* PRINT BLOCKING (Complying with prompt requirement: cannot download or copy) */
@media print {
  body * {
    display: none !important;
    visibility: hidden !important;
  }
  body::before {
    content: "CRITICAL SECURITY NOTICE: UNAUTHORIZED PRINTING, DUPLICATION, OR EXPORTATION OF CONFIDENTIAL BOARD OF TRUSTEES MATERIALS IS STRICTLY PROHIBITED UNDER TEXAS HEALTH & SAFETY CODE § 161.032 AND HOSPITAL POLICY.";
    display: block !important;
    visibility: visible !important;
    position: fixed;
    top: 30%;
    left: 10%;
    right: 10%;
    text-align: center;
    font-size: 16pt;
    font-weight: bold;
    color: #991b1b;
    border: 3px solid #991b1b;
    padding: 30px;
    background: #fee2e2;
  }
}

/* Top Executive Banner */
.top-gov-bar {
  background: var(--board-navy-dark);
  color: var(--board-slate-300);
  font-size: 0.75rem;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.gov-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gov-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.gov-pill.cf-secure {
  background: rgba(5, 150, 105, 0.18);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.gov-pill.cf-secure .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 8px #34d399;
}

.gov-pill.privilege {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Main Navigation / Header */
.board-header {
  background: linear-gradient(135deg, var(--board-navy) 0%, #0d284f 100%);
  color: #ffffff;
  padding: 18px 24px;
  box-shadow: var(--shadow-lg);
  border-bottom: 3px solid var(--board-gold);
  position: sticky;
  top: 0;
  z-index: 90;
}

.board-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1e3a8a, #0284c7);
  border: 1.5px solid var(--board-gold);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  flex-shrink: 0;
}

.brand-emblem svg {
  width: 24px;
  height: 24px;
  fill: #ffffff;
}

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

.brand-sub {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--board-gold);
  letter-spacing: 1px;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.65rem;
  padding: 2px 8px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--board-gold-light);
  border: 1px solid var(--board-gold);
  border-radius: var(--radius-full);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* User & Session Status in Header */
.session-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 6px 14px;
  border-radius: var(--radius-md);
}

.user-avatar-initials {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--board-gold-dark), var(--board-gold));
  color: #061325;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.session-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.session-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.session-role {
  font-size: 0.7rem;
  color: var(--board-slate-300);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--board-gold);
  color: var(--board-navy-dark);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-primary:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-danger {
  background: var(--board-rose);
  color: #ffffff;
}

.btn-danger:hover {
  background: #be123c;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.78rem;
}

/* Executive Notice & Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #091e3a 0%, #1e3a8a 100%);
  color: #ffffff;
  border-bottom: 1px solid #1e40af;
  padding: 24px;
}

.welcome-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.welcome-lead h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.welcome-lead p {
  color: #cbd5e1;
  font-size: 0.9rem;
  max-width: 780px;
}

.meeting-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.meta-chip {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-full);
  padding: 4px 12px;
  font-size: 0.78rem;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-chip.gold {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fef08a;
}

/* Navigation Tabs */
.board-nav-tabs-wrapper {
  background: #ffffff;
  border-bottom: 1px solid var(--board-slate-200);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
  z-index: 80;
}

.board-nav-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.board-nav-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--board-slate-600);
  border: none;
  background: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--board-navy);
  background: #f8fafc;
}

.tab-btn.active {
  color: var(--board-navy);
  border-bottom-color: var(--board-gold-dark);
}

.tab-count {
  font-family: var(--font-body);
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--board-slate-100);
  color: var(--board-slate-700);
  font-weight: 700;
}

.tab-btn.active .tab-count {
  background: #fef3c7;
  color: #b45309;
}

.admin-tab-btn {
  margin-left: auto;
  color: var(--board-blue-dark);
  background: rgba(2, 132, 199, 0.05);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.admin-tab-btn.active {
  border-bottom-color: var(--board-blue);
  color: var(--board-blue);
}

/* Main Container */
.board-main-container {
  max-width: 1400px;
  margin: 28px auto;
  padding: 0 24px;
  width: 100%;
  flex: 1;
}

/* Section Content Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Section Header Cards */
.section-intro-card {
  background: #ffffff;
  border: 1px solid var(--board-slate-200);
  border-radius: var(--radius-lg);
  padding: 22px 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.section-intro-text h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--board-navy);
  margin-bottom: 4px;
}

.section-intro-text p {
  font-size: 0.88rem;
  color: var(--board-slate-600);
}

.stat-pills {
  display: flex;
  gap: 10px;
}

.stat-pill {
  background: var(--board-slate-50);
  border: 1px solid var(--board-slate-200);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--board-slate-700);
}

/* Document Grid & Cards */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
  margin-bottom: 36px;
}

.doc-card {
  background: #ffffff;
  border: 1px solid var(--board-slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.doc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--board-slate-300);
}

.doc-card-header {
  padding: 20px;
  border-bottom: 1px solid var(--board-slate-100);
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.file-type-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.file-type-icon.pdf {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #fca5a5;
}

.file-type-icon.docx, .file-type-icon.doc {
  background: #dbeafe;
  color: #2563eb;
  border: 1px solid #93c5fd;
}

.doc-title-group {
  flex: 1;
}

.doc-category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--board-gold-dark);
  display: inline-block;
  margin-bottom: 2px;
}

.doc-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--board-navy);
  line-height: 1.3;
  margin-bottom: 4px;
}

.doc-card-body {
  padding: 16px 20px;
  flex: 1;
  font-size: 0.85rem;
  color: var(--board-slate-600);
  line-height: 1.45;
}

.doc-privilege-flag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #991b1b;
  background: #fef2f2;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  border-left: 3px solid #dc2626;
}

.doc-card-footer {
  padding: 14px 20px;
  background: var(--board-slate-50);
  border-top: 1px solid var(--board-slate-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.doc-meta-info {
  font-size: 0.75rem;
  color: var(--board-slate-400);
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-doc-btn {
  background: var(--board-navy);
  color: #ffffff;
  border: none;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.view-doc-btn:hover {
  background: #1e3a8a;
  transform: translateY(-1px);
}

.delete-doc-btn {
  background: none;
  border: none;
  color: var(--board-slate-400);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.2s ease;
}

.delete-doc-btn:hover {
  color: var(--board-rose);
}

/* Agenda Timeline Component */
.agenda-timeline {
  background: #ffffff;
  border: 1px solid var(--board-slate-200);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 30px;
}

.agenda-item {
  display: flex;
  gap: 20px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--board-slate-100);
  position: relative;
}

.agenda-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.agenda-time {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--board-navy);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  height: fit-content;
}

.agenda-content {
  flex: 1;
}

.agenda-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.agenda-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--board-navy);
}

.agenda-presenter {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--board-slate-600);
  background: var(--board-slate-100);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.agenda-desc {
  font-size: 0.88rem;
  color: var(--board-slate-600);
  margin-bottom: 12px;
}

.agenda-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--board-blue-dark);
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.agenda-doc-link:hover {
  background: #e0f2fe;
}

/* SECURE DOCUMENT VIEWER MODAL / FULL SCREEN (With Canvas Watermarking & DRM) */
.doc-reader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 19, 37, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.doc-reader-overlay.active {
  display: flex;
}

.doc-reader-modal {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255,255,255,0.2);
}

.doc-reader-header {
  background: var(--board-navy);
  color: #ffffff;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--board-gold);
}

.reader-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.reader-doc-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.reader-badge-confidential {
  font-size: 0.68rem;
  font-weight: 800;
  color: #fee2e2;
  background: #991b1b;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  letter-spacing: 0.5px;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reader-controls-btn {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reader-controls-btn:hover {
  background: rgba(255,255,255,0.22);
}

.reader-close-btn {
  background: rgba(225, 29, 72, 0.2);
  border: 1px solid rgba(225, 29, 72, 0.4);
  color: #fecdd3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reader-close-btn:hover {
  background: var(--board-rose);
  color: #ffffff;
}

.doc-reader-body {
  flex: 1;
  background: #334155;
  overflow-y: auto;
  position: relative;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Watermark Canvas Layer overlaying documents */
.watermark-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 50;
  background-repeat: repeat;
  opacity: 0.12;
}

.doc-canvas-wrapper {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  margin-bottom: 24px;
  position: relative;
  max-width: 900px;
  width: 100%;
}

.doc-canvas-wrapper canvas {
  display: block;
  width: 100%;
  height: auto;
}

.doc-html-wrapper {
  background: #ffffff;
  padding: 48px;
  max-width: 900px;
  width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  font-family: 'Times New Roman', Times, serif;
  line-height: 1.7;
  color: #111827;
  position: relative;
}

.doc-reader-footer {
  background: #f8fafc;
  border-top: 1px solid var(--board-slate-200);
  padding: 10px 24px;
  font-size: 0.75rem;
  color: var(--board-slate-600);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drm-footer-shield {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--board-slate-700);
}

/* ADMIN PANEL STYLING */
.admin-card {
  background: #ffffff;
  border: 1px solid var(--board-slate-200);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--board-slate-100);
}

.admin-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--board-navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed #93c5fd;
  background: #f0f9ff;
  border-radius: var(--radius-md);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 20px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--board-blue);
  background: #e0f2fe;
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  color: var(--board-blue);
}

.dropzone-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--board-navy);
  margin-bottom: 4px;
}

.dropzone-hint {
  font-size: 0.8rem;
  color: var(--board-slate-600);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--board-slate-800);
}

.form-control {
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 10px 14px;
  border: 1px solid var(--board-slate-300);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--board-slate-900);
  transition: border-color 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--board-blue);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

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

/* Recipient Table */
.data-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--board-slate-200);
}

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

.data-table th {
  background: var(--board-slate-50);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--board-slate-700);
  border-bottom: 1px solid var(--board-slate-200);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--board-slate-100);
  color: var(--board-slate-800);
}

.data-table tr:hover td {
  background: #f8fafc;
}

.badge-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gold { background: #fef3c7; color: #b45309; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-gray { background: #f1f5f9; color: #475569; }

/* Modal General Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 19, 37, 0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  padding: 20px;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  border: 1px solid var(--board-slate-200);
  animation: fadeIn 0.25s ease;
}

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

.modal-header {
  background: var(--board-navy);
  color: #ffffff;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--board-gold);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: var(--board-slate-50);
  border-top: 1px solid var(--board-slate-200);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

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

.toast {
  background: var(--board-navy);
  color: #ffffff;
  border-left: 4px solid var(--board-gold);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  animation: slideIn 0.3s ease;
}

.toast.toast-danger {
  border-left-color: var(--board-rose);
  background: #881337;
}

.toast.toast-success {
  border-left-color: #10b981;
  background: #064e3b;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Texas Legal Disclaimer Footer */
.board-footer {
  background: var(--board-navy-dark);
  color: var(--board-slate-400);
  padding: 36px 24px 24px;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.board-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.statutory-notice-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-left: 4px solid var(--board-gold);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.statutory-notice-title {
  color: var(--board-gold);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.statutory-notice-text {
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--board-slate-300);
}

.footer-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.05);
  font-size: 0.78rem;
}

/* Responsive */
@media (max-width: 900px) {
  .board-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .session-controls {
    width: 100%;
    justify-content: space-between;
  }
  .admin-tab-btn {
    margin-left: 0;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .doc-reader-modal {
    height: 98vh;
    padding: 0;
  }
}

/* ==========================================================================
   EXECUTIVE AUTHENTICATION GATEWAY (LOGIN PRESENTATION & WORD WRAPPING)
   ========================================================================== */

.board-auth-gate {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: radial-gradient(circle at 50% 30%, #0d284f 0%, #061325 100%);
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.board-auth-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.board-auth-header {
  background: linear-gradient(135deg, #091e3a 0%, #1e3a8a 100%);
  color: #ffffff;
  padding: 32px 24px 26px;
  text-align: center;
  border-bottom: 3px solid var(--board-gold);
  position: relative;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.board-auth-header .brand-emblem {
  margin: 0 auto 14px;
}

.auth-hospital-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #f59e0b;
  letter-spacing: 1px;
  margin-bottom: 6px;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.4;
}

.auth-portal-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.auth-portal-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.board-auth-body {
  padding: 24px 24px 30px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.auth-statutory-alert {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 0.74rem;
  color: #991b1b;
  line-height: 1.5;
  margin-bottom: 22px;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.auth-statutory-alert strong {
  color: #7f1d1d;
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.auth-pwd-container {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-toggle-pwd-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-toggle-pwd-btn:hover {
  color: #0f172a;
}

.auth-submit-btn {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #091e3a 0%, #1e3a8a 100%);
  color: #ffffff;
  border: 1px solid var(--board-gold);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(10, 31, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-top: 8px;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

.auth-submit-btn:hover {
  background: linear-gradient(135deg, #0c274b 0%, #1e40af 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(10, 31, 61, 0.35);
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
  padding: 0 10px;
}

.auth-magic-notice {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.5;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.auth-magic-notice strong {
  color: #0f172a;
}

.auth-demo-shortcuts {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.demo-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  overflow-wrap: break-word;
}

.demo-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-chip-btn {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-full);
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: normal;
  text-align: center;
  overflow-wrap: break-word;
  word-break: break-word;
  line-height: 1.35;
}

.demo-chip-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
}

/* ==========================================================================
   EXECUTIVE ADMIN COMMAND BAR & ADMIN TOOLS
   Prominently displayed across all portal views when logged in as Admin
   ========================================================================== */

.admin-command-bar {
  background: linear-gradient(135deg, #091e3a 0%, #1e3a8a 100%);
  border-bottom: 3px solid var(--board-gold);
  padding: 14px 24px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease;
  box-sizing: border-box;
}

.admin-bar-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-wrap: break-word;
}

.admin-badge-pulse {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fbbf24;
  letter-spacing: 0.2px;
}

.pulse-indicator {
  width: 9px;
  height: 9px;
  background-color: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 10px #34d399;
  animation: pulseGreen 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.8); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.admin-role-tag {
  font-size: 0.73rem;
  color: #cbd5e1;
  letter-spacing: 0.5px;
}

.admin-quick-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.admin-action-btn.primary {
  background: var(--board-gold);
  color: #061325;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.35);
}
.admin-action-btn.primary:hover {
  background: #f59e0b;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
}

.admin-action-btn.secondary {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
}
.admin-action-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.admin-action-btn.success {
  background: #059669;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.35);
}
.admin-action-btn.success:hover {
  background: #047857;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.45);
}

.admin-action-btn.outline {
  background: transparent;
  color: #e2e8f0;
  border-color: #64748b;
}
.admin-action-btn.outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: #cbd5e1;
}

.admin-live-pill {
  font-size: 0.65rem;
  padding: 1px 7px;
  background: #f59e0b;
  color: #061325;
  border-radius: var(--radius-full);
  font-weight: 800;
  margin-left: 6px;
  letter-spacing: 0.3px;
}

.admin-only-btn {
  display: none;
}

/* Quick User Picker Chips in Admin Console */
.hospital-user-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.user-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: normal;
  text-align: left;
}

.user-quick-chip:hover {
  background: #dbeafe;
  border-color: #93c5fd;
  color: #1e3a8a;
  transform: translateY(-1px);
}

.admin-message-composer-card {
  background: #fefce8;
  border: 1px solid #fef08a;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

/* Responsive Rules for Small Devices */
@media (max-width: 900px) {
  .top-gov-bar {
    padding: 10px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .gov-status {
    flex-wrap: wrap;
    gap: 6px;
  }
  .board-auth-gate {
    padding: 24px 12px;
  }
  .board-auth-card {
    border-radius: 12px;
  }
  .board-auth-header {
    padding: 24px 18px 20px;
  }
  .board-auth-body {
    padding: 20px 16px 24px;
  }
  .admin-command-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }
  .admin-quick-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .admin-action-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}


