:root {
  --fv-navy: #11203b;
  --fv-blue: #2563eb;
  --fv-blue-2: #3b82f6;
  --fv-cyan: #0ea5e9;
  --fv-green: #16a34a;
  --fv-amber: #d97706;
  --fv-red: #dc2626;
  --fv-ink: #172033;
  --fv-muted: #64748b;
  --fv-line: #e2e8f0;
  --fv-surface: #ffffff;
  --fv-canvas: #f4f7fb;
  --fv-radius: 16px;
  --fv-shadow: 0 14px 38px rgba(15, 23, 42, .08);
  --fv-shadow-sm: 0 6px 18px rgba(15, 23, 42, .07);
}

html, body, #root { min-height: 100%; }

body {
  color: var(--fv-ink);
  background: var(--fv-canvas);
  font-family: "DM Sans", "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.fv-product-upgrade .layout-wrapper,
body.fv-product-upgrade .layout-main-container,
body.fv-product-upgrade .layout-main {
  background: var(--fv-canvas);
}

body.fv-product-upgrade .layout-topbar {
  min-height: 64px;
  background: rgba(255, 255, 255, .92);
  border-bottom: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
  backdrop-filter: blur(16px);
}

body.fv-product-upgrade .layout-sidebar {
  background: linear-gradient(180deg, #fff 0%, #fbfdff 62%, #f7faff 100%);
  border-right: 1px solid var(--fv-line);
  box-shadow: 8px 0 30px rgba(15, 23, 42, .035);
}

body.fv-product-upgrade .layout-menu li > a {
  min-height: 45px;
  margin: 3px 12px;
  padding: .7rem .85rem;
  border-radius: 11px;
  color: #475569;
  font-weight: 600;
  transition: color .18s ease, background .18s ease, transform .18s ease;
}

body.fv-product-upgrade .layout-menu li > a:hover {
  color: var(--fv-blue);
  background: #eff6ff;
  transform: translateX(2px);
}

body.fv-product-upgrade .layout-menu li.active-menuitem > a,
body.fv-product-upgrade .layout-menu a.router-link-active {
  color: #fff;
  background: linear-gradient(135deg, var(--fv-blue), var(--fv-cyan));
  box-shadow: 0 8px 20px rgba(37, 99, 235, .22);
}

body.fv-product-upgrade .layout-menu .layout-menuitem-icon { font-size: 1.05rem; }

body.fv-product-upgrade h1,
body.fv-product-upgrade h2,
body.fv-product-upgrade h3,
body.fv-product-upgrade h4,
body.fv-product-upgrade .page-title {
  color: var(--fv-navy);
  letter-spacing: -.025em;
}

body.fv-product-upgrade .card,
body.fv-product-upgrade .p-card,
body.fv-product-upgrade .p-dialog,
body.fv-product-upgrade .p-datatable,
body.fv-product-upgrade .p-tabview-panels {
  border: 1px solid rgba(226, 232, 240, .9);
  border-radius: var(--fv-radius);
  box-shadow: var(--fv-shadow-sm);
}

body.fv-product-upgrade .card { padding: 1.5rem; }

body.fv-product-upgrade .p-button {
  min-height: 42px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  box-shadow: none;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

body.fv-product-upgrade .p-button:not(.p-button-text):not(.p-button-link):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .16);
}

body.fv-product-upgrade .p-button.p-button-success,
body.fv-product-upgrade .p-button:not(.p-button-outlined):not(.p-button-danger):not(.p-button-text):not(.p-button-link) {
  border-color: var(--fv-blue);
  background: linear-gradient(135deg, var(--fv-blue), var(--fv-blue-2));
}

body.fv-product-upgrade .p-inputtext,
body.fv-product-upgrade .p-dropdown,
body.fv-product-upgrade .p-multiselect,
body.fv-product-upgrade .p-calendar,
body.fv-product-upgrade .p-treeselect {
  min-height: 44px;
  border-color: #cbd5e1;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}

body.fv-product-upgrade .p-inputtext:focus,
body.fv-product-upgrade .p-dropdown:not(.p-disabled).p-focus,
body.fv-product-upgrade .p-multiselect:not(.p-disabled).p-focus {
  border-color: var(--fv-blue-2);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .13);
}

body.fv-product-upgrade .p-tabview .p-tabview-nav,
body.fv-product-upgrade .p-tabmenu .p-tabmenu-nav {
  gap: .35rem;
  padding: .35rem;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
}

body.fv-product-upgrade .p-tabview .p-tabview-nav li .p-tabview-nav-link,
body.fv-product-upgrade .p-tabmenu .p-tabmenu-nav .p-tabmenuitem .p-menuitem-link {
  min-height: 42px;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--fv-muted);
  font-weight: 700;
}

