/*
 * GMAO_ORANGE_DRC - Style CSS Principal
 * Design professionnel avec identité de marque Orange DRC (Orange & Anthracite)
 */

:root {
  --orange-brand: #FF7900;
  --orange-hover: #E06A00;
  --orange-light: #FFF0E0;
  --dark-sidebar: #000000;
  --dark-sidebar-hover: #1A1A1A;
  --dark-sidebar-active: #FF7900;
  --bg-main: #F6F6F6;
  --text-main: #000000;
  --text-muted: #595959;
  --border-color: #D9D9D9;
  --table-border-color: #CFCFCF;
  --font-orange: "Helvetica Neue", Helvetica, "SF Pro", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --font-ui: var(--font-orange);
  --font-body: var(--font-orange);
  --font-mono: Consolas, "SFMono-Regular", "Roboto Mono", "Liberation Mono", Menlo, monospace;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background-color: var(--bg-main);
  color: var(--text-main);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6,
.sidebar-brand,
.sidebar-menu-link,
.sidebar-submenu-link,
.sidebar-menu-header,
.main-header,
.btn,
button,
.nav-link,
.dropdown-item,
.form-label,
.badge {
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0;
}

p,
li,
small,
label,
input,
select,
textarea,
.form-control,
.form-select,
.table,
.table th,
.table td,
.list-group,
.list-group-item,
.card-body,
.text-muted {
  font-family: var(--font-body);
  font-weight: 400;
  letter-spacing: 0;
}

strong,
.fw-semibold,
.fw-medium,
.table th,
.table .fw-semibold,
.list-group-item strong,
.intervention-item,
.intervention-list,
.interventions-list,
#interventions-table,
#preventive-table-all,
#preventive-table-alertes {
  font-family: var(--font-body);
  font-weight: 500;
}

code,
kbd,
pre,
.serial-number,
.numero-serie,
.numero_serie,
.equipment-code,
.code-equipement,
.code_equipement,
.kpi-value,
.kpi-number,
.metric-value,
.analysis-kpi h2,
[id*="kpi"],
[id*="code"],
[id*="serial"],
[id*="serie"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}

/* Sidebar fixe gauche */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 260px;
  z-index: 100;
  background-color: var(--dark-sidebar);
  color: #fff;
  overflow-y: auto;
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.sidebar-header {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-dot {
  width: 12px;
  height: 12px;
  background-color: var(--orange-brand);
  border-radius: 2px;
  display: inline-block;
}

.sidebar-menu {
  list-style: none;
  padding: 1rem 0;
  margin: 0;
}

.sidebar-menu-item {
  padding: 0.15rem 1rem;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.75rem 1rem;
  color: #D1D5DB;
  text-decoration: none;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.925rem;
  transition: all 0.2s ease;
}

.sidebar-menu-link:hover {
  background-color: var(--dark-sidebar-hover);
  color: #fff;
}

.sidebar-menu-link.active {
  background-color: var(--orange-brand);
  color: #fff;
}

.sidebar-menu-link i {
  font-size: 1.1rem;
}

.sidebar-menu-link[data-bs-toggle="collapse"] {
  position: relative;
}

.sidebar-menu-link[data-bs-toggle="collapse"]::after {
  content: '\f282';
  font-family: 'bootstrap-icons';
  position: absolute;
  right: 1rem;
  transition: transform 0.2s ease-in-out;
}

.sidebar-menu-link[data-bs-toggle="collapse"][aria-expanded="true"]::after {
  transform: rotate(-180deg);
}

.sidebar-menu-header {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--orange-brand);
  text-transform: uppercase;
  padding: 1.5rem 1rem 0.5rem;
  margin-top: 0.5rem;
}

.sidebar-menu .collapse {
  padding-left: 0.5rem;
}

.sidebar-submenu-link {
  display: block;
  padding: 0.6rem 1rem 0.6rem 2.8rem;
  color: #9CA3AF;
  text-decoration: none;
  font-size: 0.88rem;
  position: relative;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

.sidebar-submenu-link::before {
  content: '';
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 4px;
  background-color: #4B5563;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sidebar-submenu-link:hover {
  color: #fff;
  background-color: var(--dark-sidebar-hover);
}

.sidebar-submenu-link.active {
  color: #fff;
  font-weight: 500;
}

.sidebar-submenu-link.active::before {
  background-color: var(--orange-brand);
  transform: translateY(-50%) scale(1.5);
}

/* Labels de section dans la sidebar */
.sidebar-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  padding: 0.85rem 1.25rem 0.25rem;
  list-style: none;
}

