﻿:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #edf2ff;
  --text: #1f2937;
  --muted: #667085;
  --primary: #1d4ed8;
  --primary-strong: #0f3aa8;
  --border: #d6deea;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.12), transparent 30%),
    linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  color: var(--text);
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell {
  display: grid;
  --sidebar-width: 280px;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  transition: grid-template-columns .28s ease;
}
.sidebar {
  padding: 24px;
  border-right: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: transform .28s ease, opacity .28s ease;
  will-change: transform;
}
.app-shell.sidebar-collapsed {
  --sidebar-width: 0px;
}
.app-shell.sidebar-collapsed .sidebar {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}
.app-shell.sidebar-collapsed .sidebar-toggle {
  left: 0;
  width: 24px;
  border-radius: 0 999px 999px 0;
  overflow: hidden;
}
.sidebar-toggle {
  position: fixed;
  top: 24px;
  left: calc(var(--sidebar-width) - 24px);
  transform: none;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 0;
  transition: left .28s ease, background .2s ease, color .2s ease;
}
.sidebar-toggle:hover {
  background: var(--surface-alt);
  color: var(--primary-strong);
}
.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  transition: transform .28s ease;
}
.sidebar-toggle svg.collapsed {
  transform: rotate(180deg);
}
.component-status-header {
  line-height: 1.02;
}
.component-status-header span {
  display: block;
  white-space: nowrap;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 28px;
}
.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  overflow: hidden;
  border: 1px solid rgba(29, 78, 216, 0.12);
  box-shadow: var(--shadow);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.brand strong { display: block; }
