/* Modern Clinical / Laboratory Styling for Bacteriology Unit */
:root {
  --primary: #1e40af;
  --primary-hover: #1d4ed8;
  --primary-light: #dbeafe;
  --secondary: #475569;
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  
  --sensitive-bg: #f0fdf4;
  --sensitive-border: #86efac;
  --sensitive-text: #166534;
  --sensitive-badge: #bbf7d0;

  --intermediate-bg: #fffbeb;
  --intermediate-border: #fde68a;
  --intermediate-text: #92400e;
  --intermediate-badge: #fef3c7;

  --resistant-bg: #fef2f2;
  --resistant-border: #fecaca;
  --resistant-text: #991b1b;
  --resistant-badge: #fee2e2;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
  font-family: Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 60px;
}

.app-nav-shell {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-bottom: 0.4rem;
  background: rgba(248, 250, 252, 0.96);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

/* App Header */
.app-header {
  background-color: var(--surface);
  padding: 0.4rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: bold;
}

.brand-titles h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: -0.01em;
}

/* Nav Actions */
.header-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}

.app-header .btn {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

.header-db-btn.active,
.header-db-btn.active:hover {
  color: white;
  background: var(--primary);
  border-color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background-color: #2563eb;
  color: white;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-sm {
  padding: 0.3rem 0.6rem;
  font-size: 0.775rem;
}

.btn-icon-only {
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
}

.btn-icon-only:hover {
  background: #e2e8f0;
}

/* Navigation Tabs */
.tabs-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.35rem;
  display: flex;
  gap: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  flex: 1;
  justify-content: center;
  min-height: 38px;
  padding: 0.45rem 1rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: inherit;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.card-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-heading-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.tab-btn.active {
  color: white;
  background: var(--primary);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
  background: #f1f5f9;
}

.tab-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.tab-step,
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.75rem;
  line-height: 1;
}

.tab-btn.active .tab-step,
.tab-btn.active .tab-count,
.header-db-btn.active .tab-count {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Main Container */
.main-content {
  max-width: 1360px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Patient Information Card */
.patient-info-card {
  background: #ffffff;
  border-top: 4px solid #0284c7;
  margin-bottom: 1.5rem;
}

.form-grid-patient {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
}

@media (max-width: 800px) {
  .form-grid-patient {
    grid-template-columns: 1fr;
  }
}

.input-prefix-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.input-prefix-group .prefix-select {
  flex: 0 0 170px;
  font-weight: 500;
  background-color: #f8fafc;
  cursor: pointer;
}

.input-prefix-group .prefix-input {
  flex: 1;
}

.age-sex-group {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.age-sex-group .age-input {
  flex: 0 0 90px;
  text-align: center;
}

.age-sex-group .age-unit-select {
  flex: 1;
  background-color: #f8fafc;
}

.age-sex-group .sex-select {
  flex: 1;
  background-color: #f8fafc;
}

/* Specimen Header Card */
.specimen-header-card {
  background: linear-gradient(to bottom, #ffffff, #f8fafc);
  border-top: 4px solid var(--primary);
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1.4fr 1.3fr 1fr;
  gap: 1.25rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .form-grid-3 {
    grid-template-columns: 1fr;
  }
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
}

.field-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.input-text {
  width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: Arial, sans-serif;
}

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

.field-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Table Header Row */
.table-header-row {
  display: grid;
  grid-template-columns: 380px 1fr 85px;
  gap: 1rem;
  padding: 0.55rem 1.2rem;
  background: #f1f5f9;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  color: #334155;
  margin-bottom: 0.75rem;
}

/* Sensitivity Sections */
.sensitivity-section {
  border-radius: 8px;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border-light);
  background: white;
  position: relative;
}

.sensitivity-section:focus-within {
  z-index: 50;
}

.section-header {
  padding: 0.65rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  border-top-left-radius: 7px;
  border-top-right-radius: 7px;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.section-header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-sensitive .section-header {
  background-color: var(--sensitive-bg);
  border-bottom: 1px solid var(--sensitive-border);
  color: var(--sensitive-text);
}
.section-sensitive .badge {
  background-color: var(--sensitive-badge);
  color: var(--sensitive-text);
}

.section-intermediate .section-header {
  background-color: var(--intermediate-bg);
  border-bottom: 1px solid var(--intermediate-border);
  color: var(--intermediate-text);
}
.section-intermediate .badge {
  background-color: var(--intermediate-badge);
  color: var(--intermediate-text);
}

.section-resistant .section-header {
  background-color: var(--resistant-bg);
  border-bottom: 1px solid var(--resistant-border);
  color: var(--resistant-text);
}
.section-resistant .badge {
  background-color: var(--resistant-badge);
  color: var(--resistant-text);
}

/* Antibiotic Table Rows */
.antibiotic-rows-container {
  padding: 0.5rem 1.2rem 0.75rem;
}

.antibiotic-row {
  display: grid;
  grid-template-columns: 380px 1fr 85px;
  gap: 1rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px dashed var(--border-light);
  position: relative;
}

.antibiotic-row:focus-within {
  z-index: 100;
}

.antibiotic-row:last-child {
  border-bottom: none;
}

@media (max-width: 900px) {
  .table-header-row,
  .antibiotic-row {
    grid-template-columns: 1fr;
  }
}

.row-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
}

.btn-del {
  color: #dc2626;
}
.btn-del:hover {
  background-color: #fee2e2;
  border-color: #fca5a5;
}

.add-row-bar {
  padding: 0 1rem 0.75rem;
  display: flex;
  justify-content: flex-start;
}

/* Searchable Autocomplete Dropdown */
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 320px;
  overflow-y: auto;
  background: white;
  border: 1.5px solid #3b82f6;
  border-radius: 8px;
  box-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.22), 0 8px 10px -6px rgba(0, 0, 0, 0.12);
  z-index: 99999;
  margin-top: 4px;
  display: none;
}

.autocomplete-dropdown.show {
  display: block;
}

.autocomplete-item {
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background-color: #eff6ff;
}

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

.item-name {
  font-weight: 700;
  font-size: 0.885rem;
  color: #1e293b;
}

.item-highlight {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 800;
}

.item-category {
  font-size: 0.7rem;
  background: #f1f5f9;
  color: #475569;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-weight: 500;
}

.item-trade-preview {
  font-size: 0.725rem;
  color: #64748b;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Footnotes Box */
.footnotes-box {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footnotes-box p {
  margin-bottom: 0.25rem;
}

.footnotes-box strong {
  color: #334155;
}

/* =========================================================
   OFFICIAL PAPER PREVIEW & PRINT STYLING
   Accurately replicates the official paper report layout
   ========================================================= */
.preview-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.official-paper-sheet {
  background: white;
  width: 100%;
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 0.591in 0.492in 1.083in;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  font-family: Arial, Helvetica, sans-serif;
  color: black;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

/* Section 1: Top Doctor Header */
.official-doctor-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  padding: 0 4px;
  font-family: "Times New Roman", Times, serif;
  color: #000000;
}

.doctor-header-col {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.doctor-header-left,
.doctor-header-right {
  text-align: center;
  direction: rtl;
}

.doc-header-line-1 {
  font-size: 11pt;
  font-weight: normal;
  letter-spacing: 0.2px;
}

.doc-header-line-2 {
  font-size: 13pt;
  font-weight: bold;
  color: #000000;
}

.doc-header-line-3 {
  font-size: 11pt;
  font-weight: normal;
}

.doc-header-divider {
  display: none;
}

/* Section 2: Patient & Customer Information Block */
.official-patient-block {
  border-top: 1.5px solid #000000;
  border-bottom: 1.5px solid #000000;
  background-color: #c0c0c0;
  padding: 6px 4px;
  margin-bottom: 16px;
  font-family: "Times New Roman", Times, serif;
  font-size: 11pt;
  color: #000000;
}

.patient-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  column-gap: 24px;
  row-gap: 3px;
}

.patient-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.patient-row {
  display: flex;
  align-items: baseline;
  min-height: 22px;
}

.patient-col:first-child .patient-label {
  flex: 0 0 130px;
  font-weight: bold;
  color: #000000;
  font-size: 12pt;
}

.patient-col:last-child .patient-label {
  flex: 0 0 165px;
  font-weight: bold;
  color: #000000;
  font-size: 12pt;
}

.patient-sep {
  flex: 0 0 14px;
  font-weight: bold;
  text-align: left;
  color: #000000;
}

.patient-value {
  flex: 1;
  font-weight: bold;
  color: #000000;
  font-size: 12pt;
}

.patient-col:first-child .patient-value {
  text-align: right;
  padding-right: 15px;
}

.official-logo-wrapper {
  text-align: center;
  margin-bottom: 1.25rem;
}

.official-header-img {
  width: 360px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.official-header-box {
  display: inline-block;
  background: #ffffff;
  border: 2.5px solid #111827;
  box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.35);
  padding: 8px 36px;
  margin: 0 auto 0.75rem auto;
  font-family: "Times New Roman", Times, Georgia, "Palatino Linotype", serif;
  font-style: italic;
  font-weight: bold;
  font-size: 26pt;
  color: #111827;
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 1.25;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.official-title {
  font-size: 16pt;
  font-weight: bold;
  margin-bottom: 4px;
  color: black;
}

.official-subtitle-line {
  font-size: 13pt;
  font-weight: normal;
  margin-bottom: 4px;
  color: black;
}

.official-organism {
  font-style: italic;
  font-weight: bold;
  text-decoration: underline;
}

/* Official 2-Column Table */
.official-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1.5px solid black;
  margin-top: 10px;
  margin-bottom: 10px;
  direction: ltr;
}

.official-table th,
.official-table td {
  border-left: 1px solid black;
  border-right: 1px solid black;
  padding: 1px 6px;
  font-size: 11pt;
  line-height: 1.05;
  vertical-align: middle;
  box-sizing: border-box;
  overflow-wrap: break-word;
  text-align: left;
}

.official-table th {
  font-weight: normal;
  font-style: italic;
  border-bottom: 1.5px solid black;
  background-color: white;
  text-align: left;
}

.official-table th strong {
  font-weight: bold;
}

.official-table thead tr {
  height: 20pt;
}

.official-table col.col-generic,
.official-table th.col-generic,
.official-table td.cell-generic {
  width: 30.263%;
}

.official-table td.cell-generic {
  font-weight: normal;
}

.official-table col.col-trade,
.official-table th.col-trade,
.official-table td.cell-trade {
  width: 69.737%;
}

.official-table td.cell-trade {
  font-weight: normal;
}

.official-table tr.section-row td {
  font-weight: bold;
  font-style: italic;
  text-align: left;
  font-size: 13pt;
  border-top: 1.5px solid black;
  border-bottom: 1.5px solid black;
  background-color: white;
  padding: 1px 6px;
  height: 18pt;
  width: 100%;
}

.official-table tr.section-row td span {
  position: relative;
  left: 30.263%;
  display: block;
  width: max-content;
  transform: translateX(-50%);
}

.official-table tr.data-row td {
  border-top: 1px dotted #888;
  border-bottom: 1px dotted #888;
  height: 16pt;
}

#preview-sensitive-body td,
#print-sensitive-body td {
  font-weight: bold;
}

.official-table tr.data-row:first-of-type td {
  border-top: none;
}

.official-footnotes {
  font-size: 9.5pt;
  line-height: 1.45;
  margin-top: 10px;
  color: black;
}

.official-comment-container {
  margin: 12px 0 8px;
  font-size: 11pt;
  line-height: 1.4;
  color: black;
}

.official-comment-container strong {
  font-weight: bold;
}

.official-footnotes p {
  margin-bottom: 2px;
}

.official-report-footer {
  margin-top: auto;
  padding-top: 12mm;
  color: black;
  break-inside: avoid;
}

.official-signatures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20mm;
  margin: 0 8mm 14mm;
  font-family: "Times New Roman", Times, serif;
  font-size: 10.5pt;
  font-style: italic;
  line-height: 1.2;
  text-align: center;
}

.official-signature {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.official-signature strong {
  font-size: 11pt;
}

.official-address {
  font-size: 9pt;
  line-height: 1.3;
  text-align: center;
}

/* Template Customization Modal */
.template-modal-content {
  max-width: 760px !important;
  max-height: 88vh;
  overflow-y: auto;
}

.template-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.template-form-section-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e3a8a;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.35rem;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  grid-column: span 2;
}

.template-form-section-title:first-of-type {
  margin-top: 0;
}

.template-col-span-2 {
  grid-column: span 2;
}

/* Database Manager View */
.db-manager-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.db-search-input {
  max-width: 480px;
  width: 100%;
}

.db-subtabs {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.db-subtab-btn {
  padding: 0.45rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-muted);
  transition: all 0.15s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
}

.db-subtab-btn:hover {
  background: #f1f5f9;
  color: var(--text);
}

.db-subtab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.db-table th, .db-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-light);
  text-align: left;
}

