/* erp/static/style.css */
/* Tema Fibra-Optica.ro - Dark Theme Only */

/* =====================================================
   VARIABILE CSS - PALETA DE CULORI (DARK THEME)
   ===================================================== */
:root {
  /* === Culori Brand Fibra-Optica - Stil Nou === */
  --brand-primary: #FFD700;        /* Galben auriu - lumina din fibră */
  --brand-primary-dark: #FFA500;   /* Galben portocaliu - hover */
  --brand-primary-light: #FFFF00;  /* Galben strălucitor */
  
  --brand-secondary: #00BFFF;      /* Albastru - tehnologie IT */
  --brand-secondary-light: #1E90FF;/* Albastru strălucitor */
  --brand-secondary-dark: #0066CC;  /* Albastru închis */
  
  --brand-accent: #87CEEB;         /* Albastru pal - Sky Blue */
  --brand-accent-light: #B0E0E6;   /* Albastru pal strălucitor - Powder Blue */
  --brand-accent-dark: #6BA3D8;    /* Albastru pal închis */

  /* === Culori Dark Theme - Negru Profund === */
  --bg-color: #000000;              /* Negru pur */
  --bg-color-soft: #0A0A0A;        /* Negru moale */
  --text-color: #FFFFFF;
  --text-color-muted: #888888;
  --navbar-bg: #111111;
  --navbar-text: #FFFFFF;
  --card-bg: #111111;
  --border-color: #333333;
  --table-bg: #111111;
  --table-header-bg: #1A1A1A;
  --table-border: #333333;

  /* === Culori Butoane === */
  --btn-primary-bg: var(--brand-primary);
  --btn-primary-text: var(--brand-secondary);
  --btn-primary-hover: var(--brand-primary-light);

  --btn-secondary-bg: rgba(135, 206, 235, 0.15);
  --btn-secondary-text: #87CEEB;
  --btn-secondary-hover: rgba(135, 206, 235, 0.25);

  --btn-success-bg: var(--brand-accent-light);
  --btn-success-text: #FFFFFF;
  --btn-success-hover: var(--brand-accent);

  --btn-danger-bg: #FC8181;
  --btn-danger-text: #1A202C;
  --btn-danger-hover: #F56565;

  --btn-info-bg: #4A9FE8;
  --btn-info-text: #000000;
  --btn-info-hover: #3B8FD6;

  --btn-warning-bg: var(--brand-primary-light);
  --btn-warning-text: var(--brand-secondary);
  --btn-warning-hover: var(--brand-primary);

  --btn-light-bg: #1A1A1A;
  --btn-light-text: #FFFFFF;
  --btn-light-hover: #2A2A2A;

  --btn-dark-bg: #000000;
  --btn-dark-text: #FFFFFF;
  --btn-dark-hover: #1A1A1A;

  /* === Bootstrap Table Overrides === */
  --bs-table-bg: var(--table-bg) !important;
  --bs-table-color: var(--text-color) !important;
  --bs-table-striped-bg: rgba(255, 255, 255, 0.05) !important;
  --bs-table-hover-bg: rgba(255, 255, 255, 0.1) !important;
  --bs-table-border-color: var(--table-border) !important;
  --bs-table-striped-color: var(--text-color) !important;
  --bs-table-hover-color: var(--text-color) !important;
  --bs-table-active-bg: rgba(255, 255, 255, 0.15) !important;
  --bs-table-accent-bg: var(--table-bg) !important;

  /* === Tranziții === */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* === Shadows === */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.6);

  /* === Border Radius === */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* =====================================================
   DROPDOWN SUBMENU STYLES (NMS/IPAM Unified Menu)
   ===================================================== */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  margin-left: 0.125rem;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-submenu > a::after {
  display: block;
  content: " ";
  float: right;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
  border-width: 5px 0 5px 5px;
  border-left-color: #ccc;
  margin-top: 5px;
  margin-right: -10px;
}

.dropdown-submenu:hover > a::after {
  border-left-color: #fff;
}

.dropdown-submenu.pull-left {
  float: none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
  left: -100%;
  margin-left: 10px;
  -webkit-border-radius: 6px 0 6px 6px;
  -moz-border-radius: 6px 0 6px 6px;
  border-radius: 6px 0 6px 6px;
}

/* =====================================================
   STILURI DE BAZĂ
   ===================================================== */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.875rem; /* 14px global font size */
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =====================================================
   NAVBAR - BRANDED
   ===================================================== */
.navbar {
  background: rgba(0, 0, 0, 0.9) !important;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  color: var(--navbar-text);
  padding: 12px 0;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.05);
}

.navbar-brand {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--navbar-text) !important;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-normal);
}

.navbar-brand:hover {
  color: var(--brand-primary) !important;
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Nav Links - EXACT ca pe site */
.nav-link {
  color: var(--text-color-muted) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 0 !important;
  position: relative;
  transition: color var(--transition-normal);
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width var(--transition-normal);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:focus {
  color: var(--brand-primary) !important;
}

/* Dropdown Menus - EXACT ca pe site */
.dropdown-menu {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 8px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

.dropdown-item {
  color: var(--text-color);
  padding: 10px 16px;
  border-radius: 12px;
  transition: all var(--transition-normal);
  position: relative;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(255, 215, 0, 0.15);
  color: var(--brand-primary);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
}

.dropdown-item i {
  color: var(--brand-primary);
  margin-right: 8px;
}

.dropdown-divider {
  border-color: var(--border-color);
}

/* =====================================================
   CONTAINER & CARDS
   ===================================================== */
.container {
  max-width: 1400px;
  width: 95%;
  margin: 24px auto;
  background-color: var(--card-bg);
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  flex-grow: 1;
  border: 2px solid var(--border-color);
  transition: all var(--transition-normal);
}

.card {
  /* Box Model */
  border: 2px solid var(--border-color);
  border-radius: 24px;
  /* Visuals */
  background-color: var(--card-bg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  /* Misc */
  overflow: hidden;
  transition: all var(--transition-smooth);
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 215, 0, 0.1);
  transform: translateY(-3px);
  border-color: rgba(255, 215, 0, 0.25);
}

.card-header {
  /* Box Model */
  border-bottom: 2px solid rgba(255, 215, 0, 0.1);
  /* Visuals */
  background: var(--table-header-bg);
  /* Typography */
  color: #FFFFFF;
  font-weight: 600;
}

/* Override pentru card-header cu bg-warning text-dark */
.card-header.bg-warning.text-dark {
  background: var(--brand-primary) !important;
  color: #000000 !important;
}


/* Card body și card title - dark theme */
.card-body {
  color: var(--text-color) !important;
  background-color: var(--card-bg) !important;
}

.card-body * {
  color: inherit;
}

.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4,
.card-body h5,
.card-body h6 {
  color: var(--text-color) !important;
}

.card-title {
  color: var(--text-color) !important;
}

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

/* Small text în carduri */
.card-body small {
  color: var(--text-color-muted) !important;
}

/* =====================================================
   TABELE - GLOBAL COMPACT & STICKY
   ===================================================== */
.table {
  font-size: 0.875rem !important; /* 14px */
}

.table th,
.table td {
  padding: 0.5rem 0.5rem !important; /* Simulare table-sm */
  vertical-align: middle !important;
}

/* Sticky Headers */
.table-responsive {
  max-height: 80vh; /* Sau o valoare potrivită */
  overflow-y: auto;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--table-header-bg) !important;
  box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.4);
}

/* Acțiuni compacte */
.table .btn-group-sm > .btn, 
.table .btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* =====================================================
   HEADERE
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
  font-weight: 700;
}

