/* ==========================================================================
   Company View — Qatar-Inspired Light Corporate Operations & Fleet Directory
   ========================================================================== */

#company-view {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 24px 90px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  color: #1f212b;
  animation: fadeInCompany 0.25s ease-out;
}

#company-view[hidden] {
  display: none !important;
}

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

/* Header & Brand Banner */
.company-hero-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  background: linear-gradient(135deg, #3c0026 0%, #5c0931 100%);
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(92, 9, 49, 0.18);
  margin-bottom: 24px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.company-logo-slot {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  padding: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  box-sizing: border-box;
}

.company-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.company-identity {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.company-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.company-identity h1 {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 34px;
  font-weight: 300;
  letter-spacing: 0;
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

.company-codes-badge {
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.7px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
}

.company-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(110, 231, 183, 0.45);
  color: #ecfdf5;
}

.company-status-badge.browsing {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  color: #f8fafc;
}

.company-meta-line {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  flex-wrap: wrap;
}

.company-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.company-meta-item strong {
  color: #ffffff;
  font-weight: 600;
}

.company-selector-slot,
.company-switcher-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.company-switcher-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.company-select-dropdown {
  background: #ffffff;
  border: 1px solid #dbdee8;
  color: #1f212b;
  height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  min-width: 240px;
  box-shadow: 0 4px 12px rgba(31, 33, 43, 0.08);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.company-select-dropdown:hover,
.company-select-dropdown:focus {
  border-color: #5c0931;
  box-shadow: 0 0 0 3px rgba(92, 9, 49, 0.14);
}

.btn-reset-employer,
.btn-return-employer {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-reset-employer:hover,
.btn-return-employer:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
}

/* Pilot Contract Bar */
.company-contract-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  padding: 20px 26px;
  background: #ffffff;
  border: 1px solid #dbdee8;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(31, 33, 43, 0.06);
  margin-bottom: 24px;
}

.contract-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contract-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4a525d;
}

.contract-stat-value {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 18px;
  font-weight: 400;
  color: #1f212b;
  line-height: 1.3;
}

.contract-stat-value.is-compact {
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 600;
}

.contract-stat-value.highlight {
  color: #5c0931;
}

.contract-stat-value.is-good {
  color: #059669;
  font-weight: 500;
}

/* KPI Statistics Grid */
.company-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.company-kpi-card {
  padding: 22px 22px 20px;
  background: #ffffff;
  border: 1px solid #dbdee8;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(31, 33, 43, 0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.company-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #5c0931;
}

.company-kpi-card:hover {
  transform: translateY(-2px);
  border-color: #c7cad9;
  box-shadow: 0 8px 24px rgba(31, 33, 43, 0.09);
}

.kpi-icon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4a525d;
  font-weight: 600;
}

.kpi-badge-tag {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(92, 9, 49, 0.08);
  border: 1px solid rgba(92, 9, 49, 0.18);
  color: #5c0931;
  font-weight: 600;
}

.kpi-number {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0;
  color: #5c0931;
  line-height: 1.1;
}

.kpi-caption {
  font-size: 12.5px;
  color: #4a525d;
}

/* Fleet Directory & Hubs Section Cards */
.company-fleet-section {
  background: #ffffff;
  border: 1px solid #dbdee8;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(31, 33, 43, 0.06);
  padding: 26px 28px;
  margin-bottom: 28px;
}

.fleet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fleet-section-title-wrap h2 {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 24px;
  font-weight: 300;
  letter-spacing: 0;
  margin: 0 0 4px 0;
  color: #1f212b;
}

.fleet-section-title-wrap p {
  font-size: 13px;
  color: #4a525d;
  margin: 0;
}

/* Fleet Filter & Search Bar */
.fleet-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.fleet-model-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fleet-pill-btn {
  background: #f2f3fa;
  border: 1px solid #dbdee8;
  color: #4a525d;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fleet-pill-btn:hover {
  background: #ffffff;
  border-color: #5c0931;
  color: #5c0931;
}

.fleet-pill-btn.active {
  background: #5c0931;
  border-color: #5c0931;
  color: #ffffff;
}

