@charset "UTF-8";
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap");
/* =========================================================
   CAR MANAGER
   Dashboard UI
   ========================================================= */
:root {
  --cm-bg: #0f101c;
  --cm-bg-soft: #141525;
  --cm-sidebar: #121321;
  --cm-card: #151729;
  --cm-card-light: #1b1e31;
  --cm-border: #2a2e45;
  --cm-text: #f5f6fb;
  --cm-text-soft: #a8adbf;
  --cm-text-muted: #747a90;
  --cm-primary: #7661e8;
  --cm-primary-dark: #654fd5;
  --cm-blue: #5c9dff;
  --cm-green: #69d5a3;
  --cm-purple: #ad8cff;
  --cm-orange: #e99a61;
  --cm-red: #e96d7a;
  --cm-radius: 0.875rem;
  --cm-radius-small: 0.625rem;
  --cm-sidebar-width: 18.75rem;
  --cm-topbar-height: 3.75rem;
  --cm-shadow: 0 0.75rem 2.1875rem rgba(0, 0, 0, 0.22);
}

/* =========================================================
   GLOBAL
   ========================================================= */
html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cm-bg);
  color: var(--cm-text);
  font-family: "Montserrat", sans-serif;
  font-weight: 800;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   APP LAYOUT
   ========================================================= */
.app-layout {
  min-height: 100vh;
  display: flex;
  background: var(--cm-bg);
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: var(--cm-sidebar-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cm-sidebar);
  border-right: 0.0625rem solid var(--cm-border);
}

/* BRAND */
.sidebar-brand {
  height: var(--cm-topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.375rem;
  border-bottom: 0.0625rem solid var(--cm-border);
  font-size: 0.9375rem;
  letter-spacing: 0.05rem;
}

.sidebar-brand span {
  color: #858ba0;
  margin-left: 0.5rem;
}

.sidebar-brand strong {
  color: #ffffff;
  margin-left: 0.25rem;
}

.brand-icon {
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--cm-primary);
  color: #ffffff;
  font-size: 0.9375rem;
}

/* NAV */
.sidebar-nav {
  padding: 1.125rem 0.75rem;
}

.sidebar-link {
  min-height: 2.625rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.8125rem;
  margin-bottom: 0.3125rem;
  color: #aeb3c6;
  border-radius: 0.4375rem;
  font-size: 0.9375rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.sidebar-link i {
  width: 1.1875rem;
  text-align: center;
  font-size: 0.9375rem;
}

.sidebar-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.045);
}

.sidebar-link.active {
  color: #ffffff;
  background: rgba(118, 97, 232, 0.28);
}

.sidebar-link.active i {
  color: #a99bff;
}

.sidebar-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #d95867;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
}

/* SIDEBAR BOTTOM */
.sidebar-bottom {
  margin-top: auto;
  border-top: 0.0625rem solid var(--cm-border);
  padding: 0.875rem 0.75rem 1rem;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.3125rem 0.875rem;
}

.sidebar-user-avatar {
  width: 2.125rem;
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3f4f7;
  color: #242535;
  font-size: 0.9375rem;
  font-weight: 700;
}

.sidebar-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-user-info strong {
  color: #ffffff;
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info span {
  margin-top: 0.125rem;
  color: var(--cm-text-muted);
  font-size: 0.75rem;
}

.sidebar-logout {
  color: #9ca2b5;
}

/* =========================================================
   MAIN
   ========================================================= */
.main-content {
  width: calc(100% - var(--cm-sidebar-width));
  margin-left: var(--cm-sidebar-width);
  min-height: 100vh;
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--cm-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: rgba(15, 16, 28, 0.94);
  border-bottom: 0.0625rem solid var(--cm-border);
  backdrop-filter: blur(0.875rem);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 0.75rem;
}

.topbar-right {
  gap: 1.0625rem;
}

.topbar-title {
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 600;
}

.topbar-subtitle {
  margin-top: 0.0625rem;
  color: var(--cm-text-muted);
  font-size: 0.75rem;
}

.topbar-icon {
  position: relative;
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c1c5d3;
  font-size: 0.9375rem;
}

.topbar-icon:hover {
  color: #ffffff;
}

.notification-icon span {
  position: absolute;
  top: 0.1875rem;
  right: 0.1875rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #e95d70;
  box-shadow: 0 0 0 0.125rem var(--cm-bg);
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding-left: 0.25rem;
}

.topbar-avatar {
  width: 1.9375rem;
  height: 1.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f4f4f7;
  color: #272938;
  font-size: 0.8125rem;
  font-weight: 700;
}

.topbar-profile-name {
  display: flex;
  flex-direction: column;
  color: #e8e9ef;
  font-size: 0.8125rem;
  font-weight: 600;
}

.topbar-profile-name small {
  margin-top: 0.0625rem;
  color: var(--cm-text-muted);
  font-size: 0.625rem;
  font-weight: 500;
}

.mobile-menu-btn {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.5rem;
  background: var(--cm-card);
  color: #ffffff;
}

/* =========================================================
   DASHBOARD CONTENT
   ========================================================= */
.dashboard-content {
  max-width: 90.625rem;
  margin: 0 auto;
  padding: 1.875rem;
}

/* =========================================================
   PAGE HEADER
   ========================================================= */
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.5625rem;
}

.page-heading h1 {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 650;
  letter-spacing: -0.025rem;
}

.page-heading p {
  margin: 0.3125rem 0 0;
  color: var(--cm-text-muted);
  font-size: 0.875rem;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.dashboard-primary-btn {
  min-height: 2.4375rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0 1rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--cm-primary);
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background 0.18s ease, transform 0.18s ease;
}

.dashboard-primary-btn:hover {
  background: var(--cm-primary-dark);
  color: #ffffff;
  transform: translateY(-0.0625rem);
}

.dashboard-primary-small {
  flex: 1;
  min-height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4375rem;
  border-radius: 0.4375rem;
  background: var(--cm-primary);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.dashboard-primary-small:hover {
  background: var(--cm-primary-dark);
  color: #ffffff;
}

.dashboard-secondary-small {
  width: 2.25rem;
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.4375rem;
  color: #b7bbca;
  font-size: 0.9375rem;
}

.dashboard-secondary-small:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* =========================================================
   ALERT
   ========================================================= */
.dashboard-alert {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-bottom: 1.375rem;
  padding: 0.6875rem 0.875rem;
  border: 0.0625rem solid rgba(105, 213, 163, 0.2);
  border-radius: 0.5625rem;
  background: rgba(105, 213, 163, 0.08);
  color: #a8e9c8;
  font-size: 0.875rem;
}

/* =========================================================
   TOP STAT CARDS
   ========================================================= */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.125rem;
}