h1 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #333;
  display: inline-block;
}

h2 {
  font-size: 1.5rem;
  color: var(--brand-primary);
  border-bottom: 1px solid #333;
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

/* =====================================================
   INPUT GROUP - Aliniere butoane (GLOBAL)
   ===================================================== */

/* Input-group general - prevenire wrap */
.input-group {
  flex-wrap: nowrap !important;
  display: flex;
  align-items: stretch;
}

/* Butoane în input-group - aliniere perfectă */
.input-group .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  white-space: nowrap;
}

/* Input-group-sm - dimensiuni mici */
.input-group-sm .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  line-height: 1.5;
  height: calc(1.5em + 0.5rem + 2px);
  min-width: 32px;
  flex-shrink: 0;
  white-space: nowrap;
}

.input-group-sm .form-control {
  height: calc(1.5em + 0.5rem + 2px);
  flex-shrink: 0;
}

/* Input-group normal */
.input-group .form-control {
  flex-shrink: 0;
}

/* Prevenire wrap pentru acțiuni în tabele */
td .d-flex.flex-nowrap,
td[style*="min-width"] .d-flex {
  flex-wrap: nowrap !important;
}

td .btn-group {
  flex-shrink: 0;
}

td form {
  flex-shrink: 0;
}

/* Asigură că butoanele rămân pe același rând */
.d-flex.flex-nowrap,
.d-flex[class*="flex-nowrap"] {
  flex-wrap: nowrap !important;
}

/* =====================================================
   FORMULARE - STEP 5: Consistent Styling & Validation
   ===================================================== */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-color);
  font-size: 0.9rem;
}

/* Required field indicator */
.form-label.required::after {
  content: " *";
  color: var(--brand-primary);
  font-weight: 700;
}

.form-control,
.form-select {
  /* Box Model */
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  /* Typography */
  font-size: 0.95rem;
  color: #FFFFFF;
  /* Visuals */
  background-color: var(--bg-color);
  /* Misc */
  transition: all var(--transition-normal);
}

/* Compact Form Variant */
.form-compact .form-control,
.form-compact .form-select,
.form-compact .input-group-text,
.form-compact .choices__inner {
  padding: 4px 10px !important;
  min-height: 36px !important;
  height: 36px !important;
  font-size: 14px !important;
  border-radius: 8px !important;
}

.form-compact .form-label {
  font-size: 13px;
  margin-bottom: 4px;
  font-weight: 600;
}

.form-compact .invalid-feedback {
  font-size: 12px;
  margin-top: 2px;
  color: #fc8181 !important;
}

.form-compact .mb-3 {
  margin-bottom: 0.85rem !important;
}

.form-compact .input-group-text {
  background-color: #2b2b2b;
  border-color: #444;
}

/* Choices.js Compact Override */
.form-compact .choices__list--multiple .choices__item {
  padding: 2px 8px;
  font-size: 12px;
  margin-bottom: 2px;
}

/* Placeholder styling */
.form-control::placeholder,
.form-select::placeholder {
  color: var(--text-color-muted) !important;
  opacity: 0.7;
  font-style: italic;
}

/* Error state styling */
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.1);
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12), 0 0 20px rgba(220, 53, 69, 0.08);
}

/* Success state styling */
.form-control.is-valid,
.form-select.is-valid {
  border-color: #28a745;
}

.form-control.is-valid:focus,
.form-select.is-valid:focus {
  border-color: #28a745;
  box-shadow: 0 0 0 4px rgba(40, 167, 69, 0.12), 0 0 20px rgba(40, 167, 69, 0.08);
}

/* Error message styling */
.invalid-feedback,
.text-danger {
  color: #fc8181 !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.15);
  border-color: #dc3545;
  color: #fc8181;
}

/* Help text styling */
.form-text,
.text-muted {
  color: var(--text-color-muted) !important;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* FIX: Input text fields white (#fff) on focus/typing */
.form-control:focus,
.form-select:focus,
.form-control:focus-visible,
.form-select:focus-visible,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus {
  /* Box Model */
  border-color: var(--brand-primary);
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  /* Visuals */
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.12), 0 0 20px rgba(255, 215, 0, 0.08);
  background-color: #fff !important;
  color: #000 !important;
  /* Transform */
  transform: translateY(-1px);
}

/* Asigură textarea-urile au text alb */
textarea.form-control {
  background-color: var(--bg-color) !important;
  color: #FFFFFF !important;
}

/* FIX: Textarea white on focus/typing */
textarea.form-control:focus {
  background-color: #fff !important;
  color: #000 !important;
}

/* Checkbox și Radio Buttons */
.form-check-input:checked {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
}

/* ERP Autocomplete Component - Optimized Specificity */
.erp-autocomplete-wrapper {
  position: relative;
  width: 100%;
}

.erp-autocomplete-wrapper .input-group .erp-autocomplete-input.form-control {
  background-color: #2b2b2b;
  color: #ffffff;
  border-color: #444444;
  height: 38px;
  padding: 6px 12px;
  width: 100%;
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Match input-group-text height and style */
.erp-autocomplete-wrapper .input-group .input-group-text {
  background-color: #2b2b2b;
  border-color: #444444;
  height: 38px;
  border-radius: 8px 0 0 8px;
}

.erp-autocomplete-wrapper .input-group .erp-autocomplete-input.form-control:disabled {
  background-color: #1a1a1a;
  color: #666666;
  cursor: not-allowed;
}

.erp-autocomplete-wrapper .input-group .erp-autocomplete-input.form-control:focus {
  background-color: #ffffff;
  color: #000000;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.2);
}

.dropdown-menu.erp-autocomplete-results {
  background-color: #2b2b2b;
  border: 1px solid #444444;
  width: 100%;
  z-index: 1060;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  margin-top: 4px;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

.erp-autocomplete-results .erp-autocomplete-item {
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  color: #ffffff;
  background-color: transparent;
  border-radius: 0;
}

.erp-autocomplete-results .erp-autocomplete-item:hover,
.erp-autocomplete-results .erp-autocomplete-item.active {
  background-color: #3d3d3d;
  color: var(--brand-primary);
}

.erp-autocomplete-results .erp-autocomplete-item.active {
  border-left: 4px solid var(--brand-primary);
}

.erp-autocomplete-item .text-info {
  color: #0dcaf0 !important;
}

.erp-autocomplete-item .text-light {
  color: #adb5bd !important;
}

/* Select Options */
.form-select option {
  background-color: var(--card-bg);
  color: var(--text-color);
}

/* Disabled Inputs */
.form-control:disabled,
.form-select:disabled {
  background-color: var(--bg-color);
  opacity: 0.6;
}

/* =====================================================
   BUTOANE - STYLED (STANDARDIZAT)
   ===================================================== */
.btn {
  /* Box Model */
  padding: 16px 36px;
  border: none;
  border-radius: 14px;
  gap: 6px;
  /* Typography */
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  /* Layout */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* Position */
  position: relative;
  overflow: hidden;
  /* Visuals */
  cursor: pointer;
  /* Misc */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efect animație shine pentru butoanele specifice (primary, secondary, etc.) */
.btn-primary::before,
.btn-success::before,
.btn-danger::before,
.btn-info::before,
.btn-warning::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left var(--transition-smooth);
  z-index: 0;
}

.btn-primary:hover::before,
.btn-success:hover::before,
.btn-danger:hover::before,
.btn-info:hover::before,
.btn-warning:hover::before {
  left: 100%;
}

/* Efect animație shine pentru butonul secondary (albastru pal) */
.btn-secondary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(135, 206, 235, 0.2), transparent);
  transition: left var(--transition-smooth);
  z-index: 0;
}

.btn-secondary:hover::before {
  left: 100%;
}

.btn > * {
  position: relative;
  z-index: 1;
}

/* Standardizare iconițe în butoane */
.btn i {
  font-size: 1em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}

/* Butoane mici - standardizat */
.btn-sm {
  padding: 12px 24px;
  font-size: 0.9rem;
  gap: 4px;
  border-radius: 12px;
}

.btn-sm i {
  font-size: 0.9em;
}

/* Butoane mari - standardizat */
.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
  gap: 8px;
  border-radius: 16px;
}

