:root,
:root[data-glpi-theme] {
  --ll-tech-glow: rgba(0, 168, 232, 0.18);
  --ll-tech-line: rgba(0, 111, 174, 0.2);
  --ll-tech-panel: #f8fbfd;
  --ll-tech-panel-strong: #eef6fb;
}

/* Dashboard and chart surfaces */
.dashboard .grid-stack-item-content {
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 5px 16px rgba(6, 29, 52, 0.08);
}

.dashboard .card {
  overflow: hidden;
  border: 1px solid rgba(10, 41, 72, 0.14) !important;
  border-radius: 6px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.dashboard .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 28px;
  height: 3px;
  background: var(--ll-cyan);
  pointer-events: none;
}

.dashboard .g-chart {
  background-color: var(--ll-tech-panel) !important;
  color: var(--ll-text) !important;
}

.dashboard .g-chart .chart {
  filter: saturate(0.92) contrast(1.02);
}

.dashboard .main-label {
  color: var(--ll-navy);
  font-size: 1.05rem;
  font-weight: 650;
}

.dashboard .big-number .formatted-number .number,
.dashboard .big-number .formatted-number .suffix,
.dashboard .summary-numbers .number {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.dashboard .toolbar .btn,
.dashboard .toolbar .form-select,
.dashboard .toolbar .select2-selection {
  border-color: var(--ll-tech-line) !important;
  background-color: var(--ll-surface) !important;
  box-shadow: 0 2px 7px rgba(6, 29, 52, 0.05);
}

.dashboard .toolbar .btn:hover,
.dashboard .toolbar .btn.active {
  color: var(--ll-blue) !important;
  border-color: var(--ll-cyan) !important;
  box-shadow: 0 0 0 3px var(--ll-tech-glow);
}

/* Forms and editors */
form .form-label,
.form-field-row label,
.form-group > label {
  color: #244760;
  font-weight: 650;
  letter-spacing: 0;
}

form .form-control,
form .form-select,
form .select2-selection,
.modal .form-control,
.modal .form-select,
.modal .select2-selection {
  min-height: 40px;
  border-color: #bfd0dc;
  border-radius: 5px !important;
  background-color: #fbfdff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

form textarea.form-control,
.modal textarea.form-control {
  min-height: 104px;
  resize: vertical;
}

form .form-control:hover,
form .form-select:hover,
form .select2-selection:hover,
.modal .form-control:hover,
.modal .form-select:hover,
.modal .select2-selection:hover {
  border-color: #7eabc6;
}

form .form-control:focus,
form .form-select:focus,
form .select2-container--focus .select2-selection,
form .select2-container--open .select2-selection,
.modal .form-control:focus,
.modal .form-select:focus,
.modal .select2-container--focus .select2-selection,
.modal .select2-container--open .select2-selection {
  border-color: var(--ll-cyan) !important;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px var(--ll-tech-glow), inset 3px 0 0 var(--ll-cyan) !important;
}

.form-check-input {
  border-color: #8aa9be;
  box-shadow: none;
}

.form-check-input:checked {
  border-color: var(--ll-blue);
  background-color: var(--ll-blue);
}

.form-check-input:focus {
  border-color: var(--ll-cyan);
  box-shadow: 0 0 0 3px var(--ll-tech-glow);
}

form fieldset,
.form-field-row,
.form-section {
  border-color: var(--ll-border);
}

form .card-header,
.modal .modal-header {
  border-bottom-color: var(--ll-border);
  background: var(--ll-tech-panel);
}

form .card-footer,
.modal .modal-footer {
  border-top-color: var(--ll-border);
  background: var(--ll-tech-panel);
}

.select2-dropdown {
  overflow: hidden;
  border-color: var(--ll-cyan) !important;
  border-radius: 5px !important;
  box-shadow: 0 12px 30px rgba(6, 29, 52, 0.16);
}

.select2-results__option--highlighted,
.select2-results__option[aria-selected="true"] {
  color: #ffffff !important;
  background: var(--ll-blue) !important;
}

.tox-tinymce,
.mce-container {
  border-color: #bfd0dc !important;
  border-radius: 5px !important;
}

/* Tables, searches and ticket lists */
.table-responsive,
.search_page .card,
.tab_cadre_fixehov {
  border-radius: 6px;
}

table.table thead th,
.tab_cadre_fixehov thead th {
  color: #284b64;
  border-bottom: 2px solid var(--ll-cyan);
  background: var(--ll-tech-panel-strong);
  font-weight: 700;
}

table.table tbody tr,
.tab_cadre_fixehov tbody tr {
  transition: background-color 120ms ease;
}

table.table tbody tr:hover,
.tab_cadre_fixehov tbody tr:hover {
  background-color: rgba(0, 168, 232, 0.055);
}

.badge {
  border-radius: 4px;
  font-weight: 650;
}

.pagination .page-link {
  border-color: var(--ll-border);
}

.pagination .page-item.active .page-link {
  border-color: var(--ll-blue);
  background: var(--ll-blue);
}

/* Ticket timelines and dialogs */
.timeline-item,
.itil-timeline .timeline-item {
  border-color: var(--ll-border);
}

.itil-timeline .timeline-item::before {
  border-color: var(--ll-cyan);
  background-color: var(--ll-surface);
}

.modal-content {
  overflow: hidden;
  border: 1px solid rgba(0, 168, 232, 0.28);
  border-radius: 7px;
  box-shadow: 0 18px 48px rgba(6, 29, 52, 0.24);
}

:root[data-glpi-theme-dark="1"] {
  --ll-tech-glow: rgba(0, 188, 235, 0.22);
  --ll-tech-line: rgba(71, 181, 221, 0.28);
  --ll-tech-panel: #17283a;
  --ll-tech-panel-strong: #1c3146;
}

:root[data-glpi-theme-dark="1"] .dashboard .g-chart,
:root[data-glpi-theme-dark="1"] form .form-control,
:root[data-glpi-theme-dark="1"] form .form-select,
:root[data-glpi-theme-dark="1"] form .select2-selection,
:root[data-glpi-theme-dark="1"] .modal .form-control,
:root[data-glpi-theme-dark="1"] .modal .form-select,
:root[data-glpi-theme-dark="1"] .modal .select2-selection {
  color: #e7f1f8 !important;
  border-color: #35526b;
  background-color: #142536;
}

:root[data-glpi-theme-dark="1"] form .form-label,
:root[data-glpi-theme-dark="1"] .form-field-row label,
:root[data-glpi-theme-dark="1"] .dashboard .main-label,
:root[data-glpi-theme-dark="1"] table.table thead th {
  color: #d9eaf5;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard .card,
  form .form-control,
  form .form-select,
  table.table tbody tr {
    transition: none;
  }
}