/* Badge de risque spécifique site */
.risk-badge-Critique { background-color: #dc3545; color: #fff; }
.risk-badge-Élevé    { background-color: #fd7e14; color: #fff; }
.risk-badge-Moyen    { background-color: #0dcaf0; color: #000; }
.risk-badge-Faible   { background-color: #198754; color: #fff; }

/* Header principal */
.main-header {
  min-height: 88px;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  position: fixed;
  top: 0;
  right: 0;
  left: 260px;
  z-index: 99;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.main-header > .d-flex:first-child {
  flex: 0 0 auto;
  min-width: 128px;
}

.main-header > .d-flex:last-child {
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 1.25rem !important;
  min-width: 0;
}

.header-back-button {
  white-space: nowrap;
}

#page-title-display {
  display: none;
}

.role-switcher {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}

.role-switcher-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.auth-chip {
  flex: 0 1 280px;
  min-width: 240px;
  max-width: 340px;
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: #fff;
}

.auth-chip-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.auth-chip-name,
.auth-chip-role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-chip-name {
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-chip-role {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-icon-button {
  width: 50px;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#global-site-selector {
  min-height: 50px;
  min-width: 220px;
  max-width: 260px;
  border-radius: 0.25rem;
  font-size: 0.95rem;
}

#current-date-time {
  min-width: 230px;
  text-align: right;
  font-size: 0.95rem;
  line-height: 1.35;
}

.access-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  filter: grayscale(0.2);
}

.access-disabled:hover {
  transform: none !important;
}

.access-readonly-form {
  position: relative;
}

.access-denied-panel {
  max-width: 560px;
  margin: 8vh auto 0;
  padding: 2rem;
  text-align: center;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.login-panel {
  max-width: 440px;
  margin: 7vh auto 0;
  padding: 2rem;
  text-align: center;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

.access-denied-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background-color: var(--orange-light);
  color: var(--orange-brand);
  font-size: 1.8rem;
}

/* Zone principale de contenu */
.main-content {
  margin-left: 260px;
  padding: 132px 1.75rem 2.5rem 1.75rem; /* Espace pour le header */
  min-height: 100vh;
  transition: all 0.3s ease;
}

.main-content > .container-fluid {
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Cartes statistiques */
.kpi-card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  background-color: #fff;
}

.kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.kpi-card-border-orange {
  border-left: 4px solid var(--orange-brand);
}

.kpi-card-border-success {
  border-left: 4px solid #10B981;
}

.kpi-card-border-danger {
  border-left: 4px solid #EF4444;
}

.kpi-card-border-warning {
  border-left: 4px solid #F59E0B;
}

.kpi-card-border-info {
  border-left: 4px solid #3B82F6;
}

.kpi-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.metrics-kpi-grid .kpi-card .card-body {
  min-height: 118px;
  padding: 1.05rem 1.15rem;
}

.metrics-kpi-grid .kpi-card h2 {
  font-size: 1.95rem;
  line-height: 1.05;
}

.metrics-kpi-grid .kpi-icon-wrapper {
  width: 42px;
  height: 42px;
  font-size: 1.25rem;
  border-radius: 0.35rem;
}

.bg-orange-light {
  background-color: var(--orange-light);
  color: var(--orange-brand);
}

.bg-orange {
  background-color: var(--orange-brand) !important;
}

.text-orange {
  color: var(--orange-brand) !important;
}

/* Badges personnalisés */
.badge-status {
  padding: 0.35em 0.65em;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50rem;
}

/* Badges Criticité */
.bg-critic-low {
  background-color: #E1F5FE;
  color: #0288D1;
}
.bg-critic-medium {
  background-color: #E8F5E9;
  color: #2E7D32;
}
.bg-critic-high {
  background-color: #FFF3E0;
  color: #E65100;
}
.bg-critic-critical {
  background-color: #FFEBEE;
  color: #C62828;
}

/* Boutons de marque */
.btn-orange {
  background-color: var(--orange-brand);
  color: #fff;
  border: 1px solid var(--orange-brand);
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-orange:hover, .btn-orange:focus {
  background-color: var(--orange-hover);
  color: #fff;
  border-color: var(--orange-hover);
}

.btn-outline-orange {
  background-color: transparent;
  color: var(--orange-brand);
  border: 1px solid var(--orange-brand);
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-outline-orange:hover {
  background-color: var(--orange-brand);
  color: #fff;
}

/* Styles formulaires et tables */
.table-responsive {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.table {
  border: 1px solid var(--table-border-color);
  border-collapse: collapse;
}

.table th {
  font-weight: 600;
  color: var(--text-muted);
  background-color: #F9FAFB;
}

.table th,
.table td {
  border: 1px solid var(--table-border-color);
  padding: 0.75rem 0.8rem;
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: rgba(255, 121, 0, 0.02);
}

.form-control:focus, .form-select:focus {
  border-color: var(--orange-brand);
  box-shadow: 0 0 0 0.25rem rgba(255, 121, 0, 0.25);
}

/* Animations d'alerte */
.alert-fixed {
  position: fixed;
  top: 75px;
  right: 20px;
  z-index: 1050;
  min-width: 300px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Graphiques HTML simples */
.progress-kpi {
  height: 1.5rem;
  border-radius: 0.25rem;
}

.distribution-pie-layout {
  display: grid;
  grid-template-columns: minmax(150px, 190px) 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 230px;
}

.distribution-pie {
  width: min(190px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto;
  box-shadow: inset 0 0 0 1px rgba(17, 24, 39, 0.08), 0 10px 24px rgba(17, 24, 39, 0.08);
}

.distribution-pie-center {
  width: 47%;
  aspect-ratio: 1;
  border-radius: 50%;
  background-color: #fff;
  display: grid;
  place-items: center;
  align-content: center;
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
}

.distribution-pie-center span {
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.distribution-pie-center small {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.distribution-pie-legend {
  display: grid;
  gap: 0.75rem;
}

.distribution-pie-legend-item {
  display: grid;
  grid-template-columns: 0.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.distribution-pie-dot {
  width: 0.8rem;
  aspect-ratio: 1;
  border-radius: 50%;
}

.distribution-pie-label {
  color: var(--text-dark);
  font-weight: 700;
  min-width: 0;
}

.distribution-pie-value {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.metrics-analysis-grid .card-header {
  padding-top: 0.85rem !important;
  padding-bottom: 0.6rem !important;
}

.metrics-analysis-grid .card-body {
  padding: 1rem 1.1rem;
}

.metrics-distribution-pie-layout {
  grid-template-columns: minmax(120px, 150px) 1fr;
  gap: 1rem;
  min-height: 168px;
}

.metrics-distribution-pie-layout .distribution-pie {
  width: 145px;
}

.metrics-distribution-pie-layout .distribution-pie-center span {
  font-size: 1rem;
}

.metrics-distribution-pie-layout .distribution-pie-legend {
  gap: 0.45rem;
}

.metrics-distribution-pie-layout .distribution-pie-legend-item {
  gap: 0.5rem;
}

@media (max-width: 576px) {
  .distribution-pie-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
  }

  .distribution-pie {
    width: 170px;
  }
}

.nav-pills .nav-link {
  color: var(--orange-brand);
}

.nav-pills .nav-link.active {
  background-color: var(--orange-brand);
  color: #fff;
}

.tracker-group-button {
  min-height: 96px;
}

.dashboard-submenu {
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.dashboard-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.75rem;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.kpi-detail-actions {
  justify-content: center;
  align-items: center;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.kpi-detail-actions .btn {
  min-width: 230px;
}

.kpi-toolbar {
  display: flex;
  justify-content: flex-end;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.kpi-executive-grid {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

.kpi-executive-grid .kpi-card .card-body {
  min-height: 108px;
  padding: 1rem 1.2rem;
}

.kpi-executive-grid .kpi-card h2 {
  font-size: 1.85rem;
  line-height: 1;
}

.kpi-status-note {
  display: block;
  max-width: 340px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
}

.kpi-technical-card {
  max-width: 520px;
  margin: 0 auto;
  border-left: 4px solid var(--orange-brand) !important;
}

.kpi-technical-card th {
  color: var(--text-muted);
  font-size: 0.76rem;
  text-transform: uppercase;
}

.kpi-tech-value {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--text-main);
}

.kpi-filter-band {
  padding: 0.85rem;
  background-color: #fafafa;
  border: 1px solid var(--border-color);
  border-radius: 0.35rem;
}

.kpi-filter-band .form-select {
  border-radius: 0;
}

.metrics-detail-actions {
  justify-content: center;
  align-items: center;
}

.metrics-detail-actions .btn {
  min-width: 270px;
}

.dashboard-activity-filter-band {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background-color: #fafafa;
}

.dashboard-activity-filter-band .form-select,
.dashboard-activity-filter-band .form-control,
.dashboard-activity-filter-band .input-group-text {
  border-radius: 0;
}

.dashboard-activity-summary {
  min-height: 46px;
  padding: 0.75rem 1rem;
  background-color: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-activity-summary span {
  font-weight: 700;
  color: var(--text-main);
}

.dashboard-activity-summary small {
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-activity-pagination {
  min-height: 50px;
  padding: 0.75rem 1rem;
  background-color: #fff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.dashboard-activity-pagination[hidden] {
  display: none !important;
}

.dashboard-activity-pagination span {
  min-width: 110px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
}

.fuel-detail-actions {
  justify-content: center;
  align-items: center;
}

.fuel-detail-actions .btn {
  min-width: 220px;
}

.equipment-detail-actions {
  justify-content: center;
  align-items: center;
}

.equipment-detail-actions .btn {
  min-width: 240px;
}

.spareparts-detail-actions {
  justify-content: center;
  align-items: center;
}

.spareparts-detail-actions .btn {
  min-width: 220px;
}

.spareparts-critical-toggle {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: #fff;
}

.critical-stock-actions {
  justify-content: center;
  align-items: center;
}

.critical-stock-actions .btn {
  min-width: 220px;
}

.critical-stock-summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  background-color: #fff;
}

.module-detail-actions {
  justify-content: center;
  align-items: center;
}

.module-detail-actions .btn {
  min-width: 220px;
}

.enterprise-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.35rem;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--orange-brand);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.enterprise-page-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--orange-brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.enterprise-action-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.enterprise-page-header > .enterprise-action-bar:only-child {
  margin-left: auto;
}

.enterprise-page-header:has(> .enterprise-action-bar:only-child) {
  justify-content: flex-end;
  padding: 0;
  margin-bottom: 2rem !important;
  background-color: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.enterprise-page-header:has(> .enterprise-action-bar:only-child) .enterprise-action-bar {
  width: auto;
  margin-left: auto;
}

.enterprise-control-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.enterprise-control-panel .dashboard-detail-actions {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.workspace-welcome-panel {
  max-width: 920px;
  min-height: 180px;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 10vh auto 0;
  padding: 1.75rem 2rem;
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-top: 4px solid var(--orange-brand);
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.workspace-welcome-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
}

.workspace-welcome-mark span {
  width: 24px;
  height: 24px;
  display: block;
  background-color: var(--orange-brand);
}

.workspace-welcome-content {
  max-width: 820px;
}

.workspace-welcome-signature {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--orange-brand);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.workspace-welcome-content h3 {
  margin: 0 0 0.55rem;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0;
}

.workspace-welcome-content p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.5;
}

.maintenance-submenu-link,
.dashboard-submenu-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 42px;
  padding: 0.6rem 0.75rem;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 0.375rem;
  font-weight: 600;
}

.maintenance-submenu-link:hover,
.dashboard-submenu-link:hover {
  background-color: var(--orange-light);
  color: var(--orange-brand);
}

.tracker-entry-card {
  border-left: 4px solid var(--orange-brand) !important;
}

.tracker-date-cell {
  font-variant-numeric: tabular-nums;
  min-width: 96px;
  white-space: nowrap;
}

.analysis-kpi {
  min-height: 112px;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--table-border-color);
  border-radius: 0.5rem;
  background-color: #fff;
}

.analysis-kpi-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1.35rem;
}

.analysis-panel {
  padding: 1rem;
  border: 1px solid var(--table-border-color);
  border-radius: 0.5rem;
  background-color: #fff;
}

.fmd-recommendation-list {
  padding-left: 1.15rem;
}

.fmd-recommendation-list li + li {
  margin-top: 0.55rem;
}

.fmd-compact-table {
  font-size: 0.86rem;
}

.fmd-compact-table th,
.fmd-compact-table td {
  padding: 0.65rem 0.7rem;
}

/* Responsive mobile */
@media (max-width: 991.98px) {
  .sidebar {
    left: -260px;
  }
  .sidebar.active {
    left: 0;
  }
  .main-header {
    left: 0;
    min-height: 78px;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  .main-content {
    margin-left: 0;
    padding: 112px 0.75rem 2rem;
  }
  .main-content > .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  .header-back-button {
    padding-inline: 0.55rem;
  }
  .main-header > .d-flex:first-child {
    min-width: 0;
  }
  .main-header > .d-flex:last-child {
    gap: 0.5rem !important;
    justify-content: flex-end;
  }
  .role-switcher-label,
  #current-date-time {
    display: none !important;
  }
  .auth-chip {
    min-width: 0;
    flex-basis: 170px;
    max-width: 170px;
    min-height: 48px;
  }
  .auth-chip-role {
    display: none;
  }
  #global-site-selector {
    max-width: 140px;
    min-width: 120px;
    min-height: 46px;
  }
  .workspace-welcome-panel {
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    margin-top: 1rem;
    padding: 1.25rem;
  }
  .enterprise-page-header,
  .enterprise-control-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .enterprise-page-header:has(> .enterprise-action-bar:only-child) {
    align-items: flex-end;
    margin-bottom: 1.25rem !important;
  }
  .enterprise-action-bar {
    justify-content: flex-start;
  }
  .enterprise-page-header:has(> .enterprise-action-bar:only-child) .enterprise-action-bar {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}