.dashboard-stat-card {
  min-height: 10.625rem;
  padding: 1.0625rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card);
  box-shadow: var(--cm-shadow);
}

.dashboard-stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9375rem;
}

.dashboard-stat-top > a {
  color: #747b91;
  font-size: 0.9375rem;
  transition: color 0.15s ease, transform 0.15s ease;
}

.dashboard-stat-top > a:hover {
  color: #ffffff;
  transform: translateX(0.125rem);
}

.dashboard-stat-icon {
  width: 2.125rem;
  height: 2.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.icon-blue {
  background: rgba(92, 157, 255, 0.12);
  color: var(--cm-blue);
}

.icon-green {
  background: rgba(105, 213, 163, 0.12);
  color: var(--cm-green);
}

.icon-purple {
  background: rgba(173, 140, 255, 0.12);
  color: var(--cm-purple);
}

.dashboard-stat-label {
  margin-bottom: 0.25rem;
  color: #a6abbd;
  font-size: 0.8125rem;
}

.dashboard-stat-value {
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 650;
  line-height: 1.1;
}

.dashboard-stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.9375rem;
  padding-top: 0.6875rem;
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.055);
  color: #71778c;
  font-size: 0.6875rem;
}

/* =========================================================
   PANELS
   ========================================================= */
.dashboard-panel {
  overflow: hidden;
  margin-bottom: 1.125rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card);
  box-shadow: var(--cm-shadow);
}

.dashboard-panel-header {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.875rem 1.0625rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.055);
}

.dashboard-panel-header h2 {
  margin: 0;
  color: #f5f6fa;
  font-size: 0.9375rem;
  font-weight: 650;
}

.dashboard-panel-header span {
  display: block;
  margin-top: 0.1875rem;
  color: var(--cm-text-muted);
  font-size: 13px;
}

.panel-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3125rem;
  color: #9889f4;
  font-size: 0.75rem;
  font-weight: 500;
}

.panel-link:hover {
  color: #b1a6ff;
}

/* =========================================================
   MONTHLY COMPARISON
   ========================================================= */
.monthly-comparison {
  padding-bottom: 1.0625rem;
}

.monthly-comparison .dashboard-panel-header {
  border-bottom: 0;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9375rem;
  padding: 0 1.0625rem;
}

.comparison-card {
  min-height: 10.3125rem;
  padding: 1.0625rem;
  border: 0.0625rem solid rgba(255, 255, 255, 0.06);
  border-radius: 0.6875rem;
  background: #1a1d30;
}

.comparison-card.current {
  background: linear-gradient(135deg, rgba(118, 97, 232, 0.1), rgba(255, 255, 255, 0.015)), #1a1d30;
}

.comparison-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #adb1c0;
  font-size: 0.75rem;
}

.comparison-change {
  padding: 0.1875rem 0.375rem;
  border-radius: 0.3125rem;
  font-size: 0.625rem;
  font-weight: 600;
}

.change-up {
  background: rgba(233, 109, 122, 0.1);
  color: #e97d88;
}

.change-down {
  background: rgba(105, 213, 163, 0.1);
  color: #6ed5a6;
}

.comparison-value {
  margin-top: 0.25rem;
  color: #ffffff;
  font-size: 1.75rem;
  font-weight: 650;
}

.comparison-divider {
  height: 0.0625rem;
  margin: 1.0625rem 0 0.6875rem;
  background: rgba(255, 255, 255, 0.06);
}

.comparison-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.comparison-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3125rem;
}

.tag {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.025rem;
}

.tag-fuel {
  color: #e99a61;
}

.tag-service {
  color: #a890f7;
}

.tag-parts {
  color: #6fc0c9;
}

.comparison-transactions {
  color: #7f8497;
  font-size: 0.625rem;
  white-space: nowrap;
}

.comparison-transactions i {
  margin-right: 0.1875rem;
}

/* =========================================================
   CARS
   ========================================================= */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9375rem;
  padding: 1.0625rem;
}

.dashboard-car-card {
  overflow: hidden;
  border: 0.0625rem solid rgba(255, 255, 255, 0.06);
  border-radius: 0.6875rem;
  background: #191c2d;
}

.dashboard-car-image {
  width: 100%;
  height: 9.0625rem;
  overflow: hidden;
  background: #111321;
}

.dashboard-car-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.dashboard-car-card:hover .dashboard-car-image img {
  transform: scale(1.03);
}

.dashboard-car-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555b70;
  font-size: 2.625rem;
}

.dashboard-car-body {
  padding: 0.875rem;
}

.dashboard-car-title {
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 650;
}

.dashboard-car-subtitle {
  min-height: 1rem;
  color: #747a90;
  font-size: 12px;
}

.dashboard-car-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.8125rem;
}

.dashboard-car-stats > div {
  padding: 0.5625rem;
  border-radius: 0.4375rem;
  background: rgba(255, 255, 255, 0.025);
}

.dashboard-car-stats span {
  display: block;
  color: #696f84;
  font-size: 0.625rem;
}

.dashboard-car-stats strong {
  display: block;
  margin-top: 0.1875rem;
  color: #cdd0db;
  font-size: 0.75rem;
}

.dashboard-car-stats span {
  font-size: 12px !important;
}

.dashboard-car-actions {
  display: flex;
  gap: 0.4375rem;
  margin-top: 0.75rem;
}

/* =========================================================
   TWO COLUMNS
   ========================================================= */
.dashboard-two-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.125rem;
}

.dashboard-two-columns .dashboard-panel {
  margin-bottom: 0;
}

/* =========================================================
   LIST
   ========================================================= */
.dashboard-list {
  padding: 0.1875rem 1.0625rem;
}

.dashboard-list-item {
  min-height: 4.0625rem;
  display: flex;
  align-items: center;
  gap: 0.6875rem;
  padding: 0.6875rem 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.05);
}

.dashboard-list-item:last-child {
  border-bottom: 0;
}

.list-link {
  transition: background 0.15s ease;
}

.list-link:hover {
  color: inherit;
}

.list-item-icon {
  flex: 0 0 auto;
  width: 1.9375rem;
  height: 1.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.list-item-icon.normal {
  background: rgba(105, 213, 163, 0.1);
  color: var(--cm-green);
}

.list-item-icon.warning {
  background: rgba(233, 154, 97, 0.1);
  color: var(--cm-orange);
}

.list-item-icon.danger {
  background: rgba(233, 109, 122, 0.1);
  color: var(--cm-red);
}

.list-item-icon.service {
  background: rgba(118, 97, 232, 0.1);
  color: var(--cm-purple);
}

.list-item-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.list-item-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e5e6ed;
  font-size: 0.8125rem;
  font-weight: 600;
}

