:root {
  --bg: #05070b;
  --panel: rgba(12, 18, 28, 0.86);
  --panel-strong: rgba(15, 24, 38, 0.94);
  --line: rgba(74, 144, 255, 0.22);
  --text: #f6fbff;
  --muted: #91a3bb;
  --blue: #1586ff;
  --blue-2: #38bdf8;
  --green: #20d489;
  --red: #ff4d5f;
  --amber: #f8c14b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(21, 134, 255, 0.24), transparent 34%),
    linear-gradient(135deg, #05070b 0%, #0b111c 52%, #05070b 100%);
}

body.theme-light {
  --bg: #f3f7fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-strong: rgba(255, 255, 255, 0.98);
  --line: rgba(21, 134, 255, 0.2);
  --text: #0d1726;
  --muted: #607086;
  --shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  background:
    radial-gradient(circle at top left, rgba(21, 134, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #eef5ff 0%, #f8fbff 52%, #edf4fb 100%);
}

body.theme-light .auth-card,
body.theme-light .card,
body.theme-light .sidebar {
  background: var(--panel);
}

body.theme-light input,
body.theme-light textarea,
body.theme-light select {
  border-color: rgba(96, 112, 134, 0.26);
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
}

body.theme-light .sidebar-card,
body.theme-light .metric,
body.theme-light .summary-card,
body.theme-light .report-kpi,
body.theme-light .finance-summary-items span,
body.theme-light .report-intelligence p,
body.theme-light .report-alerts p,
body.theme-light .settings-status-line,
body.theme-light .backup-info {
  background: rgba(255, 255, 255, 0.72);
}

body.theme-light .nav button {
  color: #1c2a3d;
  background: rgba(15, 23, 42, 0.06);
}

body.theme-light .nav button.active {
  color: #0057d9;
  background: rgba(21, 134, 255, 0.14);
}

body.theme-light .btn-ghost {
  color: #0d1726;
  background: rgba(255, 255, 255, 0.34);
}

body.theme-light .btn-danger {
  color: #9f1239;
  background: rgba(255, 77, 95, 0.14);
}

body.theme-light th {
  color: #607086;
}

body.theme-light td {
  border-bottom-color: rgba(96, 112, 134, 0.16);
}

body.theme-light .premium-table code,
body.theme-light .report-intelligence p,
body.theme-light .report-alerts p {
  color: #1c2a3d;
}

body.theme-light .table-wrap::-webkit-scrollbar-thumb,
body.theme-light .sidebar::-webkit-scrollbar-thumb,
body.theme-light .nav::-webkit-scrollbar-thumb {
  background: rgba(21, 134, 255, 0.42);
}

button,
input,
textarea,
select {
  font: inherit;
  max-width: 100%;
}

.boot,
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.boot {
  align-content: center;
  gap: 12px;
  color: var(--muted);
}

.brand-orb {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: white;
  font-weight: 900;
  box-shadow: 0 0 32px rgba(21, 134, 255, 0.42);
}

.auth-card,
.card,
.sidebar {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 22px;
  overflow: hidden;
}

.auth-copy {
  padding: 42px;
  background: linear-gradient(145deg, rgba(21, 134, 255, 0.2), rgba(5, 7, 11, 0.1));
}

.eyebrow {
  color: var(--blue-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  margin-bottom: 14px;
}

h2 {
  margin-bottom: 14px;
}

p {
  line-height: 1.5;
}

.auth-copy p,
.muted,
small {
  color: var(--muted);
}

.auth-form,
.form-grid,
.stack {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.auth-form {
  padding: 42px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(145, 163, 187, 0.25);
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  background: rgba(2, 6, 12, 0.72);
  outline: none;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21, 134, 255, 0.18);
}

.input-with-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  width: 100%;
  min-width: 0;
}

.barcode-field input {
  min-height: 50px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.barcode-field .btn {
  min-height: 50px;
  white-space: nowrap;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  min-width: 0;
  color: white;
  font-weight: 900;
  cursor: pointer;
  background: rgba(145, 163, 187, 0.16);
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #0057ff);
  box-shadow: 0 12px 28px rgba(21, 134, 255, 0.28);
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.22);
}

.btn-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 12px 28px rgba(139, 92, 246, 0.22);
}

.btn-danger {
  background: rgba(255, 77, 95, 0.18);
  color: #ffdce1;
}

.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 250px;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  padding: 18px 16px;
  border-width: 0 1px 0 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(56, 189, 248, 0.42) transparent;
  scrollbar-gutter: stable;
}

.sidebar::-webkit-scrollbar,
.nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb,
.nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.32);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  margin-bottom: 18px;
  min-width: 0;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.02;
  letter-spacing: 0.04em;
}

.brand small {
  display: block;
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav {
  display: grid;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
  padding-right: 2px;
}

.nav button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  text-align: left;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.nav button.active {
  background: rgba(21, 134, 255, 0.18);
  color: var(--blue-2);
}

.main {
  width: calc(100% - 250px);
  max-width: calc(100% - 250px);
  min-width: 0;
  margin-left: 250px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  width: 100%;
  min-width: 0;
}

.topbar h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
  width: 100%;
  min-width: 0;
}

.metric,
.card {
  min-width: 0;
  width: 100%;
  height: auto;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 9px;
  font-size: 28px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.row-actions,
.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  min-width: 0;
}

.row-actions {
  flex-wrap: nowrap;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  border-bottom: 1px solid rgba(145, 163, 187, 0.12);
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 900;
  background: rgba(145, 163, 187, 0.24);
}

.status.aberta,
.status.aprovado {
  background: rgba(32, 212, 137, 0.22);
  color: #99ffd1;
}

.status.andamento {
  background: rgba(21, 134, 255, 0.2);
  color: #bde0ff;
}

.status.finalizada {
  background: rgba(248, 193, 75, 0.22);
  color: #ffe4a3;
}

.status.pendente {
  background: rgba(248, 193, 75, 0.2);
  color: #ffe4a3;
}

.status.conectado {
  background: rgba(32, 212, 137, 0.22);
  color: #99ffd1;
}

.status.desconectado {
  background: rgba(255, 77, 95, 0.18);
  color: #ffb3bd;
}

.status.aguardando_qr {
  background: rgba(139, 92, 246, 0.2);
  color: #d8c8ff;
}

.status.pago {
  background: rgba(32, 212, 137, 0.2);
  color: #99ffd1;
}

.status.vencido {
  background: rgba(255, 77, 95, 0.18);
  color: #ffb3bd;
}

.status.normal {
  background: rgba(32, 212, 137, 0.2);
  color: #99ffd1;
}

.status.baixo {
  background: rgba(248, 193, 75, 0.22);
  color: #ffe4a3;
}

.status.sem {
  background: rgba(255, 77, 95, 0.18);
  color: #ffb3bd;
}

.status.ativo {
  background: rgba(32, 212, 137, 0.2);
  color: #99ffd1;
}

.status.vip {
  background: rgba(21, 134, 255, 0.22);
  color: #a9d7ff;
}

.status.inativo {
  background: rgba(145, 163, 187, 0.18);
  color: #d5deea;
}

.status.inadimplente {
  background: rgba(255, 77, 95, 0.18);
  color: #ffb3bd;
}

.status.aguardando {
  background: rgba(139, 92, 246, 0.2);
  color: #d8c8ff;
}

.status.agendada {
  background: rgba(21, 134, 255, 0.2);
  color: #bde0ff;
}

.status.enviada_mecanico {
  background: rgba(21, 134, 255, 0.2);
  color: #bde0ff;
}

.status.aguardando_pecas {
  background: rgba(248, 193, 75, 0.2);
  color: #ffe4a3;
}

.status.cancelada {
  background: rgba(145, 163, 187, 0.18);
  color: #d5deea;
}

.status.aguardando_aprovacao {
  background: rgba(248, 193, 75, 0.2);
  color: #ffe4a3;
}

.status.recusado,
.status.vencido {
  background: rgba(255, 77, 95, 0.18);
  color: #ffb3bd;
}

.status.convertido_os {
  background: rgba(139, 92, 246, 0.22);
  color: #d8c8ff;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  color: var(--text);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 5, 12, 0.78);
  backdrop-filter: blur(14px);
}