.brand span, .eyebrow, .lead, .hint, .section-title p, .selected-aircraft { color: var(--muted); }
.nav { display: grid; gap: 8px; }
.nav-group { display: grid; gap: 8px; }
.nav-sub { display: grid; gap: 8px; padding-left: 14px; }
.selected-aircraft-chip {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hidden { display: none !important; }
.nav-link {
  padding: 12px 14px;
  border-radius: 14px;
  border: 0;
  background: transparent;
  text-align: left;
  position: relative;
  transition: background .2s ease, color .2s ease;
}
.nav-link:hover, .nav-link.active, .nav-link.selected {
  background: var(--surface-alt);
  color: var(--primary-strong);
}
.nav-link.active::before,
.nav-link.selected::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 999px;
  background: var(--primary);
}
.nav-link.active,
.nav-link.selected {
  background: #dbe4ff;
  color: var(--primary-strong);
  font-weight: 700;
  padding-left: 18px;
}
.nav-link.sub {
  background: transparent;
  padding-left: 14px;
}
.nav-link.sub.active,
.nav-link.sub.selected {
  background: #dbe4ff;
}
.content { padding: 28px; transition: width .28s ease; }
.app-shell.sidebar-collapsed .content {
  width: 100%;
}
.page-header { margin-bottom: 18px; }
.page-header h1, h2, h3 { margin: 0; }
.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 700;
}
.panel, .company-card, .card, .modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.office-form .field input:disabled,
.office-form textarea:disabled {
  background: #f8fafc;
  color: #6b7280;
  cursor: not-allowed;
}
.office-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}
.office-logo-section {
  display: flex;
  justify-content: center;
}
.office-logo-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  justify-items: center;
  align-content: start;
  min-height: 320px;
  width: min(100%, 420px);
}
.office-logo-preview,
.office-logo-placeholder,
.aircraft-logo-preview {
  max-width: min(100%, 360px);
  height: min(30vh, 210px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.office-logo-preview {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 12px;
  width: 100%;
  height: min(30vh, 210px);
  object-fit: contain;
  object-position: center center;
}
.office-logo-placeholder {
  flex-direction: column;
  gap: 18px;
  text-align: center;
  padding-left: 26px;
  padding-right: 26px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  color: var(--muted);
}
.office-logo-placeholder-mark {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--primary), #5a86ff);
  color: white;
  font-size: 28px;
  font-weight: 700;
  box-shadow: var(--shadow);
}
.office-logo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.sr-only-file-input { display: none !important; }
.office-fields-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}
.office-fields-group {
  padding-top: 0;
  border-top: 4px solid rgba(29, 78, 216, 0.14);
}
.office-fields-group h4 {
  margin: 0 0 12px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  background: #e2e6fa;
  padding: 12px 14px;
  border-radius: 0 0 14px 14px;
  width: fit-content;
}
.office-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  width: 100%;
}
.office-fields-group > .office-fields-grid {
  padding-top: 12px;
}
.office-fields-section .form-actions.full {
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .office-fields-grid {
    grid-template-columns: 1fr;
  }
}
.field-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.company-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  margin-bottom: 18px;
  text-align: center;
  align-items: center;
}
.company-card > div {
  display: grid;
  gap: 10px;
  justify-items: center;
}
.company-card span, .metric span, .card span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.company-card strong, .metric strong, .card strong { display: block; margin-top: 0; font-size: 1.08rem; }
.page-section { margin-top: 18px; }
.section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.aircraft-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.aircraft-chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(29, 78, 216, 0.08), rgba(29, 78, 216, 0.02));
  text-align: left;
  min-height: 88px;
}
.aircraft-chip-logo {
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.aircraft-chip-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.aircraft-chip-logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #5a86ff);
  color: white;
  font-weight: 700;
}
.aircraft-chip-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.aircraft-chip-content strong {
  font-size: 1.05rem;
  line-height: 1.15;
}
.aircraft-chip-content span {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.15;
}
.panel { padding: 20px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.field { display: grid; gap: 8px; }
.office-form .field { min-width: 0; }
.office-form .form-actions.full { grid-area: actions; }
.field-label-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.rab-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(29, 78, 216, 0.22);
  border-top-color: var(--primary);
  animation: rab-spin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes rab-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 1100px) {
  .office-form {
    grid-template-columns: 1fr;
    grid-template-areas:
      "logo"
      "left"
      "right"
      "actions";
  }

  .office-logo-card {
    grid-area: auto;
  }

  .office-fields-left,
  .office-fields-right { grid-area: auto; }
  .office-form .form-actions.full { grid-area: auto; }
}
.aircraft-form {
  display: grid;
  gap: 18px;
}
.aircraft-section {
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 4px solid rgba(29, 78, 216, 0.14);
  padding-top: 0;
}
.aircraft-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.aircraft-section h4,
.aircraft-subsection h5,
.aircraft-dual-columns h6 {
  margin: 0;
}
.aircraft-section h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  background: #e2e6fa;
  padding: 12px 14px;
  border-radius: 14px;
  width: fit-content;
  margin-top: -4px;
}
.aircraft-situation-badge {
  display: inline-grid;
  gap: 4px;
  min-width: 250px;
  max-width: 360px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(29, 78, 216, 0.14);
  background: #e2e6fa;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  justify-self: end;
}
.aircraft-situation-badge span {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
  text-transform: uppercase;
}
.aircraft-situation-badge strong {
  font-size: 15px;
  line-height: 1.15;
  text-transform: none;
}
.aircraft-situation-badge.normal {
  border-color: rgba(22, 163, 74, 0.18);
  background: #ecfdf3;
}
.aircraft-situation-badge.normal strong {
  color: #067647;
}
.aircraft-situation-badge.alert {
  border-color: rgba(220, 38, 38, 0.18);
  background: #fef3f2;
}
.aircraft-situation-badge.alert strong {
  color: #b42318;
}
.inspection-panel {
  display: grid;
  gap: 18px;
}
.inspection-title {
  align-items: end;
}
.inspection-title p {
  margin: 6px 0 0;
}
.inspection-summary {
  display: grid;
  grid-template-columns: repeat(var(--inspection-summary-columns, 4), minmax(0, 1fr));
  gap: 12px;
}
.inspection-summary > div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}
.inspection-summary span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.inspection-summary strong {
  font-size: 16px;
  line-height: 1.15;
}
.inspection-table {
  background: white;
  border: 1px solid rgba(214, 222, 234, 0.30);
  border-radius: 18px;
  overflow: hidden;
  table-layout: fixed;
  width: 100%;
  box-shadow: var(--shadow);
}
.inspection-panel .table-wrap {
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.inspection-table.expanded {
  min-width: 100%;
}
.inspection-table:not(.expanded) {
  min-width: 100%;
}
.inspection-table thead th {
  text-align: center;
  background: #e2e6fa;
  border: 1px solid rgba(103, 116, 138, 0.58);
  padding: 6px 4px;
  line-height: 1.1;
  vertical-align: middle;
  white-space: nowrap;
}
.inspection-table thead tr:first-child th {
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.inspection-table thead tr:last-child th {
  font-size: 9px;
}
.inspection-table-header-title {
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.inspection-table tbody td {
  text-align: center;
  height: 38px;
  padding: 6px 4px;
  vertical-align: middle;
  border: 1px solid rgba(154, 165, 184, 0.55);
  word-break: break-word;
  font-size: 10px;
  line-height: 1.05;
}
.inspection-table tbody tr:nth-child(even) {
  background: #f8fbff;
}
.inspection-table tbody tr:hover {
  background: #eef4ff;
}
.inspection-table tbody tr.selected-row {
  background: rgba(29, 78, 216, 0.08);
}
.inspection-table tbody tr.selected-row td:first-child {
  border-left: 0;
}
.inspection-table tbody tr.selected-row td {
  border-bottom-color: rgba(214, 222, 234, 0.30);
}
.inspection-table tbody tr.selected-row {
  position: relative;
}
.inspection-table tbody td:last-child {
  text-align: center;
  white-space: normal;
}
.inspection-col-inspection_date { width: 82px; }
.inspection-col-os_number { width: 64px; }
.inspection-col-inspection_type { width: 58px; }
.inspection-col-hours_flown { width: 60px; }
.inspection-col-cell_total_hours { width: 60px; }
.inspection-col-cell_flight_hours { width: 60px; }
.inspection-col-motor_tsn,
.inspection-col-motor_tso,
.inspection-col-engine2_tsn,
.inspection-col-engine2_tso,
.inspection-col-helix_tsn,
.inspection-col-helix_tso,
.inspection-col-prop2_tsn,
.inspection-col-prop2_tso {
  width: 60px;
}
.inspection-date-cell {
  width: 82px;
  white-space: nowrap;
  font-size: 10px;
}
.inspection-table tbody td.inspection-helix-tso-cell {
  text-align: center;
}
.inspection-last-data-cell {
  overflow: visible;
}
.inspection-actions-float-panel {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 4px;
  z-index: 3;
  pointer-events: auto;
}
.component-table {
  font-size: 10px;
}
.component-col-component_name { width: 108px; }
.component-col-manufacturer { width: 96px; }
.component-col-part_number { width: 96px; }
.component-col-serial_number { width: 92px; }
.component-col-tbo_hours,
.component-col-tbo_calendar,
.component-col-tlv_hours,
.component-col-tlv_calendar,
.component-col-installation_tsn,
.component-col-installation_tso,
.component-col-current_tsn,
.component-col-current_tso,
.component-col-remaining_hours {
  width: 52px;
}
.component-col-installation_date,
.component-col-due_date {
  width: 72px;
}
.component-col-available_remaining { width: 64px; }
.component-col-final_status {
  width: 100px;
}
.component-last-data-cell {
  overflow: visible;
}
.component-modal-card {
  width: min(1040px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  padding: 16px;
  position: relative;
}
.component-modal-body {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;
  scrollbar-width: auto;
}
.component-modal-body::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
.component-modal-body::-webkit-scrollbar-thumb {
  background: rgba(29, 78, 216, 0.35);
  border-radius: 999px;
}
.component-modal-body::-webkit-scrollbar-track {
  background: rgba(214, 222, 234, 0.45);
}
.component-modal-card .aircraft-form {
  gap: 10px;
}
.component-modal-card .aircraft-section {
  gap: 10px;
  padding-top: 10px;
}
.component-modal-card .inspection-grid {
  gap: 10px;
}
.component-modal-card .component-modal-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.component-modal-card .component-modal-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.component-modal-card input,
.component-modal-card textarea {
  padding: 10px 12px;
}
.component-modal-card textarea {
  min-height: 112px;
}
.component-modal-card .component-modal-grid {
  align-items: start;
}
.component-calendar-field {
  display: grid;
  gap: 8px;
}
.component-calendar-field > span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.component-calendar-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
}
.component-calendar-inputs input,
.component-calendar-inputs select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font: inherit;
}
.component-calendar-inputs input {
  text-align: center;
}
.component-calendar-inputs select {
  text-align: center;
}
.component-calendar-inputs input:focus,
.component-calendar-inputs select:focus {
  outline: none;
  border-color: rgba(29, 78, 216, 0.5);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.08);
}
.component-calendar-inputs input:disabled,
.component-calendar-inputs select:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}
.component-wide-field {
  grid-column: 1 / -1;
}
.component-modal-card .component-wide-field {
  grid-column: 1 / -1;
}
.component-table tbody td {
  height: 38px;
  padding-top: 4px;
  padding-bottom: 4px;
  border-color: rgba(214, 222, 234, 0.30);
}
.component-cell-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  max-height: 2.2em;
  line-height: 1.1;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  font-size: clamp(8px, 0.65vw, 10px);
}
.component-last-data-cell .component-cell-text {
  width: 100%;
}
.component-table tbody td:last-child {
  text-align: center;
  white-space: normal;
}
#component-modal .modal-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  margin-bottom: 10px;
  padding-right: 54px;
}
#component-modal .icon-button {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
}
@media (max-width: 900px) {
  #component-modal .icon-button {
    right: 16px;
  }
}
.inspection-grid {
  display: grid;
  gap: 14px;
}
.inspection-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.inspection-totals-grid {
  display: grid;
  grid-template-columns: repeat(var(--inspection-total-columns, 3), minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.inspection-totals-column {
  display: grid;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
  justify-items: center;
  text-align: center;
}
.inspection-totals-column h5 {
  margin: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary-strong);
}
.inspection-total-field {
  width: 100%;
  max-width: 220px;
  justify-items: center;
}
.inspection-total-field span {
  text-align: center;
}
.inspection-total-field input {
  text-align: center;
}
.inspection-number-input {
  width: 100%;
  max-width: 160px;
}
.inspection-panel .section-title p,
.inspection-title p {
  max-width: 820px;
}
.aircraft-subsection {
  display: grid;
  gap: 12px;
  padding-top: 8px;
  margin-top: 2px;
  border-top: 1px solid rgba(214, 222, 234, 0.4);
}
.aircraft-subsection h5 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--primary-strong);
  padding: 9px 13px;
  border-radius: 12px;
  background: #e2e6fa;
  width: fit-content;
}
.aircraft-dual-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.aircraft-dual-panel {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}
.aircraft-dual-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.field-label-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.field-label-inline > span:first-child {
  min-width: 0;
}
.field-label-inline > .inline-check {
  white-space: nowrap;
}
.aircraft-dual-columns h6 {
  margin-bottom: 0;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 12px;
  background: #e2e6fa;
  width: fit-content;
}
.aircraft-grid {
  display: grid;
  gap: 12px 16px;
}
.aircraft-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.aircraft-grid-1 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.aircraft-grid input:disabled {
  background: #f8fafc;
  color: #94a3b8;
}
.aircraft-grid input.rab-autofill-loading {
  background: #eef2f7;
  color: #64748b;
  border-color: #d7e0eb;
}
.aircraft-grid input.rab-autofill-loading::placeholder {
  color: #94a3b8;
}
.aircraft-logo-card {
  display: grid;
  gap: 12px;
  justify-items: center;
}
.aircraft-logo-preview {
  min-height: 110px;
  max-width: min(100%, 360px);
  width: 100%;
  height: min(30vh, 210px);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: white;
}
.aircraft-logo-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
  margin: 0 auto;
}
.aircraft-logo-preview.office-logo-empty {
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}
.aircraft-notes textarea {
  min-height: 180px;
}
@media (max-width: 1100px) {
  .aircraft-dual-columns,
  .aircraft-grid-2,
  .aircraft-grid-1 {
    grid-template-columns: 1fr;
  }
  .inspection-summary,
  .inspection-grid-2 {
    grid-template-columns: 1fr;
  }
  .inspection-totals-grid {
    grid-template-columns: 1fr;
  }
  .aircraft-section-header {
    align-items: stretch;
  }
  .aircraft-situation-badge {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
}
.field span { font-size: 13px; color: var(--muted); }
input, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: white;
}
select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: white;
}
textarea { resize: vertical; min-height: 120px; }
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.form-actions.full { grid-column: 1 / -1; }
.button, .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
}
.button.secondary {
  background: #eaf0ff;
  color: var(--primary-strong);
}
.icon-action, .icon-mini {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--primary-strong);
  box-shadow: inset 0 0 0 1px rgba(103, 116, 138, 0.28);
}
.icon-action svg, .icon-mini svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.icon-action.danger {
  background: #fee2e2;
  color: #b91c1c;
}
.row-actions {
  opacity: 0;
  pointer-events: none;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.row-actions.visible {
  opacity: 1;
  pointer-events: auto;
}
.selected-row {
  background: rgba(29, 78, 216, 0.08);
}
.selected-row td:first-child {
  border-left: 3px solid var(--primary);
}
.selected-row td {
  border-bottom-color: rgba(29, 78, 216, 0.18);
}
.table-wrap { overflow: auto; }
.component-table-wrap {
  overflow: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.component-table thead th {
  border-color: rgba(103, 116, 138, 0.58);
}
.component-table tbody td {
  border-color: rgba(154, 165, 184, 0.55);
}
table {
  width: 100%;
  border-collapse: collapse;
}
.aircraft-table {
  width: 100%;
}
th, td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.aircraft-table th,
.aircraft-table td {
  vertical-align: middle;
}
.table-logo-cell {
  width: 88px;
}
.aircraft-table-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: white;
  display: grid;
  place-items: center;
}
.aircraft-table-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}
.aircraft-table-logo-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #5a86ff);
  color: white;
  font-weight: 700;
}
.aircraft-table tbody tr td:last-child {
  text-align: right;
  width: 180px;
}
.empty-state {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: start center;
  padding: 24px;
  overflow: auto;
  scrollbar-width: none;
}
.modal::-webkit-scrollbar { width: 0; height: 0; }
.modal-card {
  width: min(900px, 100%);
  padding: 20px;
  margin: 0 auto;
  position: relative;
  max-height: calc(100vh - 48px);
  overflow: auto;
  scrollbar-width: none;
}
.modal-card::-webkit-scrollbar { width: 0; height: 0; }
}
.confirm-card { width: min(520px, 100%); }
.inspection-modal-card {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden;
  padding: 16px;
}
.inspection-modal-card.inspection-modal-expanded {
  width: min(1180px, calc(100vw - 24px));
}
.inspection-modal-card.inspection-modal-compact {
  width: min(920px, calc(100vw - 24px));
}
.inspection-modal-card .aircraft-form {
  gap: 10px;
}
.inspection-modal-card .aircraft-section {
  gap: 10px;
  padding-top: 10px;
}
.inspection-modal-card .inspection-grid {
  gap: 10px;
}
.inspection-modal-card .inspection-totals-grid {
  gap: 10px;
}
.inspection-modal-card .inspection-totals-column {
  padding: 12px 10px;
  gap: 10px;
}
.inspection-modal-card .inspection-total-field {
  max-width: none;
}
.inspection-modal-card input,
.inspection-modal-card select {
  padding: 10px 12px;
}
.inspection-modal-card.inspection-modal-compact .inspection-totals-column {
  padding: 10px 8px;
}
.inspection-modal-card.inspection-modal-compact .inspection-total-field {
  max-width: 140px;
}
.inspection-modal-card.inspection-modal-compact .inspection-number-input {
  max-width: 140px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 0 0 12px;
  background: transparent;
}
.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: #edf2ff;
  color: var(--primary-strong);
  font-size: 24px;
  line-height: 1;
  position: sticky;
  top: 20px;
  z-index: 3;
  margin-left: auto;
  flex: 0 0 auto;
}
#aircraft-modal .modal-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
}
#aircraft-modal .icon-button {
  position: fixed;
  top: 44px;
  right: calc((100vw - 900px) / 2 + 44px);
  z-index: 9999;
  margin-left: 0;
  align-self: start;
  justify-self: end;
}
@media (max-width: 900px) {
  #aircraft-modal .icon-button {
    right: 44px;
  }
}
.selected-aircraft {
  margin-top: 8px;
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; --sidebar-width: 0px; }
  .sidebar { position: relative; height: auto; }
  .company-card, .form-grid { grid-template-columns: 1fr; }
  .sidebar-toggle { display: none; }
}
@media print {
  body { background: white; }
  .sidebar, .modal, .button, .nav { display: none !important; }
  .app-shell, .content { display: block; padding: 0; }
  .panel, .company-card, .card { box-shadow: none; }
  @page { size: A4; margin: 12mm; }
}