.list-item-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 0.1875rem;
  color: #6e7488;
  font-size: 0.6875rem;
}

.list-item-value {
  flex: 0 0 auto;
  text-align: right;
  font-size: 0.6875rem;
  font-weight: 600;
}

.list-item-value.normal {
  color: #73d2a4;
}

.list-item-value.warning {
  color: #e7a068;
}

.list-item-value.danger {
  color: #e87480;
}

.list-item-value.service-cost {
  display: flex;
  flex-direction: column;
  gap: 0.1875rem;
}

.list-item-value.service-cost strong {
  color: #d5d7df;
  font-size: 0.75rem;
}

.list-item-value.service-cost span {
  color: #696f83;
  font-size: 0.625rem;
}

/* =========================================================
   EMPTY
   ========================================================= */
.dashboard-empty {
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.875rem;
  text-align: center;
}

.dashboard-empty.compact {
  min-height: 11.875rem;
}

.dashboard-empty-icon {
  width: 2.8125rem;
  height: 2.8125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  border-radius: 0.75rem;
  background: rgba(118, 97, 232, 0.1);
  color: var(--cm-purple);
  font-size: 1.25rem;
}

.dashboard-empty-icon.success {
  background: rgba(105, 213, 163, 0.1);
  color: var(--cm-green);
}

.dashboard-empty h3 {
  margin: 0;
  color: #ffffff;
  font-size: 0.9375rem;
}

.dashboard-empty p {
  margin: 0.3125rem 0 1.0625rem;
  color: #747a8f;
  font-size: 0.75rem;
}

/* =========================================================
   FOOTER
   ========================================================= */
.dashboard-footer {
  padding: 1.5625rem 0 0.3125rem;
  color: #4f5467;
  text-align: center;
  font-size: 0.6875rem;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 75rem) {
  .cars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 62rem) {
  :root {
    --cm-sidebar-width: 15.625rem;
  }
  .dashboard-content {
    padding: 1.5rem;
  }
  .dashboard-two-columns {
    grid-template-columns: 1fr;
  }
  .dashboard-two-columns .dashboard-panel {
    margin-bottom: 1.125rem;
  }
}

@media (max-width: 48rem) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .main-content {
    width: 100%;
    margin-left: 0;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .topbar {
    padding: 0 1.0625rem;
  }
  .topbar-profile-name {
    display: none;
  }
  .dashboard-content {
    padding: 1.25rem 0.9375rem;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading .dashboard-primary-btn {
    width: 100%;
  }
  .dashboard-stats-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stat-card {
    min-height: 9.0625rem;
  }
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .cars-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 32.5rem) {
  .topbar {
    height: 3.8125rem;
  }
  .topbar-right {
    gap: 0.3125rem;
  }
  .topbar-icon:first-child {
    display: none;
  }
  .page-heading h1 {
    font-size: 1.375rem;
  }
  .dashboard-panel-header {
    min-height: 3.875rem;
    padding: 0.75rem 0.8125rem;
  }
  .comparison-grid {
    padding: 0 0.75rem;
  }
  .comparison-card {
    padding: 0.875rem;
  }
  .comparison-meta {
    align-items: flex-start;
    flex-direction: column;
  }
  .comparison-transactions {
    white-space: normal;
  }
  .dashboard-car-image {
    height: 11.25rem;
  }
  .dashboard-list {
    padding: 0.1875rem 0.8125rem;
  }
}

/* =========================================================
   BOOTSTRAP OVERRIDES
   ========================================================= */
.btn-close {
  filter: invert(1) grayscale(1);
}

.alert {
  --bs-alert-border-width: 0;
}

.form-control,
.form-select {
  background-color: #151729;
  border-color: var(--cm-border);
  color: #ffffff;
}

.form-control:focus,
.form-select:focus {
  background-color: #171a2d;
  border-color: var(--cm-primary);
  color: #ffffff;
  box-shadow: 0 0 0 0.2rem rgba(118, 97, 232, 0.14);
}

.form-control::placeholder {
  color: #656b80;
}

.input-group-text {
  background: #191c2e;
  border-color: var(--cm-border);
  color: #8f95a8;
}

/* =========================================================
   OLD APP ELEMENTS
   ========================================================= */
.section-card {
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card);
}

.section-header {
  color: #ffffff;
}

.stat-card {
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius-small);
  background: var(--cm-card-light);
}

.quick-btn {
  background: var(--cm-card-light) !important;
  border-color: var(--cm-border) !important;
  color: #dfe1e8 !important;
}

.quick-btn:hover {
  background: #20243a !important;
  border-color: #3a3f5a !important;
}

.car-card {
  overflow: hidden;
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card-light);
}

.car-image,
.car-placeholder {
  width: 100%;
  height: 11.25rem;
}

.car-image {
  object-fit: cover;
}

.car-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111321;
  color: #545a70;
  font-size: 2.625rem;
}

.car-body {
  padding: 0.9375rem;
}

.reminder-row,
.service-row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.chart-bar-bg {
  background: #22263a;
}

.chart-bar {
  background: var(--cm-primary);
}

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar {
  width: 0.5rem;
  height: 0.5rem;
}

::-webkit-scrollbar-track {
  background: #0d0e18;
}

::-webkit-scrollbar-thumb {
  background: #30344b;
  border-radius: 1.25rem;
}

::-webkit-scrollbar-thumb:hover {
  background: #414761;
}

/* =========================================================
   CAR MANAGER — GLOBAL APP UI
   Spójny styl dla formularzy, tabel, kart, navbarów i modali
   ========================================================= */
:root {
  --cm-bg: #0f101c;
  --cm-bg-soft: #141525;
  --cm-sidebar: #121321;
  --cm-card: #151729;
  --cm-card-light: #1b1e31;
  --cm-card-hover: #20243a;
  --cm-border: #2a2e45;
  --cm-text: #f5f6fb;
  --cm-text-soft: #a8adbf;
  --cm-text-muted: #747a90;
  --cm-primary: #7661e8;
  --cm-primary-dark: #654fd5;
  --cm-primary-soft: rgba(118, 97, 232, 0.12);
  --cm-success: #69d5a3;
  --cm-warning: #e99a61;
  --cm-danger: #e96d7a;
  --cm-info: #5c9dff;
  --cm-radius: 0.875rem;
  --cm-radius-small: 0.625rem;
}