.modal-card {
  width: min(560px, 100%);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.modal-head h2 {
  margin-bottom: 0;
}

.scanner-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 16px;
  aspect-ratio: 4 / 3;
  background: #02060c;
}

.scanner-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scanner-line {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--blue-2), transparent);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.9);
}

.scanner-help {
  margin: 12px 0 0;
}

.form-grid > .btn-primary {
  width: 100%;
}

@media (max-width: 1180px) {
  .grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-company,
  .settings-backup {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 980px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    max-height: 44vh;
    min-height: 0;
    padding: 16px;
    border-width: 0 0 1px;
  }

  .brand {
    margin-bottom: 14px;
  }

  .brand-orb {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  .brand strong {
    font-size: 18px;
  }

  .brand small {
    max-width: calc(100vw - 120px);
  }

  .nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 190px;
    overflow-y: auto;
    padding-right: 0;
  }

  .nav button {
    min-height: 44px;
    padding: 10px 12px;
  }

  .main {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .topbar h1 {
    font-size: clamp(28px, 10vw, 40px);
  }

  .row-actions {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
  }

  .row-actions .btn {
    width: 100%;
    white-space: normal;
  }

  .sidebar.open .nav {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .auth-copy,
  .auth-form {
    padding: 26px;
  }

  .metrics,
  .form-grid.two,
  .input-with-button,
  .logo-row {
    grid-template-columns: 1fr;
  }

  .settings-card-head,
  .settings-status-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    padding: 20px;
  }

  .nav {
    grid-template-columns: 1fr;
  }
}

.btn svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  fill: currentColor;
}

.brand-hex {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 16px;
  background:
    linear-gradient(var(--panel-strong), var(--panel-strong)) padding-box,
    linear-gradient(135deg, var(--blue), #4aa3ff) border-box;
  border: 2px solid transparent;
  box-shadow: 0 0 28px rgba(21, 134, 255, 0.28);
}

.brand strong span {
  color: var(--blue-2);
}

.sidebar-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(145, 163, 187, 0.08);
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.sidebar-footer {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  margin-top: 12px;
  padding-top: 12px;
  padding-bottom: 18px;
}

.sidebar-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(145, 163, 187, 0.18);
  border-radius: 14px;
  padding: 12px;
  background: rgba(9, 15, 25, 0.74);
}

.sidebar-card span,
.sidebar-card small,
.copyright {
  color: var(--muted);
  font-size: 12px;
}

.sidebar-card strong {
  color: var(--blue-2);
  font-size: 14px;
}

.sidebar-footer > .btn {
  min-height: 42px;
  padding: 10px 12px;
}

.sidebar-card .btn {
  min-height: 38px;
  padding: 9px 10px;
}

.erp-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(145, 163, 187, 0.16);
}

.erp-topbar.simple {
  grid-template-columns: auto 1fr;
}

.page-title {
  min-width: 0;
}

.page-title h1 {
  margin-bottom: 6px;
  font-size: clamp(30px, 3.2vw, 42px);
}

.page-title p {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: min(380px, 32vw);
  min-width: 220px;
  color: var(--muted);
}

.search-box svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.search-box input {
  min-height: 48px;
  padding-left: 44px;
  border-radius: 12px;
  background: rgba(9, 15, 25, 0.72);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(145, 163, 187, 0.18);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  color: var(--text);
  background: rgba(145, 163, 187, 0.08);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.mobile-menu-btn {
  display: none;
}

.notification-btn {
  position: relative;
}

.notification-btn span {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.profile-pill span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), #0057ff);
  font-weight: 900;
}

.profile-pill strong {
  font-size: 14px;
  white-space: nowrap;
}

.dashboard-topbar {
  align-items: start;
}

.dashboard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: min(760px, 100%);
}

.dashboard-search {
  width: min(360px, 100%);
}

.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.dashboard-kpi {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(145deg, rgba(17, 26, 42, 0.94), rgba(8, 14, 24, 0.9));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
}

.dashboard-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kpi-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.kpi-icon svg {
  width: 26px;
  height: 26px;
  fill: white;
}

.dashboard-kpi.green .kpi-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.dashboard-kpi.blue .kpi-icon { background: linear-gradient(135deg, #1578ff, #0057ff); }
.dashboard-kpi.purple .kpi-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.dashboard-kpi.red .kpi-icon { background: linear-gradient(135deg, #ff4d5f, #b91c1c); }

.dashboard-kpi > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-kpi strong {
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1;
}

.dashboard-kpi small {
  font-weight: 900;
}

.dashboard-kpi small.up { color: #73f4a4; }
.dashboard-kpi small.down { color: #ff9aaa; }

.mini-chart {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 54px;
  margin-top: 2px;
}

.mini-chart span {
  width: 100%;
  max-width: 22px;
  border-radius: 999px 999px 4px 4px;
  background: rgba(255, 255, 255, 0.2);
}

.dashboard-kpi.green .mini-chart span {
  background: linear-gradient(180deg, #73f4a4, rgba(34, 197, 94, 0.35));
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.dashboard-panel,
.dashboard-suggestions {
  border-color: rgba(21, 134, 255, 0.22);
}

.dashboard-table table {
  min-width: 820px;
}

.avatar-sm {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), #0057ff);
  font-size: 12px;
  font-weight: 900;
}

.today-services-list {
  display: grid;
  gap: 12px;
}

.today-services-list article {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(145, 163, 187, 0.13);
  border-radius: 16px;
  padding: 13px;
  background: rgba(2, 6, 12, 0.32);
}

.today-services-list time {
  color: #8fcaff;
  font-weight: 900;
}

.service-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(21, 134, 255, 0.14);
}

.service-icon svg {
  width: 20px;
  height: 20px;
  fill: #8fcaff;
}

.today-services-list strong,
.today-services-list small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-suggestions {
  margin-bottom: 18px;
}

.suggestions-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.suggestion-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.34);
}

.suggestion-card > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: white;
  font-weight: 900;
}

.suggestion-card.danger > span { background: rgba(255, 77, 95, 0.35); }
.suggestion-card.blue > span { background: rgba(21, 134, 255, 0.35); }
.suggestion-card.green > span { background: rgba(34, 197, 94, 0.35); }
.suggestion-card.purple > span { background: rgba(139, 92, 246, 0.35); }

.suggestion-card strong,
.suggestion-card small {
  display: block;
  overflow-wrap: anywhere;
}

.suggestion-card small {
  margin-top: 5px;
}

.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
  flex-wrap: wrap;
}

.dashboard-footer strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #73f4a4;
}

.dashboard-footer i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.8);
}

body.theme-light .dashboard-kpi,
body.theme-light .today-services-list article,
body.theme-light .suggestion-card {
  background: rgba(255, 255, 255, 0.76);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(17, 26, 42, 0.92), rgba(8, 14, 24, 0.88));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.24);
}

.summary-card > svg {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  padding: 14px;
  border-radius: 18px;
  fill: white;
}