.db-table th {
  background: #f8fafc;
  font-weight: 600;
  color: var(--secondary);
}

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

.db-trade-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.db-trade-tag {
  background: #e0f2fe;
  color: #0369a1;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.775rem;
  font-weight: 500;
}

/* Modal for Adding/Editing Antibiotics & Organisms */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  border-radius: 10px;
  padding: 1.75rem;
  width: 92%;
  max-width: 650px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.65rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-light);
}

/* Notification Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 0.75rem 1.25rem;
  background: #1e293b;
  color: white;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  z-index: 3000;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.25s ease-out;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.toast-success {
  background: #15803d;
}

.toast.toast-error {
  background: #b91c1c;
}

.toast.toast-info {
  background: #2563eb;
}

/* Hide print container on screen */
.print-only-container {
  display: none;
}

/* =========================================================
   PRINT MEDIA RULES
   Activates ONLY during window.print() or Cmd+P
   ========================================================= */
@media print {
  @page {
    size: A4 portrait;
    margin: 0.591in 0.492in 1.083in;
  }

  body {
    background: white !important;
    padding: 0 !important;
    font-size: 11pt !important;
    color: black !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-nav-shell,
  .app-header,
  .tabs-container,
  .main-content,
  .preview-actions-bar,
  .toast,
  .modal-backdrop,
  .btn,
  .badge {
    display: none !important;
  }

  .print-only-container {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .official-paper-sheet {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    min-height: 10.02in !important;
  }

  .official-header-img {
    width: 320px !important;
  }
}

@media (max-width: 900px) {
  .app-header {
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
  }

  .tabs-container {
    margin: 0 0.75rem;
    overflow-x: auto;
  }

  .tab-btn {
    white-space: nowrap;
  }

  .card-heading-row {
    align-items: flex-start;
  }

  .card-heading-actions > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
