:root,
html[data-theme="light"] {
  --blue: #ff6b14;
  --cyan: #ff6b14;
  --green: #00a86b;
  --orangeRed: #ff6b14;
  --primary: #ff6b14;
  --success: #00a86b;
  --bg: #f4f7fb;
  --text: #101828;
  --muted: #64748b;
  --border: #d8e1ee;
  --border-strong: #ff8a3d;
  --surface-1: rgba(255, 255, 255, 0.96);
  --surface-2: rgba(255, 255, 255, 0.84);
  --field-top: #ffffff;
  --field-bottom: #f8fafc;
  --option-bg: #ffffff;
  --option-fg: #101828;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.1);
  color-scheme: light;
}

html[data-theme="dark"],
html[data-theme="black"] {
  --blue: #ff6b14;
  --cyan: #ff6b14;
  --green: #00a86b;
  --orangeRed: #ff6b14;
  --primary: #ff6b14;
  --success: #00a86b;
  --bg: #0f172a;
  --text: #f8fafc;
  --muted: #b6c2d1;
  --border: rgba(255, 255, 255, 0.12);
  --border-strong: #ff8a3d;
  --surface-1: rgba(20, 32, 51, 0.98);
  --surface-2: rgba(15, 23, 42, 0.92);
  --field-top: #172033;
  --field-bottom: #111827;
  --option-bg: #172033;
  --option-fg: #f8fafc;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

body,
html[data-theme="light"] body {
  background:
    linear-gradient(180deg, #ffffff 0%, #f4f7fb 52%, #eef3f9 100%),
    var(--bg) !important;
}

html[data-theme="dark"] body,
html[data-theme="black"] body {
  background:
    linear-gradient(180deg, #0f172a 0%, #111827 56%, #0b1120 100%),
    var(--bg) !important;
}

code,
.chip-value,
.bar-value,
.legend-value {
  color: #ff6b14 !important;
}

.shell {
  background: #f4f7fb;
}

.sidebar {
  background: #ffffff !important;
  border-right-color: #d8e1ee !important;
}

.brand,
.topbar,
.card,
.modal,
.login-card {
  background: #ffffff !important;
  border-color: #d8e1ee !important;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="dark"] .shell,
html[data-theme="black"] .shell {
  background: #0f172a;
}

html[data-theme="dark"] .sidebar,
html[data-theme="black"] .sidebar {
  background: #111827 !important;
  border-right-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-theme="dark"] .brand,
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .card,
html[data-theme="dark"] .modal,
html[data-theme="dark"] .login-card,
html[data-theme="black"] .brand,
html[data-theme="black"] .topbar,
html[data-theme="black"] .card,
html[data-theme="black"] .modal,
html[data-theme="black"] .login-card {
  background: #142033 !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.card:before,
.login-card:before,
.modal:before,
.topbar:before,
.brand:before {
  display: none !important;
}

.brand {
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  border-top: 3px solid #ff6b14 !important;
}

.brand-logo {
  display: block;
  width: 132px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-title {
  color: #101828 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
  letter-spacing: 0 !important;
}

html[data-theme="dark"] .brand-title,
html[data-theme="black"] .brand-title {
  color: #f8fafc !important;
}

.brand-title.is-hidden-for-logo {
  display: none !important;
}

.brand-sub {
  color: #475569 !important;
  font-weight: 700;
}

.navlink {
  color: #334155 !important;
}

html[data-theme="dark"] .navlink,
html[data-theme="black"] .navlink {
  color: #dbe3ee !important;
}

.navlink:hover {
  background: #fff4ed !important;
  color: #ff5a00 !important;
}

.navlink.active,
.navlink.active:visited {
  color: #ff5a00 !important;
  background: #fff4ed !important;
  border-color: #ffb37a !important;
  -webkit-text-fill-color: currentColor;
  background-image: none !important;
}

.topbar-title,
.login-title,
.modal-title,
.stat-value,
.donut-total {
  color: #ff5a00 !important;
  background: none !important;
  -webkit-text-fill-color: currentColor;
}

.btn-primary {
  color: #ffffff !important;
  background: #ff6b14 !important;
  border-color: #ff6b14 !important;
}

.btn-primary:hover {
  background: #e95500 !important;
  border-color: #e95500 !important;
}

.portal-evoque-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 800;
  color: #ff5a00 !important;
  background: #fff4ed !important;
  border-color: #ffb37a !important;
}

.theme-switch {
  width: 52px;
  height: 30px;
  border: 1px solid #d8e1ee;
  border-radius: 999px;
  background: #ffffff;
  padding: 3px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

.theme-switch-track {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #f8fafc;
}

.theme-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ff6b14;
  transition: transform 0.18s ease, background 0.18s ease;
}

.theme-switch[aria-pressed="true"] {
  background: #111827;
  border-color: rgba(255, 255, 255, 0.2);
}

.theme-switch[aria-pressed="true"] .theme-switch-track {
  background: #0f172a;
}

.theme-switch[aria-pressed="true"] .theme-switch-thumb {
  transform: translateX(22px);
  background: #f8fafc;
}

.btn:focus-visible,
.input-sm:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: #ff8a3d !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 20, 0.18) !important;
}

.bar-fill {
  background: linear-gradient(90deg, #ff6b14, #ff9a52) !important;
  filter: none !important;
}

.alert-success {
  border-color: rgba(0, 168, 107, 0.28) !important;
  background: rgba(0, 168, 107, 0.1) !important;
}

.login-page {
  background:
    linear-gradient(180deg, rgba(255, 107, 20, 0.08), rgba(244, 247, 251, 0.92)),
    #f4f7fb !important;
}

.units-readonly-page .table-units .tr {
  grid-template-columns: 1.2fr 0.55fr 0.55fr 1.1fr 0.9fr 1.3fr !important;
}

.units-readonly-page .table-units .tr > :last-child {
  display: none !important;
}

.equipment-image-table .tr {
  grid-template-columns: 58px 1.2fr 0.8fr 1.2fr 1fr 0.8fr 0.9fr 0.9fr !important;
}

.table-recent.equipment-image-table .tr {
  grid-template-columns: 58px 1fr 1.2fr 0.8fr 1.4fr 0.8fr !important;
}

.equipment-image-cell {
  display: flex;
  align-items: center;
}

.equipment-image-wrap {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff4ed;
  border: 1px solid #ffd5b8;
}

.equipment-image-wrap img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

html[data-theme="dark"] .equipment-image-wrap,
html[data-theme="black"] .equipment-image-wrap {
  background: rgba(255, 107, 20, 0.12);
  border-color: rgba(255, 107, 20, 0.32);
}