body.fv-product-upgrade .p-tabview .p-tabview-nav li.p-highlight .p-tabview-nav-link,
body.fv-product-upgrade .p-tabmenu .p-tabmenu-nav .p-tabmenuitem.p-highlight .p-menuitem-link {
  color: var(--fv-blue);
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .08);
}

body.fv-product-upgrade .p-datatable .p-datatable-thead > tr > th {
  padding: .9rem 1rem;
  border-color: var(--fv-line);
  background: #f8fafc;
  color: #475569;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.fv-product-upgrade .p-datatable .p-datatable-tbody > tr > td {
  padding: .95rem 1rem;
  border-color: #edf2f7;
  color: #334155;
}

body.fv-product-upgrade .p-datatable .p-datatable-tbody > tr:hover { background: #f8fbff; }

body.fv-product-upgrade .p-dialog-mask { backdrop-filter: blur(7px); }
body.fv-product-upgrade .p-dialog { overflow: hidden; box-shadow: 0 30px 80px rgba(15, 23, 42, .22); }
body.fv-product-upgrade .p-dialog .p-dialog-header { padding: 1.15rem 1.4rem; border-bottom: 1px solid var(--fv-line); }
body.fv-product-upgrade .p-dialog .p-dialog-content { padding: 1.35rem; }

.fv-command-centre {
  position: relative;
  z-index: 4;
  margin: 0 0 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 18px;
  background:
    radial-gradient(circle at 95% 0%, rgba(14, 165, 233, .14), transparent 31%),
    linear-gradient(135deg, #fff 0%, #f8fbff 100%);
  box-shadow: var(--fv-shadow);
}

.fv-command-centre__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.fv-eyebrow {
  display: block;
  margin-bottom: .2rem;
  color: var(--fv-blue);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.fv-command-centre h2 { margin: 0; font-size: clamp(1.3rem, 2.2vw, 1.8rem); }
.fv-command-centre p { margin: .25rem 0 0; color: var(--fv-muted); }

.fv-health-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 34px;
  padding: .45rem .7rem;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.fv-health-pill::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fv-green);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
  content: "";
}

.fv-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .75rem;
}

.fv-stat {
  position: relative;
  min-width: 0;
  padding: .9rem;
  overflow: hidden;
  border: 1px solid var(--fv-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .88);
}

.fv-stat::after {
  position: absolute;
  right: -.8rem;
  bottom: -.9rem;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent, var(--fv-blue)) 12%, transparent);
  content: "";
}

