/* ============================================================
   PrompTive MUR — Pharmacy brand design system
   Light-first clinical theme. Primary: pharmacy emerald green.
   ============================================================ */

/* Global Variables & Themes */
:root {
  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-heading: 'Outfit', var(--font-family-sans);

  /* Light Theme (Default) — clean clinical mint */
  --bg-primary: #f4faf7;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9f4ee;
  --border-color: #dcebe2;
  --text-primary: #12241c;
  --text-secondary: #4d6a5e;
  --text-muted: #8aa79a;

  /* Brand accent — pharmacy emerald */
  --accent-teal: #059669;
  --accent-teal-hover: #047857;
  --accent-teal-light: rgba(5, 150, 105, 0.10);
  --accent-gradient: linear-gradient(135deg, #059669 0%, #0d9488 100%);
  --accent-blue: #2563eb;
  --accent-blue-hover: #1d4ed8;
  --accent-blue-light: rgba(37, 99, 235, 0.1);
  --accent-amber: #d97706;
  --accent-red: #e11d48;
  --accent-red-hover: #be123c;
  --accent-red-light: rgba(225, 29, 72, 0.1);

  --shadow-sm: 0 1px 2px 0 rgba(18, 36, 28, 0.05);
  --shadow-md: 0 6px 16px -4px rgba(18, 36, 28, 0.08), 0 2px 4px -2px rgba(18, 36, 28, 0.06);
  --shadow-lg: 0 18px 40px -12px rgba(18, 36, 28, 0.14), 0 6px 12px -6px rgba(18, 36, 28, 0.08);
  --shadow-glow: 0 6px 20px rgba(5, 150, 105, 0.28);

  --sidebar-width: 260px;
  --border-radius: 16px;
  --transition-speed: 0.25s;
}

[data-theme="dark"] {
  /* Dark Theme — deep forest */
  --bg-primary: #0a1310;
  --bg-secondary: #101c17;
  --bg-tertiary: #17261f;
  --border-color: #23392e;
  --text-primary: #eef7f2;
  --text-secondary: #9db8ab;
  --text-muted: #6b8578;

  --accent-teal: #34d399;
  --accent-teal-hover: #6ee7b7;
  --accent-teal-light: rgba(52, 211, 153, 0.13);
  --accent-gradient: linear-gradient(135deg, #0ea371 0%, #109d8f 100%);
  --accent-blue: #3b82f6;
  --accent-blue-hover: #60a5fa;
  --accent-blue-light: rgba(59, 130, 246, 0.15);
  --accent-amber: #f59e0b;
  --accent-red: #f43f5e;
  --accent-red-hover: #fb7185;
  --accent-red-light: rgba(244, 63, 94, 0.15);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 20px rgba(52, 211, 153, 0.25);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(1000px 520px at 90% -10%, var(--accent-teal-light), transparent 60%),
    radial-gradient(800px 480px at -10% 110%, var(--accent-teal-light), transparent 55%);
  background-attachment: fixed;
  color: var(--text-primary);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* App Layout Grid */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: background-color var(--transition-speed), border-color var(--transition-speed);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 4px 6px;
}

/* Pharmacy-cross brand badge */
.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.logo-badge svg {
  width: 18px;
  height: 18px;
}

.logo-text {
  font-family: var(--font-family-heading);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text-primary);
}

.logo-text span {
  color: var(--accent-teal);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-radius: 12px;
  font-family: var(--font-family-sans);
  font-size: 14.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-speed);
}

.nav-btn:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-btn.active {
  background-color: var(--accent-teal-light);
  border-color: var(--accent-teal-light);
  color: var(--accent-teal);
  font-weight: 600;
}

.nav-icon {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Theme Toggle Slider */
.theme-toggle-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.theme-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.theme-toggle-btn {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  position: relative;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.toggle-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-gradient);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform var(--transition-speed);
}

[data-theme="dark"] .toggle-circle {
  transform: translateX(20px);
}

/* API Status Badge */
.api-status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.green {
  background-color: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.dot.red {
  background-color: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

/* Main Content Styling */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 36px 44px;
  min-height: 100vh;
}

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

.header-titles h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 4px;
  background: linear-gradient(120deg, var(--text-primary) 55%, var(--accent-teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-titles .subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Views Setup */
.view-section {
  display: none;
  animation: fadeIn var(--transition-speed) ease-in-out;
}

.view-section.active {
  display: block;
}

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

/* Cards Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}

.grid-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-speed), box-shadow var(--transition-speed), transform var(--transition-speed);
}

.grid-card:hover {
  box-shadow: var(--shadow-md);
}

.grid-card.full-width {
  grid-column: span 2;
}

.grid-card h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
  border-left: 3px solid transparent;
  border-image: var(--accent-gradient) 1;
  padding-left: 12px;
}

/* Form Styling */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.form-group.span-2 {
  grid-column: span 2;
}

.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="password"],
textarea,
select {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  font-family: var(--font-family-sans);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-speed);
}

input[type="text"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-light);
  background-color: var(--bg-secondary);
}

