/* ============================================================
   TESLA-INSPIRED FLEET MANAGEMENT
   Light theme default — Dark mode via [data-theme="dark"]
   Font: Outfit (geometric, modern)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ── Light Theme (Default) ── */
:root {
  --bg-primary: #f5f5f7;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8fa;
  --bg-input: #f0f0f5;
  --bg-input-focus: #e8e8f0;
  --bg-nav: rgba(255,255,255,0.88);
  --text-primary: #1d1d1f;
  --text-secondary: rgba(0,0,0,0.5);
  --text-tertiary: rgba(0,0,0,0.3);
  --accent: #3e6ae1;
  --accent-glow: rgba(62,106,225,0.18);
  --accent-light: #3e6ae1;
  --green: #28a745;
  --green-dim: rgba(40,167,69,0.1);
  --red: #dc3545;
  --red-dim: rgba(220,53,69,0.1);
  --orange: #e67e22;
  --orange-dim: rgba(230,126,34,0.1);
  --cyan: #17a2b8;
  --cyan-dim: rgba(23,162,184,0.1);
  --border: rgba(0,0,0,0.08);
  --border-light: rgba(0,0,0,0.12);
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-glow: 0 4px 16px rgba(62,106,225,0.25);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 100px;
  --nav-height: 76px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --transition: 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  /* Select option colors */
  --select-option-bg: #ffffff;
  --select-option-text: #1d1d1f;
  /* Chart text */
  --chart-text: rgba(0,0,0,0.5);
  --chart-grid: rgba(0,0,0,0.06);
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.06);
  --bg-input-focus: rgba(255,255,255,0.10);
  --bg-nav: rgba(18,18,18,0.88);
  --text-primary: #ffffff;
  --text-secondary: rgba(255,255,255,0.55);
  --text-tertiary: rgba(255,255,255,0.3);
  --accent: #5b85f5;
  --accent-glow: rgba(91,133,245,0.25);
  --accent-light: #5b85f5;
  --green: #30d158;
  --green-dim: rgba(48,209,88,0.15);
  --red: #ff453a;
  --red-dim: rgba(255,69,58,0.15);
  --orange: #ff9f0a;
  --orange-dim: rgba(255,159,10,0.15);
  --cyan: #64d2ff;
  --cyan-dim: rgba(100,210,255,0.15);
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.14);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.4);
  --shadow-card-hover: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px rgba(91,133,245,0.2);
  --select-option-bg: #1a1a1a;
  --select-option-text: #ffffff;
  --chart-text: rgba(255,255,255,0.5);
  --chart-grid: rgba(255,255,255,0.05);
}

/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

html, body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

body {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 10px);
}

a {
  text-decoration: none;
  color: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 4px; }

/* ── Typography ── */
h1, h2, h3, h4, h5 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.15rem; }

/* ── Theme Toggle Button ── */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10000;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  font-size: 1rem;
  box-shadow: var(--shadow-card);
  -webkit-tap-highlight-color: transparent;
}

.theme-toggle:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: scale(1.08);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle .fa-sun { display: none; }
.theme-toggle .fa-moon { display: inline; }
[data-theme="dark"] .theme-toggle .fa-sun { display: inline; }
[data-theme="dark"] .theme-toggle .fa-moon { display: none; }

/* ── Container Wrapper ── */
#containerWrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.containerWrapper {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Bottom Navigation ── */
#mainnav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--bg-nav);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-top: 1px solid var(--border);
  padding: 6px 0 calc(6px + var(--safe-bottom));
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: background 0.3s;
}

#mainnav .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  color: var(--text-tertiary);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

#mainnav .nav-item i {
  font-size: 1.3rem;
  transition: var(--transition);
}

#mainnav .nav-item:hover,
#mainnav .nav-item.active {
  color: var(--accent);
}

#mainnav .nav-item:active {
  transform: scale(0.92);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  white-space: nowrap;
}

.btn:hover { cursor: pointer; }
.btn:active { transform: scale(0.96); }

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--accent);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(62,106,225,0.35);
}

