/* ═══════════════════════════════════════════════════════════════════
   TAOYEN HERITAGE - ENHANCED COMPONENT STYLES
   Advanced components with animations, variants, and polish
════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS - All Variants with States
════════════════════════════════════════════════════════════════════ */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-150) var(--ease-out);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.btn-md {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
}

.btn-lg {
  padding: var(--space-4) var(--space-6);
  font-size: var(--text-lg);
}

.btn-xl {
  padding: var(--space-5) var(--space-8);
  font-size: var(--text-xl);
}

/* Button Icons */
.btn-icon {
  padding: var(--space-3);
  aspect-ratio: 1;
}

.btn-icon-sm {
  padding: var(--space-2);
  width: 2rem;
  height: 2rem;
}

.btn-icon-lg {
  padding: var(--space-4);
  width: 3rem;
  height: 3rem;
}

/* Button Primary — teal (main CTA) */
.btn-primary {
  background: linear-gradient(135deg, var(--teal-500) 0%, var(--teal-600) 100%);
  color: white;
  border-color: var(--teal-600);
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--teal-600) 0%, var(--teal-700) 100%);
  border-color: var(--teal-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(13, 148, 136, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.15);
}

/* Button Secondary — navy (supporting) */
.btn-secondary {
  background: linear-gradient(135deg, var(--navy-500) 0%, var(--navy-600) 100%);
  color: white;
  border-color: var(--navy-600);
  box-shadow: 0 2px 4px rgba(12, 31, 63, 0.1);
}

.btn-secondary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--navy-600) 0%, var(--navy-700) 100%);
  border-color: var(--navy-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(12, 31, 63, 0.2);
}

/* Button PM - Violet (Distinctive) */
.btn-pm {
  background: linear-gradient(135deg, var(--pm-500) 0%, var(--pm-600) 100%);
  color: white;
  border-color: var(--pm-600);
  box-shadow: 0 2px 4px rgba(109, 40, 217, 0.2);
}

.btn-pm:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--pm-600) 0%, var(--pm-700) 100%);
  border-color: var(--pm-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

/* Button Outline */
.btn-outline {
  background: transparent;
  color: var(--navy-500);
  border-color: var(--slate-300);
}

.btn-outline:hover:not(:disabled) {
  background: var(--slate-50);
  border-color: var(--navy-300);
  color: var(--navy-600);
}

/* Button Ghost */
.btn-ghost {
  background: transparent;
  color: var(--navy-500);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--slate-100);
}

/* Button Danger */
.btn-danger {
  background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
  color: white;
  border-color: var(--error-600);
}

.btn-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--error-600) 0%, var(--error-700) 100%);
  box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Button Success */
.btn-success {
  background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
  color: white;
  border-color: var(--success-600);
}

/* Button Warning */
.btn-warning {
  background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
  color: white;
  border-color: var(--warning-600);
}

/* Loading Button State */
.btn.is-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: 50%;
  left: 50%;
  margin-left: -0.5rem;
  margin-top: -0.5rem;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   CARDS - Enhanced with Variants and Animations
════════════════════════════════════════════════════════════════════ */

.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
  overflow: hidden;
  transition: all var(--duration-300) var(--ease-out);
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card:focus-within {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* Card Hover Effect - Shine animation */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  transition: left 0.5s ease-in-out;
}

.card:hover::before {
  left: 100%;
}

/* Card Header */
.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--slate-200);
  background: linear-gradient(to bottom, var(--slate-50) 0%, var(--white) 100%);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--navy-500);
  margin: 0;
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--slate-500);
  margin-top: var(--space-1);
  margin-bottom: 0;
}

/* Card Body */
.card-body {
  padding: var(--space-6);
}

.card-body-lg {
  padding: var(--space-8);
}

.card-body-sm {
  padding: var(--space-4);
}

/* Card Footer */
.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--slate-200);
  background: var(--slate-50);
}

/* Card Variants - Border Left Accents */
.card--pm {
  border-left: 4px solid var(--pm-500);
}

.card--pm .card-header {
  background: linear-gradient(to bottom, var(--pm-50) 0%, var(--white) 100%);
}

.card--success {
  border-left: 4px solid var(--success-500);
}

.card--success .card-header {
  background: linear-gradient(to bottom, var(--success-50) 0%, var(--white) 100%);
}

.card--warning {
  border-left: 4px solid var(--amber-500);
}

.card--warning .card-header {
  background: linear-gradient(to bottom, var(--amber-50) 0%, var(--white) 100%);
}

.card--error {
  border-left: 4px solid var(--error-500);
}

.card--error .card-header {
  background: linear-gradient(to bottom, var(--error-50) 0%, var(--white) 100%);
}

/* Card Elevations */
.card-elevated {
  box-shadow: var(--shadow-lg);
}

.card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--slate-300);
}

.card-flat:hover {
  border-color: var(--slate-400);
  transform: none;
}

/* Card with Icon */
.card-with-icon {
  display: flex;
  flex-direction: column;
}

.card-icon-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-6);
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   FORMS - Enhanced Inputs with Focus States
════════════════════════════════════════════════════════════════════ */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--slate-700);
}

.form-label-required::after {
  content: " *";
  color: var(--error-500);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: #334155;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  transition: all var(--duration-150) var(--ease-out);
  appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
  background: white;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #94a3b8;
}

/* Form Sizes */
.form-input-sm,
.form-select-sm {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.form-input-lg,
.form-select-lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
}

/* Form States */
.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: #f1f5f9;
  color: #475569;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Validation States */
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error-500);
  background: var(--error-50);
}

.form-input.error:focus,
.form-select.error:focus,
.form-textarea.error:focus {
  border-color: var(--error-600);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input.success,
.form-select.success,
.form-textarea.success {
  border-color: var(--success-500);
  background: var(--success-50);
}

.form-input.success:focus,
.form-select.success:focus,
.form-textarea.success:focus {
  border-color: var(--success-600);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Form Help Text */
.form-hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--slate-500);
}

.form-error {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--error-500);
}

/* Checkbox & Radio Custom Styles */
.form-checkbox,
.form-radio {
  appearance: none;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--slate-300);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-150) var(--ease-out);
  position: relative;
}

.form-checkbox:checked,
.form-radio:checked {
  background: var(--teal-500);
  border-color: var(--teal-500);
}

.form-checkbox:checked {
  background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M13.854 2.146a.5.5 0 0 1 .708 0l-7 7a.5.5 0 0 1-.708 0L3.5 9.293a.5.5 0 1 1-.708.708l7-7a.5.5 0 0 1 .708 0l3.5 3.5a.5.5 0 0 1 0 .708-.708L6.5 6.5a.5.5 0 0 1 .708-.708l3.5-3.5a.5.5 0 0 1 0-.708L7 2.146a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
}

.form-radio:checked {
  background-image: radial-gradient(circle, white 40%, transparent 40%);
}

/* Select Dropdown Arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES - Status Indicators with Icons
════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* Badge with Icon */
.badge-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
}

/* Badge Variants */
.badge-default {
  background: var(--slate-100);
  color: var(--slate-700);
}

.badge-primary {
  background: var(--navy-100);
  color: var(--navy-700);
}

.badge-secondary {
  background: var(--teal-100);
  color: var(--teal-700);
}

.badge-pm {
  background: var(--pm-100);
  color: var(--pm-700);
}

.badge-success {
  background: var(--success-100);
  color: var(--success-700);
}

.badge-warning {
  background: var(--amber-100);
  color: var(--amber-700);
}

.badge-error {
  background: var(--error-100);
  color: var(--error-700);
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none;
}

.badge-info {
  background: var(--info-100);
  color: var(--info-700);
}

/* Status-Specific Badges */
.badge-draft {
  background: var(--slate-100);
  color: var(--slate-700);
}

.badge-pending {
  background: var(--amber-100);
  color: var(--amber-700);
}

.badge-approved {
  background: var(--teal-100);
  color: var(--teal-700);
}

.badge-in-progress {
  background: var(--pm-100);
  color: var(--pm-700);
}

.badge-closed {
  background: var(--success-100);
  color: var(--success-700);
}

.badge-rejected {
  background: var(--error-100);
  color: var(--error-700);
}

/* Animated Badge (for attention) */
.badge-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS - Notification Banners
════════════════════════════════════════════════════════════════════ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid;
  margin-bottom: var(--space-4);
}

.alert-icon {
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-1);
}

