@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.3.0/fonts/remixicon.css');

:root {
  /* ========================================================================
     PREMIUM MODERN CORPORATE COLOR PALETTE
     White • Light Gray • Navy Blue • Subtle Gold Accents
     ======================================================================== */
  --c-white: #ffffff;
  --c-bg-canvas: #f8fafc;        /* Soft pristine canvas */
  --c-bg-surface: #f1f5f9;       /* Light gray surface */
  --c-bg-subtle: #f8f9fc;
  --c-border-light: #e2e8f0;     /* Ultra-clean light gray border */
  --c-border-medium: #cbd5e1;

  /* Navy Blue Family (Primary Executive Identity) */
  --c-navy-dark: #090915;        /* Deep Executive Navy */
  --c-navy-primary: #001bb7;     /* Brand Royal Navy */
  --c-navy-bright: #0046ff;      /* Dynamic Bright Navy */
  --c-navy-surface: #0e1124;

  /* Subtle Gold Accents */
  --c-gold: #c59b27;             /* Refined Champagne Gold */
  --c-gold-light: #d4af37;
  --c-gold-soft: rgba(197, 155, 39, 0.12);
  --c-gold-border: rgba(197, 155, 39, 0.35);

  /* Typography Hierarchy */
  --text-main: #090915;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Semantic Status Colors (High Contrast on Neutral Cells) */
  --st-excellent: #047857;       /* Deep Forest Green */
  --st-very-good: #0e7490;       /* Slate Teal */
  --st-good: #001bb7;            /* Brand Royal Navy */
  --st-average: #b45309;         /* Amber Ochre */
  --st-weak: #c2410c;            /* Burnt Warm Orange */
  --st-maintenance: #6d28d9;     /* Imperial Purple */
  --st-replacement: #b91c1c;     /* Crimson Red */
  --st-modified: #475569;        /* Balanced Slate */

  /* Soft Ambient Shadows */
  --shadow-sm: 0 1px 3px rgba(9, 9, 21, 0.03), 0 1px 2px rgba(9, 9, 21, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(9, 9, 21, 0.05), 0 2px 6px -1px rgba(9, 9, 21, 0.02);
  --shadow-elevated: 0 12px 32px -4px rgba(9, 9, 21, 0.07), 0 4px 12px -2px rgba(9, 9, 21, 0.03);
  --shadow-sheet: 0 16px 48px -8px rgba(9, 9, 21, 0.1);

  --font-cairo: 'Cairo', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Rounded Elements */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

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

body {
  font-family: var(--font-cairo);
  background-color: var(--c-bg-canvas);
  color: var(--text-main);
  direction: rtl;
  text-align: right;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   REMIX ICON GLOBAL STYLING (STRICT NO-EMOJI SYSTEM)
   ========================================================================== */
i[class^="ri-"], i[class*=" ri-"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: -0.125em;
  line-height: 1;
  font-style: normal;
}

/* ==========================================================================
   EXECUTIVE CORPORATE NAVBAR
   ========================================================================== */
.app-header {
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border-light);
  padding: 0.9rem 2.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.brand-header-logo-wrap {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo-image {
  height: 42px;
  width: auto;
  object-fit: contain;
}

/* Modern Rounded Nav Tabs */
.nav-tabs {
  display: flex;
  gap: 0.35rem;
  background: var(--c-bg-surface);
  padding: 5px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border-light);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-cairo);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tab-btn i {
  font-size: 1.05rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.tab-btn:hover {
  color: var(--c-navy-dark);
  background: rgba(255, 255, 255, 0.7);
}

.tab-btn:hover i {
  color: var(--c-navy-primary);
}

.tab-btn.active {
  background: var(--c-white);
  color: var(--c-navy-primary);
  box-shadow: 0 2px 8px rgba(0, 27, 183, 0.08);
  border: 1px solid rgba(0, 27, 183, 0.1);
}

.tab-btn.active i {
  color: var(--c-navy-primary);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Executive Buttons with Soft Rounded Borders */
.btn {
  font-family: var(--font-cairo);
  font-weight: 700;
  font-size: 0.86rem;
  padding: 0.55rem 1.35rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.3;
}

.btn i {
  font-size: 1.05rem;
}

.btn-primary {
  background-color: var(--c-navy-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #001694;
  box-shadow: 0 4px 14px rgba(0, 27, 183, 0.25);
}

.btn-accent {
  background: var(--c-navy-dark);
  color: #ffffff;
  border: 1px solid var(--c-navy-dark);
  position: relative;
}

.btn-accent::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background-color: var(--c-gold);
  border-radius: var(--radius-pill);
}

.btn-accent:hover {
  background-color: #16182e;
  box-shadow: 0 4px 14px rgba(9, 9, 21, 0.15);
}

.btn-outline {
  background: var(--c-white);
  color: var(--text-secondary);
  border: 1px solid var(--c-border-light);
}

.btn-outline:hover {
  background: var(--c-bg-surface);
  color: var(--c-navy-dark);
  border-color: var(--c-border-medium);
}

.btn-sm {
  padding: 0.42rem 0.95rem;
  font-size: 0.8rem;
}

/* App Main Container with Balanced Breathing Room */
.app-container {
  max-width: 1440px;
  margin: 2.25rem auto;
  padding: 0 2.25rem 4rem;
}

.tab-pane {
  display: none;
}

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

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

/* ==========================================================================
   OFFICIAL PRINTABLE INSPECTION REPORT (A4 FORMAT)
   ========================================================================== */
.report-print-controls {
  background: var(--c-white);
  padding: 1.35rem 2rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.report-sheets-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* A4 Sheet Dimensions & Paper Texture */
.report-page {
  background: #ffffff;
  width: 210mm;
  min-height: 297mm;
  height: 297mm;
  max-height: 297mm;
  padding: 9mm 14mm 9mm;
  margin: 0 auto;
  box-shadow: var(--shadow-sheet);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid var(--c-border-light);
}

/* ==========================================================================
   PAGE 1 HEADER: SOPHISTICATED CORPORATE BRANDING & BREATHING SPACE
   ========================================================================== */
.rep-header-page1 {
  border-bottom: 1.5px solid var(--c-navy-dark);
  padding-bottom: 0.55rem;
  margin-bottom: 0.55rem;
  position: relative;
}

.rep-top-banner-p1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 0.5rem;
}

.rep-logo-img-lockup {
  max-width: 270px;
  height: auto;
  object-fit: contain;
}

.rep-center-title-p1 {
  text-align: center;
}

.rep-center-title-p1 h2 {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--c-navy-dark);
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.rep-center-title-p1 .en-sub {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.rep-accent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--c-bg-surface);
  color: var(--c-navy-primary);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--c-border-light);
  margin-top: 3px;
}

.rep-location-box {
  font-size: 0.68rem;
  color: var(--text-secondary);
  line-height: 1.4;
  text-align: left;
  border-right: 2px solid var(--c-gold);
  padding-right: 0.75rem;
}

.rep-location-box .loc-bold {
  font-weight: 800;
  color: var(--c-navy-dark);
}

/* Metadata Grid Table */
.rep-meta-grid {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5rem;
  border: 1px solid var(--c-border-light);
  font-size: 0.73rem;
}

.rep-meta-grid td {
  border: 1px solid var(--c-border-light);
  padding: 0.24rem 0.55rem;
  vertical-align: middle;
}

.rep-meta-grid .m-lbl {
  font-weight: 700;
  background-color: var(--c-bg-surface);
  width: 15%;
  color: var(--c-navy-dark);
}

.rep-meta-grid .m-val {
  width: 35%;
  color: #1e293b;
  font-weight: 600;
}

.rep-meta-grid .m-val.highlight {
  font-weight: 800;
  color: var(--c-navy-primary);
}

/* Saudi License Plate Badge (Remix Icon flag, no emoji) */
.saudi-plate-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #ffffff;
  border: 1px solid var(--c-navy-dark);
  border-radius: var(--radius-xs);
  padding: 0 6px;
  font-family: var(--font-cairo);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--c-navy-dark);
}

.saudi-plate-badge .ksa-emblem {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--c-navy-primary);
  border-left: 1px solid var(--c-navy-dark);
  padding-left: 5px;
  margin-left: 2px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* Inspection Legend Box (Page 1) */
.rep-legend-box {
  background-color: #fafbfc;
  border: 1px solid var(--c-border-light);
  border-top: 2px solid var(--c-navy-primary);
  border-radius: var(--radius-xs);
  padding: 0.32rem 0.6rem;
  margin-bottom: 0.5rem;
}

.rep-legend-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-navy-dark);
}