.btn-primary.disabled, .btn-primary:disabled {
  background: rgba(62,106,225,0.3);
  color: rgba(255,255,255,0.5);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active,
.show>.btn-primary.dropdown-toggle {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-outline-primary,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  box-shadow: none;
}

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

.btn-outline-primary.disabled, .btn-outline-primary:disabled {
  color: var(--text-tertiary);
  background: transparent;
}

.btn-outline-primary:not(:disabled):not(.disabled).active,
.btn-outline-primary:not(:disabled):not(.disabled):active {
  background: var(--accent);
  color: #fff;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
  min-height: 54px;
}

.btn-action {
  width: 100%;
  padding: 18px 24px;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn-action i {
  font-size: 1.15rem;
}

/* ── Cards ── */
.tesla-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.tesla-card:hover {
  box-shadow: var(--shadow-card-hover);
}

/* ── Page Header ── */
.page-header {
  padding: 24px 0 20px;
  text-align: center;
}

.page-header .page-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.4rem;
}

.page-header .page-icon.blue {
  background: var(--accent-glow);
  color: var(--accent);
}

.page-header .page-icon.green {
  background: var(--green-dim);
  color: var(--green);
}

.page-header .page-icon.orange {
  background: var(--orange-dim);
  color: var(--orange);
}

.page-header .page-icon.cyan {
  background: var(--cyan-dim);
  color: var(--cyan);
}

.page-header h1 {
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Legacy bigtitle */
.bigtitle {
  padding: 24px 0 20px;
  text-align: center;
}

.bigtitle-icon { display: none; }

.bigtitle h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.bigtitle h1::after { display: none; }

/* ── Forms ── */
.form-group {
  margin-bottom: 16px;
}

.form-control,
select.form-control {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 14px 16px;
  width: 100%;
  transition: all var(--transition);
  -webkit-appearance: none;
  appearance: none;
  min-height: 50px;
}

/* Fix select dropdown options always readable */
select.form-control option {
  background-color: var(--select-option-bg);
  color: var(--select-option-text);
  padding: 10px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(0,0,0,0.35)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.4)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.form-control:focus,
select.form-control:focus {
  background: var(--bg-input-focus);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-tertiary);
}

textarea.form-control {
  min-height: 80px;
  resize: vertical;
}

/* Input group */
.input-group {
  display: flex;
  margin-bottom: 16px;
}

.input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.input-group-append {
  display: flex;
}

.input-group-text {
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 14px 16px;
  display: flex;
  align-items: center;
}

/* Checkbox */
.custom-control {
  padding-left: 0;
}

.custom-control-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.custom-checkbox .custom-control-label {
  position: relative;
  padding-left: 36px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: block;
  user-select: none;
}

.custom-checkbox .custom-control-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-input);
  transition: all var(--transition);
}

.custom-checkbox .custom-control-label::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  width: 12px;
  height: 7px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0);
  transition: transform 0.2s ease;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background: var(--accent);
  border-color: var(--accent);
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  transform: rotate(-45deg) scale(1);
}

#checkBoxUsername {
  font-weight: 600;
  color: var(--text-primary);
}

/* Validation */
.was-validated .form-control:invalid,
.was-validated select.form-control:invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}

.was-validated .form-control:valid,
.was-validated select.form-control:valid {
  border-color: var(--green);
}

.was-validated .custom-checkbox .custom-control-input:invalid ~ .custom-control-label::before {
  border-color: var(--red);
}

/* ── Range Slider (Fuel) ── */
.fuel-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.fuel-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.fuel-label i {
  margin-right: 4px;
  color: var(--text-tertiary);
}

.fuel-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.fuel-value.low { color: var(--red); }
.fuel-value.medium { color: var(--orange); }
.fuel-value.high { color: var(--green); }

/* Range slider — fully custom */
.custom-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  margin: 16px 0 8px 0;
  display: block;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(62,106,225,0.35);
  cursor: pointer;
  margin-top: -10px;
  border: 3px solid var(--bg-card);
  transition: box-shadow 0.2s;
}

.custom-range::-webkit-slider-thumb:active {
  box-shadow: 0 2px 16px rgba(62,106,225,0.5);
}

.custom-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(62,106,225,0.35);
  cursor: pointer;
  border: 3px solid var(--bg-card);
}

.custom-range::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
}

.custom-range::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.custom-range::-ms-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  margin-top: 0;
}

.custom-range::-ms-track {
  height: 6px;
  border-radius: 3px;
}

/* ── Gauge Meter (Legacy) ── */
.fuelMeterBackground {
  display: none;
}

.gaugeMeter {
  position: relative;
  text-align: center;
  overflow: hidden;
  cursor: default;
  margin: 12px auto;
}