.alert-message {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--slate-600);
}

.alert-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  margin-left: var(--space-2);
  color: var(--slate-400);
  transition: color var(--duration-150) var(--ease-out);
}

.alert-close:hover {
  color: var(--slate-600);
}

/* Alert Variants */
.alert-success {
  background: var(--success-50);
  border-color: var(--success-200);
  color: var(--success-700);
}

.alert-warning {
  background: var(--warning-50);
  border-color: var(--warning-200);
  color: var(--warning-700);
}

.alert-error {
  background: var(--error-50);
  border-color: var(--error-200);
  color: var(--error-700);
}

.alert-info {
  background: var(--info-50);
  border-color: var(--info-200);
  color: var(--info-700);
}

/* Alert Dismissible */
.alert-dismissible {
  padding-right: var(--space-8);
}

/* ═══════════════════════════════════════════════════════════════════
   LOADING SPINNERS
════════════════════════════════════════════════════════════════════ */

.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--slate-200);
  border-top-color: var(--teal-500);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.spinner-sm {
  width: 1rem;
  height: 1rem;
  border-width: 2px;
}

.spinner-lg {
  width: 2rem;
  height: 2rem;
  border-width: 4px;
}

/* Dot Spinner (alternative) */
.spinner-dots {
  display: flex;
  gap: var(--space-2);
}

.spinner-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--teal-500);
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

.spinner-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* ═══════════════════════════════════════════════════════════════════
   TABLES - Clean Data Tables
════════════════════════════════════════════════════════════════════ */

.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--slate-200);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table thead {
  background: var(--slate-50);
  border-bottom: 2px solid var(--slate-200);
}

.data-table th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--slate-700);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--slate-100);
  font-size: var(--text-sm);
  color: var(--slate-600);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover {
  background: var(--slate-50);
}

/* Striped Rows */
.data-table.striped tbody tr:nth-child(even) {
  background: var(--slate-50);
}

/* ═══════════════════════════════════════════════════════════════════
   PROGRESS BARS
════════════════════════════════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 0.5rem;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--teal-500);
  border-radius: var(--radius-full);
  transition: width var(--duration-300) var(--ease-out);
}

.progress-bar-animated {
  background: linear-gradient(
    90deg,
    var(--teal-400) 0%,
    var(--teal-500) 50%,
    var(--teal-600) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Progress Bar Colors */
.progress-bar-secondary {
  background: var(--navy-500);
}

.progress-bar-pm {
  background: var(--pm-500);
}

.progress-bar-success {
  background: var(--success-500);
}

.progress-bar-warning {
  background: var(--warning-500);
}

.progress-bar-error {
  background: var(--error-500);
}

/* ═══════════════════════════════════════════════════════════════════
   TOOLTIPS
════════════════════════════════════════════════════════════════════ */

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  color: white;
  background: var(--slate-800);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-150) var(--ease-out);
  z-index: var(--z-tooltip);
}

.tooltip:hover::after {
  opacity: 1;
}

/* Tooltip with arrow */
.tooltip[data-tooltip-position="top"]::after {
  bottom: calc(100% + var(--space-2));
}

.tooltip[data-tooltip-position="bottom"]::after {
  top: calc(100% + var(--space-2));
  bottom: auto;
  transform: translateX(-50%) translateY(4px);
}

/* ═══════════════════════════════════════════════════════════════════
   DIVIDER
════════════════════════════════════════════════════════════════════ */

.divider {
  height: 1px;
  background: var(--slate-200);
  border: none;
  margin: var(--space-6) 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: var(--slate-200);
  border: none;
  margin: 0 var(--space-6);
}

.divider-with-text {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
}

.divider-with-text::before,
.divider-with-text::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

.divider-with-text span {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--slate-500);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════
   SKELETON LOADERS
════════════════════════════════════════════════════════════════════ */

.skeleton {
  background: linear-gradient(
    90deg,
    var(--slate-200) 0%,
    var(--slate-100) 50%,
    var(--slate-200) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  border-radius: var(--radius-sm);
}

.skeleton-heading {
  height: 1.5rem;
  border-radius: var(--radius-md);
}

.skeleton-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-full);
}

.skeleton-button {
  width: 8rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATES
════════════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: var(--space-12);
  color: var(--slate-500);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--slate-700);
  margin-bottom: var(--space-2);
}

.empty-state-description {
  font-size: var(--text-base);
  color: var(--slate-500);
  margin-bottom: var(--space-6);
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

.empty-state-action {
  margin-top: var(--space-4);
}

/* ═══════════════════════════════════════════════════════════════════
   UTILITY ENHANCEMENTS
════════════════════════════════════════════════════════════════════ */

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus trap utilities */
.focus-trap {
  position: relative;
}

.focus-trap::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* No transition utility */
.no-transition {
  transition: none !important;
}

/* Truncate text */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Line clamp */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE GRID
════════════════════════════════════════════════════════════════════ */

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.grid-cols-md-2 {
  @media (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.grid-cols-lg-3 {
  @media (min-width: 1024px) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Responsive Containers */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-xl { max-width: var(--container-xl); }

/* Hide on Mobile */
@media (max-width: 767px) {
  .hide-mobile {
    display: none !important;
  }
}

/* Show on Mobile Only */
@media (min-width: 768px) {
  .show-mobile-only {
    display: none !important;
  }
}

/* Hide on Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
  .hide-tablet {
    display: none !important;
  }
}

/* Hide on Desktop */
@media (min-width: 1024px) {
  .hide-desktop {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   PM FLOW COMPONENTS
   Template cards, service type cards, truck badges
════════════════════════════════════════════════════════════════════ */

/* Template Grid */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .template-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Template Card */
.template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-5);
  background: var(--slate-50);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-200) var(--ease-out);
  overflow: hidden;
}

.template-card:hover {
  border-color: var(--teal-400);
  background: var(--teal-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.template-card.selected {
  border-color: var(--teal-500);
  background: var(--teal-50);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

.template-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-bottom: var(--space-3);
  height: 32px;
}

.template-name {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
  color: var(--slate-900);
  margin-bottom: var(--space-1);
  text-align: center;
}

.template-interval {
  font-size: var(--text-sm);
  color: var(--teal-600);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-2);
}

.template-items {
  font-size: var(--text-xs);
  color: var(--slate-500);
  margin-bottom: var(--space-1);
}

.template-cost {
  font-size: var(--text-sm);
  color: var(--navy-600);
  font-weight: var(--font-semibold);
}

/* PM request — selectable template tiles (not plain text) */
.pm-template-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem 1.125rem;
  width: 100%;
}

@media (max-width: 639px) {
  .pm-template-picker__grid {
    grid-template-columns: 1fr;
  }
}

.pm-pick-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  min-height: 220px;
  padding: 0;
  margin: 0;
  background: var(--white, #fff);
  border: 2px solid var(--slate-200, #e2e8f0);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.pm-pick-card:hover {
  border-color: var(--pm-400, #a78bfa);
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.12);
  transform: translateY(-2px);
}

.pm-pick-card:focus {
  outline: none;
}

.pm-pick-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.35);
}

.pm-pick-card--selected {
  border-color: var(--pm-600, #7c3aed) !important;
  background: linear-gradient(180deg, var(--pm-50, #faf5ff) 0%, var(--white, #fff) 48%);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18), 0 8px 20px rgba(91, 33, 182, 0.1) !important;
}

.pm-pick-card__accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--pm-500, #6d28d9), var(--pm-400, #a78bfa));
  opacity: 0.85;
}

.pm-pick-card--selected .pm-pick-card__accent {
  width: 5px;
  opacity: 1;
}

.pm-pick-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  padding: 1rem 1rem 0.25rem 1.125rem;
  padding-left: 1.25rem;
}

.pm-pick-card__interval-label {
  flex: 0 0 100%;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-500, #64748b);
}

.pm-pick-card__km {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--pm-700, #6d28d9);
  font-family: var(--font-code, "JetBrains Mono", ui-monospace, monospace);
}

.pm-pick-card__km-suffix {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500, #64748b);
}

.pm-pick-card__title {
  margin: 0;
  padding: 0.25rem 1rem 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--slate-800, #1e293b);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pm-pick-card__preview {
  flex: 1 1 auto;
  margin: 0.25rem 0.75rem 0.75rem 1rem;
  padding: 0.5rem 0.65rem;
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-100, #f1f5f9);
  border-radius: 8px;
  min-height: 4.25rem;
}

.pm-pick-card__list {
  margin: 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--slate-600, #475569);
}

.pm-pick-card__list li {
  margin-bottom: 0.15rem;
}

.pm-pick-card__list li:last-child {
  margin-bottom: 0;
}

.pm-pick-card__more {
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.65rem;
  font-style: italic;
  color: var(--slate-500, #64748b);
}

.pm-pick-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding: 0.65rem 1rem 1rem 1.25rem;
  border-top: 1px solid var(--slate-100, #f1f5f9);
  background: rgba(248, 250, 252, 0.6);
}

.pm-pick-card__price {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy-700, #1a3460);
}

.pm-pick-card__meta {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--slate-500, #64748b);
  font-family: var(--font-code, "JetBrains Mono", monospace);
}

.pm-selected-template {
  margin: 0.75rem 0 0.25rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--pm-200, #e9d5ff);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--pm-50, #faf5ff) 0%, var(--white, #fff) 100%);
}

.pm-selected-template__main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.pm-selected-template__label {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--pm-800, #5b21b6);
}

.pm-selected-template__estimate {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy-700, #1a3460);
  font-family: var(--font-code, "JetBrains Mono", ui-monospace, monospace);
}

.pm-selected-template__hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--amber-800, #92400e);
}

/* Service Type Grid */
.service-type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (max-width: 767px) {
  .service-type-grid {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }
}

/* Service Type Card */
.service-type-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-6);
  background: var(--slate-50);
  border: 2px solid var(--slate-200);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-200) var(--ease-out);
  text-align: center;
}