/* ---------- GLOBAL PAGE ---------- */
body:not(.dashboard-page) {
  min-height: 100vh;
  background: radial-gradient(circle at 85% 0%, rgba(118, 97, 232, 0.08), transparent 28%), var(--cm-bg) !important;
  color: var(--cm-text);
}

body:not(.dashboard-page) > .container,
body:not(.dashboard-page) > .container-fluid {
  color: var(--cm-text);
}

body:not(.dashboard-page) .container {
  max-width: 80rem;
}

body:not(.dashboard-page) .text-muted {
  color: var(--cm-text-muted) !important;
}

body:not(.dashboard-page) h1,
body:not(.dashboard-page) h2,
body:not(.dashboard-page) h3,
body:not(.dashboard-page) h4,
body:not(.dashboard-page) h5,
body:not(.dashboard-page) h6 {
  color: #fff;
}

body:not(.dashboard-page) hr {
  border-color: rgba(255, 255, 255, 0.07);
  opacity: 1;
}

/* ---------- NAVBAR LEGACY — OBSOLETE ---------- */
/* ---------- BUTTONS ---------- */
body:not(.dashboard-page) .btn {
  border-radius: 0.5rem;
  font-weight: 600;
  transition: .18s ease;
}

body:not(.dashboard-page) .btn-primary {
  border-color: var(--cm-primary);
  background: var(--cm-primary);
  color: #fff;
}

body:not(.dashboard-page) .btn-primary:hover,
body:not(.dashboard-page) .btn-primary:focus {
  border-color: var(--cm-primary-dark);
  background: var(--cm-primary-dark);
  color: #fff;
  transform: translateY(-0.0625rem);
}

body:not(.dashboard-page) .btn-outline-primary {
  border-color: rgba(118, 97, 232, 0.65);
  color: #b3a9ff;
}

body:not(.dashboard-page) .btn-outline-primary:hover {
  background: var(--cm-primary);
  border-color: var(--cm-primary);
  color: #fff;
}

body:not(.dashboard-page) .btn-outline-secondary {
  border-color: var(--cm-border);
  color: #b9bdcb;
}

body:not(.dashboard-page) .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #424861;
  color: #fff;
}

body:not(.dashboard-page) .btn-outline-danger {
  border-color: rgba(233, 109, 122, 0.5);
  color: #f0838e;
}

body:not(.dashboard-page) .btn-outline-danger:hover {
  background: var(--cm-danger);
  border-color: var(--cm-danger);
  color: #fff;
}

body:not(.dashboard-page) .btn-outline-info {
  border-color: rgba(92, 157, 255, 0.45);
  color: #83b8ff;
}

body:not(.dashboard-page) .btn-outline-info:hover {
  background: var(--cm-info);
  border-color: var(--cm-info);
  color: #fff;
}

body:not(.dashboard-page) .btn-danger {
  background: #c94f61;
  border-color: #c94f61;
}

body:not(.dashboard-page) .btn-danger:hover {
  background: #b84355;
  border-color: #b84355;
}

body:not(.dashboard-page) .btn-light {
  background: var(--cm-card-light) !important;
  border-color: var(--cm-border) !important;
  color: #dfe2eb !important;
}

body:not(.dashboard-page) .btn-light:hover {
  background: var(--cm-card-hover) !important;
  color: #fff !important;
}

/* ---------- FORMS ---------- */
body:not(.dashboard-page) .form-label {
  color: #c8cbd6;
  font-size: 0.875rem;
  font-weight: 600;
}

body:not(.dashboard-page) .form-control,
body:not(.dashboard-page) .form-select,
body:not(.dashboard-page) .input-group-text {
  min-height: 2.5rem;
  background: #121422 !important;
  border-color: var(--cm-border) !important;
  color: #f5f6fb !important;
}

body:not(.dashboard-page) textarea.form-control {
  min-height: auto;
}

body:not(.dashboard-page) .form-control::placeholder {
  color: #62687c;
}

body:not(.dashboard-page) .form-control:focus,
body:not(.dashboard-page) .form-select:focus {
  background: #15182a !important;
  border-color: var(--cm-primary) !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(118, 97, 232, 0.14) !important;
}

body:not(.dashboard-page) .input-group-text {
  color: #9298aa !important;
}

body:not(.dashboard-page) .form-text {
  color: #6f7589 !important;
  font-size: 0.8125rem;
}

body:not(.dashboard-page) .form-check-label {
  color: #c8cbd6;
}

body:not(.dashboard-page) .form-check-input {
  background-color: #121422;
  border-color: var(--cm-border);
}

body:not(.dashboard-page) .form-check-input:checked {
  background-color: var(--cm-primary);
  border-color: var(--cm-primary);
}

/* ---------- ALERTS ---------- */
body:not(.dashboard-page) .alert {
  border: 0.0625rem solid transparent;
  border-radius: 0.625rem;
  color: #e9ebf2;
}

body:not(.dashboard-page) .alert-success {
  background: rgba(105, 213, 163, 0.09);
  border-color: rgba(105, 213, 163, 0.18);
  color: #a9e9c9;
}

body:not(.dashboard-page) .alert-danger {
  background: rgba(233, 109, 122, 0.09);
  border-color: rgba(233, 109, 122, 0.18);
  color: #f2a0a9;
}

body:not(.dashboard-page) .alert-warning {
  background: rgba(233, 154, 97, 0.09);
  border-color: rgba(233, 154, 97, 0.18);
  color: #f0b486;
}

body:not(.dashboard-page) .alert-info {
  background: rgba(92, 157, 255, 0.09);
  border-color: rgba(92, 157, 255, 0.18);
  color: #9ac5ff;
}

body:not(.dashboard-page) .alert-light {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.07);
  color: #d8dbe4;
}

/* ---------- TABLES ---------- */
body:not(.dashboard-page) .table {
  margin-bottom: 0;
  color: #dfe2ea;
  --bs-table-bg: transparent;
  --bs-table-color: #dfe2ea;
  --bs-table-border-color: rgba(255, 255, 255, 0.06);
}

body:not(.dashboard-page) .table thead th {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.025);
  color: #8f95a8;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body:not(.dashboard-page) .table tbody td {
  vertical-align: middle;
  border-color: rgba(255, 255, 255, 0.06);
  font-size: 0.875rem;
}

body:not(.dashboard-page) .table-hover > tbody > tr:hover > * {
  --bs-table-hover-bg: rgba(118, 97, 232, 0.045);
  color: #fff;
}

body:not(.dashboard-page) .table-responsive {
  border-radius: 0.625rem;
}