.summary-card.blue > svg { background: linear-gradient(135deg, #1578ff, #0057ff); }
.summary-card.green > svg { background: linear-gradient(135deg, #22c55e, #16a34a); }
.summary-card.purple > svg { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.summary-card.amber > svg { background: linear-gradient(135deg, #f59e0b, #f97316); }
.summary-card.red > svg { background: linear-gradient(135deg, #ff4d5f, #b91c1c); }

.summary-card div {
  min-width: 0;
}

.summary-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.summary-card strong {
  display: block;
  margin: 5px 0;
  font-size: clamp(23px, 2.2vw, 30px);
}

.summary-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.7fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.suppliers-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.suppliers-summary .summary-card {
  padding: 18px;
}

.suppliers-summary .summary-card strong {
  font-size: clamp(18px, 1.5vw, 24px);
}

.client-topbar .topbar-actions {
  align-items: center;
}

.client-search {
  width: min(520px, 100%);
}

.client-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.client-summary .summary-card {
  padding: 18px;
}

.client-summary .summary-card strong {
  font-size: clamp(18px, 1.5vw, 24px);
}

.client-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.65fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.client-form-card,
.client-list-card,
.client-intelligence {
  border-color: rgba(21, 134, 255, 0.22);
}

.form-section-title {
  margin-top: 4px;
  color: #8fcaff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.client-card-list {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.client-card-row {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 18px;
  padding: 18px;
  background: rgba(2, 6, 12, 0.32);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.client-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.client-card-top div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.client-card-top strong {
  font-size: 18px;
  line-height: 1.25;
  word-break: normal;
  overflow-wrap: normal;
}

.client-email {
  word-break: normal;
  overflow-wrap: break-word;
}

.client-card-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

.client-card-info > div {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.client-card-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  word-break: normal;
  overflow-wrap: normal;
}

.client-card-info strong {
  word-break: normal;
  overflow-wrap: normal;
}

.vehicle-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.vehicle-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border: 1px solid rgba(21, 134, 255, 0.3);
  border-radius: 999px;
  padding: 5px 9px;
  color: #9fd2ff;
  background: rgba(21, 134, 255, 0.09);
  font-size: 12px;
  font-weight: 900;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.muted-chip {
  border-color: rgba(145, 163, 187, 0.18);
  color: var(--muted);
  background: rgba(145, 163, 187, 0.08);
}

.client-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.client-card-actions .btn {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 13px;
}

body.theme-light .client-card-row,
body.theme-light .client-card-info > div {
  background: rgba(255, 255, 255, 0.72);
}

.client-intelligence {
  margin-top: 20px;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.insight-grid article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(2, 6, 12, 0.36);
}

.insight-grid svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: var(--blue);
}

.insight-grid p {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.client-profile-card {
  width: min(980px, calc(100vw - 28px));
  max-height: min(88vh, 860px);
  overflow-y: auto;
}

.client-profile-card::-webkit-scrollbar {
  width: 8px;
}

.client-profile-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(21, 134, 255, 0.32);
}

.profile-alert {
  margin-bottom: 14px;
  border: 1px solid rgba(255, 77, 95, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  color: #ffb3bd;
  background: rgba(255, 77, 95, 0.1);
  font-weight: 900;
}

.client-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.client-profile-grid div,
.client-profile-split article {
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(2, 6, 12, 0.34);
}

.client-profile-grid div {
  display: grid;
  gap: 6px;
}

.client-profile-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-profile-grid strong,
.client-profile-split strong {
  overflow-wrap: anywhere;
}

.client-profile-split {
  display: grid;
  grid-template-columns: 1.2fr 0.7fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.client-profile-split h3,
.profile-history h3 {
  margin-bottom: 10px;
  font-size: 15px;
}

.profile-history {
  margin-top: 14px;
}

.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}

body.theme-light .insight-grid article,
body.theme-light .client-profile-grid div,
body.theme-light .client-profile-split article {
  background: rgba(255, 255, 255, 0.72);
}

.supplier-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(140px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

.supplier-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.7fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.supplier-table table {
  min-width: 1060px;
}

.supplier-actions {
  flex-wrap: wrap;
  min-width: 320px;
}

.supplier-purchase-panel,
.supplier-details {
  margin-top: 20px;
  border-color: rgba(21, 134, 255, 0.28);
}

.supplier-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.supplier-detail-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 12, 0.34);
}

.supplier-detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.supplier-detail-grid strong {
  overflow-wrap: anywhere;
}

.supplier-note {
  margin-bottom: 14px;
}

body.theme-light .supplier-detail-grid div {
  background: rgba(255, 255, 255, 0.72);
}

.form-card h2,
.list-card h2,
.alerts-card h2,
.client-intelligence h2,
.supplier-purchase-panel h2,
.supplier-details h2,
.stock-movement-panel h2,
.stock-history-panel h2,
.stock-details-panel h2 {
  position: relative;
  padding-left: 14px;
  font-size: 20px;
}

.stock-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stock-summary .summary-card {
  padding: 18px;
}

.stock-summary .summary-card strong {
  font-size: clamp(18px, 1.5vw, 24px);
}

.stock-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.75fr) minmax(150px, 0.75fr) minmax(210px, 0.9fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 20px;
}

.toggle-line {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 900;
}

.toggle-line input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.stock-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.62fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
}

.stock-list {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.stock-list-head,
.stock-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(105px, 0.55fr) minmax(125px, 0.7fr) minmax(110px, 0.55fr) minmax(260px, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  max-width: 100%;
}

.stock-list-head {
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-row {
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.28);
}

.stock-product-cell,
.stock-meta-cell,
.stock-number-cell {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.stock-product-cell strong,
.stock-meta-cell strong,
.stock-number-cell strong {
  overflow-wrap: anywhere;
}

.stock-product-cell small,
.stock-meta-cell span,
.stock-meta-cell small,
.stock-number-cell span,
.stock-number-cell small {
  color: var(--muted);
}

.stock-meta-cell span,
.stock-number-cell span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-status-cell {
  min-width: 0;
}

.stock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}

.stock-movement-panel,
.stock-history-panel,
.stock-details-panel,
.stock-alerts-panel {
  border-color: rgba(21, 134, 255, 0.24);
}

.stock-history-panel,
.stock-details-panel,
.stock-alerts-panel {
  margin-top: 20px;
}

.stock-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stock-detail-grid div {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 12, 0.34);
}

.stock-detail-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-detail-grid strong {
  overflow-wrap: anywhere;
}

.movement-type {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(21, 134, 255, 0.18);
  color: #9fd2ff;
  font-size: 12px;
  font-weight: 900;
}

.movement-type.saida,
.movement-type.baixa,
.movement-type.cancelamento {
  background: rgba(255, 77, 95, 0.16);
  color: #ffb3bd;
}

.movement-type.ajuste {
  background: rgba(248, 193, 75, 0.18);
  color: #ffe4a3;
}

.integration-note {
  margin-top: 14px;
  border: 1px solid rgba(21, 134, 255, 0.22);
  border-radius: 14px;
  padding: 14px;
  color: #9fd2ff;
  background: rgba(21, 134, 255, 0.08);
  font-weight: 800;
}

body.theme-light .stock-detail-grid div {
  background: rgba(255, 255, 255, 0.72);
}

body.theme-light .stock-row {
  border-color: rgba(92, 119, 152, 0.18);
  background: rgba(255, 255, 255, 0.72);
}

.finance-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 20px;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  border: 1px solid rgba(145, 163, 187, 0.18);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 900;
  background: rgba(145, 163, 187, 0.08);
}

.chip strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  border-radius: 999px;
  padding: 0 8px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.09);
  font-size: 12px;
}

.chip.active {
  border-color: rgba(21, 134, 255, 0.62);
  color: white;
  background: linear-gradient(135deg, rgba(21, 134, 255, 0.9), rgba(0, 87, 255, 0.82));
}

.chip.active strong {
  background: rgba(255, 255, 255, 0.22);
}

.finance-type {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.finance-type.receita {
  color: #99ffd1;
  background: rgba(32, 212, 137, 0.18);
}

.finance-type.despesa {
  color: #ffd1d7;
  background: rgba(255, 77, 95, 0.16);
}

.finance-table td strong {
  display: block;
  margin-bottom: 4px;
}

.finance-table td small {
  display: block;
}

.quote-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.search-pill {
  min-width: min(360px, 100%);
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(145, 163, 187, 0.2);
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(2, 6, 12, 0.5);
}

.search-pill svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: var(--muted);
}

.search-pill input {
  border: 0;
  background: transparent;
  padding: 12px 0;
}

.quote-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.quotes-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.45fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.quote-form-card,
.quote-list-card {
  min-width: 0;
  overflow: hidden;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-bottom: 14px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
}

.section-title span {
  color: var(--blue-2);
  font-weight: 900;
}

.section-title.compact {
  margin-bottom: 10px;
}

.quote-form {
  display: grid;
  gap: 16px;
}

.quote-step {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.22);
}

.quote-step h3 {
  margin: 0;
  font-size: 16px;
}

.quote-line {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(86px, 0.5fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
  margin-bottom: 10px;
}

.quote-card-list {
  display: grid;
  gap: 14px;
}

.quote-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(2, 6, 12, 0.42));
}

.quote-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.quote-card-main h3 {
  margin: 3px 0;
}

.quote-card-main p {
  margin: 0;
  color: var(--muted);
}

.quote-card-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quote-card-info div {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(145, 163, 187, 0.1);
  border-radius: 14px;
  padding: 10px;
  background: rgba(2, 6, 12, 0.22);
}

.quote-card-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.quote-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.quote-card-actions .btn {
  padding: 10px 12px;
}

.os-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.os-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.os-layout {
  display: grid;
  grid-template-columns: minmax(440px, 1fr) minmax(0, 1.25fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.os-form-card,
.os-list-card {
  min-width: 0;
  overflow: hidden;
}

.os-form {
  display: grid;
  gap: 16px;
}

.os-step-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.os-step-tabs span {
  border: 1px solid rgba(48, 166, 255, 0.24);
  border-radius: 999px;
  padding: 8px 11px;
  color: #8ccaff;
  background: rgba(30, 144, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
}

.os-step {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 20px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.24);
}

.os-step h3 {
  margin: 0;
}

.checklist-grid .check-line,
.check-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  background: rgba(2, 6, 12, 0.2);
  font-weight: 800;
}

.check-line input {
  width: 18px;
  height: 18px;
}

.os-part-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) minmax(90px, 0.45fr) minmax(120px, 0.6fr) minmax(120px, 0.6fr);
  gap: 10px;
  align-items: end;
  min-width: 0;
  margin-bottom: 10px;
}

.os-send-step {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.os-card-list {
  display: grid;
  gap: 14px;
}

.os-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(30, 144, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 12, 0.46));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.os-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.os-card-head h3 {
  margin: 4px 0;
  overflow-wrap: break-word;
}

.os-card-head p {
  margin: 0;
  color: var(--muted);
}

.os-card-info {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.os-card-info div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.1);
  border-radius: 14px;
  padding: 11px;
  background: rgba(2, 6, 12, 0.24);
}