.btn-lg i {
  font-size: 1.1em;
}

/* Transform general pentru hover - se aplică doar dacă nu e deja definit */
.btn:hover:not(.btn-primary):not(.btn-secondary):not(.btn-info):not(.btn-success):not(.btn-warning) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

/* Primary Button - Galben - EXACT ca pe site */
.btn-primary {
  /* Box Model */
  border: 2px solid var(--brand-primary);
  /* Typography */
  font-weight: 700;
  color: #000000;
  /* Visuals */
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 215, 0, 0.15);
  /* Position */
  position: relative;
  overflow: hidden;
  /* Misc */
  transition: all var(--transition-smooth);
}

/* Forțează text negru pe butoanele galbene chiar dacă au clase text-info */
.btn-primary.text-info,
.btn-primary .text-info {
  color: #000000 !important;
}


.btn-primary:hover,
.btn-primary:focus,
.btn-primary:focus-visible {
  /* Visuals */
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.35), 0 0 30px rgba(255, 215, 0, 0.25);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Secondary Button - EXACT ca pe site */
.btn-secondary {
  background: transparent;
  border: 2px solid var(--brand-accent);
  color: var(--brand-accent) !important;
  font-weight: 700;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}


.btn-secondary:hover,
.btn-secondary:focus-visible {
  /* Visuals */
  background: var(--brand-accent);
  box-shadow: 0 8px 25px rgba(135, 206, 235, 0.25), 0 0 20px rgba(135, 206, 235, 0.15);
  border-color: var(--brand-accent-light);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

/* Success Button - Albastru Pal - EXACT ca pe site */
.btn-success {
  background: linear-gradient(135deg, var(--brand-accent-light), var(--brand-accent));
  color: #000000 !important;
  border: 2px solid var(--brand-accent-light);
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(135, 206, 235, 0.15), 0 0 20px rgba(135, 206, 235, 0.1);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}


.btn-success:hover,
.btn-success:focus-visible {
  /* Visuals */
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-dark));
  box-shadow: 0 12px 40px rgba(135, 206, 235, 0.3), 0 0 30px rgba(135, 206, 235, 0.2);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, #FC8181, #F56565);
  color: #000000 !important;
  border: 2px solid #FC8181;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(252, 129, 129, 0.2), 0 0 20px rgba(252, 129, 129, 0.1);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}


.btn-danger:hover,
.btn-danger:focus-visible {
  /* Visuals */
  background: linear-gradient(135deg, #F56565, #E53E3E);
  box-shadow: 0 12px 40px rgba(252, 129, 129, 0.35), 0 0 30px rgba(252, 129, 129, 0.25);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid #FC8181;
  outline-offset: 2px;
}

/* Info Button - Turcoaz (mai închis) */
.btn-info {
  background: linear-gradient(135deg, #4A9FE8, #3B8FD6);
  color: #000000 !important;
  border: 2px solid #4A9FE8;
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(74, 159, 232, 0.2), 0 0 20px rgba(74, 159, 232, 0.1);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}


.btn-info:hover,
.btn-info:focus-visible {
  /* Visuals */
  background: linear-gradient(135deg, #3B8FD6, #2E7BC4);
  box-shadow: 0 12px 40px rgba(74, 159, 232, 0.35), 0 0 30px rgba(74, 159, 232, 0.25);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid #4A9FE8;
  outline-offset: 2px;
}

/* Warning Button - Galben - EXACT ca pe site */
.btn-warning {
  background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
  color: #000000 !important;
  border: 2px solid var(--brand-primary-light);
  font-weight: 700;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.25), 0 0 20px rgba(255, 215, 0, 0.15);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Forțează text negru pe butoanele galbene chiar dacă au clase text-info */
.btn-warning.text-info,
.btn-warning .text-info {
  color: #000000 !important;
}


.btn-warning:hover,
.btn-warning:focus-visible {
  /* Visuals */
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-dark));
  box-shadow: 0 12px 40px rgba(255, 215, 0, 0.35), 0 0 30px rgba(255, 215, 0, 0.25);
  /* Typography */
  color: #000000;
  /* Transform */
  transform: translateY(-3px) scale(1.02);
  /* Focus */
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Light Button */
.btn-light {
  background: var(--btn-light-bg);
  color: var(--btn-light-text) !important;
  border-color: var(--border-color);
}

.btn-light:hover {
  background: var(--btn-light-hover);
}

/* Dark Button */
.btn-dark {
  background: var(--btn-dark-bg);
  color: var(--btn-dark-text) !important;
  border-color: var(--border-color);
}

.btn-dark:hover {
  background: var(--btn-dark-hover);
}

/* Outline Buttons */
.btn-outline-primary {
  background: transparent;
  color: var(--brand-primary) !important;
  border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
  background: var(--brand-primary);
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.25);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-color) !important;
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background: var(--border-color);
  color: #FFFFFF !important;
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-color) !important;
  border-color: var(--border-color);
}

.btn-outline-dark:hover {
  background: var(--border-color);
  color: #FFFFFF !important;
}

.btn-outline-success {
  background: transparent;
  color: var(--brand-accent) !important;
  border-color: var(--brand-accent);
}

.btn-outline-success:hover {
  background: var(--brand-accent);
  color: #000000 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.25);
}

.btn-outline-light {
  background: transparent;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
}

/* Small Buttons */
.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* =====================================================
   TABELE
   ===================================================== */
.table {
  /* Box Model */
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
  border-radius: var(--radius-md);
  /* Visuals */
  background-color: var(--table-bg);
  /* Typography */
  color: var(--text-color);
  /* Misc */
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Table Header */
.table thead {
  background: var(--table-header-bg);
  border-bottom: 2px solid rgba(255, 215, 0, 0.15);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.table thead th {
  padding: 14px 16px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
  border: none;
  color: var(--text-color) !important;
}

/* Table Body */
.table tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  border-top: 1px solid var(--table-border);
  color: var(--text-color);
}

/* Striped Rows */
.table-striped tbody tr:nth-of-type(odd) td,
.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.03) !important;
  box-shadow: none !important;
}

