:root{ --bg:#0b0f14; --panel:#0f1621; --ink:#e6edf3; --muted:#9fb3c8; --teal:#20c997; --border:rgba(255,255,255,.10);}
body{ background:var(--bg); color:var(--ink); }
.navbar{ background:#081018; border-bottom:1px solid var(--border); }
.card{ background:var(--panel); border:1px solid var(--border); border-radius:18px; }
.table{ --bs-table-bg:transparent; }
.table td,.table th{ border-top-color:rgba(255,255,255,.08); }
.table thead th{ border-bottom-color:rgba(255,255,255,.12); color:var(--muted); font-weight:700; }
.form-control,.form-select{ background:#0b1220; color:var(--ink); border-color:rgba(255,255,255,.14); border-radius:14px; }
.form-control:focus,.form-select:focus{ box-shadow:none; border-color:var(--teal); }
.btn-teal{ background:var(--teal); border-color:var(--teal); color:#062a23; font-weight:900; border-radius:14px; }
.btn-teal:hover{ filter:brightness(.95); color:#062a23; }
.badge-soft{ background:rgba(32,201,151,.14); color:#74ffd6; border:1px solid rgba(32,201,151,.25); border-radius:999px; }
.text-muted{ color:var(--muted)!important; }
a{ color:#7ee2c2; text-decoration:none; }
a:hover{ color:#a7ffe3; text-decoration:underline; }
.thumb{ width:72px; height:72px; object-fit:cover; border-radius:14px; border:1px solid rgba(255,255,255,.12); background:#0b1220; }
.gallery-thumb{ width:150px; height:150px; object-fit:cover; border-radius:16px; border:1px solid rgba(255,255,255,.12); background:#0b1220; }
.kpi{ font-size:2.1rem; font-weight:900; letter-spacing:-.02em; }
.code{ font-family: ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace; }


.actionbar{
  position: sticky;
  top: 62px;
  z-index: 1020;
  backdrop-filter: blur(10px);
  background: rgba(11,15,20,.72);
  border: 1px solid var(--border);
  border-radius: 18px;
}
.card-car{ transition: transform .08s ease; }
.card-car:active{ transform: scale(.99); }
.modal-fullscreen .modal-content{ background: rgba(8,12,18,.98); color: var(--ink); }
.viewer-img{
  width: 100%;
  height: 70vh;
  object-fit: contain;
  background: #05080c;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
}
.inline-pill{
  display:inline-flex; align-items:center; gap:.35rem;
  padding:.15rem .55rem; border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(15,22,33,.65);
  font-size:.85rem;
}
.inline-pill button{
  border:none; background:transparent; color:inherit; padding:0 .2rem;
}
.table thead th{ white-space:nowrap; }
/* Mobile readability: labels + placeholders */
.form-label,
label{
  color: rgba(231,238,252,.90) !important;
}

.form-control,
.form-select,
textarea,
input{
  color: #e7eefc !important;            /* typed text */
  background: #0b162f !important;
  border-color: rgba(255,255,255,.18) !important;
}

/* Placeholder text (the “Name *”, “2025”, etc.) */
.form-control::placeholder,
textarea::placeholder,
input::placeholder{
  color: rgba(231,238,252,.55) !important;
  opacity: 1 !important;               /* critical on mobile */
}

/* Extra mobile browser placeholder selectors */
::-webkit-input-placeholder{ color: rgba(231,238,252,.55) !important; opacity:1 !important; }
::-moz-placeholder{ color: rgba(231,238,252,.55) !important; opacity:1 !important; }
:-ms-input-placeholder{ color: rgba(231,238,252,.55) !important; opacity:1 !important; }

/* Focus state */
.form-control:focus,
.form-select:focus{
  border-color: #34d399 !important;
  box-shadow: 0 0 0 .2rem rgba(52,211,153,.15) !important;
}

/* If you’re using floating labels */
.form-floating > label{
  color: rgba(231,238,252,.75) !important;
}
/* Make Bootstrap component text match our dark UI */
:root{
  --bs-body-bg: #0b1220;
  --bs-body-color: #e7eefc;
  --bs-body-color-rgb: 231,238,252;

  /* “muted/secondary” text that is still readable */
  --bs-secondary-color: rgba(231,238,252,.78);
  --bs-tertiary-color: rgba(231,238,252,.65);
  --bs-emphasis-color: #ffffff;

  /* Cards use these vars */
  --bs-card-color: #e7eefc;
  --bs-card-cap-color: #e7eefc;
}

/* Critical: Bootstrap .card sets its own color; force it */
.card,
.card *{
  color: inherit;
}

.card,
.modal-content,
.dropdown-menu{
  color: #e7eefc !important;
}

/* Your custom muted class was too dim */
.muted,
.text-muted,
.small.text-muted{
  color: rgba(231,238,252,.78) !important;
}

/* Notes blocks / long text */
.card .muted,
.card .text-muted{
  color: rgba(231,238,252,.80) !important;
}

/* Optional: headings inside cards */
.card .fw-semibold,
.card .fw-bold{
  color: #e7eefc !important;
}


/* Upgrade 14 - Dashboard Enhancements (cards + pseudo-charts) */

.hwdb-dash-shell {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hwdb-dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.hwdb-dash-card {
  background: radial-gradient(circle at top, rgba(0, 255, 255, 0.15), rgba(0, 0, 0, 0.95));
  border-radius: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(0, 255, 255, 0.22);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.hwdb-dash-card-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7ee7ff;
  margin-bottom: 4px;
}

.hwdb-dash-card-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #e9fcff;
}

.hwdb-dash-card-note {
  font-size: 0.8rem;
  color: #a7e9ff;
  margin-top: 4px;
}

.hwdb-dash-chart {
  background: radial-gradient(circle at top, rgba(0, 255, 255, 0.12), rgba(0, 0, 0, 0.96));
  border-radius: 16px;
  padding: 16px 18px 18px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.hwdb-dash-chart-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7ee7ff;
  margin-bottom: 10px;
}

.hwdb-dash-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.hwdb-dash-bar-label {
  flex: 0 0 90px;
  font-size: 0.8rem;
  color: #c1f7ff;
}

.hwdb-dash-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(2, 12, 24, 0.9), rgba(2, 8, 16, 0.9));
  overflow: hidden;
}

.hwdb-dash-bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #05edf3, #01b5d4);
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
  transform-origin: left;
  transform: scaleX(0.1);
}

.hwdb-dash-recent {
  background: rgba(3, 10, 20, 0.96);
  border-radius: 16px;
  padding: 14px 16px 18px;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.hwdb-dash-recent-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7ee7ff;
  margin-bottom: 10px;
}

.hwdb-dash-recent-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.hwdb-dash-recent-table th,
.hwdb-dash-recent-table td {
  padding: 6px 4px;
  text-align: left;
}

.hwdb-dash-recent-table th {
  font-weight: 600;
  color: #a7e9ff;
  border-bottom: 1px solid rgba(0, 255, 255, 0.25);
}

.hwdb-dash-recent-table tr:nth-child(even) td {
  background: rgba(0, 25, 40, 0.6);
}

/* animate bars on load */
@keyframes hwdbBarGrow {
  from { transform: scaleX(0.1); }
  to   { transform: scaleX(1); }
}

.hwdb-dash-bar-fill.hwdb-animated {
  animation: hwdbBarGrow 0.8s ease-out forwards;
}

@media (max-width: 768px) {
  .hwdb-dash-bar-label {
    flex: 0 0 70px;
  }
}


/* Upgrade 16 - Global UI & Theme Enhancements
   - Smooth hover states
   - Subtle animations
   - Grid/list-ready styling hooks
   - Input/button polishing
*/

/* Typography & base */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Buttons */
.hwdb-btn-primary,
button.hwdb-primary,
a.hwdb-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.7);
  background: radial-gradient(circle at top, #05edf3, #01b5d4);
  color: #02060a;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.45);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.hwdb-btn-primary:hover,
button.hwdb-primary:hover,
a.hwdb-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 22px rgba(0, 255, 255, 0.7);
}

.hwdb-btn-primary:active,
button.hwdb-primary:active,
a.hwdb-btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.55);
}

/* Secondary button style */
.hwdb-btn-ghost,
button.hwdb-ghost,
a.hwdb-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(1, 10, 18, 0.95);
  color: #a7e9ff;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.hwdb-btn-ghost:hover,
button.hwdb-ghost:hover,
a.hwdb-btn-ghost:hover {
  border-color: rgba(0, 255, 255, 0.7);
  box-shadow: 0 0 14px rgba(0, 255, 255, 0.35);
}

/* Inputs & form controls */
.hwdb-input,
.hwdb-select,
.hwdb-textarea,
input[type="text"].hwdb,
input[type="number"].hwdb,
select.hwdb,
textarea.hwdb {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0, 255, 255, 0.38);
  background: rgba(0, 12, 22, 0.96);
  color: #e9fcff;
  font-size: 0.9rem;
  outline: none;
  transition: border 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.hwdb-input:focus,
.hwdb-select:focus,
.hwdb-textarea:focus,
input[type="text"].hwdb:focus,
input[type="number"].hwdb:focus,
select.hwdb:focus,
textarea.hwdb:focus {
  border-color: #05edf3;
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.5);
}

/* Labels */
.hwdb-label,
label.hwdb {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #a7e9ff;
}

/* Cards & hover lift */
.hwdb-card,
.car-card,
.hwdb-tile {
  background: radial-gradient(circle at top, rgba(0, 255, 255, 0.08), rgba(0, 0, 0, 0.96));
  border-radius: 16px;
  border: 1px solid rgba(0, 255, 255, 0.24);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.hwdb-card:hover,
.car-card:hover,
.hwdb-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 26px rgba(0, 255, 255, 0.5);
  border-color: rgba(0, 255, 255, 0.6);
}

/* Grid vs table view hooks */
.hwdb-view-toggle {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.hwdb-view-toggle button {
  flex: 0 0 auto;
}

.hwdb-view-container.grid-mode .hwdb-car-list,
.hwdb-view-container.grid-mode .car-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hwdb-view-container.grid-mode .hwdb-car-row,
.hwdb-view-container.grid-mode .car-row {
  display: block;
}

.hwdb-view-container.table-mode .hwdb-car-list,
.hwdb-view-container.table-mode .car-list {
  display: table;
  width: 100%;
  border-collapse: collapse;
}

.hwdb-view-container.table-mode .hwdb-car-row,
.hwdb-view-container.table-mode .car-row {
  display: table-row;
}

.hwdb-view-container.table-mode .hwdb-car-row > * ,
.hwdb-view-container.table-mode .car-row > * {
  display: table-cell;
  padding: 6px 8px;
}

/* Small theme utility helpers */
.hwdb-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 255, 0.45);
  padding: 3px 9px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #a7e9ff;
}

.hwdb-muted {
  opacity: 0.7;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .hwdb-card,
  .car-card,
  .hwdb-tile {
    border-radius: 14px;
  }
}
/* HWDB Add Car Modal / Floating Panel */

.hwdb-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, rgba(0, 20, 35, 0.95), rgba(0, 0, 0, 0.96));
  z-index: 9999;
}

.hwdb-modal.is-open {
  display: flex;
}

.hwdb-modal-inner {
  width: 95%;
  max-width: 980px;
  max-height: calc(100vh - 80px);
  background: rgba(3, 10, 20, 0.98);
  border-radius: 18px;
  border: 1px solid rgba(0, 255, 255, 0.35);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
}

.hwdb-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 8px;
  border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.hwdb-modal-title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7ee7ff;
}

.hwdb-modal-close {
  border: none;
  background: transparent;
  color: #e9fcff;
  font-size: 1.2rem;
  cursor: pointer;
}

.hwdb-modal-body {
  padding: 14px 18px 16px;
  overflow-y: auto;
}

.hwdb-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.7fr);
  gap: 16px;
}

.hwdb-modal-section-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #a7e9ff;
  margin-bottom: 6px;
}

.hwdb-modal-footer {
  padding: 10px 18px 14px;
  border-top: 1px solid rgba(0, 255, 255, 0.2);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .hwdb-modal-inner {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .hwdb-modal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hwdb-modal-body {
    padding-bottom: 80px; /* space for buttons */
  }

  .hwdb-modal-footer {
    position: sticky;
    bottom: 0;
    background: rgba(3, 10, 20, 0.98);
  }
}