.os-card-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.os-card-info strong {
  overflow-wrap: break-word;
}

.os-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.os-card-actions .btn {
  padding: 10px 12px;
}

.os-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(14px);
}

.os-detail-card {
  width: min(1080px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  border: 1px solid rgba(48, 166, 255, 0.25);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(4, 9, 18, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.os-detail-card::-webkit-scrollbar {
  width: 8px;
}

.os-detail-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(48, 166, 255, 0.32);
}

.os-detail-card .icon-btn {
  font-size: 24px;
  color: var(--text);
}

.os-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.os-detail-grid article {
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.28);
}

.os-detail-grid h3 {
  margin: 0 0 10px;
}

.os-detail-grid p {
  margin: 6px 0;
  overflow-wrap: break-word;
}

body.theme-light .os-step,
body.theme-light .os-card,
body.theme-light .os-card-info div,
body.theme-light .os-detail-grid article {
  background: rgba(255, 255, 255, 0.72);
}

.service-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.service-top-actions select {
  width: min(240px, 100%);
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--text);
  background: var(--panel-strong);
  font-weight: 800;
}

.service-layout {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.service-form-card,
.service-list-card {
  min-width: 0;
  overflow: hidden;
}

.service-card-icon,
.service-title-icon,
.service-form label > svg {
  color: var(--blue);
}

.service-title-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-right: 8px;
  border: 1px solid rgba(48, 166, 255, 0.22);
  border-radius: 10px;
  background: rgba(30, 144, 255, 0.1);
  vertical-align: -7px;
}

.service-card-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(48, 166, 255, 0.24);
  border-radius: 14px;
  background: rgba(30, 144, 255, 0.1);
}

.service-card-icon svg,
.service-title-icon svg,
.service-form label > svg {
  width: 18px;
  height: 18px;
}

.service-form {
  display: grid;
  gap: 16px;
}

.service-form-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.service-form label {
  position: relative;
}

.service-form label > svg {
  position: absolute;
  top: 38px;
  left: 14px;
  z-index: 1;
  opacity: 0.78;
}

.service-form label > svg + input,
.service-form label > svg + select {
  padding-left: 42px;
}

.service-advanced {
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 18px;
  padding: 0;
  background: rgba(2, 6, 12, 0.18);
}

.service-advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  padding: 14px 16px;
  color: var(--text);
  font-weight: 900;
}

.service-advanced summary svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
  transition: transform 0.2s ease;
}

.service-advanced[open] summary svg {
  transform: rotate(180deg);
}

.service-advanced summary::-webkit-details-marker {
  display: none;
}

.service-advanced-grid {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
  animation: serviceAdvancedIn 0.18s ease;
}

@keyframes serviceAdvancedIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.service-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.service-table-wrap {
  overflow: hidden;
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 18px;
}

.service-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.service-table th,
.service-table td {
  overflow: hidden;
  padding: 13px 10px;
  border-bottom: 1px solid rgba(145, 163, 187, 0.12);
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.service-table th:nth-child(2),
.service-table td:nth-child(2) {
  width: 140px;
}

.service-table th:nth-child(3),
.service-table td:nth-child(3) {
  width: 90px;
}

.service-table th:nth-child(4),
.service-table td:nth-child(4) {
  width: 100px;
}

.service-table th:nth-child(5),
.service-table td:nth-child(5),
.service-table th:nth-child(6),
.service-table td:nth-child(6) {
  width: 90px;
}

.service-table th:nth-child(7),
.service-table td:nth-child(7) {
  width: 140px;
}

.service-table th {
  color: var(--muted);
  background: rgba(30, 144, 255, 0.08);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-table td {
  color: var(--text);
  font-weight: 750;
}

.service-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.service-status.ativo {
  color: #0f5132;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.28);
}

.service-status.inativo {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.service-icon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.service-action {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--muted);
  background: rgba(2, 6, 12, 0.18);
}

.service-action:hover {
  color: var(--blue);
  border-color: rgba(48, 166, 255, 0.35);
  background: rgba(30, 144, 255, 0.11);
}

.service-action.danger:hover {
  color: var(--danger);
  border-color: rgba(255, 77, 95, 0.35);
  background: rgba(255, 77, 95, 0.1);
}

.service-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 82;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 12, 0.68);
  backdrop-filter: blur(14px);
}

.service-detail-card {
  width: min(720px, 100%);
  max-height: min(680px, 92vh);
  overflow: auto;
  border: 1px solid rgba(48, 166, 255, 0.24);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(4, 9, 18, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.service-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.service-detail-grid div {
  border: 1px solid rgba(145, 163, 187, 0.13);
  border-radius: 16px;
  padding: 12px;
  background: rgba(2, 6, 12, 0.22);
}

.service-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.service-detail-grid strong {
  display: block;
  margin-top: 4px;
}

body.theme-light .service-advanced,
body.theme-light .service-table-wrap,
body.theme-light .service-action,
body.theme-light .service-detail-grid div {
  background: rgba(255, 255, 255, 0.72);
}

.employee-top-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.employee-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.25fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.employee-form-card,
.employee-list-card {
  min-width: 0;
  overflow: hidden;
}

.employee-form {
  display: grid;
  gap: 16px;
}

.employee-card-list {
  display: grid;
  gap: 14px;
}

.employee-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(30, 144, 255, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 12, 0.46));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.employee-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.employee-card-head h3 {
  margin: 8px 0 2px;
}

.employee-card-head p {
  margin: 0;
  color: var(--muted);
}

.employee-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(48, 166, 255, 0.42);
  border-radius: 14px;
  background: rgba(30, 144, 255, 0.11);
}

.employee-card-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.employee-card-info div {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(145, 163, 187, 0.1);
  border-radius: 14px;
  padding: 11px;
  background: rgba(2, 6, 12, 0.24);
}

.employee-card-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.employee-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-actions .btn {
  padding: 10px 12px;
}

body.theme-light .employee-card,
body.theme-light .employee-card-info div {
  background: rgba(255, 255, 255, 0.72);
}

.vehicle-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.vehicle-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.vehicles-layout {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.45fr);
  gap: 20px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.vehicle-form-card,
.vehicle-list-card,
.vehicle-suggestions {
  min-width: 0;
  overflow: hidden;
}

.vehicle-form {
  display: grid;
  gap: 16px;
}

.vehicle-form textarea {
  min-height: 100px;
}

.vehicle-form-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.vehicle-card-list {
  display: grid;
  gap: 14px;
}

