/* Fleet Management System - Modern Dashboard Styles (2026) */

:root {
  /* Taoyen Design System Color Palette */
  --primary: #0c1f3f;  /* Navy */
  --primary-light: #1a3a5c;
  --primary-dark: #071428;
  --secondary: #0d9488;  /* Teal */
  --secondary-light: #14b8a6;
  --success: #16a34a;  /* Green */
  --warning: #d97706;  /* Amber */
  --danger: #dc2626;  /* Red */
  --info: #0d9488;  /* Teal */

  /* Neutral Colors */
  --bg-primary: #fafafa;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f4f4f5;
  --text-primary: #18181b;
  --text-secondary: #71717a;
  --text-muted: #a1a1aa;
  --border: #e4e4e7;
  --border-light: #f4f4f5;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Spacing */
  --sidebar-width: 280px;
  --header-height: 64px;
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
}

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

body:not(.ty-app) {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dashboard Layout */
.dashboard-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Modern Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary); /* Navy - Taoyen Design System */
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1.25rem;
}

.sidebar-logo-image {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: var(--radius);
  padding: 0.5rem;
  background: white;
  box-shadow: var(--shadow);
}

.sidebar-title h1 {
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8 !important; /* Light slate - visible on navy */
  text-align: center;
  margin: 0;
  line-height: 1.3;
}

.sidebar-title p {
  font-size: 0.625rem;
  color: #64748b !important; /* Medium slate - visible on navy */
  text-align: center;
}

.sidebar-nav {
  flex: 1;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 2rem;
}

.nav-section-title {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8 !important; /* Light slate - visible on navy */
  padding: 0 0.75rem;
  margin-bottom: 0.75rem;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  color: #94a3b8 !important; /* Light slate for inactive links */
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  font-weight: 500;
  font-size: 0.875rem;
}

.nav-link:hover {
  background: #f1f5f9;
  color: #0c1f3f !important; /* Navy on hover */
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.15) 0%, rgba(13, 148, 136, 0.1) 100%);
  color: #0d9488 !important; /* Teal for active link */
  font-weight: 600;
}

.nav-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 500;
  font-size: 0.875rem;
  color: #1e293b !important; /* Dark slate */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.btn-logout {
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-logout:hover {
  background: #0d9488 !important; /* Dark teal - Taoyen Secondary */
  color: #ffffff !important; /* White text on hover */
  border-color: #0d9488;
}

/* Main Content Area */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Header */
.top-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.page-title h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #0c1f3f !important; /* Force Navy text - Taoyen Primary */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.btn-icon:hover {
  background: #0d9488 !important; /* Dark teal - Taoyen Secondary */
  color: #ffffff !important; /* White text on hover */
  border-color: #0d9488;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--danger);
  color: white;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-secondary);
}

/* Language Toggle Button */
.language-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem !important;
  width: 50px !important;
  height: 32px !important;
  min-width: 50px;
  background: var(--primary) !important;
  color: white !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px;
}

.language-toggle:hover {
  background: #0d9488 !important; /* Dark teal - Taoyen Secondary */
  color: #ffffff !important; /* Maintain white text */
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Dashboard Content */
.dashboard-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-body {
  padding: 1rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0c1f3f !important; /* Force Navy text - Taoyen Primary */
}

.mb-4 {
  margin-bottom: 1rem;
}

/* Form elements */
.form-input,
.form-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: border-color 0.15s ease;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group {
  margin-bottom: 1rem;
}

/* Utility classes */
.text-muted {
  color: var(--text-muted);
}


/* Welcome Section */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  color: white;
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.welcome-content {
  position: relative;
  z-index: 1;
}

.welcome-banner h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #ffffff !important; /* White text on navy background is correct */
}

.welcome-banner p {
  opacity: 0.9;
  font-size: 0.975rem;
  color: #ffffff !important; /* White text on navy background */
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: opacity 0.15s ease;
}

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

