:root {
  --brand-teal: #005462;
  --brand-teal-dark: #003f49;
  --brand-green: #4faf2f;
  --brand-green-dark: #2e8d24;
  --brand-ink: #18343a;
  --brand-surface: #f4f8f7;
  --brand-line: #d8e6e3;
}

html { font-size: 16px; }
body {
  background: var(--brand-surface);
  color: var(--brand-ink);
  margin-bottom: 0;
  min-height: 100vh;
}
a { color: var(--brand-teal); }
a:hover { color: var(--brand-green-dark); }
.btn-success {
  background: var(--brand-green);
  border-color: var(--brand-green);
}
.btn-success:hover,
.btn-success:focus {
  background: var(--brand-green-dark);
  border-color: var(--brand-green-dark);
}
.btn-outline-primary {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}
.btn-outline-primary:hover {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}
.app-nav {
  background: #fff;
  box-shadow: 0 1px 14px rgba(0, 84, 98, .12);
}
.brand-lockup {
  align-items: center;
  color: var(--brand-teal-dark);
  display: inline-flex;
  font-weight: 800;
  gap: .65rem;
}
.brand-lockup img {
  height: 44px;
  object-fit: contain;
  width: 44px;
}
.navbar-nav .nav-link {
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.navbar-nav .nav-link:hover {
  border-bottom-color: var(--brand-green);
  color: var(--brand-teal-dark) !important;
}
.app-shell { padding-top: 1.25rem; }
.hero-band {
  background: linear-gradient(112deg, var(--brand-teal) 0%, #006b72 46%, var(--brand-green) 100%);
  border-radius: 8px;
  color: #fff;
  padding: 1.4rem;
  box-shadow: 0 12px 26px rgba(0, 84, 98, .16);
}
.auth-logo-panel {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: center;
}
.auth-logo-panel img {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 150px;
  max-width: 320px;
  object-fit: contain;
  width: auto;
}
.auth-logo-panel p {
  color: #48666b;
  margin: .85rem auto 0;
  max-width: 620px;
}
.metric {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  border-top: 4px solid var(--brand-green);
  padding: 1rem;
  height: 100%;
}
.metric-link {
  color: inherit;
  display: block;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.metric-link:hover {
  border-top-color: var(--brand-teal);
  color: inherit;
  transform: translateY(-1px);
}
.metric strong {
  color: var(--brand-teal);
  display: block;
  font-size: 1.8rem;
  line-height: 1.1;
}
.panel {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(24, 52, 58, .04);
}
.fleet-admin-grid {
  display: grid;
  gap: 1.25rem;
}
.entry-grid {
  display: grid;
  gap: .8rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.entry-grid-wide,
.entry-grid-actions {
  grid-column: 1 / -1;
}
.entry-grid .form-label {
  color: var(--brand-teal-dark);
  font-size: .82rem;
  font-weight: 800;
  margin-bottom: .3rem;
}
.entry-grid .btn {
  min-height: 42px;
}
.edit-panel {
  background: #f7fbfa;
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand-green);
  border-radius: 8px;
  padding: 1rem;
}
.records-disclosure {
  margin-top: .75rem;
}
.records-disclosure summary {
  color: var(--brand-teal);
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  margin-bottom: .75rem;
}
.records-disclosure summary:hover {
  color: var(--brand-green-dark);
}
.fleet-table-wrap {
  border: 1px solid var(--brand-line);
  border-radius: 8px;
}
.fleet-table {
  font-size: .9rem;
  margin-bottom: 0;
  min-width: 860px;
}
.fleet-table th {
  background: #f7fbfa;
  border-bottom-color: #a8c5bf;
  color: var(--brand-teal-dark);
  font-size: .78rem;
  letter-spacing: .02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.fleet-table td {
  white-space: nowrap;
}
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--brand-green);
  box-shadow: 0 0 0 .2rem rgba(79, 175, 47, .18);
}
.form-check-input:checked {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}
.status-pill {
  border-radius: 999px;
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .25rem .55rem;
}
.status-pass { background: #e7f6df; color: #2e7d20; }
.status-defect { background: #fef3c7; color: #92400e; }
.status-grounded { background: #fee2e2; color: #991b1b; }
.check-accordion {
  display: grid;
  gap: .8rem;
}
.check-section {
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(24, 52, 58, .04);
}
.check-section-heading {
  margin: 0;
}
.check-section-toggle {
  align-items: center;
  background: #fff;
  border: 0;
  color: var(--brand-ink);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: 1rem;
  text-align: left;
  width: 100%;
}
.check-section-toggle:not(.collapsed) {
  background: linear-gradient(112deg, rgba(0, 84, 98, .08), rgba(79, 175, 47, .12));
  border-bottom: 1px solid var(--brand-line);
}
.check-section-toggle small {
  color: var(--brand-teal);
  display: block;
  font-weight: 700;
  margin-bottom: .15rem;
  text-transform: uppercase;
}
.check-section-count {
  background: #e7f6df;
  border-radius: 999px;
  color: var(--brand-green-dark);
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 800;
  padding: .28rem .55rem;
}
.check-section-body {
  padding: 1rem;
}
.check-row {
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand-teal);
  border-radius: 8px;
  margin-bottom: .75rem;
  padding: .85rem;
  background: #fff;
}
.check-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.check-actions label {
  border: 1px solid #b8cfca;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  padding: .65rem;
  text-align: center;
  font-weight: 700;
}
.check-actions label:hover { border-color: var(--brand-green); }
.check-actions input { display: none; }
.check-actions input:checked + span.ok { color: var(--brand-green-dark); }
.check-actions input:checked + span.defect { color: #991b1b; }
.mobile-form {
  max-width: 760px;
  margin: 0 auto;
}
.selection-preview {
  align-items: center;
  background: #f7fbfa;
  border: 1px solid var(--brand-line);
  border-radius: 8px;
  color: #48666b;
  display: flex;
  gap: .75rem;
  min-height: 76px;
  padding: .55rem;
}
.selection-preview img {
  border: 1px solid #b8cfca;
  border-radius: 6px;
  height: 60px;
  object-fit: cover;
  width: 82px;
}
.selection-preview span {
  font-size: .9rem;
}
.table td, .table th { vertical-align: middle; }
.fleet-thumb {
  border: 1px solid var(--brand-line);
  border-radius: 6px;
  height: 44px;
  object-fit: cover;
  width: 64px;
}
.footer-brand {
  align-items: center;
  display: flex;
  gap: .65rem;
  padding-bottom: .65rem;
  padding-top: .65rem;
}
.footer-brand img {
  height: 32px;
  object-fit: contain;
  width: 32px;
}
.notification-bell {
  align-items: center;
  background: #e7f6df;
  border: 1px solid rgba(79, 175, 47, .35);
  border-radius: 999px;
  color: var(--brand-teal-dark);
  display: inline-flex;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  position: relative;
  text-decoration: none;
  width: 32px;
}
.notification-bell:hover {
  color: var(--brand-teal-dark);
}
.notification-bell svg {
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 18px;
}
.notification-bell strong {
  align-items: center;
  background: #dc2626;
  border-radius: 999px;
  color: #fff;
  display: flex;
  font-size: .7rem;
  height: 18px;
  justify-content: center;
  line-height: 1;
  min-width: 18px;
  padding: 0 .25rem;
  position: absolute;
  right: -7px;
  top: -7px;
}
.notification-list {
  display: grid;
  gap: .8rem;
}
.notification-item {
  align-items: start;
  border: 1px solid var(--brand-line);
  border-left: 4px solid var(--brand-line);
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  padding: .9rem;
}
.notification-unread {
  border-left-color: var(--brand-green);
  background: #fbfef9;
}
.notification-item p {
  margin: .25rem 0;
}
.notification-actions {
  display: flex;
  flex: 0 0 auto;
  gap: .5rem;
}
@media (max-width: 576px) {
  .hero-band { margin-left: -.25rem; margin-right: -.25rem; }
  .app-shell { padding-top: .75rem; }
  .brand-lockup img { height: 38px; width: 38px; }
  .auth-logo-panel img { max-width: 86%; }
  .notification-item {
    display: block;
  }
  .notification-actions {
    margin-top: .75rem;
  }
  .entry-grid {
    grid-template-columns: 1fr;
  }
}