.vehicle-card {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(145, 163, 187, 0.14);
  border-radius: 20px;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(30, 144, 255, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(2, 6, 12, 0.46));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.vehicle-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.vehicle-card-head h3 {
  margin: 6px 0 0;
  overflow-wrap: break-word;
}

.vehicle-plate {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid rgba(48, 166, 255, 0.46);
  border-radius: 12px;
  padding: 7px 10px;
  color: #86c8ff;
  background: rgba(30, 144, 255, 0.11);
  font-weight: 950;
  letter-spacing: 0.5px;
}

.vehicle-card-info {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vehicle-card-info div {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.1);
  border-radius: 14px;
  padding: 12px;
  background: rgba(2, 6, 12, 0.24);
}

.vehicle-card-info span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.vehicle-card-info strong {
  overflow-wrap: break-word;
}

.vehicle-card-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.vehicle-card-actions .btn,
.vehicle-form-actions .btn {
  padding: 10px 12px;
}

.vehicle-suggestions {
  margin-top: 20px;
}

.vehicle-suggestion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.vehicle-suggestion {
  display: grid;
  gap: 9px;
  min-width: 0;
  border: 1px solid rgba(48, 166, 255, 0.18);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.26);
}

.vehicle-suggestion > span {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #66b4ff;
  background: rgba(30, 144, 255, 0.12);
}

.vehicle-suggestion svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.vehicle-suggestion p {
  margin: 0;
  color: var(--muted);
}

.vehicle-history-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(14px);
}

.vehicle-history-card {
  width: min(980px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border: 1px solid rgba(48, 166, 255, 0.25);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.98), rgba(4, 9, 18, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.vehicle-history-card::-webkit-scrollbar {
  width: 8px;
}

.vehicle-history-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(48, 166, 255, 0.32);
}

.vehicle-history-card .icon-btn {
  font-size: 24px;
  color: var(--text);
}

.vehicle-history-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}

.vehicle-history-grid article {
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.28);
}

.vehicle-history-grid h3 {
  margin: 0 0 12px;
}

.vehicle-history-timeline {
  display: grid;
  gap: 10px;
}

.vehicle-history-timeline div {
  display: grid;
  gap: 4px;
  border-left: 3px solid #1e90ff;
  padding: 10px 12px;
  background: rgba(30, 144, 255, 0.08);
  border-radius: 0 12px 12px 0;
}

.vehicle-history-timeline span,
.vehicle-history-timeline small {
  color: var(--muted);
}

body.theme-light .vehicle-card,
body.theme-light .vehicle-card-info div,
body.theme-light .vehicle-suggestion,
body.theme-light .vehicle-history-grid article {
  background: rgba(255, 255, 255, 0.72);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.settings-form,
.settings-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.settings-card {
  display: grid;
  align-content: start;
  gap: 16px;
}

.settings-company {
  grid-row: span 2;
}

.settings-backup {
  grid-column: 1 / -1;
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.settings-card-head h2 {
  margin-bottom: 4px;
}

.settings-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 14px;
  color: var(--blue-2);
  background: rgba(21, 134, 255, 0.12);
  box-shadow: 0 0 26px rgba(21, 134, 255, 0.14);
}

.settings-icon svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.logo-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
}

.logo-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.36);
  border-radius: 22px;
  color: white;
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(21, 134, 255, 0.95), rgba(56, 189, 248, 0.82));
  box-shadow: 0 18px 40px rgba(21, 134, 255, 0.2);
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.toggle-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  color: var(--text);
}

.toggle-row input {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  accent-color: var(--blue);
}

.settings-toggle-offset {
  align-self: end;
  padding-bottom: 13px;
}

.settings-status-line,
.backup-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 14px;
  padding: 12px;
  background: rgba(2, 6, 12, 0.42);
}

.backup-info {
  align-items: flex-start;
  flex-direction: column;
}

.whatsapp-qr-panel {
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  overflow: auto;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 18px;
  padding: 16px;
  background: rgba(2, 6, 12, 0.52);
}

.whatsapp-qr-panel[hidden] {
  display: none;
}

.whatsapp-qr-image {
  width: min(240px, 100%);
  height: auto;
  border-radius: 14px;
  background: white;
  padding: 10px;
}

.whatsapp-qr-panel pre {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

.backup-info span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.backup-info strong {
  overflow-wrap: anywhere;
}

.reports-topbar {
  align-items: start;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin: -4px 0 18px;
}

.report-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: end;
  border-color: rgba(21, 134, 255, 0.3);
  margin-bottom: 18px;
}

.report-filter-title {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-quick-ranges,
.report-custom-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

.report-custom-filter {
  align-items: end;
}

.report-custom-filter label {
  flex: 1 1 150px;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 18px;
}

.report-kpi {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid rgba(21, 134, 255, 0.22);
  border-radius: 20px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(13, 20, 32, 0.95), rgba(8, 14, 24, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
}

.report-kpi span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-kpi strong {
  overflow-wrap: anywhere;
  font-size: clamp(20px, 2.1vw, 28px);
}

.report-kpi.blue { border-color: rgba(21, 134, 255, 0.26); }
.report-kpi.green { border-color: rgba(32, 212, 137, 0.24); }
.report-kpi.purple { border-color: rgba(139, 92, 246, 0.26); }
.report-kpi.amber { border-color: rgba(248, 193, 75, 0.24); }

.report-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.report-trend.down {
  color: var(--red);
}

.report-trend small {
  font-weight: 700;
  text-transform: none;
}

.report-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 14px;
}

.report-chart-card {
  min-height: 300px;
  border-color: rgba(21, 134, 255, 0.28);
  overflow: hidden;
}

.chart-main-value {
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.report-line-chart {
  width: 100%;
  height: 220px;
  overflow: visible;
}

.report-line-chart .chart-grid line {
  stroke: rgba(145, 163, 187, 0.13);
}

.report-line-chart circle {
  fill: var(--blue-2);
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}

.report-donut {
  --service: 60;
  --parts: 32;
  width: min(210px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  margin: 8px auto 18px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-strong) 0 46%, transparent 47%),
    conic-gradient(var(--blue) 0 calc(var(--service) * 1%), var(--green) calc(var(--service) * 1%) calc((var(--service) + var(--parts)) * 1%), var(--amber) 0);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.35), 0 18px 44px rgba(0, 0, 0, 0.24);
}

.report-donut div {
  display: grid;
  gap: 4px;
  text-align: center;
}

.report-donut strong {
  font-size: 18px;
}

.report-donut span {
  color: var(--muted);
  font-size: 12px;
}

.report-legend {
  display: grid;
  gap: 10px;
}

.report-legend span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.report-legend i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  margin-top: 5px;
  border-radius: 99px;
}

.blue-dot { background: var(--blue); }
.green-dot { background: var(--green); }
.amber-dot { background: var(--amber); }

.report-bars {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 210px;
  padding-top: 14px;
}

.report-bar-row {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  flex: 1 1 0;
  min-width: 42px;
  height: 210px;
}

.report-bar-row span,
.report-bar-row strong {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.report-bar-row div {
  display: flex;
  align-items: end;
  border-radius: 12px;
  background: rgba(145, 163, 187, 0.09);
}

.report-bar-row i {
  display: block;
  width: 100%;
  border-radius: 12px 12px 4px 4px;
  background: linear-gradient(180deg, #8b5cf6, #1586ff);
  box-shadow: 0 0 22px rgba(21, 134, 255, 0.2);
}

.report-table-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 14px;
}

.report-table-card {
  padding: 18px;
  border-color: rgba(21, 134, 255, 0.26);
}

.report-table table {
  min-width: 420px;
}

.report-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  max-width: 100%;
}

.finance-summary-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.finance-summary-items span {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 1px solid rgba(145, 163, 187, 0.13);
  border-radius: 14px;
  padding: 14px;
  background: rgba(2, 6, 12, 0.38);
}

.finance-summary-items strong {
  overflow-wrap: anywhere;
}

.report-intelligence,
.report-alerts,
.report-observations {
  display: grid;
  align-content: start;
  gap: 10px;
  border-color: rgba(21, 134, 255, 0.26);
}