.gaugeMeter span {
  line-height: 1em !important;
  top: 40%;
  transform: translate(0, -40%);
  color: var(--text-primary) !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 700 !important;
}

.gaugeMeter b {
  line-height: 1em !important;
  top: 60%;
  transform: translate(0, -60%);
  color: var(--text-secondary) !important;
  font-family: 'Outfit', sans-serif !important;
  font-weight: 400 !important;
}

.gaugeMeter span, .gaugeMeter b {
  margin: 0 23%;
  width: 54%;
  position: absolute;
  text-align: center;
  display: inline-block;
  text-overflow: ellipsis;
}

.gaugeMeter[data-style="semi"] b {
  margin: 0 10%;
  width: 80%;
}

.gaugeMeter s, .gaugeMeter u {
  text-decoration: none;
  font-size: .5em;
  opacity: .5;
}

.gaugeMeter canvas {
  position: relative;
  z-index: 2;
}

/* ── Home Page ── */
.home-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 40px);
  min-height: calc(100dvh - var(--nav-height) - 40px);
  text-align: center;
  padding: 40px 0;
}

.home-car-icon {
  width: 120px;
  height: 120px;
  margin-bottom: 32px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-car-icon::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse-glow 3s ease-in-out infinite;
}

.home-car-icon i {
  position: relative;
  z-index: 1;
  font-size: 3.5rem;
  color: var(--accent);
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.home-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.home-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 40px;
  line-height: 1.6;
}

.home-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 340px;
}

.home-action-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-card);
}

.home-action-btn i {
  font-size: 1.5rem;
  transition: var(--transition);
}

.home-action-btn.take-btn {
  border-color: rgba(62,106,225,0.2);
}

.home-action-btn.take-btn i {
  color: var(--accent);
}

.home-action-btn.take-btn:hover,
.home-action-btn.take-btn:active {
  background: var(--accent-glow);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.home-action-btn.return-btn {
  border-color: rgba(40,167,69,0.2);
}

.home-action-btn.return-btn i {
  color: var(--green);
}

.home-action-btn.return-btn:hover,
.home-action-btn.return-btn:active {
  background: var(--green-dim);
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* ── Vehicle Status Image ── */
#vehiculeStatusWrapper {
  margin: 20px 0;
}

#vehiculeStatusWrapper h3 {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

#imgVehiculeStatus img {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  max-width: 100%;
}

/* ── Success Screen ── */
#successStartWrapper,
#successBackWrapper {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
}

#successStartWrapper .row,
#successBackWrapper .row {
  width: 100%;
}

#successStartWrapper h1,
#successBackWrapper h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--green);
  margin-bottom: 12px;
}

#successStartWrapper .col,
#successBackWrapper .col {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.vehiculeName {
  font-weight: 700;
  color: var(--text-primary);
}

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

@keyframes success-pop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

#successStartWrapper,
#successBackWrapper {
  animation: success-pop 0.5s ease-out;
}

/* ── Moves / History Page ── */
#filterWrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

#filterWrapper .form-control {
  width: 100%;
  margin: 0;
}

#ddlFilterDates[readonly] {
  background: var(--bg-input);
  color: var(--text-primary);
}

.oneMove {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 8px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}

.oneMove:hover {
  box-shadow: var(--shadow-card-hover);
}

.oneMove .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.oneMove .col,
.oneMove [class^="col-"] {
  padding: 2px 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Move badges */
.move-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.move-badge.in {
  background: var(--green-dim);
  color: var(--green);
}

.move-badge.out {
  background: var(--accent-glow);
  color: var(--accent);
}

.move-action.in::after { display: none; }
.move-action.out::before { display: none; }
.move-action.out { float: none; }

/* Icons */
.fa-exclamation-triangle { color: var(--orange) !important; }
.fa-exclamation-circle { color: var(--red) !important; }
.fa-charging-station { color: var(--text-tertiary); }

/* ── Statistics Page ── */
.stats-page {
  padding-top: 20px;
  max-width: 100%;
}

.stats-page h1 { font-size: 1.5rem; }
.stats-page h2 {
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.year-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.year-selector label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin: 0;
}

.year-selector select.form-control {
  width: auto;
  min-width: 100px;
  padding: 10px 36px 10px 14px;
  min-height: 42px;
  font-size: 0.9rem;
}

/* Alert */
.alert-info {
  background: var(--accent-glow);
  border: 1px solid rgba(62,106,225,0.15);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  padding: 14px 16px;
  font-size: 0.85rem;
}

.alert-info strong { color: var(--accent); }
.alert-info .fa-info-circle { color: var(--accent); }

/* Cards */
.stats-card, .card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  animation: fadeSlideUp 0.5s ease-out both;
  transition: all var(--transition);
}