.rep-legend-head i {
  color: var(--c-navy-primary);
  font-size: 0.85rem;
}

.rep-legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.3rem;
}

.rep-legend-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  padding: 0.16rem 0.45rem;
  border: 1px solid var(--c-border-light);
  border-radius: 2px;
  font-size: 0.66rem;
  font-weight: 700;
}

/* ==========================================================================
   SUBSEQUENT PAGES (2, 3, 4) HEADER WITH REMIX ICON
   ========================================================================== */
.rep-header-subpage {
  border-bottom: 1.5px solid var(--c-navy-dark);
  padding-bottom: 0.4rem;
  margin-bottom: 0.5rem;
  position: relative;
}

.rep-top-banner-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rep-app-icon-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.rep-subpage-title-center {
  text-align: center;
}

.rep-subpage-title-center h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--c-navy-dark);
  line-height: 1.15;
}

.rep-subpage-title-center span {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.rep-subpage-meta-left {
  text-align: left;
  font-size: 0.66rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.rep-accent-divider {
  height: 1.5px;
  background: linear-gradient(90deg, var(--c-gold) 0%, transparent 100%);
  margin-top: 0.35rem;
  width: 100%;
}

/* ==========================================================================
   RESTRUCTURED TABLES (STRICT USER SPECIFICATIONS)
   ========================================================================== */
.rep-content {
  flex: 1;
}

.rep-section-block {
  margin-bottom: 0.5rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Main Section Bar: Deep Navy with White Text & Subtle Gold Line */
.rep-section-bar {
  background-color: var(--c-navy-dark);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--c-gold);
}

.rep-section-bar span:first-child {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.rep-section-bar span:first-child i {
  color: var(--c-gold);
  font-size: 0.92rem;
}

.rep-section-bar .en-sec {
  font-size: 0.68rem;
  font-weight: 500;
  color: #cbd5e1;
  letter-spacing: 0.3px;
}

/* Table Structure */
.rep-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  border: 1px solid var(--c-border-light);
  border-top: none;
}

.rep-table thead {
  display: table-header-group;
}

.rep-table tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

.rep-table th {
  background-color: var(--c-bg-surface);
  color: var(--c-navy-dark);
  border: 1px solid var(--c-border-light);
  padding: 0.28rem 0.55rem;
  font-weight: 800;
  font-size: 0.71rem;
}

.rep-table td {
  border: 1px solid var(--c-border-light);
  padding: 0.2rem 0.55rem;
  vertical-align: middle;
}

/* Zebra Striping (Subtle, Clean & Readable) */
.rep-table tbody tr:nth-child(even) {
  background-color: #fafbfc;
}

.rep-table tbody tr:nth-child(odd) {
  background-color: #ffffff;
}

/* 1. Col 1: # (6%) */
.rep-table .col-num {
  width: 6%;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
}

/* 2. Col 2: نقطة الفحص (42% - Right Aligned) */
.rep-table .col-point {
  width: 42%;
  text-align: right;
  font-weight: 700;
  color: var(--c-navy-dark);
}

/* 3. Col 3: حالة الفحص (24% - Center Aligned, Neutral Background) */
.rep-table .col-status {
  width: 24%;
  text-align: center;
  background-color: transparent !important;
}

/* 4. Col 4: الملاحظات الفنية (28% - Right Aligned) */
.rep-table .col-notes {
  width: 28%;
  text-align: right;
  font-size: 0.69rem;
  color: var(--text-secondary);
}

.rem-default-text {
  color: var(--text-light);
  font-weight: 500;
}

.rem-actual-text {
  color: var(--c-navy-dark);
  font-weight: 700;
}

/* Semantic Status Text on Neutral Background */
.status-text-val {
  font-weight: 800;
  font-size: 0.73rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  line-height: 1.2;
}

.status-text-val.stg-excellent { color: var(--st-excellent); }
.status-text-val.stg-very-good { color: var(--st-very-good); }
.status-text-val.stg-good { color: var(--st-good); }
.status-text-val.stg-average { color: var(--st-average); }
.status-text-val.stg-weak { color: var(--st-weak); }
.status-text-val.stg-maintenance { color: var(--st-maintenance); }
.status-text-val.stg-replacement { color: var(--st-replacement); font-weight: 900; }
.status-text-val.stg-modified { color: var(--st-modified); }

.status-code-tag {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  opacity: 0.75;
}

/* ==========================================================================
   PAGE 4: ACCREDITATION, STAMP & SIGNATURES
   ========================================================================== */
.rep-accreditation-box {
  background-color: #fafbfc;
  border: 1px solid var(--c-border-light);
  border-top: 2px solid var(--c-navy-dark);
  border-radius: var(--radius-xs);
  padding: 0.6rem 0.9rem;
  margin-top: 0.45rem;
  margin-bottom: 0.45rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rep-summary-stats {
  display: flex;
  gap: 1.5rem;
}

.rep-sum-item {
  display: flex;
  flex-direction: column;
}

.rep-sum-item .s-val {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--c-navy-dark);
  line-height: 1;
}

.rep-sum-item .s-lbl {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--text-muted);
}

.rep-seal-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-right: 1px solid var(--c-border-light);
  padding-right: 0.9rem;
}