.fv-stat__label { color: var(--fv-muted); font-size: .72rem; font-weight: 800; }
.fv-stat__value { display: block; margin-top: .2rem; color: var(--fv-navy); font-size: 1.55rem; font-weight: 900; letter-spacing: -.04em; }
.fv-stat__meta { display: block; margin-top: .15rem; color: #94a3b8; font-size: .68rem; }

.fv-fleet-panel {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(0, 2fr);
  gap: .9rem;
  margin-top: .9rem;
}

.fv-fleet-panel__control,
.fv-fleet-panel__activity {
  min-width: 0;
  padding: .9rem;
  border: 1px solid var(--fv-line);
  border-radius: 13px;
  background: #fff;
}

.fv-panel-title { margin: 0 0 .65rem; color: var(--fv-navy); font-size: .9rem; font-weight: 900; }
.fv-search-wrap { position: relative; }
.fv-search-wrap::before { position: absolute; left: .75rem; top: .7rem; color: #94a3b8; content: "⌕"; font-size: 1.15rem; }
.fv-search {
  width: 100%;
  min-height: 41px;
  padding: .55rem .7rem .55rem 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  outline: 0;
}
.fv-search:focus { border-color: var(--fv-blue-2); box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }

.fv-filter-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.fv-filter {
  min-height: 32px;
  padding: .35rem .6rem;
  border: 1px solid var(--fv-line);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: .72rem;
  font-weight: 800;
  cursor: pointer;
}
.fv-filter.is-active { border-color: #bfdbfe; background: #eff6ff; color: var(--fv-blue); }

.fv-activity-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.fv-activity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-width: 0;
  padding: .65rem .7rem;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.fv-activity-item:hover { border-color: #bfdbfe; transform: translateY(-1px); }
.fv-activity-item__name { overflow: hidden; color: var(--fv-navy); font-size: .82rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.fv-activity-item__meta { margin-top: .15rem; overflow: hidden; color: var(--fv-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.fv-status { display: inline-flex; align-items: center; gap: .35rem; color: #475569; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.fv-status::before { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; content: ""; }
.fv-status--moving::before { background: var(--fv-green); }
.fv-status--parked::before { background: var(--fv-blue-2); }
.fv-status--idle::before { background: var(--fv-amber); }
.fv-status--offline::before { background: var(--fv-red); }

.fv-empty { padding: 1rem; color: var(--fv-muted); font-size: .82rem; text-align: center; }

.fv-page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1.2rem 1.35rem;
  border: 1px solid var(--fv-line);
  border-radius: 15px;
  background: linear-gradient(135deg, #fff, #f8fbff);
  box-shadow: var(--fv-shadow-sm);
}
.fv-page-intro h2 { margin: 0; font-size: 1.35rem; }
.fv-page-intro p { max-width: 62ch; margin: .3rem 0 0; color: var(--fv-muted); }

.fv-report-tools { display: flex; align-items: center; gap: .55rem; }
.fv-report-tools .fv-search { width: min(280px, 100%); }

body[data-fv-route="reporting"] .p-button.p-button-success,
body[data-fv-route="reporting"] button[class*="p-button-success"] {
  justify-content: flex-start;
  min-height: 54px;
  padding: .8rem 1rem;
  border-color: var(--fv-line);
  background: #fff;
  color: var(--fv-navy);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .04);
}
body[data-fv-route="reporting"] .p-button.p-button-success:hover,
body[data-fv-route="reporting"] button[class*="p-button-success"]:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: var(--fv-blue);
}

.fv-offline-report-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  margin-top: .55rem;
  padding: .8rem 1rem;
  border: 1px solid var(--fv-line);
  border-radius: 10px;
  background: #fff;
  color: var(--fv-navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.fv-offline-report-button:hover { border-color: #bfdbfe; background: #f8fbff; color: var(--fv-blue); }

.fv-report-preview {
  width: 100%;
  padding: 1.1rem;
  border: 1px solid var(--fv-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--fv-shadow-sm);
}
.fv-report-preview__header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .8rem; }
.fv-report-preview h3 { margin: 0; }
.fv-report-preview__meta { color: var(--fv-muted); font-size: .78rem; }
.fv-export { min-height: 38px; padding: .45rem .7rem; border: 0; border-radius: 9px; background: var(--fv-blue); color: #fff; font-weight: 800; cursor: pointer; }

.fv-detail-drawer {
  position: fixed;
  z-index: 12000;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, .42);
  backdrop-filter: blur(5px);
}
.fv-detail-drawer__panel {
  width: min(480px, 100%);
  height: 100%;
  padding: 1.2rem;
  overflow-y: auto;
  background: #fff;
  box-shadow: -24px 0 60px rgba(15, 23, 42, .2);
  animation: fv-slide-in .2s ease-out;
}
@keyframes fv-slide-in { from { transform: translateX(30px); opacity: .5; } }
.fv-detail-drawer__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.fv-detail-drawer__top h2 { margin: .2rem 0 0; font-size: 1.55rem; }
.fv-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f1f5f9; color: var(--fv-navy); font-size: 1.25rem; cursor: pointer; }
.fv-detail-hero { margin: 1rem 0; padding: 1rem; border-radius: 14px; background: linear-gradient(135deg, var(--fv-navy), #233d68); color: #fff; }
.fv-detail-hero .fv-status { color: #fff; }
.fv-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.fv-detail-field { min-width: 0; padding: .8rem; border: 1px solid var(--fv-line); border-radius: 11px; background: #f8fafc; }
.fv-detail-field__label { display: block; color: var(--fv-muted); font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.fv-detail-field__value { display: block; margin-top: .2rem; overflow-wrap: anywhere; color: var(--fv-navy); font-size: .88rem; font-weight: 800; }
.fv-detail-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.fv-detail-actions button, .fv-detail-actions a { min-height: 40px; padding: .55rem .75rem; border: 1px solid #bfdbfe; border-radius: 9px; background: #eff6ff; color: var(--fv-blue); font-weight: 800; text-decoration: none; cursor: pointer; }

body.fv-product-upgrade .p-progress-spinner-circle { stroke: var(--fv-blue); }
body.fv-product-upgrade .p-toast .p-toast-message { border-radius: 12px; box-shadow: var(--fv-shadow); }

@media (max-width: 1280px) {
  .fv-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .fv-fleet-panel { grid-template-columns: 1fr; }
  .fv-activity-list { grid-template-columns: 1fr; }
  body.fv-product-upgrade .p-dialog { width: calc(100vw - 2rem) !important; max-width: calc(100vw - 2rem); }
}

@media (max-width: 768px) {
  body.fv-product-upgrade .layout-main { padding-left: .75rem !important; padding-right: .75rem !important; }
  body.fv-product-upgrade .card { padding: 1rem; border-radius: 13px; }
  .fv-command-centre { margin-inline: 0; padding: .85rem; border-radius: 14px; }
  .fv-command-centre__top, .fv-page-intro { align-items: flex-start; flex-direction: column; }
  .fv-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .fv-stat { padding: .75rem; }
  .fv-stat__value { font-size: 1.35rem; }
  .fv-report-tools { width: 100%; }
  .fv-report-tools .fv-search { width: 100%; }
  body.fv-product-upgrade .p-tabview .p-tabview-nav,
  body.fv-product-upgrade .p-tabmenu .p-tabmenu-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  body.fv-product-upgrade .p-tabview .p-tabview-nav li,
  body.fv-product-upgrade .p-tabmenu .p-tabmenu-nav li { flex: 0 0 auto; }
  body.fv-product-upgrade .p-datatable-wrapper { overflow-x: auto; border-radius: 10px; }
  body.fv-product-upgrade .p-paginator { gap: .1rem; padding: .65rem .25rem; }
  body.fv-product-upgrade .p-paginator .p-paginator-pages .p-paginator-page,
  body.fv-product-upgrade .p-paginator .p-paginator-first,
  body.fv-product-upgrade .p-paginator .p-paginator-prev,
  body.fv-product-upgrade .p-paginator .p-paginator-next,
  body.fv-product-upgrade .p-paginator .p-paginator-last { min-width: 36px; height: 36px; }
  body.fv-product-upgrade .p-splitter { flex-direction: column !important; }
  body.fv-product-upgrade .p-splitter-panel { width: 100% !important; min-width: 0 !important; }
  body.fv-product-upgrade .gm-style { touch-action: pan-x pan-y; }
}

@media (max-width: 430px) {
  .fv-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fv-stat__label { font-size: .66rem; }
  .fv-health-pill { display: none; }
  .fv-detail-grid { grid-template-columns: 1fr; }
  .fv-command-centre h2 { font-size: 1.25rem; }
  body.fv-product-upgrade .p-button { width: auto; min-height: 44px; }
  body.fv-product-upgrade .p-dialog .p-dialog-content { padding: .85rem; }
  body.fv-product-upgrade .p-dialog .grid > [class*="col-"] { width: 100%; }
  body.fv-product-upgrade .p-datatable.p-datatable-responsive-stack .p-datatable-tbody > tr {
    display: block;
    margin-bottom: .7rem;
    padding: .35rem;
    border: 1px solid var(--fv-line);
    border-radius: 11px;
    background: #fff;
  }
  body.fv-product-upgrade .p-datatable.p-datatable-responsive-stack .p-datatable-tbody > tr > td {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: .55rem;
    border: 0;
    text-align: right;
  }
  body.fv-product-upgrade .p-datatable .p-row-title { display: inline-block; color: var(--fv-muted); font-weight: 800; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