.service-type-card:hover {
  border-color: var(--pm-400);
  background: var(--pm-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.service-type-card.selected {
  border-color: var(--pm-500);
  background: var(--pm-50);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.service-name {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--slate-900);
  margin-bottom: var(--space-2);
}

.service-desc {
  font-size: var(--text-sm);
  color: var(--slate-600);
  margin-bottom: var(--space-3);
}

.service-meta {
  display: flex;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--slate-500);
  font-weight: var(--font-medium);
}

/* Truck Badge */
.truck-badge {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: linear-gradient(135deg, var(--navy-50) 0%, var(--slate-50) 100%);
  border-left: 4px solid var(--navy-500);
  border-radius: var(--radius-md);
}

.truck-badge-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--slate-200);
}

.truck-plate {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  font-family: var(--font-mono);
  color: var(--navy-600);
  letter-spacing: 0.05em;
}

.truck-status {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.truck-status.active {
  background: var(--success-100);
  color: var(--success-700);
}

.truck-status.inactive {
  background: var(--error-100);
  color: var(--error-700);
}

.truck-status.maintenance {
  background: var(--warning-100);
  color: var(--warning-700);
}

.truck-badge-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

@media (max-width: 767px) {
  .truck-badge-body {
    grid-template-columns: 1fr;
  }
}

.truck-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.truck-info .label {
  font-size: var(--text-xs);
  color: var(--slate-500);
  font-weight: var(--font-medium);
}

.truck-info .value {
  font-size: var(--text-sm);
  color: var(--slate-900);
  font-weight: var(--font-semibold);
}

/* Checklist Section */
.checklist-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  color: var(--slate-400);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.empty-text {
  font-size: var(--text-base);
  font-weight: var(--font-medium);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: var(--space-3);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  transition: all var(--duration-150) var(--ease-out);
}

.checklist-item:hover {
  background: var(--slate-100);
  border-color: var(--slate-300);
}

.checklist-item input[type="checkbox"] {
  margin-right: var(--space-3);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checklist-item label {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
}

/* Workflow Container Responsive */
.workflow-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

@media (min-width: 1024px) {
  .workflow-container {
    flex-direction: row;
  }
}

.workflow-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

@media (min-width: 1024px) {
  .workflow-body {
    flex-direction: row;
  }
}

.workflow-main {
  flex: 1;
  padding: var(--space-4);
}

@media (min-width: 768px) {
  .workflow-main {
    padding: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .workflow-main {
    padding: var(--space-8);
  }
}

/* Page Header Responsive */
.page-header {
  margin-bottom: var(--space-6);
}

.page-header h1 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--navy-600);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .page-header h1 {
    font-size: var(--text-3xl);
  }
}

/* Form Page Header - Consistent Back Button Placement */
.form-page-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: var(--space-4) 0;
  margin-bottom: var(--space-6);
}

.form-page-header .btn {
  flex-shrink: 0;
}

/* Card Responsive */
.card {
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

@media (max-width: 767px) {
  .card {
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
  }
}

.card-header {
  padding: var(--space-4);
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}

@media (max-width: 767px) {
  .card-header {
    padding: var(--space-3);
  }
}

.card-body {
  padding: var(--space-4);
}

@media (max-width: 767px) {
  .card-body {
    padding: var(--space-3);
  }
}

/* Form Responsive */
.fg-item {
  margin-bottom: var(--space-4);
}

@media (max-width: 767px) {
  .fg-item {
    margin-bottom: var(--space-3);
  }
}

.fld-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: #334155;
  margin-bottom: var(--space-2);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-3);
  font-size: var(--text-base);
  color: #0f172a;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-md);
  transition: all var(--duration-150) var(--ease-out);
}

@media (max-width: 767px) {
  .form-input,
  .form-select {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* Field Hint */
.field-hint {
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: #64748b;
}

.subcontractor-shop-select-hint {
  margin: 0 0 var(--space-3);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.45;
  color: #0f4c5c;
  background: #ecfeff;
  border: 1px solid #99f6e4;
  border-radius: var(--radius-md, 8px);
}

/* Action Bar Responsive */
.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  margin-top: var(--space-6);
}

@media (max-width: 767px) {
  .action-bar {
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-3);
  }

  .action-bar-left,
  .action-bar-right {
    width: 100%;
  }

  .action-bar .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Sidebar Responsive (if exists) */
@media (max-width: 1023px) {
  .workflow-sidebar {
    display: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   FUEL MONITORING STATS DASHBOARD
═══════════════════════════════════════════════════════════════════ */

/* Fuel Stat Box */
.fuel-stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  transition: all var(--duration-150) var(--ease-out);
}

.fuel-stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fuel-stat-box--primary {
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border-color: #7dd3fc;
}

.fuel-stat-box--success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
}

.fuel-stat-box--info {
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  border-color: #a5b4fc;
}

.fuel-stat-box--warning {
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  border-color: #fde047;
}

.fuel-stat-value {
  font-size: 2rem;
  font-weight: var(--font-bold);
  line-height: 1;
  color: var(--slate-900);
}

.fuel-stat-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--slate-600);
  margin-top: var(--space-2);
}

.fuel-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background: var(--slate-50);
  border-radius: var(--radius-md);
}

.fuel-detail-label {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--slate-700);
}

/* Fuel Badge for Vehicle Show Page */
.fuel-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

.fuel-badge--critical {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b;
}

.fuel-badge--low {
  background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
  color: #854d0e;
}

.fuel-badge--normal {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}

.fuel-badge--unknown {
  background: var(--slate-100);
  color: var(--slate-600);
}

.fuel-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--slate-200);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: var(--space-2);
}

.fuel-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-500) 0%, var(--teal-600) 100%);
  border-radius: var(--radius-full);
  transition: width var(--duration-300) var(--ease-out);
}