.fleet-pill-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.fleet-search-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fleet-station-select {
  background: #ffffff;
  border: 1px solid #dbdee8;
  color: #1f212b;
  height: 38px;
  min-height: 38px;
  min-width: 165px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  box-shadow: none;
}

.fleet-station-select:focus {
  border-color: #5c0931;
  box-shadow: 0 0 0 3px rgba(92, 9, 49, 0.12);
}

.fleet-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  background: #f8f9fc;
  border: 1px solid #dbdee8;
  border-radius: 999px;
  padding: 0 14px;
  min-width: 240px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.fleet-search-box:focus-within {
  background: #ffffff;
  border-color: #5c0931;
  box-shadow: 0 0 0 3px rgba(92, 9, 49, 0.12);
}

.fleet-search-input {
  background: transparent !important;
  border: none !important;
  color: #1f212b !important;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  width: 100% !important;
}

.fleet-search-input::placeholder {
  color: #6e7780 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

/* Fleet Table */
.company-fleet-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #dbdee8;
}

.company-fleet-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.company-fleet-table th {
  background: #f2f3fa;
  padding: 13px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #4a525d;
  border-bottom: 1px solid #dbdee8;
}

.company-fleet-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #ebeff5;
  color: #1f212b;
  vertical-align: middle;
}

.company-fleet-table tbody tr:hover td {
  background: #f8f9fc;
}

.fleet-reg-badge {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #5c0931;
  background: rgba(92, 9, 49, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(92, 9, 49, 0.2);
  display: inline-block;
}

.fleet-model-cell {
  font-weight: 600;
  color: #1f212b;
}

.fleet-model-sub {
  font-size: 11.5px;
  color: #6e7780;
  display: block;
  margin-top: 2px;
}

.fleet-base-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fleet-station-code {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13px;
  font-weight: 700;
  color: #5c0931;
}

.fleet-station-city {
  color: #4a525d;
  font-size: 12.5px;
}

.fleet-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.fleet-status-pill.ready {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.fleet-status-pill.flown {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.fleet-status-pill.stranded {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.btn-fly-tail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #5c0931;
  border: 1px solid #5c0931;
  color: #ffffff;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(92, 9, 49, 0.22);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-fly-tail:hover {
  background: #730b3d;
  border-color: #730b3d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(92, 9, 49, 0.3);
}

.fleet-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #4a525d;
  font-size: 14px;
}

.company-fleet-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8f9fc;
  border-top: 1px solid #dbdee8;
  font-size: 12px;
  color: #4a525d;
  border-radius: 0 0 12px 12px;
  flex-wrap: wrap;
  gap: 10px;
}

/* Hubs Network Grid */
.company-hubs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.hub-card {
  padding: 16px 18px;
  background: #f8f9fc;
  border: 1px solid #dbdee8;
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-card:hover {
  transform: translateY(-2px);
  border-color: #5c0931;
  box-shadow: 0 6px 18px rgba(31, 33, 43, 0.08);
}

.hub-icao-badge {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 14px;
  font-weight: 700;
  color: #5c0931;
  background: rgba(92, 9, 49, 0.08);
  padding: 7px 11px;
  border-radius: 8px;
  border: 1px solid rgba(92, 9, 49, 0.2);
  flex-shrink: 0;
}

.hub-info-col h4,
.hub-city-name {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 16px;
  font-weight: 400;
  color: #1f212b;
  margin: 0 0 2px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hub-info-col span,
.hub-airport-name {
  font-size: 12px;
  color: #4a525d;
  display: block;
}

/* Responsive */
@media (max-width: 1024px) {
  .company-hero-banner {
    grid-template-columns: auto 1fr;
  }
  .company-selector-slot,
  .company-switcher-control {
    grid-column: 1 / -1;
    align-items: flex-start;
  }
  .company-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .company-hero-banner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 16px;
    padding: 22px 18px;
  }
  .company-logo-slot {
    margin: 0 auto;
  }
  .company-title-row,
  .company-meta-line {
    justify-content: center;
  }
  .company-selector-slot,
  .company-switcher-control {
    align-items: stretch;
  }
  .company-kpi-grid {
    grid-template-columns: 1fr;
  }
  .fleet-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .fleet-search-box {
    width: 100%;
  }
}