.rep-seal-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1.5px solid var(--c-navy-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--c-navy-dark);
  font-size: 0.55rem;
  font-weight: 900;
  text-align: center;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px var(--c-gold-soft);
}

.rep-signatures-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 0.4rem 1rem;
  margin-top: 0.35rem;
}

.rep-sign-column {
  text-align: center;
}

.rep-sign-line {
  border-top: 1px solid var(--c-border-medium);
  padding-top: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--c-navy-dark);
}

.rep-sign-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.rep-omitted-column-notice {
  font-size: 0.64rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding: 0.25rem 0.55rem;
  background: var(--c-bg-surface);
  border-radius: var(--radius-xs);
  border-right: 2px solid var(--c-gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.rep-omitted-column-notice i {
  color: var(--c-gold);
  font-size: 0.85rem;
}

/* ==========================================================================
   REPORT FOOTER (ALL 4 PAGES)
   ========================================================================== */
.rep-footer {
  margin-top: auto;
  border-top: 1px solid var(--c-navy-dark);
  padding-top: 0.35rem;
}

.rep-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  color: var(--text-muted);
}

.rep-barcode-view {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.barcode-lines {
  letter-spacing: 2px;
  font-weight: 900;
  font-size: 0.95rem;
  color: var(--c-navy-dark);
}

.rep-barcode-text {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--c-navy-primary);
  font-size: 0.7rem;
}

.rep-page-number {
  font-weight: 800;
  color: var(--c-navy-dark);
}

/* ==========================================================================
   MINIMALIST CORPORATE DASHBOARD (ALL REMIX ICONS)
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 1.15rem;
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.stat-icon.blue { background: rgba(0, 70, 255, 0.08); color: var(--c-navy-primary); }
.stat-icon.green { background: rgba(4, 120, 87, 0.08); color: var(--st-excellent); }
.stat-icon.orange { background: rgba(197, 155, 39, 0.1); color: var(--c-gold); }
.stat-icon.red { background: rgba(185, 28, 28, 0.08); color: var(--st-replacement); }
.stat-icon.purple { background: rgba(109, 40, 217, 0.08); color: var(--st-maintenance); }

.stat-info .stat-value {
  font-size: 1.9rem;
  font-weight: 900;
  line-height: 1.1;
  color: var(--c-navy-dark);
}

.stat-info .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.toolbar-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.75rem;
  margin-bottom: 2rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 2.6rem 0.65rem 1rem;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-cairo);
  font-size: 0.9rem;
  outline: none;
  background: var(--c-bg-surface);
  color: var(--text-main);
  transition: all 0.2s;
}

.search-box input:focus {
  background: #ffffff;
  border-color: var(--c-navy-primary);
  box-shadow: 0 0 0 3px rgba(0, 27, 183, 0.08);
}

.search-box .search-icon {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 1.1rem;
  pointer-events: none;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-pill {
  border: 1px solid var(--c-border-light);
  background: var(--c-bg-surface);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-family: var(--font-cairo);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.filter-pill:hover {
  border-color: var(--c-border-medium);
  color: var(--c-navy-dark);
}

.filter-pill.active {
  background: var(--c-navy-dark);
  color: #ffffff;
  border-color: var(--c-navy-dark);
}

.sections-accordion {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-box {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.section-box-header {
  background: var(--c-white);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-bottom: 1px solid var(--c-border-light);
  transition: background 0.2s;
}

.section-box-header:hover {
  background: var(--c-bg-surface);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-navy-dark);
}

.section-title i {
  color: var(--c-navy-primary);
  font-size: 1.2rem;
}

.section-title .sec-badge {
  background: var(--c-bg-surface);
  color: var(--c-navy-primary);
  border: 1px solid var(--c-border-light);
  font-size: 0.74rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
}

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

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.items-table th {
  background: var(--c-bg-surface);
  color: var(--text-muted);
  padding: 0.8rem 1.25rem;
  text-align: right;
  font-weight: 700;
  border-bottom: 1px solid var(--c-border-light);
  font-size: 0.78rem;
}

.items-table td {
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid var(--c-border-light);
  vertical-align: middle;
}

.items-table tr:hover td {
  background-color: var(--c-bg-surface);
}

.status-select {
  font-family: var(--font-cairo);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--c-border-light);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
}

/* Brand Guide Showcase Tab */
.brand-showcase {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
}

.showcase-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.showcase-header h2 {
  font-size: 2rem;
  font-weight: 900;
  color: var(--c-navy-dark);
}

.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.swatch-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--c-border-light);
  transition: transform 0.2s;
}