.report-intelligence p,
.report-alerts p {
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 12px;
  padding: 11px 12px;
  color: #d8e6f7;
  background: rgba(2, 6, 12, 0.34);
}

.report-alerts p {
  display: flex;
  gap: 10px;
}

.report-alerts p span {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border-radius: 99px;
  color: #07111f;
  background: var(--amber);
  font-weight: 900;
}

.form-card h2::before,
.list-card h2::before,
.alerts-card h2::before,
.client-intelligence h2::before,
.supplier-purchase-panel h2::before,
.supplier-details h2::before,
.stock-movement-panel h2::before,
.stock-history-panel h2::before,
.stock-details-panel h2::before,
.report-chart-card h2::before,
.report-table-card h2::before,
.report-finance-summary h2::before,
.report-intelligence h2::before,
.report-alerts h2::before,
.report-observations h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 3px;
  height: 22px;
  border-radius: 99px;
  background: var(--blue);
}

.report-chart-card h2,
.report-table-card h2,
.report-finance-summary h2,
.report-intelligence h2,
.report-alerts h2,
.report-observations h2 {
  position: relative;
  padding-left: 14px;
  font-size: 20px;
}

.report-finance-summary {
  border-color: rgba(21, 134, 255, 0.26);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
  margin-bottom: 16px;
}

.card-head h2 {
  margin: 0;
}

.btn-outline-blue,
.btn-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(21, 134, 255, 0.58);
  color: #66b4ff;
  background: rgba(21, 134, 255, 0.08);
}

.premium-table table {
  min-width: 760px;
}

.premium-table th {
  padding: 13px 10px;
  color: #b9c5d8;
}

.premium-table td {
  padding: 16px 10px;
}

.premium-table code {
  font-family: Inter, system-ui, sans-serif;
  color: #d7e8ff;
}

.dots-btn {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  font-size: 22px;
  line-height: 1;
}

.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-btn {
  border: 1px solid rgba(145, 163, 187, 0.12);
  border-radius: 10px;
  min-width: 38px;
  height: 38px;
  color: var(--text);
  background: rgba(145, 163, 187, 0.08);
}

.page-btn.active {
  border-color: rgba(21, 134, 255, 0.65);
  background: linear-gradient(135deg, var(--blue), #0057ff);
}

.page-gap {
  color: var(--muted);
}

.alerts-card {
  width: 100%;
  max-width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(145, 163, 187, 0.16);
  border-radius: 20px;
  padding: 24px;
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.alerts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.stock-alert {
  display: grid;
  gap: 8px;
  min-width: 0;
  border-radius: 14px;
  padding: 16px;
  border: 1px solid rgba(248, 193, 75, 0.36);
  background: linear-gradient(135deg, rgba(248, 193, 75, 0.16), rgba(28, 20, 10, 0.72));
}

.stock-alert.danger {
  border-color: rgba(255, 77, 95, 0.38);
  background: linear-gradient(135deg, rgba(255, 77, 95, 0.16), rgba(30, 12, 20, 0.72));
}

.stock-alert span {
  color: #ffb4bd;
  font-size: 12px;
  font-weight: 900;
}

.stock-alert.warning span {
  color: #ffd36a;
}

.stock-alert strong {
  overflow-wrap: anywhere;
}

.link-btn {
  border: 0;
  color: #66b4ff;
  background: transparent;
  font-weight: 800;
}

@media (max-width: 1280px) {
  .summary-grid,
  .alerts-grid,
  .dashboard-kpi-grid,
  .suggestions-grid,
  .client-summary,
  .suppliers-summary,
  .stock-summary,
  .quote-summary,
  .os-summary,
  .vehicle-summary,
  .vehicle-suggestion-grid,
  .report-kpi-grid,
  .report-table-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .parts-grid,
  .finance-grid,
  .dashboard-main-grid,
  .client-layout,
  .supplier-grid,
  .supplier-filters,
  .stock-layout,
  .quotes-layout,
  .os-layout,
  .service-layout,
  .employee-layout,
  .vehicles-layout,
  .stock-filters,
  .settings-grid,
  .report-filter-card,
  .report-chart-grid,
  .report-bottom-grid {
    grid-template-columns: 1fr;
  }

  .stock-list-head,
  .stock-row {
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.9fr) minmax(105px, 0.55fr) minmax(125px, 0.7fr) minmax(110px, 0.55fr) minmax(230px, 0.9fr);
  }

  .finance-summary-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-line,
  .service-form-main,
  .service-detail-grid,
  .quote-card-info,
  .os-part-row,
  .os-card-info,
  .os-detail-grid,
  .employee-card-info,
  .vehicle-card-info,
  .vehicle-history-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .insight-grid,
  .client-card-info,
  .client-profile-grid,
  .client-profile-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-company,
  .settings-backup {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 900px) {
  .erp-topbar {
    grid-template-columns: auto 1fr;
  }

  .dashboard-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
    min-width: 0;
    width: 100%;
  }

  .dashboard-actions .btn,
  .dashboard-search {
    width: 100%;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
  }

  .search-box {
    width: 100%;
    min-width: 0;
    flex: 1 1 240px;
  }
}

@media (max-width: 760px) {
  .mobile-menu-btn,
  .sidebar-toggle {
    display: inline-grid;
  }

  .sidebar {
    max-height: 82px;
    transition: max-height 0.22s ease;
  }

  .sidebar .nav,
  .sidebar .sidebar-footer {
    display: none;
  }

  .sidebar.open {
    max-height: 88vh;
    overflow-y: auto;
  }

  .sidebar.open .nav,
  .sidebar.open .sidebar-footer {
    display: grid;
  }

  .sidebar.open .nav {
    max-height: none;
    overflow: visible;
  }

  .erp-topbar {
    align-items: start;
  }

  .profile-pill strong {
    display: none;
  }

  .summary-grid,
  .alerts-grid,
  .dashboard-kpi-grid,
  .suggestions-grid,
  .client-summary,
  .suppliers-summary,
  .client-profile-grid,
  .client-profile-split,
  .supplier-detail-grid,
  .stock-summary,
  .quote-summary,
  .os-summary,
  .vehicle-summary,
  .vehicle-suggestion-grid,
  .stock-detail-grid,
  .report-kpi-grid,
  .report-table-grid,
  .finance-summary-items {
    grid-template-columns: 1fr;
  }

  .quote-line,
  .service-form-main,
  .service-detail-grid,
  .quote-card-info,
  .os-part-row,
  .os-card-info,
  .os-detail-grid,
  .employee-card-info,
  .vehicle-card-info,
  .vehicle-history-grid {
    grid-template-columns: 1fr;
  }

  .quote-card-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-card-actions {
    justify-content: stretch;
  }

  .quote-card-actions .btn {
    width: 100%;
  }

  .os-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .os-card-actions {
    justify-content: stretch;
  }

  .os-card-actions .btn {
    width: 100%;
  }

  .employee-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .employee-actions {
    justify-content: stretch;
  }

  .employee-actions .btn {
    width: 100%;
  }

  .os-send-step {
    grid-template-columns: 1fr;
  }

  .os-detail-modal {
    padding: 14px;
  }

  .vehicle-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .vehicle-card-actions,
  .vehicle-form-actions {
    justify-content: stretch;
  }

  .vehicle-card-actions .btn,
  .vehicle-form-actions .btn {
    width: 100%;
  }

  .vehicle-history-modal {
    padding: 14px;
  }

  .today-services-list article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .today-services-list .service-icon {
    display: none;
  }

  .today-services-list .status {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .supplier-actions,
  .stock-actions {
    min-width: 0;
  }

  .stock-actions .btn {
    width: 100%;
  }

  .client-card-info {
    grid-template-columns: 1fr;
  }

  .client-card-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-card-actions {
    justify-content: stretch;
  }

  .client-card-actions .btn {
    width: 100%;
  }

  .stock-list-head {
    display: none;
  }

  .stock-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .stock-actions {
    justify-content: stretch;
  }

  .insight-grid {
    grid-template-columns: 1fr;
  }

  .profile-actions .btn {
    width: 100%;
  }

  .report-actions {
    justify-content: stretch;
  }

  .report-actions .btn,
  .report-custom-filter .btn {
    width: 100%;
  }

  .suggestion-card .btn {
    width: 100%;
  }

  .table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination {
    flex-wrap: wrap;
  }
}

@media (max-width: 620px) {
  .logo-row,
  .form-grid.three,
  .form-grid.four,
  .form-grid.five,
  .dashboard-actions,
  .settings-card .form-grid.two {
    grid-template-columns: 1fr;
  }

  .settings-card-head,
  .settings-status-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .settings-card .button-row .btn {
    width: 100%;
  }
}

@media (min-width: 1101px) {
  .service-layout {
    grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr);
  }
}

@media (max-width: 1100px) {
  .service-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .service-top-actions,
  .service-top-actions select,
  .service-top-actions .search-pill {
    width: 100%;
  }

  .service-table thead {
    display: none;
  }

  .service-table,
  .service-table tbody,
  .service-table tr,
  .service-table td {
    display: block;
    width: 100% !important;
  }

  .service-table tr {
    padding: 10px;
    border-bottom: 1px solid rgba(145, 163, 187, 0.12);
  }

  .service-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 0;
    white-space: normal;
  }

  .service-table td::before {
    content: attr(data-label);
    flex: 0 0 88px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .service-table td:first-child {
    align-items: flex-start;
    font-size: 15px;
  }

  .service-table td:first-child::before {
    padding-top: 2px;
  }

  .service-icon-actions {
    justify-content: flex-end;
  }
}

/* Premium AutoCore access screen */
.login-screen {
  position: relative;
  isolation: isolate;
  display: block;
  min-height: 100svh;
  padding: clamp(24px, 4vh, 48px);
  overflow: hidden;
  color: #fff;
  background: #020617;
}

.login-background,
.login-background > div {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-background {
  z-index: -1;
  overflow: hidden;
}

.login-background-image {
  background: #020617 url("./assets/login-background.jpg") center center / cover no-repeat;
  filter: saturate(1.12) contrast(1.12) brightness(0.58) blur(2px);
  transform: scale(1.045);
  animation: loginBackdrop 22s ease-in-out infinite alternate;
}

.login-background-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.74) 45%, rgba(2, 6, 23, 0.88) 100%),
    linear-gradient(180deg, rgba(7, 17, 36, 0.5), rgba(2, 6, 23, 0.94)),
    linear-gradient(135deg, rgba(0, 212, 255, 0.14), transparent 36%, rgba(56, 189, 248, 0.08) 76%, transparent);
}