/* ---------- BADGES ---------- */
body:not(.dashboard-page) .badge {
  border: 0.0625rem solid rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

body:not(.dashboard-page) .text-bg-light {
  background: rgba(255, 255, 255, 0.055) !important;
  color: #c9cdd8 !important;
}

body:not(.dashboard-page) .text-bg-secondary {
  background: rgba(255, 255, 255, 0.07) !important;
  color: #c9cdd8 !important;
}

body:not(.dashboard-page) .text-bg-dark {
  background: #0d0f19 !important;
  color: #dfe2eb !important;
}

/* ---------- OILS ---------- */
.card-oil {
  min-height: 10.625rem;
  padding: 1.0625rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card);
  box-shadow: var(--cm-shadow);
  transition: transform .18s ease, border-color .18s ease;
}

.card-oil:hover {
  transform: translateY(-0.125rem);
  border-color: #3a3f5b !important;
}

.oil-icon {
  width: 2.625rem;
  height: 2.625rem;
  flex: 0 0 2.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.6875rem;
  background: rgba(92, 157, 255, 0.1);
  color: #7db1ff;
  font-size: 1.1875rem;
}

.meta {
  color: #73798d;
  font-size: 0.8125rem;
}

/* ---------- EXPENSE CATEGORIES ---------- */
.category-option,
.category-card {
  position: relative;
}

.category-option input,
.category-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-option label,
.category-card label {
  width: 100%;
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.6875rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.625rem;
  background: #121422;
  color: #cdd0da;
  cursor: pointer;
  transition: .18s ease;
}

.category-option label:hover,
.category-card label:hover {
  border-color: #444a66;
  background: #191c2e;
}

.category-option input:checked + label,
.category-input:checked + label {
  border-color: var(--cm-primary);
  background: rgba(118, 97, 232, 0.1);
  color: #fff;
  box-shadow: 0 0 0 0.0625rem rgba(118, 97, 232, 0.12);
}

.category-icon {
  width: 2.125rem;
  height: 2.125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5625rem;
  background: rgba(255, 255, 255, 0.05);
  font-size: 1rem;
}