.table-striped tbody tr:nth-of-type(even) td,
.table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: var(--table-bg) !important;
  box-shadow: none !important;
}

/* Hover Rows */
.table-hover tbody tr {
  transition: all var(--transition-fast);
}

.table-hover tbody tr:hover td,
.table-hover > tbody > tr:hover > * {
  background-color: rgba(255, 215, 0, 0.1) !important;
  box-shadow: none !important;
  transform: scale(1.01);
}

/* Super-specific override pentru celulele tabelului */
table > :not(caption) > * > * {
  background-color: var(--table-bg) !important;
  color: var(--text-color) !important;
  box-shadow: none !important;
  border-color: var(--table-border) !important;
}

/* Bordered Tables */
.table-bordered {
  border: 1px solid var(--table-border) !important;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--table-border) !important;
}

/* Table Variants - Override pentru dark theme */
.table-danger {
  background-color: rgba(252, 129, 129, 0.15) !important;
}

.table-danger td,
.table-danger th {
  color: var(--text-color) !important;
  background-color: rgba(252, 129, 129, 0.15) !important;
}

.table-warning {
  background-color: rgba(245, 166, 35, 0.15) !important;
}

.table-warning td,
.table-warning th {
  color: var(--text-color) !important;
  background-color: rgba(245, 166, 35, 0.15) !important;
}

.table-success {
  background-color: rgba(135, 206, 235, 0.1) !important;
}

.table-success td,
.table-success th {
  color: var(--text-color) !important;
  background-color: rgba(135, 206, 235, 0.1) !important;
}

.table-info {
  background-color: rgba(74, 159, 232, 0.15) !important;
}

.table-info td,
.table-info th {
  color: #000000 !important;
  background-color: rgba(74, 159, 232, 0.15) !important;
}

.table-primary {
  background-color: rgba(245, 166, 35, 0.15) !important;
}

.table-primary td,
.table-primary th {
  color: var(--text-color) !important;
  background-color: rgba(245, 166, 35, 0.15) !important;
}

/* =====================================================
   ALERTE
   ===================================================== */
.alert {
  border: none;
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, rgba(135, 206, 235, 0.15) 0%, rgba(135, 206, 235, 0.08) 100%);
  color: var(--brand-accent-light);
  border-left: 4px solid var(--brand-accent);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(252, 129, 129, 0.2) 0%, rgba(252, 129, 129, 0.1) 100%);
  color: #FC8181;
  border-left: 4px solid #E53E3E;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.08) 100%);
  color: var(--brand-primary);
  border-left: 4px solid var(--brand-primary);
}

.alert-info {
  background: linear-gradient(135deg, rgba(74, 159, 232, 0.2) 0%, rgba(74, 159, 232, 0.1) 100%);
  color: #4A9FE8;
  border-left: 4px solid #3B8FD6;
}

.alert-primary {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
  color: var(--brand-primary);
  border-left: 4px solid var(--brand-secondary);
}

.alert-secondary {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.15) 0%, rgba(148, 163, 184, 0.1) 100%);
  color: #94A3B8;
  border-left: 4px solid #718096;
}

/* Alert Close Button */
.alert .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  padding: 6px 12px;
  font-weight: 600;
  font-size: 0.75rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.badge.bg-primary {
  background: var(--brand-primary) !important;
  color: #000000 !important;
}

.badge.bg-success {
  background: var(--brand-accent) !important;
}

.badge.bg-warning {
  background: var(--brand-primary) !important;
  color: #000000 !important;
}


.badge.bg-info {
  background: var(--btn-info-bg) !important;
  color: var(--btn-info-text) !important;
}

/* Badge-uri generale cu text-dark */
.badge.text-dark:not(.bg-warning):not(.bg-light):not(.bg-secondary-subtle) {
  color: var(--text-color) !important;
}

.badge.bg-secondary {
  background: var(--brand-secondary) !important;
}

/* =====================================================
   LINK-URI
   ===================================================== */
a {
  /* Typography */
  color: var(--brand-primary);
  text-decoration: none;
  /* Misc */
  transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
  /* Typography */
  color: var(--brand-primary-light);
  /* Focus */
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* =====================================================
   VALIDARE FORMULARE
   ===================================================== */
.is-invalid {
  border-color: #E53E3E !important;
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.15) !important;
}

.invalid-feedback {
  color: #FC8181;
  font-size: 0.85rem;
  margin-top: 4px;
}

.is-valid {
  border-color: var(--brand-accent) !important;
}

.valid-feedback {
  color: var(--brand-accent);
}

/* =====================================================
   UTILITĂȚI TEXT
   ===================================================== */
.text-secondary,
.text-muted {
  color: var(--text-color-muted) !important;
}

.text-dark,
.text-body {
  color: var(--text-color) !important;
}

/* Culori text pentru dark theme */
.text-primary {
  color: var(--brand-primary) !important;
}

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

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

.text-danger {
  color: #FC8181 !important;
}

.text-info {
  color: #4A9FE8 !important;
}

/* =====================================================
   OVERRIDE TEXT-DARK PE DARK THEME
   ===================================================== */

/* Badge-uri cu text-dark - trebuie text contrastat */
.badge.text-dark {
  color: var(--text-color) !important;
}

/* Badge warning (galben) - text negru pentru contrast */
.badge.bg-warning.text-dark {
  color: #000000 !important;
}

/* Badge info (albastru deschis) - text light */
.badge.bg-info.text-dark {
  color: #000000 !important;
}

/* Badge light - text light */
.badge.bg-light.text-dark {
  color: var(--text-color) !important;
}

/* Badge secondary-subtle - text light */
.badge.bg-secondary-subtle.text-dark {
  color: var(--text-color) !important;
}

/* Card-header-uri cu text-dark */
.card-header.text-dark {
  color: var(--text-color) !important;
}

/* Card-header warning (galben) - text dark pentru contrast */
.card-header.bg-warning.text-dark {
  color: var(--brand-secondary) !important;
}

/* Card-header info - text light */
.card-header.bg-info.text-dark {
  color: #000000 !important;
}

/* Alte elemente cu text-dark */
.text-dark:not(.badge):not(.card-header) {
  color: var(--text-color) !important;
}

.text-light {
  color: #FFFFFF !important;
}

.bg-white {
  background-color: var(--card-bg) !important;
}

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

/* =====================================================
   CHOICES.JS DROPDOWN - DARK THEME COMPLET
   ===================================================== */
.choices {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  margin-bottom: 0;
}

.choices__inner {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  border: 2px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  padding: 8px 10px !important;
  min-height: 44px !important;
}

.choices__inner:focus,
.choices.is-focused .choices__inner {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2) !important;
}

/* Input în Choices */
.choices__input {
  background-color: transparent !important;
  color: var(--text-color) !important;
  margin-bottom: 0 !important;
}

.choices__input::placeholder {
  color: var(--text-color-muted) !important;
}

/* Placeholder */
.choices__placeholder {
  color: var(--text-color-muted) !important;
  opacity: 1 !important;
}