/* Upload Area */
.upload-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background-color: var(--bg-primary);
  transition: all var(--transition-speed);
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent-teal);
  background-color: var(--accent-teal-light);
  transform: translateY(-1px);
}

.upload-icon {
  width: 44px;
  height: 44px;
  color: var(--accent-teal);
}

.drop-zone-text .main-text {
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.file-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background-color: var(--accent-teal-light);
  border: 1px solid var(--accent-teal);
  border-radius: 10px;
  margin-top: 16px;
  animation: fadeIn var(--transition-speed);
}

.file-info-bar span {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 80%;
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-family-sans);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-speed);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 8px;
}

.btn-xs {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.18);
}

.btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background-color: var(--accent-teal-light);
}

.btn-danger-outline {
  background: none;
  border: 1px solid var(--accent-red);
  color: var(--accent-red);
}

.btn-danger-outline:hover {
  background-color: var(--accent-red-light);
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-speed);
}

.btn-icon:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-back {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.btn-back:hover {
  color: var(--accent-teal);
}

/* Medication Grid Table */
.medication-table-card {
  margin-top: 8px;
}

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

.card-header h2 {
  margin-bottom: 0;
}

.table-actions {
  display: flex;
  gap: 10px;
}

.table-container {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-primary);
  position: relative;
}

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

th {
  background-color: var(--bg-tertiary);
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.06em;
}

td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: none;
}

.table-input {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-primary);
  transition: all var(--transition-speed);
}

.table-input:hover {
  border-color: var(--border-color);
  background-color: var(--bg-secondary);
}

.table-input:focus {
  border-color: var(--accent-teal);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent-teal-light);
}

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.generate-section {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

/* Spinner Icon */
.spinner-icon {
  animation: spin 1s linear infinite;
  width: 18px;
  height: 18px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Report Workspace Layout */
.report-workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.editor-pane {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  padding-right: 8px;
}

.editor-section-card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.editor-section-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.editor-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.editor-card-header h3 {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.editor-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-group {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  background-color: var(--bg-primary);
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.category-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-teal);
  border: none;
  background: transparent;
  outline: none;
  width: 70%;
}

.bullet-list-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bullet-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.bullet-dot {
  color: var(--accent-teal);
  margin-top: 8px;
  font-size: 16px;
  line-height: 1;
}

.bullet-textarea {
  flex: 1;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  resize: vertical;
  min-height: 38px;
}

.bullet-textarea:focus {
  border-color: var(--accent-teal);
}

.flex-gap-2 {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Live Preview Panel */
.preview-pane {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: calc(100vh - 180px);
}

.preview-header-bar {
  display: flex;
  justify-content: space-between;
  background-color: var(--bg-tertiary);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
}

.preview-zoom {
  background-color: var(--accent-teal-light);
  color: var(--accent-teal);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
}

.print-preview-container {
  padding: 20px;
  background-color: var(--bg-tertiary);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  flex: 1;
}

/* High Fidelity Print Preview Document (Standard A4 representation)
   NOTE: The printed report is intentionally plain black-on-white —
   it must stay audit / HIQA standard. Do not theme this block. */
.mur-print-document {
  background-color: #ffffff;
  color: #000000;
  width: 595px;
  min-height: 842px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-family: Arial, Helvetica, sans-serif;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  flex-shrink: 0; /* Prevents flex-parent from shrinking the A4 sheet height */
}

.print-header {
  text-align: center;
  border-bottom: 2px solid #000000;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.print-title {
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #000000;
  margin: 0;
}

.print-subtitle {
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  color: #4b5563;
  margin: 4px 0 0 0;
}

.print-section {
  margin-bottom: 20px;
}

.section-title {
  font-size: 13px;
  font-weight: bold;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 4px;
  margin-bottom: 10px;
  color: #000000;
  text-transform: capitalize;
}

.details-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}

.details-row {
  display: flex;
}

.details-row .label {
  font-weight: bold;
  width: 100px;
}

.details-row .val {
  flex: 1;
}

.print-text {
  font-size: 10px;
  line-height: 1.4;
  color: #1f2937;
  margin-bottom: 8px;
}

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }

.flex-justify-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Printed Table */
.print-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
  font-size: 10px;
}

.print-table th {
  background-color: #f3f4f6;
  color: #000000;
  font-weight: bold;
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  font-size: 10px;
  text-transform: none;
  letter-spacing: normal;
}