.category-name {
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---------- SERVICE / PART / TIMELINE ---------- */
.service-card {
  overflow: hidden;
}

.service-header {
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.service-title {
  color: #fff;
  font-weight: 650;
}

.service-date,
.service-mileage,
.service-details,
.item-price,
.meta {
  color: var(--cm-text-muted);
}

.item-icon,
.part-icon,
.part-icon-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5625rem;
  background: rgba(118, 97, 232, 0.1);
  color: #a99bff;
}

.item-icon,
.part-icon {
  width: 2.125rem;
  height: 2.125rem;
}

.part-icon-lg {
  width: 2.625rem;
  height: 2.625rem;
}

.timeline-item {
  position: relative;
  padding: 0.75rem 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.timeline-item:last-child {
  border-bottom: 0;
}

/* ---------- CAR VIEW / INFO ---------- */
.car-header {
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: linear-gradient(135deg, rgba(118, 97, 232, 0.08), transparent 60%), var(--cm-card);
  box-shadow: 0 0.75rem 2.1875rem rgba(0, 0, 0, 0.18);
}

.info-card {
  padding: 1rem;
}

.info-value {
  margin-top: 0.25rem;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 650;
}

.info-card .text-muted,
.car-header .text-muted {
  color: var(--cm-text-muted) !important;
}

.reminder-item,
.part-row,
.stats-bar,
.service-card {
  border-color: rgba(255, 255, 255, 0.07) !important;
}

.reminder-item {
  background: rgba(255, 255, 255, 0.018);
  border: 0.0625rem solid rgba(255, 255, 255, 0.06);
  border-radius: 0.625rem;
}

.consumption-bar-track,
.stats-bar-track {
  background: #22263a !important;
}

.consumption-bar,
.stats-bar-line {
  background: var(--cm-primary) !important;
}

/* ---------- LIST GROUPS ---------- */
body:not(.dashboard-page) .list-group {
  border-radius: 0.625rem;
  overflow: hidden;
}

body:not(.dashboard-page) .list-group-item {
  background: var(--cm-card-light);
  border-color: rgba(255, 255, 255, 0.06);
  color: #dfe2ea;
}

/* ---------- MODALS ---------- */
body:not(.dashboard-page) .modal-content {
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.875rem;
  background: #151729;
  color: #e8eaf0;
  box-shadow: 0 1.5625rem 5rem rgba(0, 0, 0, 0.45);
}

body:not(.dashboard-page) .modal-header,
body:not(.dashboard-page) .modal-footer {
  border-color: rgba(255, 255, 255, 0.06);
}

body:not(.dashboard-page) .modal-title {
  color: #fff;
}

body:not(.dashboard-page) .modal-backdrop {
  --bs-backdrop-bg: #000;
  --bs-backdrop-opacity: .72;
}

.delete-modal-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: rgba(233, 109, 122, 0.1);
  color: var(--cm-danger);
}

/* ---------- LOGIN ---------- */
body.bg-dark .card {
  border: 0.0625rem solid var(--cm-border) !important;
  border-radius: 1rem !important;
  background: var(--cm-card) !important;
  color: var(--cm-text);
  box-shadow: 0 1.5625rem 5rem rgba(0, 0, 0, 0.38) !important;
}

body.bg-dark .fs-1 {
  color: #a99bff;
}

/* ---------- GENERIC SMALL UI ---------- */
.money-input {
  font-variant-numeric: tabular-nums;
}

.empty-items {
  padding: 2.8125rem 1.25rem;
  text-align: center;
  color: var(--cm-text-muted);
}

.total-box {
  padding: 1rem;
  border: 0.0625rem solid rgba(118, 97, 232, 0.22);
  border-radius: 0.625rem;
  background: rgba(118, 97, 232, 0.07);
}

.price-same {
  color: var(--cm-success) !important;
}

.dropdown-menu {
  border: 0.0625rem solid var(--cm-border);
  background: #151729;
  box-shadow: 0 0.9375rem 2.5rem rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  color: #cdd1dc;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background: rgba(118, 97, 232, 0.1);
  color: #fff;
}

.dropdown-divider {
  border-color: rgba(255, 255, 255, 0.07);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 48rem) {
  body:not(.dashboard-page) .navbar {
    min-height: 3.75rem;
  }
  .form-header,
  .form-body {
    padding: 1.125rem;
  }
  body:not(.dashboard-page) .container {
    padding-left: 0.9375rem;
    padding-right: 0.9375rem;
  }
  .page-card .card-body {
    padding: 1.125rem !important;
  }
  .desktop-table {
    overflow-x: auto;
  }
  .category-option label,
  .category-card label {
    min-height: 4rem;
  }
}

/* =========================================================
   SCALE / TYPOGRAPHY — zgodne ze skalą style.scss
   ========================================================= */
body {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
}

.app-sidebar {
  width: 18.75rem;
}

.app-page {
  padding-left: 18.75rem;
}

.app-topbar {
  left: 18.75rem;
  height: 3.75rem;
}

.app-page-content {
  min-height: calc(100vh - 3.75rem);
}

.app-sidebar-brand {
  height: 3.75rem;
  padding: 0 1.25rem;
}

.app-brand-icon {
  width: 2rem;
  height: 2rem;
}

.app-sidebar-nav {
  padding: 1.25rem 0.75rem;
}

.app-nav-label {
  padding: 0 0.9375rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.app-nav-label-space {
  margin-top: 1rem;
}

.app-nav-link {
  min-height: 2.75rem;
  padding: 0 0.9375rem;
  margin-bottom: 0.25rem;
  border-radius: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  gap: 0.625rem;
}

.app-nav-link i {
  width: 1.5rem;
  font-size: 1.25rem;
}

.app-nav-link-small {
  min-height: 2.5rem;
  padding-left: 2.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.app-nav-badge {
  min-width: 1.25rem;
  height: 1.25rem;
  font-size: 0.6875rem;
}

.app-current-car {
  padding: 0.625rem 0.9375rem 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.app-user {
  gap: 0.625rem;
  padding: 0.5rem 0.375rem 0.75rem;
}

.app-user-avatar {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 0.75rem;
}

.app-user-info strong {
  font-size: 0.8125rem;
}

.app-user-info span {
  font-size: 0.6875rem;
}

.app-sidebar-bottom {
  padding: 0.875rem 0.75rem 1rem;
}

.app-topbar {
  padding: 0 1.5rem;
}

.app-topbar-title {
  font-size: 1.1875rem;
  font-weight: 600;
}

.app-topbar-subtitle {
  font-size: 0.8125rem;
  margin-top: 0;
}

.app-topbar-icon {
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.125rem;
}

.app-topbar-profile {
  gap: 0.625rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.app-topbar-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.dashboard-content {
  max-width: 87.5rem;
  padding: 1.5rem 1.75rem;
}

.page-heading {
  margin-bottom: 1.5rem;
}

.page-heading h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.page-heading p {
  font-size: 13px;
  margin-top: -0.2rem;
}

.dashboard-primary-btn {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.dashboard-primary-small {
  min-height: 2.375rem;
  font-size: 0.8125rem;
}

.dashboard-secondary-small {
  width: 2.5rem;
  height: 2.375rem;
}

.dashboard-stat-card {
  padding: 1.25rem;
}

.dashboard-stat-label {
  font-size: 0.8125rem;
}

.dashboard-stat-value {
  font-size: 1.75rem;
}

.dashboard-stat-footer {
  font-size: 0.6875rem;
}

.dashboard-panel-header {
  min-height: 4.5rem;
  padding: 1rem 1.25rem;
}

.dashboard-panel-header h2 {
  font-size: 0.9375rem;
}

.dashboard-panel-header span {
  font-size: 0.75rem;
}

.panel-link {
  font-size: 0.75rem;
}

.comparison-card {
  padding: 1.25rem;
}

.comparison-card-top {
  font-size: 0.75rem;
}

.comparison-value {
  font-size: 1.75rem;
}

.tag {
  font-size: 0.625rem;
}

.comparison-transactions {
  font-size: 0.6875rem;
}

.dashboard-car-body {
  padding: 1rem;
}

.dashboard-car-title {
  font-size: 1rem;
}

.dashboard-car-subtitle {
  font-size: 0.6875rem;
}

.dashboard-car-stats span {
  font-size: 0.625rem;
}

.dashboard-car-stats strong {
  font-size: 0.75rem;
}

.list-item-main strong {
  font-size: 0.8125rem;
}

.list-item-main span {
  font-size: 0.6875rem;
}

.list-item-value {
  font-size: 0.6875rem;
}

.list-item-value.service-cost strong {
  font-size: 0.75rem;
}

.list-item-value.service-cost span {
  font-size: 0.625rem;
}

.dashboard-empty h3 {
  font-size: 1rem;
}

.dashboard-empty p {
  font-size: 0.75rem;
}

.dashboard-footer {
  font-size: 0.6875rem;
}

body:not(.dashboard-page) .form-label {
  font-size: 0.8125rem;
}

body:not(.dashboard-page) .form-control,
body:not(.dashboard-page) .form-select,
body:not(.dashboard-page) .input-group-text {
  min-height: 2.625rem;
  font-size: 0.875rem;
}

body:not(.dashboard-page) .form-text {
  font-size: 0.75rem;
}

body:not(.dashboard-page) .table thead th {
  font-size: 0.6875rem;
}

body:not(.dashboard-page) .table tbody td {
  font-size: 0.875rem;
}

.meta {
  font-size: 0.75rem;
}

.category-name {
  font-size: 0.8125rem;
}

.info-value {
  font-size: 1rem;
}

.task-title, .transfer-title {
  font-size: 0.875rem;
}

.task-meta, .transfer-meta, .transfer-direction {
  font-size: 0.6875rem;
}

.task-description, .transfer-message {
  font-size: 0.75rem;
}

.transfer-status {
  font-size: 0.6875rem;
}

/* =========================================================
   APP-WIDE NAVIGATION
   ========================================================= */
.app-page {
  padding-left: var(--cm-sidebar-width);
  padding-top: var(--cm-topbar-height);
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  z-index: 1200;
  inset: 0 auto 0 0;
  width: var(--cm-sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--cm-sidebar);
  border-right: 1px solid var(--cm-border);
}

.app-sidebar-brand {
  height: var(--cm-topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.375rem;
  border-bottom: 0.0625rem solid var(--cm-border);
}

.app-sidebar-brand a {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0;
}

.app-sidebar-brand small {
  color: #888da1;
  font-size: 0.5625rem;
  font-weight: 600;
  margin-right: 0.125rem;
}

.app-brand-icon {
  width: 1.875rem;
  height: 1.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--cm-primary);
  color: #fff;
}

.app-sidebar-nav {
  padding: 1.125rem 0.75rem;
  overflow-y: auto;
}

.app-nav-label {
  padding: 0 0.75rem 0.4375rem;
  color: #5f657a;
  font-size: 0.5625rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.app-nav-label-space {
  margin-top: 1rem;
}

.app-nav-link {
  min-height: 2.625rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.8125rem;
  margin-bottom: 0.3125rem;
  border-radius: 0.5rem;
  color: #aeb3c6;
  font-size: 0.8125rem;
  transition: .18s ease;
}

.app-nav-link i {
  width: 1.125rem;
  text-align: center;
  font-size: 0.875rem;
}

.app-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.045);
}

.app-nav-link.active {
  color: #fff;
  background: rgba(118, 97, 232, 0.27);
}

.app-nav-link.active i {
  color: #aa9cff;
}

.app-nav-link-small {
  min-height: 2.1875rem;
  font-size: 0.6875rem;
  padding-left: 1.125rem;
}

.app-nav-badge {
  margin-left: auto;
  min-width: 1.1875rem;
  height: 1.1875rem;
  padding: 0 0.3125rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: var(--cm-primary);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 800;
}

.app-nav-badge-warning {
  background: #9c704d;
}

.app-nav-badge-danger {
  background: #c95767;
}

.app-current-car {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5625rem 0.75rem 0.375rem;
  color: #dddff0;
  font-size: 0.6875rem;
  font-weight: 650;
}

.app-current-car i {
  color: #a99bff;
}

.app-sidebar-bottom {
  margin-top: auto;
  padding: 0.8125rem 0.6875rem 0.9375rem;
  border-top: 0.0625rem solid var(--cm-border);
}

.app-user {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.375rem 0.375rem 0.75rem;
}

.app-user-avatar, .app-topbar-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f4f4f7;
  color: #292a38;
  font-weight: 800;
}

.app-user-avatar {
  width: 2rem;
  height: 2rem;
  font-size: 0.6875rem;
}

.app-user-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-user-info strong {
  color: #fff;
  font-size: 0.6875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-user-info span {
  color: #6f7589;
  font-size: 0.5625rem;
  margin-top: 0.125rem;
}

.app-logout {
  color: #9da3b5;
}

.app-topbar {
  position: fixed;
  z-index: 1100;
  top: 0;
  left: var(--cm-sidebar-width);
  right: 0;
  height: var(--cm-topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5625rem;
  background: rgba(15, 16, 28, 0.94);
  border-bottom: 0.0625rem solid var(--cm-border);
  backdrop-filter: blur(0.875rem);
}

.app-topbar-left, .app-topbar-right {
  display: flex;
  align-items: center;
}

.app-topbar-left {
  gap: 0.6875rem;
}

.app-topbar-right {
  gap: 0.8125rem;
}

.app-topbar-title {
  color: #fff;
  font-size: 19px;
  font-weight: 650;
}

.app-topbar-subtitle {
  color: #62687c;
  font-size: 13px;
  margin-top: -0.4rem;
}

.app-topbar-icon {
  position: relative;
  width: 1.9375rem;
  height: 1.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aeb3c4;
  border-radius: 0.5rem;
}

.app-topbar-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.app-topbar-dot {
  position: absolute;
  top: 0.375rem;
  right: 0.375rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: #e95d70;
  box-shadow: 0 0 0 0.125rem #0f101c;
}

.app-topbar-profile {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  color: #dfe2eb;
  font-size: 0.625rem;
  font-weight: 600;
}

.app-topbar-avatar {
  width: 1.875rem;
  height: 1.875rem;
  font-size: 0.625rem;
}

.app-mobile-toggle {
  display: none;
  width: 2.125rem;
  height: 2.125rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.5rem;
  background: var(--cm-card);
  color: #fff;
}

.app-mobile-backdrop {
  display: none;
}

.app-page-content {
  min-height: calc(100vh - var(--cm-topbar-height));
}

.app-page-heading {
  max-width: 90.625rem;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   FIX: CAR VIEW CHARTS / HISTORY
   ========================================================= */
.stats-chart-row {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: 0.625rem 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.stats-chart-row:last-child {
  border-bottom: 0;
}

.stats-chart-month {
  grid-column: 1;
  align-self: start;
  color: #dfe2eb;
  font-size: 0.6875rem;
  font-weight: 700;
  padding-top: 0.25rem;
}

.stats-bar-line {
  grid-column: 2;
  display: grid;
  grid-template-columns: 6.5625rem minmax(0, 1fr) 5.9375rem;
  align-items: center;
  gap: 0.5625rem;
  min-width: 0;
}

.stats-bar-label {
  color: #777d91;
  font-size: 0.625rem;
}

.stats-bar-track {
  height: 0.5625rem;
  min-width: 0;
  overflow: hidden;
  border-radius: 1.25rem;
  background: #22263a !important;
}

.stats-bar {
  height: 100%;
  width: 0;
  border-radius: 1.25rem;
  background: var(--cm-primary) !important;
  transition: width .35s ease;
}

.stats-bar.fuel {
  background: #5c9dff !important;
}

.stats-bar.service {
  background: #a98cff !important;
}

.stats-bar.extra {
  background: #e99a61 !important;
}

.stats-bar-value {
  text-align: right;
  color: #e8eaf1;
  font-size: 0.625rem;
  font-weight: 650;
  white-space: nowrap;
}

.consumption-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  min-height: 11.875rem;
  overflow-x: auto;
  padding: 1.25rem 0.3125rem 0;
}

.consumption-column {
  min-width: 3.375rem;
  height: 10.625rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.consumption-value {
  color: #dfe2eb;
  font-size: 0.5625rem;
  margin-bottom: 0.375rem;
}

.consumption-bar-track {
  width: 1.875rem;
  height: 7.1875rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 0.4375rem 0.4375rem 0.1875rem 0.1875rem;
  background: #22263a !important;
}

.consumption-bar {
  width: 100%;
  height: 0;
  border-radius: 0.4375rem 0.4375rem 0 0;
  background: var(--cm-primary) !important;
}

.consumption-label {
  margin-top: 0.4375rem;
  color: #747a90;
  font-size: 0.5625rem;
  white-space: nowrap;
}

/* =========================================================
   TASKS / TRANSFERS
   ========================================================= */
.task-panel, .transfer-panel {
  border: 0.0625rem solid var(--cm-border);
  border-radius: var(--cm-radius);
  background: var(--cm-card);
  overflow: hidden;
  box-shadow: var(--cm-shadow);
}

.task-panel-header, .transfer-panel-header {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9375rem;
  padding: 0.9375rem 1.125rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.task-panel-header h2, .transfer-panel-header h2 {
  margin: 0;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 650;
}

.task-panel-header h2 i, .transfer-panel-header h2 i {
  color: #a99bff;
  margin-right: 0.4375rem;
}

.task-panel-header span, .transfer-panel-header span {
  display: block;
  margin-top: 0.25rem;
  color: #6f7589;
  font-size: 0.625rem;
}

.task-list, .transfer-list {
  padding: 0 1rem;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9375rem 0.125rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.task-item:last-child, .transfer-item:last-child {
  border-bottom: 0;
}

.task-item.completed {
  opacity: .55;
}

.task-check {
  width: 2rem;
  height: 2rem;
  flex: 0 0 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5625rem;
  background: rgba(118, 97, 232, 0.11);
  color: #a99bff;
}

.task-check.warning {
  background: rgba(233, 154, 97, 0.11);
  color: #e9a66f;
}

.task-check.danger {
  background: rgba(233, 109, 122, 0.11);
  color: #ef8792;
}

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

.task-title {
  color: #f4f5f9;
  font-size: 0.75rem;
  font-weight: 650;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.25rem;
  color: #777d91;
  font-size: 0.5625rem;
}

.task-description {
  margin-top: 0.4375rem;
  color: #979caf;
  font-size: 0.625rem;
  line-height: 1.55;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.task-actions form {
  margin: 0;
}

.task-empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #747a90;
  font-size: 0.6875rem;
}

.task-empty i {
  display: block;
  margin-bottom: 0.5rem;
  color: #777d91;
  font-size: 1.625rem;
}

.transfer-item {
  display: flex;
  gap: 0.8125rem;
  align-items: flex-start;
  padding: 1.0625rem 0.125rem;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.transfer-car-icon {
  width: 2.375rem;
  height: 2.375rem;
  flex: 0 0 2.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.625rem;
  background: rgba(118, 97, 232, 0.11);
  color: #a99bff;
}

.transfer-main {
  min-width: 0;
  flex: 1;
}

.transfer-title {
  color: #f3f4f8;
  font-size: 0.75rem;
  font-weight: 650;
}

.transfer-meta, .transfer-direction {
  margin-top: 0.25rem;
  color: #777d91;
  font-size: 0.5625rem;
}

.transfer-direction {
  color: #9a9fb1;
}

.transfer-message {
  margin-top: 0.5rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.025);
  color: #aeb3c2;
  font-size: 0.625rem;
}

.transfer-side {
  text-align: right;
  min-width: 6.5625rem;
}

.transfer-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.5625rem;
  padding: 0 0.5625rem;
  border-radius: 1.25rem;
  font-size: 0.5625rem;
  font-weight: 700;
}

.status-pending {
  background: rgba(233, 154, 97, 0.11);
  color: #e9a66f;
}

.status-accepted {
  background: rgba(105, 213, 163, 0.1);
  color: #78d9ad;
}

.status-rejected, .status-cancelled {
  background: rgba(233, 109, 122, 0.1);
  color: #e98993;
}

@media (max-width: 56.25rem) {
  .app-page {
    padding-left: 0;
  }
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: 1.25rem 0 3.75rem rgba(0, 0, 0, 0.35);
  }
  body.app-sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  .app-topbar {
    left: 0;
    padding: 0 1rem;
  }
  .app-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .app-mobile-backdrop {
    position: fixed;
    z-index: 1190;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(0.125rem);
  }
  body.app-sidebar-open .app-mobile-backdrop {
    display: block;
  }
}

@media (max-width: 42.5rem) {
  .app-topbar-profile span {
    display: none;
  }
  .stats-chart-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .stats-chart-month {
    grid-column: 1;
  }
  .stats-bar-line {
    grid-column: 1;
    grid-template-columns: 5.3125rem minmax(0, 1fr) 5.125rem;
  }
  .transfer-item {
    flex-wrap: wrap;
  }
  .transfer-side {
    width: 100%;
    text-align: left;
    margin-left: 3.1875rem;
  }
}

/* Final consistency fixes for existing car/service markup */
body.app-page .bg-white {
  background: var(--cm-card) !important;
  color: var(--cm-text) !important;
}

body.app-page .shadow-sm {
  box-shadow: var(--cm-shadow) !important;
}

.service-header {
  min-height: 4.75rem;
  padding: 0.9375rem 1.125rem;
  cursor: pointer;
  transition: background .18s ease;
}

.service-header:hover {
  background: rgba(255, 255, 255, 0.045);
}

.service-details {
  padding: 1.25rem;
  color: #c8ccd7;
}

.service-menu-button {
  width: 2.125rem;
  height: 2.125rem;
  flex: 0 0 2.125rem;
  border: 0.0625rem solid var(--cm-border);
  border-radius: 0.5rem;
  background: transparent;
  color: #8f95a8;
  font-size: 1.25rem;
  line-height: 1;
}

.service-menu-button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.service-arrow {
  width: 1.5rem;
  color: #6f7589;
  font-size: 0.8125rem;
  transition: transform .18s ease;
}

.service-header[aria-expanded="true"] .service-arrow {
  transform: rotate(180deg);
}

.part-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6875rem 0;
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.part-row:last-child {
  border-bottom: 0;
}

@media (max-width: 36rem) {
  .service-header {
    padding: 0.8125rem;
  }
  .service-details {
    padding: 0.9375rem;
  }
  .service-header .service-mileage,
  .service-header .service-date {
    display: inline-block;
    margin-right: 0.4375rem;
  }
  .stats-bar-line {
    grid-template-columns: 4.875rem minmax(0, 1fr) 4.625rem;
  }
}

.logo-navi {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-navi span {
  font-size: 1.5rem;
  line-height: 1;
}

.logo-navi small {
  font-size: 0.625rem;
  line-height: 1;
  margin: 0;
  padding: 0;
}

/* =========================================================
   FINAL SCALE NORMALIZATION
   ========================================================= */
@media (max-width: 62rem) {
  .app-sidebar {
    width: 15.625rem;
  }
  .app-page {
    padding-left: 15.625rem;
  }
  .app-topbar {
    left: 15.625rem;
  }
}

@media (max-width: 48rem) {
  .app-page {
    padding-left: 0;
  }
  .app-topbar {
    left: 0;
    height: 3.75rem;
  }
  .app-page-content {
    min-height: calc(100vh - 3.75rem);
  }
  .dashboard-content {
    padding: 1.25rem 1rem;
  }
  .page-heading h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 36rem) {
  .app-topbar-title {
    font-size: 1rem;
  }
  .app-topbar-subtitle {
    display: none;
  }
  .dashboard-content {
    padding: 1rem 0.875rem;
  }
  .page-heading h1 {
    font-size: 1.375rem;
  }
}