.fuel-progress-fill--critical {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.fuel-progress-fill--low {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

/* ═══════════════════════════════════════════════════════════════════
   ENHANCED FUEL MONITORING DASHBOARD
═══════════════════════════════════════════════════════════════════ */

/* Dashboard Card */
.fuel-dashboard-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.fuel-dashboard-header {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.fuel-dashboard-header h5 {
  color: white;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.fuel-icon {
  color: rgba(255, 255, 255, 0.9);
}

.fuel-last-sync {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Fuel Stat Card */
.fuel-stat-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease-out;
  position: relative;
  overflow: hidden;
}

.fuel-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary, #0ea5e9) 0%, var(--color-secondary, #6366f1) 100%);
}

.fuel-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.fuel-stat-card--total::before {
  background: linear-gradient(90deg, #3b82f6 0%, #6366f1 100%);
}

.fuel-stat-card--sensors::before {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.fuel-stat-card--average::before {
  background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.fuel-stat-card--alert::before {
  background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.fuel-stat-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #64748b;
  flex-shrink: 0;
}

.fuel-stat-card--total .fuel-stat-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
}

.fuel-stat-card--sensors .fuel-stat-icon {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #059669;
}

.fuel-stat-card--average .fuel-stat-icon {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #7c3aed;
}

.fuel-stat-card--alert .fuel-stat-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.fuel-stat-icon--pulse {
  animation: icon-pulse 1.5s ease-in-out infinite;
}

@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.fuel-stat-content {
  flex: 1;
}

.fuel-stat-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
  letter-spacing: -1px;
}

.fuel-stat-value--alert {
  color: #ef4444;
}

.fuel-stat-unit {
  font-size: 1.25rem;
  font-weight: 600;
  color: #64748b;
}

.fuel-stat-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Chart Cards */
.fuel-chart-card,
.fuel-breakdown-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e2e8f0;
  height: 100%;
}

.fuel-chart-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Donut Chart */
.fuel-donut-chart {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
}

.donut-chart {
  width: 180px;
  height: 180px;
}

.donut-segment {
  transition: all 0.3s ease-out;
  cursor: pointer;
}

.donut-segment:hover {
  stroke-width: 14;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.donut-label-main {
  font-size: 28px;
  font-weight: 800;
  fill: #1e293b;
  letter-spacing: -1px;
}

.donut-label-sub {
  font-size: 12px;
  font-weight: 600;
  fill: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Fuel Level Breakdown */
.fuel-level-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fuel-level-row:last-child {
  border-bottom: none;
}

.fuel-level-row--critical:hover {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.05) 0%, transparent 100%);
}

.fuel-level-row--low:hover {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.05) 0%, transparent 100%);
}

.fuel-level-row--normal:hover {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.05) 0%, transparent 100%);
}

.fuel-level-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.fuel-level-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px currentColor;
}

.fuel-level-indicator--critical {
  background: #ef4444;
  color: #ef4444;
}

.fuel-level-indicator--low {
  background: #f59e0b;
  color: #f59e0b;
}

.fuel-level-indicator--normal {
  background: #22c55e;
  color: #22c55e;
}

.fuel-level-name {
  font-weight: 600;
  color: #475569;
}

.fuel-level-range {
  font-weight: 400;
  color: #94a3b8;
  font-size: 0.875rem;
}

.fuel-level-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.fuel-level-count {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1e293b;
  min-width: 40px;
  text-align: center;
  letter-spacing: -0.5px;
}

.fuel-level-bar {
  width: 120px;
  height: 8px;
  background: #f1f5f9;
  border-radius: 8px;
  overflow: hidden;
}

.fuel-level-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.6s ease-out;
  position: relative;
}