/* Lista dropdown */
.choices__list--dropdown {
  background-color: var(--card-bg) !important;
  border: 2px solid var(--border-color) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xl) !important;
  z-index: 1060 !important;
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.choices__list--dropdown .choices__item {
  color: var(--text-color) !important;
  padding: 10px 14px !important;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted,
.choices__list--dropdown .choices__item--selectable:hover {
  background-color: rgba(255, 215, 0, 0.1) !important;
  color: var(--brand-primary) !important;
}

/* Iteme selectate (badge-uri) */
.choices__list--multiple .choices__item {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary-dark) !important;
  color: #000000 !important;
  border-radius: var(--radius-sm) !important;
  padding: 4px 10px !important;
  font-weight: 500 !important;
}

.choices__list--multiple .choices__item.is-highlighted {
  background-color: var(--brand-primary-dark) !important;
  border-color: var(--brand-primary-dark) !important;
}

/* Buton de ștergere item */
.choices__button {
  border-left: 1px solid rgba(0, 191, 255, 0.2) !important;
  opacity: 0.8 !important;
}

.choices__button:hover {
  opacity: 1 !important;
}

/* Lista single select */
.choices__list--single {
  padding: 0 !important;
}

.choices__list--single .choices__item {
  color: var(--text-color) !important;
}

/* Opțiuni în dropdown */
.choices__item--choice {
  background-color: transparent !important;
}

.choices__item--choice.is-selected {
  background-color: rgba(255, 215, 0, 0.08) !important;
  color: var(--brand-primary) !important;
}

/* Grupuri în dropdown */
.choices__group .choices__heading {
  color: var(--text-color-muted) !important;
  font-weight: 600 !important;
  border-bottom: 1px solid var(--border-color) !important;
}

/* Mesaj "nu sunt rezultate" */
.choices__list--dropdown .choices__item--disabled {
  color: var(--text-color-muted) !important;
  background-color: transparent !important;
}

/* Loading indicator */
.choices__list--dropdown .choices__item--disabled.choices__item--placeholder {
  display: none !important;
}

.choices.is-loading .choices__inner::after {
  border-color: var(--brand-primary) transparent transparent !important;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination .page-link {
  color: var(--text-color);
  background-color: var(--card-bg);
  border-color: var(--border-color);
}

.pagination .page-link:hover {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #000000;
}

.pagination .page-item.active .page-link {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #000000;
}

/* =====================================================
   MODALS
   ===================================================== */
.modal-content {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-normal);
  overflow: hidden;
}

.modal-content:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.modal-header {
  background: var(--table-header-bg);
  border-bottom: 2px solid rgba(255, 215, 0, 0.15);
  color: #FFFFFF;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.modal-header .btn-close {
  filter: invert(1);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
}

/* =====================================================
   PROGRES BARS
   ===================================================== */
.progress {
  background-color: var(--border-color);
  border-radius: var(--radius-full);
  height: 10px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
}

/* =====================================================
   RESPONSIVE ADJUSTMENTS
   ===================================================== */

