:root {
  --primary: #1e3a8a;     /* Deep blue */
  --primary-light: #3b82f6;
  --danger:#ff0000;
  --warning: #FFA500;
  --grey: #f3f4f6;
  --grey-dark: #1f2937;
  --text: #111827;
  --text-light: #ffffff;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  --radius: 1rem;
}

body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: var(--grey);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
}

/* Top header */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  padding: 0.5rem 1rem;
  color: white;
  position: sticky;
  top: 0;
  z-index: 999;
}

.logo {
  height: 40px;
  max-height: 100%;
}

.desktop-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.desktop-nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
}

.logout {
  background: red;
  padding: 0.3rem 0.7rem;
  border-radius: 0.5rem;
  color: white;
}

/* Hide desktop nav on mobile */
@media (max-width: 1023px) {
  .desktop-nav {
    display: none;
  }
}


/* Vehicle Cards */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin: 1rem;
}

.card strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.card form {
    display: inline-block;
}

.service-row {
  background: #f9fafb;
  padding: 0.5rem;
  margin: 0.5rem 0;
  border-radius: 0.5rem;
}

/* Buttons */
.btn {
  background: var(--primary);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  display: inline-block;
  cursor:pointer;
}

.btn.secondary {
  background: #e5e7eb;
  color: #111827;
}

.btn.warning{
    background: var(--warning);
    border:0;
}

.btn.danger{
    background: var(--danger);
    border:0;
}

.badge.overdue {
  background: red;
  color: white;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.5rem;
}

/* Dark mode */
body.dark {
  background: var(--grey-dark);
  color: var(--text-light);
}

body.dark .card {
  background: #374151;
  color: white;
}

body.dark .service-row {
  background: #4b5563;
}

body.dark .btn.secondary {
  background: #9ca3af;
  color: black;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--primary);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0 30px;
  z-index: 1000;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.nav-item {
  color: white;
  text-align: center;
  font-size: 1.2rem;
  text-decoration: none;
  flex: 1;
  transition: background 0.2s ease;
}

.nav-item span {
  display: block;
  font-size: 0.7rem;
  margin-top: 0.15rem;
}

.nav-item.active {
  background: var(--primary-light);
  font-weight: bold;
  border-radius: 0.5rem;
}

body {
  padding-bottom: 77px; /* space for sticky bottom nav */
}

/* Hide on desktop */
@media (min-width: 1024px) {
  .bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0; /* space for sticky bottom nav */
  }

}

/* logout modal */

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 1.5rem;
  border-radius: var(--radius);
  max-width: 350px;
  text-align: center;
}

body.dark .modal-content {
  background: #374151;
  color: white;
}

/* Form Styling */
form label {
  font-weight: 500;
  display: block;
  margin-top: 1rem;
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 0.6rem;
  margin-top: 0.3rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
  box-sizing: border-box;
}

form select[multiple] {
  height: auto;
  min-height: 120px;
  background: #f9fafb;
}

/* Dark mode form fields */
body.dark form input,
body.dark form select,
body.dark form textarea {
  background: #4b5563;
  color: white;
  border-color: #6b7280;
}

.service-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.service-modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  position: relative;
  z-index: 10000;
  animation: fadeInUp 0.3s ease;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* Optional smooth animation */
@keyframes fadeInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


.service-row.highlight {
    animation: flash-bg 2s ease-in-out;
}

@keyframes flash-bg {
    0% { background-color: #ffffcc; }
    100% { background-color: transparent; }
}


/* login form */
.form-group.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-color, #333); /* fallback for dark/light mode */
}

.form-group.remember-me input[type="checkbox"] {
    accent-color: #007BFF; /* Bootstrap-style blue for modern look */
    width: 18px;
    height: 18px;
    cursor: pointer;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    border: none;
    border-radius: 0;
    background: none;
    box-shadow: none;
    display: inline-block;
    vertical-align: middle;
}

.form-group.remember-me label {
    cursor: pointer;
    user-select: none;
    color: inherit;
    margin: 0;
}

/* Optional: smaller gap between checkbox and label */
form .form-group.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

tr.highlight-current {
    background-color: #e6f7ff;
}