.fuel-level-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.fuel-level-bar-fill--critical {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.fuel-level-bar-fill--low {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.fuel-level-bar-fill--normal {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

/* Responsive */
@media (max-width: 768px) {
  .fuel-dashboard-header {
    padding: 16px;
  }

  .fuel-dashboard-header h5 {
    font-size: 1rem;
  }

  .fuel-stat-card {
    padding: 16px;
  }

  .fuel-stat-value {
    font-size: 1.5rem;
  }

  .fuel-stat-icon {
    width: 48px;
    height: 48px;
  }

  .fuel-chart-card,
  .fuel-breakdown-card {
    padding: 16px;
  }

  .donut-chart {
    width: 140px;
    height: 140px;
  }

  .donut-label-main {
    font-size: 22px;
  }

  .fuel-level-bar {
    width: 80px;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   COMPACT FUEL DASHBOARD
═══════════════════════════════════════════════════════════════════ */

.fuel-dashboard-card-compact {
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: white;
}

.fuel-stat-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  background: #f8fafc;
  min-width: 60px;
}

.fuel-stat-compact--avg {
  background: #ede9fe;
}

.fuel-stat-compact--critical {
  background: #fef2f2;
}

.fuel-stat-compact--low {
  background: #fffbeb;
}

.fuel-stat-compact-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}

.fuel-stat-compact-value {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.fuel-distribution-bar-compact {
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  background: #e2e8f0;
}

.fuel-bar-segment {
  height: 100%;
  transition: width 0.3s ease-out;
}

.fuel-bar-segment--critical {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.fuel-bar-segment--low {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.fuel-bar-segment--normal {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.fuel-theft-badge-compact {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  text-decoration: none;
  transition: all 0.2s ease-out;
}

.fuel-theft-badge-compact:hover {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  transform: translateY(-1px);
}

.fuel-theft-alert-banner-compact {
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
  border-left: 4px solid #ef4444;
}

.badge-compact {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid #ef4444;
  color: #dc2626;
  background: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease-out;
}

.badge-compact:hover {
  background: #fef2f2;
  transform: translateY(-1px);
}

.badge-pulse {
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Fuel Alerts on Vehicle Show Page */
.fuel-alerts-header {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border-bottom: 1px solid #fecaca;
}

.fuel-alert-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 8px;
  border-left: 4px solid #94a3b8;
}

.fuel-alert-item--critical {
  background: #fef2f2;
  border-left-color: #ef4444;
}

.fuel-alert-item--warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
}

.fuel-alert-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.fuel-alert-time {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.fuel-alert-details {
  flex: 1;
}

.fuel-alert-message {
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}

.fuel-alert-meta {
  font-size: 12px;
  color: #64748b;
}

/* ═══════════════════════════════════════════════════════════════════
   FULL-WIDTH FUEL DASHBOARD
═══════════════════════════════════════════════════════════════════ */

.fuel-dashboard-card-full {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.fuel-dashboard-header-full {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  padding: 16px 20px;
  border-bottom: none;
}

.fuel-dashboard-header-full h5 {
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.fuel-dashboard-header-full small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
}

.fuel-icon {
  color: rgba(255, 255, 255, 0.9);
}

.fuel-last-sync-full {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  animation: pulse 2s ease-in-out infinite;
}

.fuel-theft-badge-full {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: white;
  text-decoration: none;
  transition: all 0.2s ease-out;
}

.fuel-theft-badge-full:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

/* Fuel Metric Cards */
.fuel-metric-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
  border-radius: 10px;
  background: white;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease-out;
  position: relative;
}

.fuel-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 10px 10px 0 0;
}

.fuel-metric-card--blue::before {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.fuel-metric-card--green::before {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.fuel-metric-card--purple::before {
  background: linear-gradient(90deg, #8b5cf6 0%, #7c3aed 100%);
}

.fuel-metric-card--orange::before {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.fuel-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fuel-metric-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #64748b;
  margin-bottom: 8px;
}

.fuel-metric-card--blue .fuel-metric-icon {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #2563eb;
}

.fuel-metric-card--green .fuel-metric-icon {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
}

.fuel-metric-card--purple .fuel-metric-icon {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #7c3aed;
}

.fuel-metric-card--orange .fuel-metric-icon {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #d97706;
}

.fuel-metric-icon--pulse {
  animation: icon-pulse 1.5s ease-in-out infinite;
}

.fuel-metric-value {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}

.fuel-metric-value--alert {
  color: #ef4444;
}

.fuel-metric-unit {
  font-size: 1rem;
  font-weight: 600;
  color: #64748b;
  margin-left: 2px;
}

.fuel-metric-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fuel-metric-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* Fuel Distribution Card */
.fuel-distribution-card {
  background: white;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #e2e8f0;
}

.fuel-distribution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.fuel-distribution-title {
  font-weight: 700;
  color: #475569;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fuel-distribution-total {
  font-size: 0.8rem;
  color: #64748b;
}

.fuel-distribution-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fuel-dist-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fuel-dist-label {
  min-width: 90px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
}

.fuel-dist-bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.fuel-dist-bar {
  flex: 1;
  height: 24px;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.fuel-dist-fill {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  transition: width 0.6s ease-out;
  position: relative;
}

.fuel-dist-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

.fuel-dist-fill--critical {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.fuel-dist-fill--low {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.fuel-dist-fill--normal {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.fuel-dist-value {
  min-width: 80px;
  text-align: right;
  font-weight: 700;
  font-size: 0.9rem;
  color: #1e293b;
}

.fuel-dist-pct {
  font-size: 0.75rem;
  color: #64748b;
  font-weight: 400;
}

/* Theft Sidebar */
.fuel-theft-sidebar {
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
  border-radius: 10px;
  border: 1px solid #fecaca;
  overflow: hidden;
}

.fuel-theft-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border-bottom: 1px solid #fecaca;
  font-weight: 700;
  color: #991b1b;
  font-size: 0.875rem;
}

.fuel-theft-sidebar-list {
  max-height: 220px;
  overflow-y: auto;
}

.fuel-theft-sidebar-item {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-bottom: 1px solid #fecaca;
  transition: background 0.2s ease-out;
}

.fuel-theft-sidebar-item:hover {
  background: rgba(239, 68, 68, 0.05);
}

.fuel-theft-sidebar-item:last-child {
  border-bottom: none;
}

.fuel-theft-sidebar-plate {
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.fuel-theft-sidebar-plate a {
  color: #1e293b;
  text-decoration: none;
}

.fuel-theft-sidebar-plate a:hover {
  color: #dc2626;
}

.badge-sm {
  font-size: 10px;
  padding: 2px 6px;
}

.maintenance-status-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.maintenance-approver-email-badge {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.fuel-theft-sidebar-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.8rem;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-theft-sidebar-more {
  padding: 8px 16px;
  text-align: center;
  border-top: 1px solid #fecaca;
}

.btn-link-danger {
  color: #dc2626;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-link-danger:hover {
  text-decoration: underline;
}

/* All Clear Status */
.fuel-status-sidebar {
  background: linear-gradient(135deg, #dcfce7 0%, #ffffff 100%);
  border-radius: 10px;
  border: 1px solid #bbf7d0;
  padding: 32px 16px;
  text-align: center;
}

.fuel-status-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
  border-radius: 50%;
}

.fuel-status-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #166534;
  margin-bottom: 8px;
}

.fuel-status-text {
  font-size: 0.875rem;
  color: #64748b;
}

/* Responsive */
@media (max-width: 991px) {
  .fuel-theft-sidebar {
    margin-top: 16px;
  }
  
  .fuel-dist-label {
    min-width: 70px;
    font-size: 0.75rem;
  }
  
  .fuel-dist-value {
    min-width: 60px;
    font-size: 0.8rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   FULL-WIDTH VEHICLE LOCATIONS PAGE LAYOUT
═══════════════════════════════════════════════════════════════════ */

/* Break out of constrained wrapper for vehicle locations page */
body.ty-app.vehicle-locations-page .ty-content-wrapper {
  max-width: 100% !important;
  padding: 16px 20px 40px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Compact full-width dashboard */
.fuel-dashboard-card-full {
  border: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  margin-bottom: 16px;
}

.fuel-dashboard-header-full {
  background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  padding: 12px 16px;
  border-bottom: none;
}

.fuel-dashboard-header-full h5 {
  color: white;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.fuel-dashboard-header-full small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.7rem;
}

.fuel-icon {
  color: rgba(255, 255, 255, 0.9);
}

/* Compact GPS status badge */
.fuel-last-sync-full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.fuel-last-sync-full--healthy {
  color: #86efac;
}

.fuel-last-sync-full--unhealthy {
  color: #fca5a5;
}

.fuel-last-sync-full svg {
  width: 6px;
  height: 6px;
}

.fuel-last-sync-meta {
  margin-left: 2px;
  font-size: 0.64rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.95;
}

.fuel-dashboard-reports-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.fuel-dashboard-reports-link:hover {
  color: #fff;
}

.fuel-header-status-grid {
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(220px, auto);
  column-gap: 18px;
  align-items: center;
}

.fuel-header-status-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fuel-header-status-col--left {
  justify-content: flex-end;
}

.fuel-header-status-col--right {
  justify-content: flex-start;
}

.fuel-api-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.fuel-api-health-badge--up {
  color: #86efac;
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(134, 239, 172, 0.4);
}

.fuel-api-health-badge--down {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(252, 165, 165, 0.4);
}

.fuel-header-all-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.2);
  border: 1px solid rgba(134, 239, 172, 0.45);
}

.fuel-header-all-clear .fuel-column-clear-icon {
  width: 16px;
  height: 16px;
  margin-bottom: 0;
  font-size: 10px;
}

.fuel-header-all-clear .fuel-column-clear-text {
  color: #dcfce7;
  font-size: 0.68rem;
  white-space: nowrap;
}

/* Compact theft badge */
.fuel-theft-badge-full {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 16px;
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: white;
  text-decoration: none;
  transition: all 0.2s ease-out;
  font-size: 0.75rem;
  font-weight: 600;
}

.fuel-theft-badge-full svg {
  width: 14px;
  height: 14px;
}

.fuel-theft-badge-full .badge {
  padding: 2px 6px;
  font-size: 0.65rem;
  color: #fff !important;
}

.fuel-theft-badge-full:hover {
  background: rgba(239, 68, 68, 0.3);
  transform: translateY(-1px);
}

.fuel-theft-badge-full--active {
  background: rgba(239, 68, 68, 0.35);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.45);
}

.fuel-theft-badge-full--active:hover {
  background: rgba(239, 68, 68, 0.4);
}

/* ═══════════════════════════════════════════════════════════════════
   4-COLUMN FUEL DASHBOARD LAYOUT - COMPACT
═══════════════════════════════════════════════════════════════════ */

.fuel-dashboard-card-full .card-body {
  padding: 8px 10px;
}

.fuel-dashboard-card-full .row {
  gap: 0;
}

.fuel-dashboard-grid {
  row-gap: 8px;
}

.fuel-column-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  height: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.fuel-column-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fuel-column-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.fuel-column-header--blue {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.fuel-column-header--purple {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #5b21b6;
}

.fuel-column-header--orange {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.fuel-column-header--danger {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b;
}

.fuel-column-header--success {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
}

.fuel-column-body {
  padding: 8px 10px;
}

.fuel-column-body--compact {
  padding: 8px 10px;
}

.fuel-column-body--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 8px 10px;
}

.fuel-column-body--clear-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  padding: 8px 10px;
}

.fuel-column-clear-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.fuel-column-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 6px;
}

.fuel-column-stats-inline {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.fuel-column-stat--inline {
  margin-bottom: 0;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f8fafc;
}

.fuel-overview-quad {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.fuel-column-stat--metric .fuel-column-value {
  font-size: 1.2rem;
}

.fuel-column-value {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  color: #1e293b;
  font-variant-numeric: tabular-nums;
}

.fuel-column-value--purple {
  color: #7c3aed;
}

.fuel-column-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.fuel-column-sub {
  font-size: 0.62rem;
  color: #94a3b8;
  text-align: center;
}

.fuel-column-progress-group {
  width: 100%;
}

.fuel-column-progress {
  display: flex;
  align-items: center;
  gap: 6px;
}

.fuel-column-progress-bar {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
}

.fuel-column-progress-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease-out;
}

.fuel-column-progress-fill--normal {
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.fuel-column-progress-text {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  min-width: 55px;
}

/* Column Stats Rows */
.fuel-column-stats-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fuel-column-stats-rows--inline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fuel-column-row-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  background: #f8fafc;
  border-radius: 6px;
}

.fuel-column-row-stat--inline {
  justify-content: center;
}

.fuel-column-row-badge {
  min-width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
  font-variant-numeric: tabular-nums;
}

.fuel-column-row-badge--critical {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.fuel-column-row-badge--low {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.fuel-column-row-badge--normal {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}

.fuel-column-row-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #475569;
  flex: 1;
}

.fuel-column-row-label .text-muted {
  font-size: 0.65rem;
}

@media (max-width: 767px) {
  .fuel-column-stats-rows--inline {
    grid-template-columns: 1fr;
  }

  .fuel-column-row-stat--inline {
    justify-content: flex-start;
  }
}

/* Theft Column Items */
.fuel-column-theft-item {
  padding: 8px;
  border-bottom: 1px dashed #fecaca;
}

.fuel-column-theft-item:last-child {
  border-bottom: none;
}

.fuel-column-theft-plate a {
  font-weight: 700;
  color: #dc2626;
  text-decoration: none;
  font-size: 0.75rem;
  display: block;
}

.fuel-column-theft-plate a:hover {
  text-decoration: underline;
}

.fuel-column-theft-info {
  margin-top: 2px;
}

.fuel-column-theft-msg {
  font-size: 0.65rem;
  color: #94a3b8;
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-column-theft-more {
  padding: 6px;
  text-align: center;
  border-top: 1px dashed #fecaca;
}

.fuel-column-theft-more .btn-link {
  font-size: 0.7rem;
  color: #dc2626;
  text-decoration: none;
  font-weight: 600;
}

.fuel-column-theft-more .btn-link:hover {
  text-decoration: underline;
}

.fuel-column-card--alerts {
  height: 100%;
}

.fuel-theft-badge-full__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.fuel-theft-badge-full__meta {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.65rem;
  font-weight: 500;
  line-height: 1.2;
}

.fuel-alert-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fuel-alert-summary__heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.fuel-alert-summary__title {
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.fuel-alert-summary__link {
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
}

.fuel-alert-summary__link:hover {
  text-decoration: underline;
}

.fuel-alert-summary__section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

.fuel-alert-summary__section--danger {
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  border-color: #fecaca;
}

.fuel-alert-summary__section-label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.fuel-alert-summary__subsection {
  margin-bottom: 8px;
}

.fuel-alert-summary__grid {
  display: grid;
  gap: 6px;
}

.fuel-alert-summary__grid--levels {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fuel-alert-summary__grid--theft {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 1200px) {
  .fuel-alert-summary__grid--theft {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.fuel-alert-summary__metric {
  background: #fff;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 6px;
}

.fuel-alert-summary__value {
  color: #1e293b;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

.fuel-alert-summary__value--critical {
  color: #dc2626;
}

.fuel-alert-summary__value--low {
  color: #d97706;
}

.fuel-alert-summary__value--normal {
  color: #16a34a;
}

.fuel-alert-summary__value--danger {
  color: #dc2626;
}

.fuel-alert-summary__label {
  color: #64748b;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.2;
}

.fuel-alert-summary__meta {
  color: #64748b;
  display: flex;
  flex-direction: column;
  font-size: 0.68rem;
  gap: 2px;
  margin-top: 6px;
}

.fuel-alert-summary__clear {
  color: #16a34a;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0;
}

.fuel-alert-summary__preview {
  border-top: 1px dashed #fecaca;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
}

.fuel-alert-summary__preview-item {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 6px 8px;
}

.fuel-alert-summary__preview-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.fuel-alert-summary__preview-plate {
  color: #991b1b;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.fuel-alert-summary__preview-plate:hover {
  color: #dc2626;
}

.fuel-alert-summary__preview-type {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  border-radius: 999px;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
}

.fuel-alert-summary__preview-summary {
  color: #334155;
  font-size: 0.72rem;
  line-height: 1.35;
  margin-bottom: 4px;
}

.fuel-alert-summary__preview-fuel {
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 4px;
}

.fuel-alert-summary__preview-meta {
  color: #64748b;
  display: flex;
  flex-direction: column;
  font-size: 0.65rem;
  gap: 2px;
}

.fuel-alert-summary__actions {
  align-items: center;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
}

.fuel-alert-summary__history-link,
.fuel-theft-sidebar-history-link,
.fuel-alert-history-link {
  color: #dc2626;
  font-weight: 600;
  text-decoration: none;
}

.fuel-alert-summary__history-link:hover,
.fuel-theft-sidebar-history-link:hover,
.fuel-alert-history-link:hover {
  color: #991b1b;
  text-decoration: underline;
}

.fuel-consumption-history {
  border: 1px solid #fecaca;
  overflow: hidden;
}

.fuel-consumption-history__header {
  align-items: flex-start;
  background: linear-gradient(135deg, #fef2f2 0%, #fff 100%);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.fuel-consumption-history__title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}

.fuel-consumption-history__subtitle {
  color: #64748b;
  font-size: 0.82rem;
  margin: 0.25rem 0 0;
}

.fuel-consumption-history__summary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1rem;
}

.fuel-consumption-history__metric-label {
  color: #64748b;
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.15rem;
  text-transform: uppercase;
}

.fuel-consumption-history__metric-value {
  color: #0f172a;
  font-size: 0.88rem;
  font-weight: 700;
}

.fuel-consumption-history__table-wrap {
  max-height: 320px;
  overflow: auto;
}

.fuel-consumption-history__row--event {
  background: #fef2f2;
}

.fuel-consumption-delta--drop {
  color: #dc2626;
  font-weight: 700;
}

.fuel-consumption-delta--gain {
  color: #16a34a;
  font-weight: 700;
}

.fuel-consumption-delta--neutral {
  color: #64748b;
}

.fuel-consumption-level {
  font-weight: 700;
}

.fuel-consumption-level--critical {
  color: #dc2626;
}

.fuel-consumption-level--low {
  color: #d97706;
}

.fuel-consumption-level--normal {
  color: #16a34a;
}

.fuel-consumption-level--unknown {
  color: #64748b;
}

.fuel-consumption-history__note,
.fuel-consumption-history__empty {
  color: #64748b;
  font-size: 0.78rem;
  margin: 0.75rem 0 0;
}

.fuel-consumption-history__gap-alert {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 0.82rem;
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
}

.fuel-consumption-history__gap-alert--critical {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.fuel-consumption-gap-row {
  background: #fffbeb;
}

.fuel-consumption-gap-row--alert {
  background: #fef2f2;
}

.fuel-consumption-gap-row__content {
  align-items: center;
  color: #92400e;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 0.45rem;
}

.fuel-consumption-gap-row--alert .fuel-consumption-gap-row__content {
  color: #991b1b;
}

.fuel-consumption-gap-row__range {
  color: #64748b;
  font-weight: 500;
}

.fuel-consumption-gap-flag {
  color: #d97706;
  margin-left: 0.25rem;
}

/* All Clear Column */
.fuel-column-clear-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 6px;
}

.fuel-column-clear-chip .fuel-column-clear-icon {
  width: 22px;
  height: 22px;
  margin-bottom: 0;
  font-size: 12px;
}

.fuel-column-clear-text {
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
}

/* Responsive */
@media (max-width: 991px) {
  .fuel-header-status-grid {
    grid-template-columns: 1fr;
    justify-items: end;
    row-gap: 8px;
  }

  .fuel-header-status-col {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .fuel-overview-quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuel-column-card {
    margin-bottom: 0;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   VEHICLE LOCATIONS PAGE - FULL WIDTH LAYOUT
═══════════════════════════════════════════════════════════════════ */

/* Apply full-width layout to vehicle locations page */
body.vehicle-locations-page .ty-content-wrapper {
  max-width: 100% !important;
  padding: 16px 20px 40px !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Compact filters on vehicle locations page */
body.vehicle-locations-page .filters-card {
  margin-bottom: 12px;
}

body.vehicle-locations-page .filters-card .card-body {
  padding: 12px 16px;
}

body.vehicle-locations-page .filters-grid {
  gap: 12px;
}

body.vehicle-locations-page .filter-field {
  flex: 1;
  min-width: 140px;
}

body.vehicle-locations-page .filter-field--submit {
  flex: 0 0 auto;
}

/* Compact content card */
body.vehicle-locations-page .content-card {
  margin-bottom: 0;
}

body.vehicle-locations-page .content-card .card-body {
  padding: 12px 16px;
}

/* Table styling for full width */
body.vehicle-locations-page .table-responsive {
  border-radius: 8px;
  overflow: hidden;
}

body.vehicle-locations-page .table {
  font-size: 0.85rem;
}

body.vehicle-locations-page .table th {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  background: #f8fafc;
}

body.vehicle-locations-page .table td {
  padding: 8px 12px;
}

/* Empty state */
body.vehicle-locations-page .empty-state {
  padding: 40px 20px;
}

body.vehicle-locations-page .empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

body.vehicle-locations-page .empty-state p {
  font-size: 0.85rem;
  color: #64748b;
}

body.ty-app.vehicle-locations-page .badge.badge-danger,
body.ty-app.vehicle-locations-page .fuel-theft-badge-full .badge.badge-danger,
body.ty-app.vehicle-locations-page .fuel-column-header .badge.badge-danger,
body.ty-app.vehicle-locations-page .fuel-alert-summary__preview-type,
body.ty-app.vehicle-locations-page .fuel-consumption-history .badge.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  border: none;
}

/* ═══════════════════════════════════════════════════════════════════
   FUEL REPORTS (R1 / R2 / R3)
═══════════════════════════════════════════════════════════════════ */

/* Report tab switcher — button cards */
.fuel-reports-page .fuel-reports-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.fuel-reports-nav-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 68px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d5dae6;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(26, 29, 39, 0.04);
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.fuel-reports-nav-item:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #94a3b8;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.fuel-reports-nav-item:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.fuel-reports-nav-item--active {
  background: linear-gradient(160deg, #0ea5e9 0%, #0284c7 100%);
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}

.fuel-reports-nav-item--active:hover {
  color: #fff;
  background: linear-gradient(160deg, #38bdf8 0%, #0284c7 100%);
  border-color: #0369a1;
  box-shadow: 0 8px 18px rgba(14, 165, 233, 0.34);
  transform: translateY(-1px);
}

.fuel-reports-nav-item__code {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.fuel-reports-nav-item--active .fuel-reports-nav-item__code {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.fuel-reports-nav-item__label {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .fuel-reports-page .fuel-reports-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .fuel-reports-page .fuel-reports-nav {
    grid-template-columns: 1fr;
  }
}

.fuel-reports-loading {
  padding: 2rem 1rem;
  text-align: center;
}

.fuel-reports-loading__text {
  color: #64748b;
  font-size: 0.95rem;
  margin: 0;
}

.fuel-reports-live-hint {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: 0.85rem;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.fuel-reports-filters {
  margin-bottom: 16px;
}

/* Report canvas (mockup .report-frame) — R1 / R2 / R3 */
.fuel-reports-frame {
  background: #f0f2f7;
  border-radius: 10px;
  padding: 24px;
  color: #1a1d27;
}

.fuel-reports-rh {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7ef;
}

.fuel-reports-rh-title {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #1a1d27;
}

.fuel-reports-rh-sub,
.fuel-reports-rh-meta {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
  color: #9197a8;
}

.fuel-reports-rh-meta {
  margin-top: 2px;
}

.fuel-reports-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #dc2626;
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  white-space: nowrap;
}

.fuel-reports-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
  animation: fuel-reports-live-pulse 1.6s ease-in-out infinite;
}

@keyframes fuel-reports-live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.88); }
}

.fuel-reports-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.fuel-reports-kpi {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 76px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e5e7ef;
  border-radius: 8px;
}

.fuel-reports-kpi-label {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 6px;
  font-size: 11px;
  line-height: 1.35;
  color: #9197a8;
}

.fuel-reports-kpi-icon {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.2;
}

.fuel-reports-kpi-val {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.fuel-reports-kpi-val--red { color: #dc2626; }
.fuel-reports-kpi-val--blue { color: #2563eb; }
.fuel-reports-kpi-val--green { color: #16a34a; }

.fuel-reports-table-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7ef;
  border-radius: 8px;
}

.fuel-reports-table-card .fuel-reports-table thead th {
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9197a8;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7ef;
}

.fuel-reports-table-card .fuel-reports-table tbody td {
  padding: 10px 12px;
  font-size: 12.5px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f5f9;
}

.fuel-reports-table-card .fuel-reports-table tbody tr:last-child td {
  border-bottom: none;
}

.fuel-reports-table-card .fuel-reports-table tbody tr:hover td {
  background: #fafbfc;
}

.fuel-reports-empty-cell {
  padding: 32px 12px !important;
  font-size: 13px;
  color: #9197a8;
  text-align: center;
}

.fuel-reports-legend-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  font-size: 11px;
  color: #9197a8;
}

.fuel-reports-legend-item {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.fuel-reports-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.fuel-reports-legend-dot--critical { background: #dc2626; }
.fuel-reports-legend-dot--low { background: #d97706; }
.fuel-reports-legend-dot--normal { background: #16a34a; }

.fuel-reports-legend-note {
  margin-left: auto;
  color: #9ca3af;
}

.fuel-reports-ignition {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  font-size: 12px;
}

.fuel-reports-ignition-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.fuel-reports-ignition--on .fuel-reports-ignition-dot {
  background: #16a34a;
}

.fuel-reports-ignition--off .fuel-reports-ignition-dot {
  background: #d1d5db;
}

@media (max-width: 992px) {
  .fuel-reports-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuel-reports-legend-note {
    margin-left: 0;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .fuel-reports-frame--r1 {
    padding: 16px;
  }

  .fuel-reports-rh {
    flex-direction: column;
    align-items: stretch;
  }

  .fuel-reports-live-badge {
    align-self: flex-start;
  }

  .fuel-reports-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* R2 / R3 shared panel (legacy) */
.fuel-reports-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.fuel-reports-panel-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #0f172a;
}

.fuel-reports-panel-sub {
  margin: 0;
  font-size: 0.85rem;
  color: #64748b;
}

.fuel-reports-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.fuel-reports-plate {
  font-weight: 700;
  font-family: var(--font-mono, ui-monospace, monospace);
  white-space: nowrap;
}

.fuel-reports-fuel-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.fuel-reports-fbar-wrap {
  flex: 1;
  height: 8px;
  background: #f1f5f9;
  border-radius: 4px;
  overflow: hidden;
  min-width: 60px;
}

.fuel-reports-fbar {
  height: 100%;
  border-radius: 4px;
}

.fuel-reports-fuel-pct {
  font-size: 0.8rem;
  font-weight: 700;
  min-width: 36px;
}

.fuel-reports-status {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.fuel-reports-status--tracker,
.fuel-reports-status--critical {
  background: #fef2f2;
  color: #dc2626;
}

.fuel-reports-status--low {
  background: #fffbeb;
  color: #d97706;
}

.fuel-reports-status--normal {
  background: #f0fdf4;
  color: #16a34a;
}

.fuel-reports-status--unknown {
  background: #f8fafc;
  color: #64748b;
}

.fuel-reports-ignition--on { color: #16a34a; }
.fuel-reports-ignition--off { color: #9ca3af; }

.fuel-reports-location {
  font-size: 0.8rem;
  color: #64748b;
  max-width: 220px;
}

.fuel-reports-footnote {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.fuel-reports-level-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.fuel-reports-chip {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
}

.fuel-reports-chip--l1 {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.fuel-reports-chip--l2 {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}

.fuel-reports-chip--inline {
  background: #f8fafc;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.fuel-reports-alert-summary {
  text-align: right;
}

.fuel-reports-alert-total {
  font-size: 0.95rem;
  font-weight: 700;
  color: #dc2626;
}

.fuel-reports-alert-hint {
  font-size: 0.75rem;
  color: #94a3b8;
}

.fuel-reports-alert-list-card .fuel-reports-alert-list {
  padding: 4px 16px;
}

.fuel-reports-alert-list-card .fuel-reports-empty-cell {
  margin: 0;
}

.fuel-reports-alert-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.fuel-reports-alert-row:last-child {
  border-bottom: none;
}

.fuel-reports-alert-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
}

.fuel-reports-alert-dot--l1 { background: #dc2626; }
.fuel-reports-alert-dot--l2 { background: #d97706; }

.fuel-reports-alert-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.fuel-reports-driver {
  font-size: 0.78rem;
  color: #64748b;
}

.fuel-reports-alert-meta {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.45;
}

.fuel-reports-alert-detail {
  font-size: 0.78rem;
  color: #dc2626;
  margin-top: 4px;
}

.fuel-reports-alert-time {
  font-size: 0.78rem;
  color: #94a3b8;
  white-space: nowrap;
}

.fuel-reports-score-val {
  font-size: 1rem;
  font-weight: 700;
}

.fuel-reports-score-val--high { color: #dc2626; }
.fuel-reports-score-val--medium { color: #d97706; }
.fuel-reports-score-val--low { color: #64748b; }

.fuel-reports-score-bar-wrap {
  width: 48px;
  height: 4px;
  background: #f1f5f9;
  border-radius: 2px;
  margin: 4px auto 0;
  overflow: hidden;
}

.fuel-reports-score-bar {
  height: 100%;
  border-radius: 2px;
}

.fuel-reports-score-bar--high { background: #dc2626; }
.fuel-reports-score-bar--medium { background: #d97706; }
.fuel-reports-score-bar--low { background: #94a3b8; }

.fuel-reports-risk {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
}

.fuel-reports-risk--high {
  background: #fef2f2;
  color: #dc2626;
}

.fuel-reports-risk--medium {
  background: #fffbeb;
  color: #d97706;
}

.fuel-reports-risk--low {
  background: #f8fafc;
  color: #64748b;
}

/* Searchable vehicle / plate combobox */
.searchable-select {
  position: relative;
  width: 100%;
}

.searchable-select.is-open {
  z-index: 50;
}

/* .card uses overflow:hidden — let combobox lists escape filter cards */
.filters-card.card {
  overflow: visible;
}

.filters-card.card:has(.searchable-select.is-open) {
  position: relative;
  z-index: 50;
}

/* CM/PM request forms — plate searchable select dropdown escapes .card { overflow: hidden } */
body.pm-request-new .card:has(.searchable-select.is-open),
body.cm-request-new .card:has(.searchable-select.is-open) {
  overflow: visible;
  position: relative;
  z-index: 45;
}

body.pm-request-new .card:has(.searchable-select.is-open) .card-body,
body.cm-request-new .card:has(.searchable-select.is-open) .card-body {
  overflow: visible;
}

.filters-card .card-body,
.filters-card .filters-grid,
.filters-card .filter-field:has(.searchable-select) {
  overflow: visible;
}

.filters-card .filter-field--vehicle-search {
  min-width: 12rem;
}

.filters-card .filter-field--vehicle-search .searchable-select {
  min-width: 12rem;
}

/* Report filter bar — searchable plate combobox */
body.ty-app .fms-report-layout .fms-report-m8 .filter-bar:has(.searchable-select) {
  overflow: visible;
  position: relative;
  z-index: 1;
}

body.ty-app .fms-report-layout .fms-report-m8 .filter-bar:has(.searchable-select.is-open) {
  z-index: 50;
}

body.ty-app .fms-report-layout .fms-report-m8 .filter-bar .searchable-select--plate-filter {
  width: 12rem;
  min-width: 10rem;
  flex-shrink: 0;
}

body.ty-app .fms-report-layout .fms-report-m8 .filter-bar .searchable-select__input.fms-report-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.searchable-select__control {
  position: relative;
  display: flex;
  align-items: stretch;
}

.searchable-select__input,
.searchable-select__input.plate-input {
  width: 100%;
  padding: 0.625rem 2.25rem 0.625rem 0.875rem;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  font-size: 0.875rem;
  color: var(--slate-800, #1e293b);
  background: var(--white, #fff);
}

.searchable-select__input:focus {
  outline: none;
  border-color: var(--teal, #0d9488);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.searchable-select__toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 2.25rem;
  border: none;
  background: transparent;
  color: var(--slate-500, #64748b);
  cursor: pointer;
  font-size: 0.85rem;
}

.searchable-select__native {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.searchable-select__dropdown {
  display: none;
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--white, #fff);
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.searchable-select.is-open .searchable-select__dropdown {
  display: block;
}

.searchable-select__option,
.searchable-select__empty {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.searchable-select__option:hover,
.searchable-select__option.is-highlighted {
  background: var(--teal-bg, #e6f7f6);
}

.searchable-select__option.is-selected {
  font-weight: 600;
  color: var(--teal, #0d9488);
}

.searchable-select__empty,
.searchable-select__more {
  color: var(--slate-500, #64748b);
  cursor: default;
}

.searchable-select__more {
  font-style: italic;
}

.searchable-select.is-open .searchable-select__toggle {
  color: var(--teal, #0d9488);
}

/* Combobox — typable input + async suggestion dropdown (custom values allowed) */
.combobox {
  position: relative;
  width: 100%;
}

.combobox.is-open {
  z-index: 20;
}

.combobox__control {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.combobox__input {
  flex: 1 1 auto;
  min-width: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.combobox__toggle {
  flex: 0 0 2rem;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-left: none;
  border-radius: 0 6px 6px 0;
  background: var(--slate-50, #f8fafc);
  color: var(--slate-500, #64748b);
  cursor: pointer;
}

.combobox__dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 240px;
  overflow-y: auto;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid var(--slate-200, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  z-index: 30;
}

.combobox.is-open .combobox__dropdown {
  display: block;
}

.combobox__option,
.combobox__empty {
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.combobox__option {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.combobox__option-label {
  font-size: 0.875rem;
  color: var(--slate-800, #1e293b);
}

.combobox__option-meta {
  font-size: 0.6875rem;
  color: var(--slate-500, #64748b);
}

.combobox__option:hover,
.combobox__option.is-highlighted {
  background: var(--slate-50, #f8fafc);
}

.combobox__empty {
  color: var(--slate-500, #64748b);
  font-size: 0.8125rem;
  cursor: default;
}

.combobox.is-open .combobox__toggle {
  color: var(--teal, #0d9488);
}

/* ═══════════════════════════════════════════════════════════════════
   JOB TITLES — Settings CRUD + user-form manager modal
════════════════════════════════════════════════════════════════════ */

.user-form-job-title-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.user-form-job-title-row__select {
  flex: 1;
  min-width: 0;
}

.user-form-job-title-row__manage {
  white-space: nowrap;
  flex-shrink: 0;
}

.job-titles-manager__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.job-titles-manager__heading {
  display: block;
  font-size: 0.9375rem;
  color: var(--slate-800, #1e293b);
}

.job-titles-manager__meta {
  margin-top: 0.25rem;
}

.job-titles-embed-form__title {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800, #1e293b);
}

.modal.job-titles-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.job-titles-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.job-titles-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 720px;
  width: 92%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.job-titles-modal .modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-200, #e2e8f0);
  background: var(--slate-100, #f1f5f9);
}

.job-titles-modal .modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-800, #1e293b);
}

.job-titles-modal .modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 4px;
  color: var(--slate-500, #64748b);
  line-height: 1;
}

.job-titles-modal .modal-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.job-titles-modal .modal-intro {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--slate-500, #64748b);
}

.job-titles-modal__footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--slate-200, #e2e8f0);
  background: var(--slate-100, #f1f5f9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════
   STATS-ROW — horizontal stat strips (used across Settings / imports)
════════════════════════════════════════════════════════════════════ */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 0;
}

.stats-row--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-row--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stats-row--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .stats-row--2 {
    grid-template-columns: 1fr;
  }

  .stats-row--3,
  .stats-row:not(.stats-row--4):not(.stats-row--2) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stats-row--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Draft stats banner (CM / PM dashboards) */
.draft-stats-banner {
  margin-top: 1rem;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-radius: 10px;
  overflow: hidden;
}

.draft-stats-banner.is-open {
  border-color: #0ea5e9;
  border-width: 2px;
}

.draft-stats-banner__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}

.draft-stats-banner__toggle:hover {
  background: #dbeafe;
}

.draft-stats-banner__counts strong {
  color: #0369a1;
  font-weight: 700;
}

.draft-stats-banner__counts span {
  color: #64748b;
}

.draft-stats-banner__label {
  color: #0369a1;
  font-weight: 600;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.draft-stats-banner__panel {
  background: #fff;
  border-top: 1px solid #bfdbfe;
}

.draft-stats-banner__table {
  width: 100%;
}

.draft-stats-banner__head,
.draft-stats-banner__row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 1.2fr 0.9fr;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  align-items: center;
}

.draft-stats-banner__head {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  border-bottom: 1px solid #f1f5f9;
}

.draft-stats-banner__row {
  font-size: 0.875rem;
  border-bottom: 1px solid #f1f5f9;
}

.draft-stats-banner__row:nth-child(even) {
  background: #f8fafc;
}

.draft-stats-banner__plate {
  font-weight: 600;
}

.draft-stats-banner__ref {
  color: #0369a1;
}

.draft-stats-banner__when {
  color: #64748b;
  font-size: 0.8125rem;
}

.draft-stats-banner__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  font-size: 0.75rem;
  color: #64748b;
  background: #fff;
}

.draft-stats-banner__view-all {
  background: none;
  border: none;
  color: #0369a1;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
}

.draft-stats-banner__view-all:hover {
  text-decoration: underline;
}

.modal.draft-stats-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.draft-stats-modal .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}

.draft-stats-modal__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  max-width: 640px;
  width: 92%;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.draft-stats-modal .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
}

.draft-stats-modal .modal-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.draft-stats-modal__subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.draft-stats-modal .modal-close {
  border: none;
  background: #f1f5f9;
  border-radius: 8px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  color: #64748b;
  flex-shrink: 0;
}

.draft-stats-modal__body {
  overflow: auto;
  padding: 0;
  flex: 1;
}

.draft-stats-modal .modal-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .draft-stats-banner__head,
  .draft-stats-banner__row {
    grid-template-columns: 1fr 1fr;
  }

  .draft-stats-banner__head > :nth-child(n+3),
  .draft-stats-banner__row > :nth-child(n+3) {
    display: none;
  }
}