/* Mobile First - Optimizări pentru ecrane mici */
@media (max-width: 576px) {
  /* Container optimizat pentru mobil */
  .container {
    width: 100%;
    padding: 12px;
    margin: 0;
  }
  
  /* Headere responsive cu clamp() */
  h1 {
    font-size: clamp(1.25rem, 4vw, 2rem);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
  }
  
  h2 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
  }
  
  h3 {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
  }
  
  /* Butoane optimizate pentru mobil */
  .btn {
    padding: clamp(10px, 2vw, 16px) clamp(16px, 4vw, 36px);
    font-size: clamp(0.875rem, 2vw, 1rem);
    min-height: 38px;
    width: auto;
    max-width: 100%;
  }
  
  .btn-sm {
    padding: clamp(6px, 1.5vw, 12px) clamp(12px, 3vw, 24px);
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    min-height: 32px;
  }
  
  .btn-lg {
    padding: clamp(12px, 2.5vw, 18px) clamp(20px, 5vw, 40px);
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    min-height: 44px;
  }
  
  /* Asigură text vizibil pe toate butoanele */
  .btn-info,
  .btn-success,
  .btn-primary,
  .btn-warning {
    color: #000000 !important;
  }
  
  .btn-secondary {
    color: var(--brand-accent) !important;
  }
  
  .btn-secondary:hover {
    color: #000000 !important;
  }
  
  /* Spacing între butoane pe mobil */
  .d-flex.gap-2 {
    gap: 0.5rem !important;
    flex-wrap: wrap;
  }
  
  /* Tabele optimizate pentru mobil */
  .table {
    font-size: 0.8rem;
  }
  
  .table thead th {
    padding: 8px 10px;
    font-size: 0.75rem;
    white-space: nowrap;
  }
  
  .table tbody td {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  /* Card-uri optimizate */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .card-header {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  /* Form-uri optimizate */
  .form-control,
  .form-select {
    font-size: 16px; /* Previne zoom pe iOS */
    padding: 10px 12px;
  }
  
  .form-label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
  }
  
  /* Input groups pe mobil */
  .input-group {
    flex-wrap: wrap;
  }
  
  .input-group .btn {
    min-width: auto;
    flex: 1 1 auto;
  }
  
  /* Navbar optimizat */
  .navbar-brand {
    font-size: 1rem;
  }
  
  .navbar-nav {
    margin-top: 0.5rem;
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 1rem;
  }
  
  /* Dropdown-uri optimizate */
  .dropdown-menu {
    max-width: calc(100vw - 24px);
    margin-left: 12px;
    margin-right: 12px;
  }
  
  /* Butoane în grupuri - stack pe mobil */
  .btn-group {
    flex-wrap: wrap;
  }
  
  .btn-group .btn {
    flex: 1 1 auto;
    min-width: 0;
  }
  
  /* Aliniere header pagină */
  .d-flex.justify-content-between.align-items-center {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 1rem;
  }
  
  .d-flex.justify-content-between.align-items-center > div:last-child {
    width: 100%;
  }
  
  /* Butoane full width pe mobil când sunt în header */
  .d-flex.justify-content-between.align-items-center .d-flex.gap-2 {
    width: 100%;
  }
  
  .d-flex.justify-content-between.align-items-center .d-flex.gap-2 .btn {
    flex: 1 1 auto;
  }
  
  /* Tabele - scroll orizontal pe mobil */
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
  }
  
  /* Butoane în tabele - stack pe mobil */
  .table td .btn-group,
  .table td .d-flex {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .table td .btn {
    min-width: auto;
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  
  /* Form-uri - coloane stack pe mobil */
  .row .col-md-6,
  .row .col-md-4,
  .row .col-md-3 {
    margin-bottom: 1rem;
  }
  
  /* Card-uri în grid - stack pe mobil */
  .row.g-2 .col-md-3,
  .row.g-2 .col-md-4,
  .row.g-2 .col-md-6 {
    margin-bottom: 0.5rem;
  }
}

/* Tablet și ecrane medii */
@media (min-width: 577px) and (max-width: 768px) {
  .container {
    width: 95%;
    padding: 16px;
    margin: 16px auto;
  }
  
  h1 {
    font-size: clamp(1.5rem, 4.5vw, 2rem);
  }
  
  .btn {
    padding: clamp(10px, 2vw, 16px) clamp(18px, 4vw, 36px);
    font-size: clamp(0.9rem, 2vw, 1rem);
  }
  
  /* Asigură text vizibil pe toate butoanele */
  .btn-info,
  .btn-success,
  .btn-primary,
  .btn-warning {
    color: #000000 !important;
  }
  
  .btn-secondary {
    color: var(--brand-accent) !important;
  }
  
  .btn-secondary:hover {
    color: #000000 !important;
  }
  
  .table thead th {
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  
  .table tbody td {
    padding: 10px 12px;
    font-size: 0.85rem;
  }
}

/* Desktop - optimizat pentru ecrane mari */
@media (min-width: 769px) {
  /* Container standard pentru desktop - folosește mai mult spațiu */
  .container {
    max-width: 1600px;
    width: 98%;
  }
}

/* Desktop mare - pentru ecrane foarte largi */
@media (min-width: 1400px) {
  .container {
    max-width: 1800px;
    width: 98%;
  }
}

/* Container fluid pe mobil, optimizat pe desktop */
.container-fluid-md {
  width: 100%;
  padding-left: 12px;
  padding-right: 12px;
}

@media (min-width: 769px) {
  .container-fluid-md {
    max-width: 1600px;
    width: 98%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* Desktop mare pentru container-fluid-md */
@media (min-width: 1400px) {
  .container-fluid-md {
    max-width: 1800px;
    width: 98%;
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* =====================================================
   SPINNER / LOADING
   ===================================================== */
.spinner-border {
  color: var(--brand-primary);
}

/* =====================================================
   TOASTS
   ===================================================== */
.toast {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  color: var(--text-color);
}

/* =====================================================
   CUSTOM SCROLLBAR
   ===================================================== */
/* =====================================================
   CUSTOM SCROLLBAR - DARK THEME
   ===================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
  border: 2px solid var(--card-bg);
  transition: background var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-color-muted);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) var(--card-bg);
}

/* =====================================================
   SEARCH EXPANDABIL IN NAVBAR
   ===================================================== */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
}

/* Buton Lupă */
.search-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.search-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
}

/* Input Wrapper - ascuns implicit */
.search-input-wrapper {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  background: var(--card-bg);
  border: 2px solid var(--brand-primary);
  border-radius: var(--radius-full);
  overflow: hidden;
  width: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.search-container.expanded .search-input-wrapper {
  width: 320px;
  opacity: 1;
  visibility: visible;
}

.search-container.expanded .search-toggle {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Input */
.search-input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-color);
  font-size: 0.95rem;
  outline: none;
  min-width: 0;
}

.search-input::placeholder {
  color: var(--text-color-muted);
}

/* Buton Închidere */
.search-close {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.search-close:hover {
  color: var(--brand-primary);
}

/* Rezultate */
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-height: 400px;
  overflow-y: auto;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1050;
}

.search-container.expanded .search-results.show {
  display: block;
}

/* Responsive - pe mobil input full width */
@media (max-width: 768px) {
  .search-container.expanded .search-input-wrapper {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    transform: none;
    z-index: 1100;
  }
  
  .search-container.expanded .search-results {
    position: fixed;
    top: 60px;
    left: 10px;
    right: 10px;
    width: auto;
    z-index: 1100;
  }
  
  /* Overlay pentru mobil */
  .search-container.expanded::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
  }
}

/* =====================================================
   NOTIFICATIONS DROPDOWN
   ===================================================== */
#notificationsDropdown {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

#notificationsDropdown .dropdown-header {
  background: linear-gradient(135deg, var(--table-header-bg) 0%, #3D4A5C 100%);
  color: #FFFFFF;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  padding: 12px 16px;
}

/* =====================================================
   FLATPICKR DATE PICKER - DARK THEME
   ===================================================== */
.flatpickr-calendar {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-lg) !important;
  border-radius: var(--radius-md) !important;
}

.flatpickr-months {
  background: var(--table-header-bg) !important;
  border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.flatpickr-months .flatpickr-month {
  background: transparent !important;
  color: var(--text-color) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months option {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.flatpickr-current-month input.cur-year {
  color: var(--text-color) !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: var(--text-color) !important;
  fill: var(--text-color) !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  color: var(--brand-primary) !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: var(--brand-primary) !important;
}

.flatpickr-weekdays {
  background: var(--table-header-bg) !important;
}

span.flatpickr-weekday {
  color: var(--text-color-muted) !important;
  background: transparent !important;
}

.flatpickr-days {
  border-color: var(--border-color) !important;
}

.dayContainer {
  background: var(--card-bg) !important;
}

.flatpickr-day {
  color: var(--text-color) !important;
  border-color: transparent !important;
}

.flatpickr-day:hover {
  background: rgba(245, 166, 35, 0.15) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-primary) !important;
}

.flatpickr-day.today {
  border-color: var(--brand-primary) !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-secondary) !important;
}

.flatpickr-day.inRange {
  background: rgba(245, 166, 35, 0.2) !important;
  border-color: rgba(245, 166, 35, 0.2) !important;
  box-shadow: none !important;
}

.flatpickr-day.disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--text-color-muted) !important;
  opacity: 0.5;
}

.flatpickr-time {
  background: var(--card-bg) !important;
  border-top: 1px solid var(--border-color) !important;
}

.flatpickr-time input {
  color: var(--text-color) !important;
  background: var(--bg-color) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
}

.flatpickr-time input:hover,
.flatpickr-time input:focus {
  background: var(--bg-color) !important;
  border-color: var(--brand-primary) !important;
}

.flatpickr-time .flatpickr-am-pm {
  color: var(--text-color) !important;
  background: var(--bg-color) !important;
  border: 1px solid var(--border-color) !important;
}

.flatpickr-time .flatpickr-am-pm:hover {
  background: rgba(245, 166, 35, 0.15) !important;
}

/* =====================================================
   FULLCALENDAR - DARK THEME
   ===================================================== */
.fc {
  --fc-border-color: var(--border-color);
  --fc-button-bg-color: var(--brand-primary);
  --fc-button-border-color: var(--brand-primary);
  --fc-button-text-color: var(--brand-secondary);
  --fc-button-hover-bg-color: var(--brand-primary-dark);
  --fc-button-hover-border-color: var(--brand-primary-dark);
  --fc-button-active-bg-color: var(--brand-primary-dark);
  --fc-page-bg-color: var(--card-bg);
  --fc-neutral-bg-color: var(--bg-color);
  --fc-list-event-hover-bg-color: rgba(255, 215, 0, 0.1);
  --fc-today-bg-color: rgba(255, 215, 0, 0.08);
  --fc-event-bg-color: var(--brand-primary);
  --fc-event-border-color: var(--brand-primary-dark);
  --fc-event-text-color: var(--brand-secondary);
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--border-color) !important;
}

.fc-theme-standard .fc-scrollgrid {
  border-color: var(--border-color) !important;
}

.fc .fc-col-header-cell {
  background: var(--table-header-bg) !important;
}

.fc .fc-col-header-cell-cushion {
  color: var(--text-color) !important;
}

.fc .fc-daygrid-day-number {
  color: var(--text-color) !important;
}

.fc .fc-daygrid-day.fc-day-today {
  background: rgba(245, 166, 35, 0.1) !important;
}

.fc .fc-daygrid-day:hover {
  background: rgba(255, 215, 0, 0.04) !important;
}