.login-diagonal-lines {
  opacity: 0.42;
  background:
    repeating-linear-gradient(128deg, transparent 0 74px, rgba(56, 189, 248, 0.12) 75px, transparent 77px 162px),
    repeating-linear-gradient(128deg, transparent 0 238px, rgba(0, 212, 255, 0.12) 239px, transparent 242px 410px);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.92), transparent 85%);
  animation: loginLines 16s linear infinite;
}

.login-light-trace {
  opacity: 0.56;
  background:
    linear-gradient(116deg, transparent 15%, rgba(6, 182, 212, 0.18) 33%, transparent 41%),
    linear-gradient(116deg, transparent 58%, rgba(56, 189, 248, 0.12) 70%, transparent 76%);
  mix-blend-mode: screen;
  animation: loginSweep 11s ease-in-out infinite;
}

.login-particles {
  opacity: 0.46;
  background-image:
    radial-gradient(circle at 9% 18%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.8px),
    radial-gradient(circle at 28% 70%, rgba(0, 212, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 64% 22%, rgba(148, 163, 184, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 86% 62%, rgba(56, 189, 248, 0.72) 0 1px, transparent 2px);
  background-size: 240px 240px, 320px 320px, 280px 280px, 360px 360px;
  animation: loginParticles 18s linear infinite;
}

.login-grid {
  width: min(1440px, 100%);
  min-height: calc(100svh - clamp(48px, 8vh, 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(520px, 1.15fr) minmax(420px, 0.85fr);
  align-items: center;
  gap: clamp(32px, 5vw, 92px);
}

.login-story,
.login-access {
  min-width: 0;
}

.login-story {
  width: min(730px, 100%);
  display: grid;
  align-content: center;
  gap: 34px;
  padding: clamp(10px, 2vh, 28px);
  animation: loginRise 760ms ease both;
}

.login-brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 16px;
}

.login-brand-mark {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(125, 211, 252, 0.42);
  border-radius: 18px;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  background:
    linear-gradient(145deg, rgba(56, 189, 248, 0.34), rgba(2, 6, 23, 0.72)),
    rgba(7, 17, 36, 0.74);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 16px 38px rgba(0, 0, 0, 0.36),
    0 0 34px rgba(0, 212, 255, 0.24);
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand strong {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.login-brand strong em {
  color: #38bdf8;
  font-style: normal;
}

.login-brand small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.login-story-copy {
  display: grid;
  gap: 18px;
}

.login-kicker {
  width: fit-content;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 999px;
  padding: 0 15px;
  color: #a5f3fc;
  background: rgba(2, 6, 23, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-story h1 {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: 64px;
  line-height: 0.98;
  text-wrap: balance;
  text-shadow: 0 20px 68px rgba(0, 0, 0, 0.58);
}

.login-story-copy > p {
  max-width: 650px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.65;
}

.login-feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.login-feature {
  min-height: 100px;
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 18px;
  padding: 18px;
  background: rgba(7, 17, 36, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.login-feature:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(7, 17, 36, 0.56);
  transform: translateY(-2px);
}

.login-feature > span {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border: 1px solid rgba(165, 243, 252, 0.5);
  border-radius: 4px;
  background: linear-gradient(135deg, #00d4ff, #2563eb);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.56);
}

.login-feature strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
  font-size: 15px;
}

.login-feature p {
  color: #94a3b8;
  font-size: 13px;
}

.login-trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.login-trust-grid article {
  min-height: 88px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(12px);
}

.login-trust-grid strong {
  color: #fff;
  font-size: 16px;
}

.login-trust-grid span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.login-access {
  display: grid;
  justify-items: center;
  animation: loginRise 760ms 90ms ease both;
}

.login-card {
  width: min(500px, 100%);
  display: grid;
  gap: 18px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 30px;
  padding: clamp(28px, 4vw, 42px);
  color: #fff;
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.58)),
    rgba(7, 17, 36, 0.6);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 34px 110px rgba(0, 0, 0, 0.56),
    0 0 70px rgba(0, 212, 255, 0.16);
  backdrop-filter: blur(28px) saturate(1.22);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.login-card:hover {
  border-color: rgba(125, 211, 252, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 40px 120px rgba(0, 0, 0, 0.6),
    0 0 88px rgba(0, 212, 255, 0.22);
  transform: translateY(-3px);
}

.login-security-badge {
  width: fit-content;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 999px;
  padding: 0 13px;
  color: #a5f3fc;
  background: rgba(2, 6, 23, 0.48);
  font-size: 11px;
  font-weight: 900;
}

.login-security-badge span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #00d4ff;
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.8);
  animation: loginPulse 2.4s ease-in-out infinite;
}

.login-shield {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  justify-self: center;
  border: 1px solid rgba(125, 211, 252, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(56, 189, 248, 0.26), rgba(2, 6, 23, 0.64)),
    rgba(15, 23, 42, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 44px rgba(0, 212, 255, 0.22);
  animation: loginFloat 5s ease-in-out infinite;
}

.login-shield svg,
.login-input-icon svg,
.login-submit svg {
  fill: currentColor;
}

.login-shield svg {
  width: 40px;
  height: 40px;
  color: #7dd3fc;
  filter: drop-shadow(0 0 12px rgba(0, 212, 255, 0.58));
}

.login-card-head {
  display: grid;
  gap: 9px;
  text-align: center;
}

.login-card-head h2 {
  margin: 0;
  color: #fff;
  font-size: 34px;
  line-height: 1.08;
}

.login-card-head p {
  color: #94a3b8;
  font-size: 14px;
}

.login-alert {
  border: 1px solid rgba(251, 113, 133, 0.38);
  border-radius: 16px;
  padding: 12px 14px;
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.24);
  font-size: 13px;
}

.login-alert[data-tone="ok"] {
  border-color: rgba(34, 211, 238, 0.32);
  color: #cffafe;
  background: rgba(8, 47, 73, 0.34);
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field label {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}

.login-input-shell {
  position: relative;
  min-height: 62px;
  display: grid;
  align-items: center;
}

.login-input-shell input {
  min-height: 62px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 18px;
  padding: 0 18px 0 56px;
  color: #fff;
  background: rgba(2, 6, 23, 0.54);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.login-input-shell input::placeholder {
  color: rgba(148, 163, 184, 0.72);
}

.login-input-shell input:focus {
  border-color: rgba(0, 212, 255, 0.74);
  background: rgba(2, 6, 23, 0.72);
  box-shadow:
    0 0 0 4px rgba(0, 212, 255, 0.14),
    0 0 34px rgba(0, 212, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.login-input-icon {
  position: absolute;
  left: 19px;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: #38bdf8;
}

.login-input-icon svg {
  width: 20px;
  height: 20px;
}

.login-password-shell input {
  padding-right: 92px;
}

.login-password-toggle {
  position: absolute;
  right: 11px;
  z-index: 1;
  min-width: 72px;
  min-height: 40px;
  border: 1px solid rgba(125, 211, 252, 0.18);
  border-radius: 13px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.54);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.login-password-toggle:hover,
.login-password-toggle:focus-visible {
  border-color: rgba(0, 212, 255, 0.5);
  background: rgba(6, 182, 212, 0.18);
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.16);
}

.login-tools,
.login-card-actions,
.login-security-foot {
  display: flex;
  align-items: center;
}

.login-tools {
  justify-content: space-between;
  gap: 14px;
}

.login-check {
  min-width: 0;
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.login-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.login-check span {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  border: 1px solid rgba(125, 211, 252, 0.32);
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.64);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.login-check input:checked + span {
  border-color: rgba(0, 212, 255, 0.72);
  background:
    linear-gradient(135deg, transparent 0 24%, rgba(255, 255, 255, 0.96) 25% 33%, transparent 34%),
    linear-gradient(225deg, transparent 0 44%, rgba(255, 255, 255, 0.96) 45% 54%, transparent 55%),
    linear-gradient(135deg, #00d4ff, #2563eb);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.28);
}

.login-check input:focus-visible + span {
  outline: 3px solid rgba(0, 212, 255, 0.18);
  outline-offset: 2px;
}

.login-link {
  border: 0;
  padding: 0;
  color: #7dd3fc;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.login-link:hover,
.login-link:focus-visible {
  color: #cffafe;
  text-shadow: 0 0 18px rgba(0, 212, 255, 0.42);
}

.login-register-fields {
  display: grid;
  gap: 14px;
  border: 1px solid rgba(125, 211, 252, 0.14);
  border-radius: 20px;
  padding: 16px;
  background: rgba(2, 6, 23, 0.28);
  animation: loginReveal 240ms ease both;
}

.login-register-fields[hidden] {
  display: none;
}

.login-submit {
  position: relative;
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(165, 243, 252, 0.42);
  border-radius: 20px;
  color: #02131f;
  background: linear-gradient(135deg, #00d4ff 0%, #38bdf8 48%, #2563eb 100%);
  box-shadow:
    0 18px 42px rgba(6, 182, 212, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.54);
  font-size: 15px;
  font-weight: 950;
  cursor: pointer;
  transition: box-shadow 200ms ease, transform 200ms ease, filter 200ms ease;
}

.login-submit::before {
  content: "";
  position: absolute;
  inset: -40% auto -40% -28%;
  width: 38%;
  background: rgba(255, 255, 255, 0.42);
  transform: skewX(-22deg) translateX(-210%);
  transition: transform 520ms ease;
}

.login-submit:hover,
.login-submit:focus-visible {
  filter: brightness(1.08);
  box-shadow:
    0 24px 56px rgba(6, 182, 212, 0.42),
    0 0 36px rgba(56, 189, 248, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.64);
  transform: translateY(-2px);
}

.login-submit:hover::before,
.login-submit:focus-visible::before {
  transform: skewX(-22deg) translateX(560%);
}

.login-submit svg {
  position: relative;
  width: 22px;
  height: 22px;
  animation: loginArrow 1.7s ease-in-out infinite;
}

.login-card-actions {
  justify-content: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 800;
}

.login-security-foot {
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding-top: 18px;
}

.login-security-foot span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 7px 10px;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.34);
  font-size: 11px;
  font-weight: 800;
}

.login-card button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.login-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(2, 19, 31, 0.28);
  border-top-color: #02131f;
  border-radius: 999px;
  animation: loginSpin 740ms linear infinite;
}

@media (max-width: 1180px) {
  .login-grid {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.82fr);
    gap: 28px;
  }

  .login-story h1 {
    font-size: 52px;
  }

  .login-feature-list {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 820px) and (min-width: 961px) {
  .login-screen {
    padding: 20px 28px;
  }

  .login-grid {
    min-height: calc(100svh - 40px);
    gap: 28px;
  }

  .login-story {
    gap: 18px;
    padding: 0;
  }

  .login-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .login-story-copy {
    gap: 12px;
  }

  .login-story h1 {
    font-size: 48px;
  }

  .login-story-copy > p {
    font-size: 15px;
    line-height: 1.5;
  }

  .login-feature {
    min-height: 68px;
    padding: 12px 14px;
  }

  .login-feature p {
    display: none;
  }

  .login-trust-grid article {
    min-height: 64px;
    padding: 12px;
  }

  .login-card {
    gap: 12px;
    padding: 22px 26px;
    border-radius: 24px;
  }

  .login-shield {
    width: 58px;
    height: 58px;
    border-radius: 18px;
  }

  .login-shield svg {
    width: 32px;
    height: 32px;
  }

  .login-card-head {
    gap: 6px;
  }

  .login-card-head h2 {
    font-size: 28px;
  }

  .login-input-shell,
  .login-input-shell input {
    min-height: 54px;
  }

  .login-submit {
    min-height: 58px;
  }

  .login-security-foot {
    padding-top: 12px;
  }
}

@media (max-width: 960px) {
  .login-screen {
    padding: 22px;
  }

  .login-grid {
    min-height: calc(100svh - 44px);
    grid-template-columns: 1fr;
    align-content: start;
    gap: 24px;
  }

  .login-story {
    width: 100%;
    gap: 22px;
    padding: 8px;
  }

  .login-story h1 {
    font-size: 42px;
    max-width: 680px;
  }

  .login-story-copy > p {
    font-size: 16px;
  }

  .login-access {
    justify-items: stretch;
  }

  .login-card {
    width: 100%;
    max-width: 620px;
    justify-self: center;
  }
}

@media (max-width: 620px) {
  .login-screen {
    padding: 16px;
  }

  .login-background-overlay {
    background:
      linear-gradient(180deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.96)),
      linear-gradient(135deg, rgba(0, 212, 255, 0.12), transparent 50%);
  }

  .login-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 16px;
  }

  .login-story h1 {
    font-size: 36px;
    line-height: 1.03;
  }

  .login-trust-grid {
    grid-template-columns: 1fr;
  }

  .login-card {
    gap: 16px;
    border-radius: 24px;
    padding: 24px 18px;
  }

  .login-card-head h2 {
    font-size: 30px;
  }

  .login-tools {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-background-image,
  .login-diagonal-lines,
  .login-light-trace,
  .login-particles,
  .login-story,
  .login-access,
  .login-shield,
  .login-security-badge span,
  .login-submit svg,
  .login-spinner {
    animation: none;
  }
}

@keyframes loginBackdrop {
  from { transform: scale(1.045) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, -0.8%, 0); }
}

@keyframes loginLines {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(54px, -34px, 0); }
}

@keyframes loginSweep {
  0%, 100% { transform: translate3d(-4%, 0, 0); opacity: 0.32; }
  50% { transform: translate3d(4%, 0, 0); opacity: 0.62; }
}

@keyframes loginParticles {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-28px, -42px, 0); }
}

@keyframes loginRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes loginFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes loginPulse {
  0%, 100% { opacity: 0.72; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes loginArrow {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}

@keyframes loginSpin {
  to { transform: rotate(360deg); }
}
