/* =====================================================
   Fleet Dashboard – Core Shell
   ===================================================== */

/* Container that replaces the free dashboard view */
#fleetApp {
  background: #0f172a;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}

/* Content area where modules are mounted */
#fleetContent {
  flex: 1;
  padding: 1.5rem;
  position: relative;  /* for absolute positioning of loading overlay */
}

/* Loading spinner overlay */
.fleet-loader {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  z-index: 10;
}

.fleet-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(243, 156, 18, 0.2);
  border-top-color: #f39c12;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

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

/* Error fallback */
.fleet-error {
  text-align: center;
  padding: 3rem 1.5rem;
  color: #ef4444;
}
.fleet-error p {
  margin-bottom: 1rem;
}
.fleet-error button {
  background: #f39c12;
  color: #0f172a;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-weight: bold;
}

/* ---- Shell header (company branding) ---- */
.fleet-shell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.8rem;
  background: #1e293b;
  border-bottom: 2px solid #f39c12;
  margin-bottom: 0;
}

.fleet-company-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #f39c12;
  letter-spacing: 0.3px;
}

.fleet-badge {
  background: #f39c12;
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Inline notification banner */
.fleet-notification {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  animation: fadeIn 0.2s ease;
}

.fleet-notification--error {
  background: #7f1d1d;
  color: #fca5a5;
  border-left: 4px solid #ef4444;
}

.fleet-notification--success {
  background: #14532d;
  color: #86efac;
  border-left: 4px solid #22c55e;
}

.fleet-notification-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.7;
}
.fleet-notification-close:hover { opacity: 1; }

.fleet-notification-retry {
  background: #f39c12;
  color: #0f172a;
  border: none;
  border-radius: 4px;
  padding: 0.3rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.8rem;
}
.fleet-notification-retry:hover { background: #e67e22; }

/* ---- Global fixes for all premium modules ---- */

/* 1. Gold date inputs */
input[type="date"] {
  color-scheme: dark;               /* tells browser to use dark theme picker */
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 0.6rem;
  font-size: 0.95rem;
}
input[type="date"]:focus {
  outline: none;
  border-color: #f39c12;            /* gold border on focus */
}
/* Gold calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(70%) sepia(80%) saturate(500%) hue-rotate(350deg);
  cursor: pointer;
}

/* 2. Table row background override (prevents white second row) */
#fleetApp table tbody tr:nth-child(even),
#fleetApp table tbody tr:nth-child(odd) {
  background: inherit;              /* let the module's own background show */
}
#fleetApp table tbody tr:hover {
  background: #334155;              /* consistent hover across all tables */
}

/* Trial countdown banner */
.trial-banner {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #0f172a;
  text-align: center;
  padding: 0.6rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 500;
}
.trial-banner-close {
  background: none;
  border: none;
  color: #0f172a;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  padding: 0 0.2rem;
}
.trial-banner-close:hover {
  opacity: 1;
}