.swatch-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-elevated);
}

.swatch-color {
  height: 120px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  padding: 0.85rem;
  color: #fff;
  font-weight: 800;
}

.swatch-info {
  background: #ffffff;
  padding: 1.2rem;
}

.swatch-name {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: var(--c-navy-dark);
}

.swatch-detail {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: 0.2rem;
}

.brand-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.rule-box {
  background: var(--c-bg-surface);
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.rule-box.prohibited {
  border-right: 3px solid var(--st-replacement);
}

.rule-box h4 {
  font-weight: 800;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rule-box h4 i {
  font-size: 1.15rem;
}

/* Vehicle Form View */
.form-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--c-border-light);
  box-shadow: var(--shadow-card);
  max-width: 920px;
  margin: 0 auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-navy-dark);
}

.form-group input {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--c-border-light);
  border-radius: var(--radius-xs);
  font-family: var(--font-cairo);
  font-size: 0.92rem;
  outline: none;
  background: var(--c-bg-surface);
  color: var(--text-main);
  transition: all 0.2s;
}

.form-group input:focus {
  background: #ffffff;
  border-color: var(--c-navy-primary);
  box-shadow: 0 0 0 3px rgba(0, 27, 183, 0.08);
}

/* ==========================================================================
   PRINT MEDIA QUERY (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: 100% !important;
  }

  .app-header,
  .report-print-controls,
  .nav-tabs,
  .btn,
  .no-print {
    display: none !important;
  }

  .app-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tab-pane {
    display: none !important;
  }

  .tab-pane#report-tab {
    display: block !important;
  }

  .report-sheets-container {
    gap: 0 !important;
  }

  .report-page {
    box-shadow: none !important;
    border: none !important;
    padding: 8mm 12mm 8mm !important;
    margin: 0 !important;
    width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: 297mm !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .report-page:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