.stat-card:hover::before {
  opacity: 1;
}

.stat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.primary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.stat-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stat-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stat-icon svg {
  width: 18px;
  height: 18px;
}

.stat-change {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0c1f3f !important; /* Force Navy text - Taoyen Primary */
  margin-bottom: 0.25rem;
  line-height: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: #475569 !important; /* Medium slate - better contrast */
  font-weight: 500;
}

/* Quick Actions */
.quick-actions {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0c1f3f !important; /* Force Navy text - Taoyen Primary */
}

.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #1e293b !important; /* Force dark text - Taoyen Navy */
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-action:hover {
  background: #0d9488 !important; /* Dark teal - Taoyen Secondary */
  color: #ffffff !important; /* White text on hover */
  border-color: #0d9488;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-action svg {
  width: 16px;
  height: 16px;
}

/* Recent Activity */
.recent-activity {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.activity-item:hover {
  background: var(--border-light);
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.activity-icon.info {
  background: rgba(6, 182, 212, 0.1);
  color: var(--info);
}

.activity-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.activity-icon svg {
  width: 18px;
  height: 18px;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 500;
  color: #0c1f3f !important; /* Force Navy text - Taoyen Primary */
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Auth Container */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Navy → teal (Taoyen); was purple (#667eea / #764ba2) and looked off vs rest of app */
  background: linear-gradient(140deg, #0c1f3f 0%, #0a1830 42%, #115e59 72%, #0d9488 100%);
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* Position alerts at top-right of auth container */
.auth-container .alert {
  position: absolute;
  top: 2rem;
  right: 2rem;
  min-width: 300px;
  max-width: 400px;
  z-index: 10;
  margin: 0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  animation: pulse 15s ease-in-out infinite;
  will-change: transform;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(10%, 10%) scale(1.1);
  }
}

.auth-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 3rem 3.5rem;
  width: auto;
  max-width: 600px;
  flex: 0 0 auto;
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}

/* Wider auth card on larger screens */
@media (min-width: 1400px) {
  .auth-card {
    max-width: 640px;
  }
}

.auth-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, #5eead4 0%, #2dd4bf 35%, #0d9488 100%);
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0c1f3f;
  font-weight: 700;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.auth-title {
  font-family: "IBM Plex Sans", "Sarabun", -apple-system, sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0c1f3f;
  margin-bottom: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-subtitle {
  font-size: 0.975rem;
  color: #475569;
  font-weight: 400;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* Login card only — override global label / form-label for Taoyen marketing look */
.auth-card .form-label {
  font-family: "IBM Plex Sans", "Sarabun", -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0c1f3f;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: #1e293b; /* Dark slate - highly visible */
  background: #ffffff; /* Pure white background */
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(12, 31, 63, 0.1); /* Navy focus */
  color: #1e293b; /* Ensure text stays visible */
}

.form-input::placeholder {
  color: #64748b; /* Medium slate - better visibility */
}

/* Auth/Login specific form inputs with extra visibility */
.auth-card .form-input {
  color: #1e293b !important; /* Force dark text */
  background: #ffffff !important; /* Force white background */
  font-weight: 500; /* Slightly bolder for better readability */
}

.auth-card .form-input:focus {
  color: #1e293b !important; /* Maintain visibility on focus */
  border-color: #0d9488 !important;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22) !important;
}

.auth-card .form-input::placeholder {
  color: #64748b !important; /* Better placeholder visibility */
}

.auth-remember-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.auth-remember-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  flex: 0 0 auto;
}

.form-checkbox-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-card .form-checkbox-label {
  font-family: "IBM Plex Sans", "Sarabun", -apple-system, sans-serif;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #0c1f3f;
}

.form-actions {
  margin-top: 1.75rem;
}

/* Base button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.975rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow);
}

.btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.btn-block {
  display: block;
  width: 100%;
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  color: inherit;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}

.alert-close:hover {
  opacity: 1;
}

.error-list {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
  list-style-position: inside;
}

.error-list li {
  margin-bottom: 0.25rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .dashboard-content {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn-action {
    width: 100%;
  }

  .auth-card {
    padding: 1.5rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-card,
.activity-item,
.btn-action {
  animation: fadeIn 0.3s ease;
}

/* Enhanced Driver Stats Section */
.driver-stats-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.section-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  margin-top: 0.125rem;
}

/* Driver Summary Cards */
.driver-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.driver-summary-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.15s ease;
  border: 1px solid var(--border);
}

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

.driver-summary-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.driver-summary-active .driver-summary-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.driver-summary-leave .driver-summary-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.driver-summary-license .driver-summary-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.driver-summary-content {
  flex: 1;
}

.driver-summary-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  line-height: 1;
  margin-bottom: 0.25rem;
}

.driver-summary-label {
  font-size: 0.875rem;
  color: #475569 !important; /* Medium slate */
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.driver-summary-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.driver-summary-bar {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0.5rem;
}

.driver-summary-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.driver-summary-active .driver-summary-progress {
  background: linear-gradient(90deg, var(--success) 0%, #34d399 100%);
}

.driver-summary-leave .driver-summary-progress {
  background: linear-gradient(90deg, var(--warning) 0%, #fbbf24 100%);
}

/* Top Drivers Section */
.top-drivers-section {
  margin-top: 2rem;
}

.top-drivers-header {
  margin-bottom: 1rem;
}

.top-drivers-title {
  font-size: 1rem;
  font-weight: 600;
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  margin: 0 0 0.25rem 0;
}

.top-drivers-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.top-drivers-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.top-driver-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.top-driver-card:hover {
  background: var(--border-light);
  border-color: var(--border);
}

.top-driver-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.top-driver-rank.rank-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.top-driver-rank.rank-silver {
  background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(209, 213, 219, 0.3);
}

.top-driver-rank.rank-bronze {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.top-driver-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.top-driver-info {
  flex: 1;
  min-width: 0;
}

.top-driver-name {
  font-weight: 600;
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  font-size: 0.875rem;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-driver-vehicle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.top-driver-stats {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.top-driver-trips {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.top-driver-trips-count {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.top-driver-trips-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.license-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  white-space: nowrap;
}

.license-badge.license-valid {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.license-badge.license-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.license-badge.license-expired {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* No Drivers Message */
.no-drivers-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.no-drivers-message svg {
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-drivers-message p {
  margin: 0;
  font-size: 0.875rem;
}

.no-drivers-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Driver Alerts */
.driver-alerts {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius);
}

.driver-alerts-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--danger);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.driver-alerts-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.driver-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
}

.driver-alert-critical {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
}

.driver-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.driver-alert-info {
  background: rgba(6, 182, 212, 0.1);
  color: #0e7490;
}

.driver-alert-count {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: currentColor;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.driver-alert-text {
  flex: 1;
  font-weight: 500;
}

/* Responsive Design for Driver Overview */
@media (max-width: 1024px) {
  .driver-summary-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .driver-summary-cards {
    grid-template-columns: 1fr;
  }

  .top-driver-stats {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
  }

  .section-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .driver-alerts {
    padding: 0.75rem;
  }
}

/* Notification Bell Component */
.notification-bell-wrapper {
  position: relative;
  display: inline-block;
}

.btn-icon {
  position: relative;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--text-primary);
}

.notification-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  text-align: center;
}

/* Notification Dropdown */
.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 360px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin-top: 0.5rem;
  z-index: 1000;
}

.notification-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.notification-dropdown-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.mark-read-link {
  font-size: 0.75rem;
  color: var(--secondary);
  text-decoration: none;
}

.mark-read-link:hover {
  text-decoration: underline;
}

.notification-dropdown-content {
  max-height: 400px;
  overflow-y: auto;
}

.notification-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border);
  border-top-color: var(--secondary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.notification-list {
  display: block;
}

.notification-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
}

.notification-item:hover {
  background: var(--bg-tertiary);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item.unread {
  background: var(--bg-tertiary);
  border-left: 3px solid var(--secondary);
}

.notification-item.read {
  opacity: 0.8;
}

.notification-item-content {
  flex: 1;
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.notification-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
}

.notification-time {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.notification-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.notification-indicator {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--secondary);
  border-radius: 50%;
  margin-left: 0.75rem;
  margin-top: 0.25rem;
  flex-shrink: 0;
}

.notification-empty {
  padding: 2rem;
  text-align: center;
}

.notification-empty p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.notification-error {
  padding: 2rem;
  text-align: center;
  color: var(--danger);
  font-size: 0.875rem;
}

.notification-dropdown-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.view-all-link {
  font-size: 0.875rem;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
}

.view-all-link:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════════════════════════════════
   UNIVERSAL FORM STYLING - Taoyen Heritage Color System
   Applies to ALL pages consistently
════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════
   FORMS - Consistent Across All Pages
   ═══════════════════════════════════════════════════════════════════ */

/* All form labels - ensure visibility */
.form-label,
label,
.content h2,
.content h3,
.field label,
.control label {
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  font-weight: 500;
  display: block;
  margin-bottom: 0.5rem;
}

/* All form inputs - ensure visibility */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
select,
textarea,
.form-input,
.form-select,
.form-textarea {
  color: #1e293b !important; /* Dark slate - highly visible */
  background: #ffffff !important; /* Pure white background */
  border: 1px solid #cbd5e1;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

input:focus,
select:focus,
textarea:focus,
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: #0d9488 !important; /* Teal focus */
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1) !important;
  color: #1e293b !important; /* Maintain text visibility */
}

/* Form placeholders */
input::placeholder,
textarea::placeholder,
.form-input::placeholder,
.form-textarea::placeholder {
  color: #64748b !important; /* Medium slate - visible but subtle */
}

/* Required field indicators */
.form-label .required,
label .required,
label span.required {
  color: #dc2626 !important; /* Red for required fields */
}

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS - Consistent Hover Effects Across All Pages
   ═══════════════════════════════════════════════════════════════════ */

/* Primary — teal (main CTA); hover = darker teal */
.btn-primary,
input[type="submit"].btn-primary {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border: 1px solid #0f766e !important;
  transition: all 0.15s ease;
}

.btn-primary:hover,
input[type="submit"].btn-primary:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important;
  background-color: #0f766e !important;
  color: #ffffff !important;
  border-color: #115e59 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Secondary — navy (supporting); hover = darker navy */
.btn-secondary,
a.btn-secondary {
  background: linear-gradient(135deg, #0c1f3f 0%, #0a1830 100%) !important;
  background-color: #0c1f3f !important;
  color: #ffffff !important;
  border: 1px solid #0a1830 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover,
a.btn-secondary:hover {
  background: linear-gradient(135deg, #0a1830 0%, #081426 100%) !important;
  background-color: #0a1830 !important;
  color: #ffffff !important;
  border-color: #081426 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Toolbar, form header, index header/actions — navy #0c1f3f → teal #0d9488 hover (primary + secondary) */
.form-page-header .btn.btn-secondary,
.resource-show-toolbar .btn.btn-secondary,
.maintenance-show-toolbar .btn.btn-secondary,
.page-header-enhanced .page-actions .btn.btn-secondary,
.page-header-enhanced .page-actions .btn.btn-primary,
.page-header .page-actions .btn.btn-secondary,
.page-header .page-actions .btn.btn-primary,
.notifications-actions .btn.btn-secondary,
.notifications-actions .btn.btn-primary,
.ty-content-wrapper .form-page-header .btn.btn-secondary,
/* PM dashboard header CTA */
.fms-dashboard-header .btn.btn-secondary,
.fms-dashboard-header .btn.btn-primary,
/* Index empty-state CTAs */
.vehicles-page .empty-state .btn.btn-primary,
.vehicles-page .empty-state-enhanced .btn.btn-primary,
.shops-page .empty-state .btn.btn-primary,
.work-orders-page .empty-state .btn.btn-primary,
.trips-page .empty-state .btn.btn-primary,
.trips-page .empty-state-enhanced .btn.btn-primary,
.maintenances-index .maintenances-empty .btn.btn-primary,
.pm-templates-index .btn.btn-primary,
.quotations-compare-page .empty-state .btn.btn-primary,
/* Index / compare filter bars (search, Filter submit) */
.filters-card .btn.btn-secondary,
.filters-card .btn.btn-primary,
.filters-card input[type="submit"].btn-secondary,
.filters-card input[type="submit"].btn-primary,
.filters-card button[type="submit"].btn-secondary,
.filters-card button[type="submit"].btn-primary {
  background: linear-gradient(135deg, #0c1f3f 0%, #0a1830 100%) !important;
  background-color: #0c1f3f !important;
  color: #ffffff !important;
  border: 1px solid #0a1830 !important;
}

.form-page-header .btn.btn-secondary:hover,
.resource-show-toolbar .btn.btn-secondary:hover,
.maintenance-show-toolbar .btn.btn-secondary:hover,
.page-header-enhanced .page-actions .btn.btn-secondary:hover,
.page-header-enhanced .page-actions .btn.btn-primary:hover,
.page-header .page-actions .btn.btn-secondary:hover,
.page-header .page-actions .btn.btn-primary:hover,
.notifications-actions .btn.btn-secondary:hover,
.notifications-actions .btn.btn-primary:hover,
.ty-content-wrapper .form-page-header .btn.btn-secondary:hover,
.fms-dashboard-header .btn.btn-secondary:hover,
.fms-dashboard-header .btn.btn-primary:hover,
.vehicles-page .empty-state .btn.btn-primary:hover,
.vehicles-page .empty-state-enhanced .btn.btn-primary:hover,
.shops-page .empty-state .btn.btn-primary:hover,
.work-orders-page .empty-state .btn.btn-primary:hover,
.trips-page .empty-state .btn.btn-primary:hover,
.trips-page .empty-state-enhanced .btn.btn-primary:hover,
.maintenances-index .maintenances-empty .btn.btn-primary:hover,
.pm-templates-index .btn.btn-primary:hover,
.quotations-compare-page .empty-state .btn.btn-primary:hover,
.filters-card .btn.btn-secondary:hover,
.filters-card .btn.btn-primary:hover,
.filters-card input[type="submit"].btn-secondary:hover,
.filters-card input[type="submit"].btn-primary:hover,
.filters-card button[type="submit"].btn-secondary:hover,
.filters-card button[type="submit"].btn-primary:hover {
  background: #0d9488 !important;
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border-color: #0d9488 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Action buttons - White background, Teal hover */
.btn-action,
a.btn-action {
  background: #ffffff !important;
  color: #1e293b !important; /* Dark text */
  border: 1px solid #e4e4e7 !important;
}

.btn-action:hover,
a.btn-action:hover {
  background: #0d9488 !important; /* Teal on hover */
  color: #ffffff !important; /* White text */
  border-color: #0d9488 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Form submit buttons (unclassed) — match primary teal */
input[type="submit"]:not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.btn-danger):not(.btn-success),
button[type="submit"]:not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.btn-danger):not(.btn-success) {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border: none !important;
  cursor: pointer;
  transition: all 0.15s ease;
}

input[type="submit"]:not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.btn-danger):not(.btn-success):hover,
button[type="submit"]:not(.btn-primary):not(.btn-secondary):not(.btn-outline):not(.btn-danger):not(.btn-success):hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important;
  background-color: #0f766e !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Outline buttons */
.btn-outline {
  background: transparent !important;
  color: #0c1f3f !important; /* Navy text */
  border: 2px solid #0c1f3f !important;
}

.btn-outline:hover {
  background: #0d9488 !important; /* Teal on hover */
  color: #ffffff !important; /* White text */
  border-color: #0d9488 !important;
}

/* Danger buttons */
.btn-danger,
.btn-delete {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-danger:hover,
.btn-delete:hover {
  background: #991b1b !important; /* Darker red */
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Success buttons */
.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

.btn-success:hover {
  background: #15803d !important; /* Darker green */
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════
   PAGE HEADINGS & TITLES - Consistent Across All Pages
   ═══════════════════════════════════════════════════════════════════ */

/* All page titles */
h1, h2, h3, h4, h5, h6,
.page-title h1, .page-title h2,
.card-title, .section-title,
.content h1, .content h2, .content h3 {
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  font-weight: 600;
}

/* Page headers */
.page-header h1,
.page-header h2,
.page-header h3 {
  color: #0c1f3f !important; /* Navy */
}

/* Card headers */
.card-header h2,
.card-header h3,
.card-header .card-title {
  color: #0c1f3f !important; /* Navy */
}

/* ═══════════════════════════════════════════════════════════════════
   TABLES - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

/* Table headers */
table th,
.data-table th,
.table th {
  color: #0c1f3f !important; /* Navy */
  background: #f1f5f9 !important; /* Light slate background */
  font-weight: 600;
}

/* Table cells */
table td,
.data-table td,
.table td {
  color: #1e293b !important; /* Dark slate */
  border-bottom-color: #e2e8f0 !important;
}

/* Table rows hover */
table tbody tr:hover,
.data-table tbody tr:hover,
.table tbody tr:hover {
  background: #f1f5f9 !important; /* Light slate on hover */
}

/* ═══════════════════════════════════════════════════════════════════
   BADGES & TAGS - Consistent Colors
   ═══════════════════════════════════════════════════════════════════ */

.badge,
.badge-primary,
.badge-secondary,
.badge-success,
.badge-warning,
.badge-danger,
.badge-info,
.badge-light,
.badge-dark {
  color: #1e293b !important; /* Ensure text visibility */
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   LINKS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

a,
.link,
.action-link {
  color: #0d9488 !important; /* Teal - Taoyen Secondary */
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover,
.link:hover,
.action-link:hover {
  color: #0f766e !important; /* Darker teal */
  text-decoration: underline;
}

/* Sidebar links */
.sidebar .nav-link,
.sidebar-link {
  color: #94a3b8 !important; /* Light slate on navy */
}

.sidebar .nav-link:hover,
.sidebar-link:hover {
  color: #0c1f3f !important; /* Navy on hover */
  background: #f1f5f9 !important;
}

.sidebar .nav-link.active,
.sidebar-link.active {
  color: #ffffff !important; /* White on active teal background */
  background: #0d9488 !important; /* Teal */
}

/* ═══════════════════════════════════════════════════════════════════
   CARDS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.card,
.stat-card,
.info-card {
  background: #ffffff !important; /* White background */
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important; /* Dark text */
}

.card-header,
.card-head {
  background: #f1f5f9 !important; /* Light slate background */
  border-bottom: 1px solid #e2e8f0 !important;
}

.card-header h2,
.card-header h3,
.card-head h2 {
  color: #0c1f3f !important; /* Navy */
}

/* ═══════════════════════════════════════════════════════════════════
   TEXT & PARAGRAPHS - Consistent Visibility
   ═══════════════════════════════════════════════════════════════════ */

p, span, div, li, td, th {
  color: #1e293b !important; /* Dark slate - default text color */
}

/* Special text elements */
.text-muted,
.text-secondary,
.subtitle,
.meta {
  color: #64748b !important; /* Medium slate */
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS & NOTIFICATIONS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.alert,
.notification,
.flash {
  color: #1e293b !important; /* Dark text */
}

.alert-success {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #166534 !important; /* Dark green text */
}

.alert-danger,
.alert-error {
  background: #fef2f2 !important;
  border-color: #fecaca !important;
  color: #991b1b !important; /* Dark red text */
}

.alert-warning,
.alert-notice {
  background: #fffbeb !important;
  border-color: #fde68a !important;
  color: #92400e !important; /* Dark amber text */
}

.alert-info {
  background: #eff6ff !important;
  border-color: #bfdbfe !important;
  color: #1e40af !important; /* Dark blue text */
}

/* ═══════════════════════════════════════════════════════════════════
   DROPDOWN & SELECT MENUS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

select,
.form-select,
.dropdown-menu {
  color: #1e293b !important; /* Dark text */
  background: #ffffff !important; /* White background */
}

select option,
.dropdown-menu a {
  color: #1e293b !important; /* Dark text */
  background: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PAGINATION - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.pagination a,
.pagination span,
.pagination .page,
.pagination .prev,
.pagination .next {
  color: #0c1f3f !important; /* Navy */
  border-color: #e2e8f0 !important;
}

.pagination a:hover,
.pagination .current {
  background: #0d9488 !important; /* Teal */
  color: #ffffff !important;
  border-color: #0d9488 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   TABS & NAVIGATION TABS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.tabs,
.nav-tabs,
.tab-nav {
  border-bottom-color: #e2e8f0 !important;
}

.tab,
.nav-tab,
.tab-link {
  color: #64748b !important; /* Medium slate */
}

.tab:hover,
.nav-tab:hover,
.tab-link:hover {
  color: #0c1f3f !important; /* Navy */
  border-bottom-color: #0d9488 !important;
}

.tab.active,
.nav-tab.active,
.tab-link.active {
  color: #0d9488 !important; /* Teal */
  border-bottom-color: #0d9488 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PROGRESS BARS & STATUS INDICATORS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.progress-bar,
.progress {
  background: #e2e8f0 !important;
}

.progress-bar-fill {
  background: #0d9488 !important; /* Teal */
}

/* ═══════════════════════════════════════════════════════════════════
   MODALS & DIALOGS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.modal,
.dialog,
.popup {
  background: #ffffff !important;
  color: #1e293b !important;
}

.modal-header,
.dialog-header {
  background: #f1f5f9 !important;
  border-bottom-color: #e2e8f0 !important;
}

.modal-header h3,
.dialog-header h3 {
  color: #0c1f3f !important; /* Navy */
}

/* ═══════════════════════════════════════════════════════════════════
   TOOLBAR & ACTION BARS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.toolbar,
.action-bar,
.page-actions {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATES - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.empty-state,
.no-data,
.no-results {
  color: #64748b !important; /* Medium slate */
}

.empty-state h3,
.no-data h3,
.no-results h3 {
  color: #0c1f3f !important; /* Navy */
}

/* ═══════════════════════════════════════════════════════════════════
   BREADCRUMBS - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

.breadcrumb,
.breadcrumbs {
  color: #64748b !important; /* Medium slate */
}

.breadcrumb a,
.breadcrumbs a {
  color: #0d9488 !important; /* Teal */
}

.breadcrumb a:hover {
  color: #0f766e !important; /* Darker teal */
}

/* ═══════════════════════════════════════════════════════════════════
   CODE & PRE - Consistent Styling
   ═══════════════════════════════════════════════════════════════════ */

code,
pre,
.code {
  color: #0c1f3f !important; /* Navy */
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE TABLES - Mobile Fix
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  /* Ensure mobile visibility */
  .card,
  .stat-card,
  .info-card {
    background: #ffffff !important;
    color: #1e293b !important;
  }

  /* Mobile buttons */
  .btn,
  button,
  input[type="submit"] {
    min-height: 44px; /* Touch-friendly */
  }
}

/* ═══════════════════════════════════════════════════════════════════
   NAVIGATION BUTTONS - Fix for Back/Cancel buttons
   ═══════════════════════════════════════════════════════════════════ */

/* Taoyen app shell navigation buttons - override with higher specificity */
.ty-app-shell .workflow-topnav .nav-logout-btn,
.ty-app-shell .workflow-topnav .nav-back-btn,
.ty-app-shell .workflow-topnav .nav-cancel-btn,
.ty-app-shell .top-nav .btn,
.ty-app-shell .header .btn,
.ty-app .workflow-topnav .nav-logout-btn,
.ty-app .workflow-topnav .nav-back-btn,
.ty-app .workflow-topnav .nav-cancel-btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border: 1px solid #0f766e !important;
}

.ty-app-shell .workflow-topnav .nav-logout-btn:hover,
.ty-app-shell .workflow-topnav .nav-back-btn:hover,
.ty-app-shell .workflow-topnav .nav-cancel-btn:hover,
.ty-app-shell .top-nav .btn:hover,
.ty-app-shell .header .btn:hover,
.ty-app .workflow-topnav .nav-logout-btn:hover,
.ty-app .workflow-topnav .nav-back-btn:hover,
.ty-app .workflow-topnav .nav-cancel-btn:hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important;
  background-color: #0f766e !important;
  color: #ffffff !important;
  border-color: #115e59 !important;
}

/* Fallback for non-Taoyen pages */
.nav-logout-btn:not(.ty-app-shell *),
.nav-back-btn:not(.ty-app-shell *),
.nav-cancel-btn:not(.ty-app-shell *),
.top-nav .btn:not(.ty-app-shell *),
.header .btn:not(.ty-app-shell *) {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  background-color: #0d9488 !important;
  color: #ffffff !important;
  border: 1px solid #0f766e !important;
}

.nav-logout-btn:not(.ty-app-shell *):hover,
.nav-back-btn:not(.ty-app-shell *):hover,
.nav-cancel-btn:not(.ty-app-shell *):hover,
.top-nav .btn:not(.ty-app-shell *):hover,
.header .btn:not(.ty-app-shell *):hover {
  background: linear-gradient(135deg, #0f766e 0%, #115e59 100%) !important;
  background-color: #0f766e !important;
  color: #ffffff !important;
  border-color: #115e59 !important;
}

/* Navigation links that look like buttons */
.top-nav a.btn,
.header a.btn {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  color: #ffffff !important;
  border: none !important;
}

/* ═══════════════════════════════════════════════════════════════════
   FMS PAGE TITLES - Specific Fix
   ═══════════════════════════════════════════════════════════════════ */

.fms-page-title,
.page-title h1,
.page-title h2,
.page-title h3,
.content h1,
.content h2,
.content h3 {
  color: #0c1f3f !important; /* Navy - Taoyen Primary */
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   FMS-SPECIFIC ELEMENTS
   ═══════════════════════════════════════════════════════════════════ */

/* Form containers */
.fms-form,
.form-container,
.edit-form,
.new-form {
  background: #ffffff !important;
  color: #1e293b !important;
}

/* Form sections */
.form-section,
.card-section,
.form-block {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* Action button bars */
.form-actions,
.button-bar,
.action-buttons {
  background: #ffffff !important;
  border-top-color: #e2e8f0 !important;
}

/* FMS cards */
.fms-card,
.info-card,
.data-card {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  color: #1e293b !important;
}

/* FMS tables */
.fms-table,
.data-table {
  background: #ffffff !important;
  color: #1e293b !important;
}

.fms-table th,
.fms-table thead th {
  background: #f1f5f9 !important;
  color: #0c1f3f !important; /* Navy */
  border-bottom-color: #e2e8f0 !important;
}

.fms-table td,
.fms-table tbody td {
  color: #1e293b !important; /* Dark slate */
  border-bottom-color: #e2e8f0 !important;
}