.stats-card:hover, .card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: none;
}

.card-header {
  background: var(--bg-input);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}

.card-header h5 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.card-body {
  padding: 16px 18px;
}

/* Tables */
.table {
  color: var(--text-secondary);
  font-size: 0.85rem;
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px 12px;
  border: none;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table thead th {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent;
  border-top: none;
  white-space: nowrap;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: var(--bg-input);
}

.table-striped tbody tr:hover {
  background: var(--bg-card-hover);
}

.table strong {
  color: var(--text-primary);
  font-weight: 600;
}

.table-responsive {
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-sm);
}

.table-info {
  background: var(--accent-glow) !important;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
}

.badge-primary { background: var(--accent-glow); color: var(--accent); }
.badge-success { background: var(--green-dim); color: var(--green); }
.badge-info { background: var(--cyan-dim); color: var(--cyan); }
.badge-warning { background: var(--orange-dim); color: var(--orange); }
.badge-danger { background: var(--red-dim); color: var(--red); }
.badge-secondary { background: var(--bg-input); color: var(--text-secondary); }

/* Charts */
.chart-container {
  position: relative;
  height: 250px;
  margin: 10px 0;
}

canvas { max-height: 300px; }

/* ── Animations ── */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up { animation: fadeSlideUp 0.5s ease-out both; }
.slide-up-1 { animation-delay: 0.05s; }
.slide-up-2 { animation-delay: 0.1s; }
.slide-up-3 { animation-delay: 0.15s; }
.slide-up-4 { animation-delay: 0.2s; }
.slide-up-5 { animation-delay: 0.25s; }

/* ── Responsive ── */
@media (min-width: 768px) {
  #containerWrapper,
  .containerWrapper {
    max-width: 520px;
  }

  #filterWrapper {
    flex-direction: row;
    flex-wrap: wrap;
  }

  #filterWrapper .form-control {
    width: auto;
    flex: 1;
    min-width: 180px;
  }

  .home-actions {
    max-width: 400px;
  }
}

@media (max-width: 767px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .stats-page .d-flex {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start !important;
  }

  .table { font-size: 0.8rem; }

  .table th,
  .table td { padding: 8px 8px; }

  #mainnav .nav-item {
    font-size: 0.6rem;
    padding: 6px 8px;
  }

  #mainnav .nav-item i { font-size: 1.2rem; }
}

/* ── Utility overrides ── */
.text-muted { color: var(--text-secondary) !important; }
.text-danger { color: var(--red) !important; }
.text-warning { color: var(--orange) !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mb-5 { margin-bottom: 32px !important; }
.mt-5 { margin-top: 32px !important; }
.mr-2 { margin-right: 8px; }
.ml-md-2 { margin-left: 0; }

.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -8px;
}

.col, [class^="col-"] { padding: 0 8px; }

.vh-100 {
  min-height: calc(100vh - var(--nav-height));
  min-height: calc(100dvh - var(--nav-height));
}

.align-items-center { align-items: center; }
.text-center { text-align: center; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.container-fluid {
  padding: 0 20px;
  max-width: 780px;
  margin: 0 auto;
}

/* ── Daterangepicker Theme ── */
.daterangepicker {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  color: var(--text-primary) !important;
  font-family: 'Outfit', sans-serif !important;
  box-shadow: var(--shadow-card-hover) !important;
}

.daterangepicker .calendar-table {
  background: transparent !important;
  border: none !important;
}

.daterangepicker td,
.daterangepicker th {
  color: var(--text-secondary) !important;
}

.daterangepicker td.active,
.daterangepicker td.active:hover {
  background: var(--accent) !important;
  color: #fff !important;
}

.daterangepicker td.in-range {
  background: var(--accent-glow) !important;
  color: var(--text-primary) !important;
}

.daterangepicker .drp-buttons {
  border-top: 1px solid var(--border) !important;
}

.daterangepicker .drp-buttons .btn {
  font-family: 'Outfit', sans-serif !important;
}

.daterangepicker td.off {
  color: var(--text-tertiary) !important;
}

.daterangepicker select.monthselect,
.daterangepicker select.yearselect {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
}