.fc-timegrid-slot {
  border-color: var(--border-color) !important;
}

.fc .fc-timegrid-slot-label {
  color: var(--text-color-muted) !important;
}

.fc-popover {
  background: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

.fc-popover-header {
  background: var(--table-header-bg) !important;
  color: var(--text-color) !important;
}

.fc-popover-body {
  background: var(--card-bg) !important;
}

.fc .fc-more-link {
  color: var(--brand-primary) !important;
}

.fc .fc-list-day-cushion {
  background: var(--table-header-bg) !important;
}

.fc .fc-list-event:hover td {
  background: rgba(245, 166, 35, 0.15) !important;
}

/* =====================================================
   BOOTSTRAP UTILITY OVERRIDES - DARK THEME
   ===================================================== */

/* bg-light și bg-white -> dark equivalents */
.bg-light {
  background-color: var(--bg-color) !important;
}

.bg-white {
  background-color: var(--card-bg) !important;
}

/* Card headers cu bg-light sau bg-white */
.card-header.bg-light,
.card-header.bg-white {
  background: var(--table-header-bg) !important;
  color: var(--text-color) !important;
  border-bottom-color: var(--border-color) !important;
}

/* text-dark pe fundal dark -> text light */
.bg-light .text-dark,
.bg-white .text-dark,
.card .text-dark {
  color: var(--text-color) !important;
}

/* Badge-uri cu bg-light */
.badge.bg-light {
  background-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

.badge.bg-light.text-dark {
  color: var(--text-color) !important;
}

/* Input group cu bg-light sau bg-white */
.input-group-text.bg-light,
.input-group-text.bg-white {
  background-color: var(--bg-color) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

/* Pre/code blocks cu bg-light */
pre.bg-light,
code.bg-light {
  background-color: var(--bg-color) !important;
  color: var(--text-color) !important;
  border-color: var(--border-color) !important;
}

/* Border rounded containers cu bg-light */
.border.bg-light {
  background-color: var(--bg-color) !important;
  border-color: var(--border-color) !important;
}

/* Metric values sau alte texte .text-dark */
.text-dark {
  color: var(--text-color) !important;
}

/* Bootstrap secondary-subtle */
.bg-secondary-subtle {
  background-color: var(--border-color) !important;
}

.badge.bg-secondary-subtle {
  background-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

/* =====================================================
   MAPS & SPECIAL CONTAINERS
   ===================================================== */

/* Override pentru elemente care TREBUIE să fie albe (ex: hărți) */
.leaflet-container,
.map-container,
#map {
  /* Hărțile trebuie să rămână cu fundal standard */
  background: #f8f9fa !important;
}

/* Tooltip-uri și popover-uri */
.leaflet-popup-content-wrapper {
  background: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.leaflet-popup-tip {
  background: var(--card-bg) !important;
}

/* =====================================================
   ADDITIONAL FORM ELEMENTS
   ===================================================== */

/* Range input */
input[type="range"] {
  accent-color: var(--brand-primary);
}

/* File input */
.form-control[type="file"] {
  background-color: var(--bg-color) !important;
  color: #FFFFFF !important;
}

.form-control[type="file"]::file-selector-button {
  background: var(--brand-primary) !important;
  color: #000000 !important;
  border: none !important;
  padding: 8px 16px !important;
  margin-right: 16px !important;
  border-radius: var(--radius-sm) !important;
}

/* Color input */
input[type="color"] {
  background-color: var(--bg-color) !important;
  border-color: var(--border-color) !important;
}

/* Number input spin buttons */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 1;
}

/* =====================================================
   ACCORDION
   ===================================================== */
.accordion-item {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
}

.accordion-button {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--table-header-bg) !important;
  color: var(--text-color) !important;
}

.accordion-button::after {
  filter: invert(1) brightness(2);
}

.accordion-body {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

/* =====================================================
   LIST GROUPS
   ===================================================== */
.list-group-item {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
}

.list-group-item:hover {
  background-color: var(--bg-color) !important;
}

.list-group-item.active {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: var(--brand-secondary) !important;
}

/* =====================================================
   TABS & NAV PILLS
   ===================================================== */
.nav-tabs {
  border-bottom-color: var(--border-color) !important;
}

.nav-tabs .nav-link {
  color: var(--text-color) !important;
  border-color: transparent !important;
}

.nav-tabs .nav-link:hover {
  border-color: var(--border-color) var(--border-color) transparent !important;
  background-color: var(--bg-color) !important;
}

.nav-tabs .nav-link.active {
  background-color: var(--card-bg) !important;
  border-color: var(--border-color) var(--border-color) var(--card-bg) !important;
  color: var(--brand-primary) !important;
}

.nav-pills .nav-link {
  color: var(--text-color) !important;
}

.nav-pills .nav-link:hover {
  background-color: var(--bg-color) !important;
}

.nav-pills .nav-link.active {
  background-color: var(--brand-primary) !important;
  color: var(--brand-secondary) !important;
}

.tab-content {
  background-color: var(--card-bg) !important;
}

/* =====================================================
   OFFCANVAS
   ===================================================== */
.offcanvas {
  background-color: var(--card-bg) !important;
  color: var(--text-color) !important;
}

.offcanvas-header {
  border-bottom: 1px solid var(--border-color) !important;
}

.offcanvas-header .btn-close {
  filter: invert(1);
}

/* =====================================================
   P0.4 - MOBILE TOUCH USABILITY IMPROVEMENTS
   ===================================================== */

/* P0.4.1 - Touch Target Sizing (Mobile Only) */
@media (max-width: 991.98px) {
  .nav-link,
  .dropdown-item,
  .btn:not(.btn-sm):not(.btn-lg),
  .icon-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  
  /* Ensure icon-only buttons meet minimum size */
  .btn i:only-child,
  .nav-link i:only-child {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* P0.4.2 - Remove Hover-Only Visual Effects on Touch Devices */
@media (hover: none) {
  .nav-link:hover,
  .dropdown-item:hover,
  .list-group-item:hover {
    background-color: inherit;
  }
}

/* P0.4.3 - Active / Tap Feedback (Touch Devices) */
@media (hover: none) {
  .nav-link:active,
  .dropdown-item:active,
  .btn:active,
  .list-group-item:active {
    background-color: rgba(0, 0, 0, 0.08);
    transition: background-color 0.1s ease;
  }
  
  /* Dark theme adjustment for active state */
  .navbar-dark .nav-link:active,
  .dropdown-menu-dark .dropdown-item:active {
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* P0.4.4 - Prevent Accidental Double Tap Zoom (Mobile Only) */
@media (max-width: 991.98px) {
  button,
  .btn,
  .nav-link,
  .dropdown-item,
  a[role="button"] {
    touch-action: manipulation;
  }
}

/* P0.4.5 - Offcanvas Scroll Safety */
body.offcanvas-backdrop {
  overflow: hidden;
}

/* =====================================================
   P0.5 - MOBILE PERFORMANCE OPTIMIZATIONS
   ===================================================== */

/* P0.5.1 - Hardware Acceleration & Transform Layer (Mobile Only) */
@media (max-width: 991.98px) {
  .offcanvas,
  .dropdown-menu,
  .nav-link,
  .btn {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform, opacity;
  }
}

/* P0.5.3 - Reduce Forced Reflow (Mobile Only) */
@media (max-width: 991.98px) {
  .offcanvas,
  .dropdown-menu {
    contain: layout paint;
  }
}

/* P0.5.4 - Minimize Map Paint (Leaflet - Mobile Only) */
@media (max-width: 991.98px) {
  .leaflet-container {
    will-change: transform;
    touch-action: pan-x pan-y;
  }
}

/* P0.5.5 - Table Scroll Optimization (Mobile Only) */
@media (max-width: 991.98px) {
  .table-responsive {
    -webkit-overflow-scrolling: touch;
    contain: content;
  }
}

/* =====================================================
   P0.6 - CRITICAL UX POLISH (MOBILE ONLY)
   ===================================================== */

/* P0.6.1 - Offcanvas Interaction Feedback (Mobile Only) */
@media (max-width: 991.98px) {
  .offcanvas-toggle:active,
  .btn:active,
  [data-bs-toggle="offcanvas"]:active {
    opacity: 0.7;
    transition: opacity 0.1s;
  }
}

/* P0.6.2 - Table & Scroll UX (Mobile Only) */
@media (max-width: 991.98px) {
  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }
  
  .table-responsive thead th {
    position: sticky;
    top: 0;
    background-color: var(--table-header-bg, #1A1A1A);
    z-index: 2;
  }
  
  /* Dark theme adjustment for sticky headers */
  .table-dark .table-responsive thead th {
    background-color: var(--table-header-bg, #1A1A1A);
  }
}

/* P0.6.3 - Map & Leaflet UX (Mobile Only) */
@media (max-width: 991.98px) {
  .leaflet-container {
    touch-action: pan-x pan-y pinch-zoom;
  }
  
  /* Disable cursor: grab on mobile (desktop only) */
  .leaflet-container .leaflet-interactive {
    cursor: default;
  }
}

/* =====================================================
   FULL APP MOBILE OPTIMIZATION - ADDITIONAL FIXES
   ===================================================== */

/* Ensure dropdowns collapse properly on desktop mouseleave */
@media (min-width: 992px) {
  .dropdown:hover > .dropdown-menu {
    display: block;
  }
  
  .dropdown-menu:hover {
    display: block;
  }
  
  /* Prevent dropdown from closing when hovering over it */
  .dropdown:not(:hover) > .dropdown-menu:not(:hover) {
    display: none;
  }
}

/* Mobile: Force tap-only for dropdowns */
@media (max-width: 991.98px) {
  .dropdown-menu {
    /* Ensure dropdowns don't rely on hover */
    pointer-events: auto;
  }
  
  /* Prevent accidental hover states on touch */
  .nav-link:hover,
  .dropdown-item:hover {
    background-color: inherit;
  }
}

/* Smooth transitions for dropdowns */
.dropdown-menu {
  transition: opacity 0.15s ease-in-out, transform 0.15s ease-in-out;
}

/* Optimize scroll performance for offcanvas */
.offcanvas-body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Prevent layout shifts during offcanvas animations */
.offcanvas {
  will-change: transform;
  backface-visibility: hidden;
}

/* =====================================================
   P1.2 - LONG FORMS MOBILE ACCORDION
   ===================================================== */

/* Mobile: Show accordion structure for long forms */
@media (max-width: 991.98px) {
  .form-accordion-section {
    margin-bottom: 1rem;
  }
  
  .form-accordion-section .accordion-button {
    font-size: 0.95rem;
    padding: 0.75rem 1rem;
  }
  
  .form-accordion-section .accordion-body {
    padding: 1rem;
  }
}

/* Desktop: Hide accordion, show normal form */
@media (min-width: 992px) {
  .form-accordion-section {
    display: none;
  }
  
  .form-section-desktop {
    display: block;
  }
}

/* Mobile: Hide desktop sections */
@media (max-width: 991.98px) {
  .form-section-desktop {
    display: none;
  }
}

/* =====================================================
   P1.3 - NOTIFICATIONS DROPDOWN MOBILE FIX
   ===================================================== */

/* Make notifications dropdown responsive on very small screens */
@media (max-width: 374.98px) {
  #notificationsDropdown {
    min-width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    left: 1rem !important;
    right: 1rem !important;
    transform: translateX(0) !important;
  }
}

/* =====================================================
   P1.6 - ADDITIONAL PERFORMANCE OPTIMIZATIONS
   ===================================================== */

/* Lazy load images */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
  opacity: 1;
}

/* Reduce repaint on scroll */
@media (max-width: 991.98px) {
  .card,
  .table-responsive {
    contain: layout style paint;
  }
}

/* =====================================================
   STEP 5: Responsive Form Optimizations
   ===================================================== */

/* Optimize form inputs on mobile */
@media (max-width: 991.98px) {
  /* Reduce padding on mobile for better touch targets */
  .form-control,
  .form-select {
    padding: 14px 16px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  /* Ensure buttons are touch-friendly */
  .btn {
    min-height: 44px;
    min-width: 44px;
    padding: 12px 20px;
  }
  
  .btn-sm {
    min-height: 36px;
    padding: 8px 16px;
  }
  
  /* Form containers responsive */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Card responsive spacing */
  .card-body {
    padding: 1rem;
  }
  
  /* Form groups responsive */
  .mb-3 {
    margin-bottom: 1rem !important;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  textarea,
  select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Smooth focus transitions */
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--bs-primary, #0d6efd);
  outline-offset: 2px;
  transition: outline-offset 0.2s ease;
}

/* =====================================================
   FIBER MODULE MOBILE OPTIMIZATIONS
   ===================================================== */

/* Fiber map touch feedback */
@media (max-width: 991.98px) {
  .custom-marker-icon.selected {
    animation: pulse-selected 0.3s ease;
  }
  
  @keyframes pulse-selected {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
  }
  
  /* Tap feedback for map elements */
  .leaflet-interactive:active {
    opacity: 0.7;
    transition: opacity 0.1s;
  }
}

/* Fiber status colors */
.fiber-occupied {
  color: #6c757d;
  opacity: 0.6;
}

.fiber-free {
  color: #28a745;
}

.fiber-splice-completed {
  color: #0d6efd;
}

/* Fiber table optimizations */
@media (max-width: 991.98px) {
  .fiber-table-responsive {
    -webkit-overflow-scrolling: touch;
    contain: content;
  }
  
  .fiber-table-responsive thead th {
    position: sticky;
    top: 0;
    background-color: var(--table-header-bg, #1A1A1A);
    z-index: 2;
  }
  
  /* Row highlight on tap */
  .fiber-table-responsive tbody tr:active {
    background-color: rgba(13, 110, 253, 0.1);
  }
}

/* Fiber offcanvas optimizations */
@media (max-width: 991.98px) {
  .fiber-offcanvas .offcanvas-body {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }
  
  /* Auto-focus first input when offcanvas opens */
  .fiber-offcanvas.show .offcanvas-body input:first-of-type,
  .fiber-offcanvas.show .offcanvas-body select:first-of-type {
    font-size: 16px; /* Prevent iOS zoom */
  }
}

/* Fiber map performance optimizations */
.leaflet-container {
  /* Hardware acceleration */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

/* Lazy load fiber layers */
.fiber-layer-lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

.fiber-layer-lazy.loaded {
  opacity: 1;
}