.print-table td {
  border: 1px solid #d1d5db;
  padding: 6px 8px;
  color: #1f2937;
}

/* Bullet list in printing */
.print-bullets {
  list-style: none;
  padding-left: 0;
  margin-bottom: 8px;
}

.print-bullets li {
  font-size: 10px;
  line-height: 1.4;
  position: relative;
  padding-left: 12px;
  margin-bottom: 4px;
  color: #1f2937;
}

.print-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #000000;
  font-weight: bold;
}

.print-clinical-cat {
  margin-bottom: 12px;
}

.print-clinical-cat-title {
  font-size: 11px;
  font-weight: bold;
  color: #111827;
  margin-bottom: 4px;
}

.sub-section-title {
  font-size: 10px;
  font-weight: bold;
  margin: 10px 0 6px 0;
}

.print-signoff {
  margin-top: 40px;
  border-top: 1px solid #d1d5db;
  padding-top: 16px;
  font-size: 11px;
}

.signoff-row {
  display: flex;
  margin-bottom: 8px;
}

.signoff-row .label {
  font-weight: bold;
  width: 140px;
}

.signoff-row .val-line {
  flex: 1;
  border-bottom: 1px dotted #9ca3af;
  padding-bottom: 2px;
}

.print-regulation-notice {
  font-size: 8.5px;
  font-style: italic;
  color: #6b7280;
  text-align: center;
}

.page-footer {
  position: absolute;
  bottom: 20px;
  right: 40px;
  font-size: 9px;
  color: #9ca3af;
}

/* History List Styling */
.history-container {
  margin-top: 8px;
}

.search-bar-container {
  display: flex;
  align-items: center;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 14px;
  gap: 10px;
  margin-bottom: 24px;
  transition: all var(--transition-speed);
}

.search-bar-container:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-light);
}

.search-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

#history-search {
  border: none;
  background: transparent;
  flex: 1;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
}

#history-search:focus {
  box-shadow: none;
  border: none;
}

.history-table-wrapper {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
}

.history-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.history-table tbody tr:hover {
  background-color: var(--accent-teal-light);
}

.history-row-actions {
  display: flex;
  gap: 6px;
}

/* Help / Caption text */
.help-text {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--bg-secondary);
  border-left: 4px solid var(--accent-teal);
  border-top: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.error {
  border-left-color: var(--accent-red);
}

/* SVG icon dimensions (replacing Tailwind classes) */
.w-4.h-4 {
  width: 16px;
  height: 16px;
}
.w-5.h-5 {
  width: 20px;
  height: 20px;
}
.w-6.h-6 {
  width: 24px;
  height: 24px;
}

/* Print Styling Overlay Override */
@media print {
  @page {
    size: auto;
    /* Real per-page margins. A body margin only pads the first/last page,
       so content at the top of pages 2+ was clipped by the printer's
       unprintable edge (missing section headings). */
    margin: 18mm 15mm;
  }

  /* Hide all dashboard-specific elements and headers completely */
  .sidebar,
  .sidebar-footer,
  .content-header,
  header,
  .editor-pane,
  .preview-header-bar,
  #toast-notification,
  #back-to-input-btn {
    display: none !important;
  }

  /* Reset main layout containers for full-width print */
  body {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    margin: 0 !important; /* Page margins come from @page, which repeats on every sheet */
    padding: 0 !important;
  }

  .app-container {
    display: block !important;
    background: #ffffff !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
  }

  .report-workspace {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .preview-pane {
    border: none !important;
    box-shadow: none !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
  }

  .print-preview-container {
    padding: 0 !important;
    margin: 0 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
    overflow-y: visible !important;
    display: block !important;
    width: 100% !important;
  }

  .mur-print-document {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important; /* Reset padding since page margins are set on body */
    background: #ffffff !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .print-section {
    page-break-inside: avoid !important;
    margin-bottom: 24px !important;
  }

  /* Never leave a heading stranded at the bottom of a page,
     separated from the content it introduces */
  .section-title,
  .sub-section-title,
  .print-clinical-cat-title {
    page-break-after: avoid !important;
    break-after: avoid !important;
    page-break-inside: avoid !important;
  }

  .print-clinical-cat {
    page-break-inside: avoid !important;
  }

  .print-signoff {
    page-break-inside: avoid !important;
    margin-top: 36px !important;
  }

  .print-table tr {
    page-break-inside: avoid !important;
  }

  /* Force table formatting in print */
  .print-table {
    width: 100% !important;
    border-collapse: collapse !important;
  }

  .print-table th {
    background-color: #f3f4f6 !important;
    color: #000000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
