:root {
  color-scheme: light;
  --ink: #080b12;
  --muted: #667085;
  --soft: #98a2b3;
  --line: #e5e7eb;
  --panel: #ffffff;
  --page: #f6f8fb;
  --nav: #08111f;
  --nav-2: #0e1a2f;
  --primary: #13294b;
  --primary-strong: #0b1a33;
  --primary-soft: #eaf0f8;
  --black: #050608;
  --green: #16a34a;
  --yellow: #d6a600;
  --red: #dc2626;
  --shadow: 0 16px 42px rgba(10, 18, 32, 0.08);
  --shadow-soft: 0 8px 24px rgba(10, 18, 32, 0.06);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(19, 41, 75, 0.08), transparent 34rem),
    var(--page);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, 0.96), rgba(19, 41, 75, 0.92)),
    linear-gradient(45deg, #08111f, #13294b);
}

.login-panel {
  width: min(420px, 100%);
  padding: 34px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.brand-lockup,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.brand-logo {
  width: 46px;
  height: 46px;
  display: block;
  flex: 0 0 46px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand-lockup h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1;
}

.brand-lockup p,
.login-hint,
.eyebrow,
.panel-heading span,
.metric-card small {
  margin: 0;
  color: var(--muted);
}

.login-form,
.crud-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

label {
  display: grid;
  gap: 7px;
  color: #263244;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder {
  color: #98a2b3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2b4c7e;
  box-shadow: 0 0 0 4px rgba(19, 41, 75, 0.12);
}

textarea {
  resize: vertical;
}

.primary-action,
.secondary-action,
.ghost-action,
.nav-item,
.icon-action {
  border: 0;
  border-radius: 8px;
  min-height: 42px;
  padding: 0 14px;
  font-weight: 850;
}

.primary-action {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 20px rgba(19, 41, 75, 0.16);
}

.primary-action:hover {
  background: var(--primary-strong);
}

.secondary-action {
  background: var(--black);
  color: #fff;
}

.ghost-action {
  width: 100%;
  margin-top: auto;
  background: transparent;
  color: #e9eef7;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.danger-action {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: #fee4e2;
  color: #b42318;
  font-weight: 900;
  cursor: pointer;
}

.user-chip {
  display: grid;
  gap: 2px;
  margin-top: auto;
  padding: 11px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 850;
}

.user-chip small {
  color: #b8c5d8;
  font-size: 12px;
  font-weight: 700;
}

.user-chip + .ghost-action {
  margin-top: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  background: linear-gradient(180deg, var(--nav), var(--nav-2));
  color: #fff;
}

.sidebar-brand {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 22px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-content: flex-start;
  min-height: 42px;
  background: transparent;
  color: #c7d2e4;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
  color: currentColor;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item.active .nav-icon {
  background: #fff;
  color: var(--primary);
}

.content-shell {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 3px 0 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.notification-trigger {
  position: relative;
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.notification-popover {
  position: fixed;
  top: 92px;
  right: 28px;
  z-index: 80;
  width: min(380px, calc(100vw - 32px));
  max-height: min(560px, calc(100vh - 118px));
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.notification-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
}

.notification-list {
  display: grid;
  gap: 10px;
  max-height: 470px;
  overflow: auto;
  padding: 12px;
}

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: #f8fafc;
}

.notification-item.unread {
  border-color: rgba(8, 145, 178, 0.35);
  background: #eefbff;
}

.notification-item strong,
.notification-item p,
.notification-item small {
  display: block;
}

.notification-item strong {
  color: #0f172a;
}

.notification-item p {
  margin: 5px 0;
  color: #334155;
  line-height: 1.4;
}

.notification-item small,
.notification-read {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.metric-grid,
.dashboard-grid,
.crud-page,
.admin-grid {
  display: grid;
  gap: 16px;
}

.metric-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.compact-metrics {
  margin-bottom: 18px;
}

.system-launcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.system-card {
  display: grid;
  gap: 12px;
  min-height: 178px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.system-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 145, 178, 0.36);
  box-shadow: var(--shadow);
}

.system-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 36px;
  border-radius: 8px;
  background: #e8f7fb;
  color: #075985;
  font-weight: 950;
  letter-spacing: 0;
}

.system-card strong {
  font-size: 20px;
  color: #0f172a;
}

.system-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.portal-shell {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 28px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.portal-topbar {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 5;
  width: min(1180px, calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.portal-brand {
  padding: 0;
  border: 0;
  color: #0f172a;
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-user span {
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.portal-hero {
  display: grid;
  gap: 8px;
  margin-top: 74px;
  text-align: center;
}

.portal-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.portal-launcher {
  align-items: stretch;
}

.portal-launcher .system-card {
  min-height: 230px;
  align-content: start;
}

.system-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.desktop-system-switch {
  width: auto;
  white-space: nowrap;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.shortcut-grid a {
  display: grid;
  align-content: center;
  min-height: 64px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: #182230;
  font-size: 13px;
  font-weight: 900;
}

.metric-card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card span {
  color: #344054;
  font-size: 13px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 30px;
  letter-spacing: 0;
}

.dashboard-grid {
  grid-template-columns: minmax(300px, 0.82fr) minmax(340px, 1.18fr);
}

.crud-page,
.admin-grid {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.single-crud {
  align-items: start;
}

.panel {
  padding: 18px;
}

.panel h3 {
  margin: 0 0 14px;
  font-size: 18px;
}

.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin-bottom: 0;
}

.donut-wrap {
  position: relative;
  width: min(260px, 74vw);
  aspect-ratio: 1;
  margin: 10px auto 18px;
}

.donut {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 33%, var(--yellow) 33% 66%, var(--red) 66% 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.donut-center strong {
  font-size: 34px;
}

.donut-center span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.legend {
  display: grid;
  gap: 9px;
}

.legend span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: #344054;
  font-size: 14px;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 8px;
}

.legend b {
  margin-left: auto;
}

.green {
  background: var(--green);
}

.yellow {
  background: var(--yellow);
}

.red {
  background: var(--red);
}

.recent-list,
.tracking-results,
.stock-grid,
.plate-card-grid,
.route-line {
  display: grid;
  gap: 10px;
}

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

.plate-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.plate-card:hover {
  transform: translateY(-2px);
  border-color: #c7d2e4;
  box-shadow: var(--shadow);
}

.plate-card-top,
.plate-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plate-card-top {
  justify-content: flex-start;
}

.plate-card-top .status-pill {
  margin-left: auto;
}

.plate-card-top strong {
  font-size: 22px;
}

.asset-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.asset-badge-large {
  width: 48px;
  height: 48px;
}

.asset-badge svg,
.asset-pin svg,
.table-actions svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.asset-badge-large svg {
  width: 25px;
  height: 25px;
}

.plate-card-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tracking-detail {
  display: grid;
  gap: 16px;
}

.back-link {
  width: fit-content;
  color: var(--primary);
  font-weight: 900;
}

.detail-hero {
  display: grid;
  gap: 16px;
}

.detail-title {
  display: flex;
  align-items: start;
  gap: 12px;
}

.detail-title .status-pill {
  margin-left: auto;
}

.detail-title h2 {
  margin: 0;
  font-size: 34px;
}

.detail-grid,
.detail-two-col {
  display: grid;
  gap: 12px;
}

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

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

.detail-grid div,
.info-list span {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.detail-grid strong,
.info-list strong {
  color: var(--ink);
  font-size: 14px;
}

.info-list {
  display: grid;
  gap: 8px;
}

.profile-area,
.profile-grid,
.profile-form {
  display: grid;
  gap: 14px;
}

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

.profile-card {
  gap: 16px;
}

.profile-avatar {
  display: inline-grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.profile-card h2 {
  margin: 0;
}

.profile-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.profile-photo-wrap {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.profile-photo {
  width: 86px;
  height: 86px;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.photo-upload-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.plain-text {
  margin: 0;
  color: #344054;
  line-height: 1.55;
}

.period-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 1fr)) repeat(4, auto);
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
}

.history-card-list {
  display: grid;
  gap: 10px;
}

.history-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.history-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-card p {
  margin: 0;
  color: #344054;
  line-height: 1.35;
}

.history-card small {
  color: var(--muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.photo-grid img {
  width: 100%;
  aspect-ratio: 1.2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}

.attachments-panel {
  padding: 0 18px 18px;
}

.attachments-panel h3 {
  margin: 0 0 12px;
  font-size: 16px;
}

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

.attachment-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.attachment-card img,
.attachment-file-icon {
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: 7px;
  background: #e8f7fb;
  object-fit: cover;
}

.attachment-file-icon {
  display: grid;
  place-items: center;
  color: #075985;
}

.attachment-file-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.attachment-card strong,
.attachment-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-card strong {
  color: #0f172a;
  font-size: 12px;
}

.attachment-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

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

.history-table table {
  min-width: 1180px;
}

.route-view {
  margin-bottom: 16px;
}

.route-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.route-point {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
}

.route-point:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 44px;
  bottom: -12px;
  width: 2px;
  background: #cbd5e1;
}

.route-dot {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.route-point strong {
  display: block;
  margin-bottom: 3px;
}

.route-point p {
  margin: 0 0 4px;
  color: #344054;
}

.route-point small {
  color: var(--muted);
}

.record-item,
.stock-card {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.record-top,
.stock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.record-title,
.stock-code {
  font-weight: 900;
}

.record-meta,
.muted-line {
  color: var(--muted);
  font-size: 13px;
}

.battery {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 16px;
}

.data-table {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 650px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

th {
  color: #475467;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-actions {
  display: flex;
  gap: 7px;
}

.icon-action {
  min-width: 36px;
  min-height: 34px;
  padding: 0 8px;
  background: #eef2f7;
  color: #182230;
}

.icon-action.danger {
  background: #fff1f1;
  color: #b42318;
}

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

.tag-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #182230;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 900;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  margin: 2px 3px 2px 0;
  border-radius: 999px;
  background: #e8f7fb;
  color: #075985;
  font-size: 11px;
  font-weight: 900;
}

.admin-overview {
  margin-bottom: 16px;
}

.admin-hero-panel {
  display: grid;
  gap: 8px;
  padding: 22px;
}

.admin-hero-panel h3 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.permission-grid {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.setting-list label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.setting-list input {
  width: 18px;
  min-height: 18px;
}

.toggle-line {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

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

.inline-actions {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.report-builder {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

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

.field-title {
  color: #263244;
  font-size: 12px;
  font-weight: 900;
}

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

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

.check-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  color: #263244;
}

.check-card input {
  width: 18px;
  min-height: 18px;
  accent-color: var(--primary);
}

.report-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-output {
  min-height: 88px;
}

.modal-open {
  overflow: hidden;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 17, 31, 0.48);
  backdrop-filter: blur(8px);
}

.modal-shell[hidden] {
  display: none !important;
}

.modal-card {
  width: min(720px, 100%);
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.36);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.28);
}

.modal-large {
  width: min(980px, 100%);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.modal-head h3 {
  margin: 0;
}

.modal-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 18px;
}

.modal-form label:has(textarea),
.modal-form .toggle-line,
.modal-form .inline-actions,
.modal-form .primary-action {
  grid-column: 1 / -1;
}

.modal-detail-grid {
  padding: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-tag-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(140deg, rgba(8, 17, 31, 0.94), rgba(19, 41, 75, 0.82)),
    #08111f;
}

.public-tag-panel {
  width: min(960px, 100%);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.public-tag-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.public-tag-header h1 {
  margin: 2px 0 0;
  font-size: 28px;
  line-height: 1.1;
}

.public-tag-form {
  display: grid;
  gap: 18px;
}

.public-step {
  display: grid;
  gap: 18px;
}

.public-step[hidden] {
  display: none;
}

.checkout-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.checkout-progress li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.checkout-progress span {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #263244;
  font-size: 12px;
}

.checkout-progress li.active,
.checkout-progress li.done {
  border-color: #13294b;
  background: #eaf0f8;
  color: #13294b;
}

.checkout-progress li.active span,
.checkout-progress li.done span {
  background: #13294b;
  color: #fff;
}

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

.full-field {
  grid-column: 1 / -1;
}

.tag-choice-group,
.asset-grid,
.plan-choice-group {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

.tag-choice-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tag-choice-group legend,
.asset-grid legend,
.plan-choice-group legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: #263244;
  font-size: 12px;
  font-weight: 900;
}

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

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

.tag-type-card,
.asset-option,
.plan-card {
  position: relative;
  min-height: 108px;
  align-content: center;
  justify-items: center;
  gap: 8px;
  padding: 14px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}

.tag-type-card input,
.asset-option input,
.plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-type-card:has(input:checked),
.asset-option:has(input:checked),
.plan-card:has(input:checked) {
  border-color: #13294b;
  background: #eaf0f8;
  box-shadow: 0 0 0 4px rgba(19, 41, 75, 0.08);
}

.plan-card {
  min-height: 96px;
  align-items: start;
  justify-items: start;
  text-align: left;
}

.plan-card strong {
  font-size: 17px;
  color: #13294b;
}

.plan-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.family-members-field {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.family-members-field[hidden] {
  display: none;
}

.plan-total-box,
.payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 8px;
  background: #13294b;
  color: #fff;
}

.plan-total-box span,
.payment-summary span {
  font-size: 12px;
  font-weight: 900;
  opacity: 0.82;
}

.plan-total-box strong,
.payment-summary strong {
  font-size: 20px;
}

.choice-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #13294b;
  color: #fff;
}

.choice-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.conditional-fields {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-status[data-tone="success"] {
  color: #166534;
}

.form-status[data-tone="error"] {
  color: #b42318;
}

.public-submit {
  width: 100%;
  min-height: 48px;
}

.public-form-actions {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
  gap: 12px;
}

.public-form-actions .secondary-action[hidden],
.public-form-actions .primary-action[hidden] {
  display: none;
}

.public-form-actions .secondary-action[hidden] + .primary-action {
  grid-column: 1 / -1;
}

.payment-step {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.summary-step,
.asaas-payment-box,
.summary-card,
.finance-overdue-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.summary-card h2,
.asaas-payment-box h2,
.terms-page h2 {
  margin: 0 0 12px;
  color: #13294b;
}

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

.summary-list div,
.finance-alert-list article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-list span,
.finance-alert-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-list strong {
  color: #13294b;
  overflow-wrap: anywhere;
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 800;
}

.terms-check input {
  width: auto;
  min-height: auto;
  padding: 0;
  margin-top: 3px;
}

.asaas-payment-box {
  display: grid;
  gap: 14px;
  text-align: center;
}

.asaas-payment-box p,
.terms-page p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.55;
}

.asaas-payment-box .primary-action {
  width: min(360px, 100%);
  margin: 0 auto;
}

.field-hint[data-tone="success"] {
  color: #166534;
}

.field-hint[data-tone="error"],
.danger-pill {
  color: #b42318;
}

.finance-overdue-box {
  margin: 16px 0;
}

.compact-heading {
  margin-bottom: 12px;
}

.finance-alert-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.finance-alert-list article {
  align-content: start;
}

.finance-alert-list .secondary-action {
  margin-top: 6px;
}

.terms-page {
  display: grid;
  gap: 18px;
}

.terms-page section {
  display: grid;
  gap: 16px;
}

.done-step {
  padding: 24px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: linear-gradient(180deg, #f0fdf4, #ffffff);
  text-align: center;
}

.done-step h2 {
  margin: 0;
  color: #13294b;
}

.done-step p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--muted);
  font-weight: 700;
}

.done-badge {
  width: fit-content;
  margin: 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: #166534;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.getrak-access-result {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
}

.getrak-access-result[hidden] {
  display: none;
}

.getrak-access-result strong {
  color: #166534;
}

.getrak-version-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.compact-table {
  font-size: 12px;
}

.qr-panel {
  display: grid;
  place-items: center;
  min-height: 560px;
}

.qr-display {
  width: min(520px, 100%);
  display: grid;
  justify-items: center;
  gap: 18px;
}

.qr-display img {
  width: min(360px, 80vw);
  aspect-ratio: 1;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.qr-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 240px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 10px;
  background: #f8fafc;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.kanban-column.drag-over {
  border-color: rgba(8, 145, 178, 0.5);
  background: #eefbff;
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.12);
}

.kanban-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #0f172a;
}

.kanban-head span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e8f7fb;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
}

.kanban-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  transition: transform 150ms ease, opacity 150ms ease, box-shadow 150ms ease;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card.dragging {
  opacity: 0.62;
  transform: rotate(1deg) scale(0.98);
  box-shadow: var(--shadow);
}

.professional-kanban .kanban-column {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.kanban-card-top {
  display: grid;
  gap: 4px;
}

.kanban-card-top strong {
  color: #0f172a;
  font-size: 15px;
}

.kanban-card-top span {
  width: fit-content;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f7fb;
  color: #075985;
  font-size: 11px;
  font-weight: 900;
}

.kanban-card span,
.kanban-card small {
  color: var(--muted);
}

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

.lead-values small {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #f8fafc;
}

.lead-values b {
  color: #0f172a;
}

.kanban-card .table-actions {
  margin-top: 4px;
}

.stats-bars {
  display: grid;
  gap: 12px;
}

.stats-bar {
  display: grid;
  gap: 6px;
}

.stats-bar div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.stats-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #22c55e);
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .metric-grid,
  .system-launcher,
  .dashboard-grid,
  .crud-page,
  .admin-grid,
  .stock-grid,
  .plate-card-grid,
  .detail-grid,
  .report-builder,
  .photo-grid,
  .attachment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

@media (max-width: 760px) {
  body {
    padding-bottom: calc(74px + env(safe-area-inset-bottom));
  }

  .desktop-only-panel {
    display: none;
  }

  .login-shell {
    padding: 18px;
    align-items: end;
  }

  .login-panel {
    padding: 24px;
    border-radius: 16px;
  }

  .brand-logo {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .notification-popover {
    inset: auto 10px calc(86px + env(safe-area-inset-bottom)) 10px;
    width: auto;
    max-height: min(62vh, 520px);
    border-radius: 12px;
  }

  .notification-list {
    max-height: calc(62vh - 54px);
  }

  .notification-item {
    grid-template-columns: 1fr;
  }

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

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 20;
    display: block;
    padding: 7px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    box-shadow: 0 22px 60px rgba(5, 6, 8, 0.28);
  }

  .sidebar-brand,
  .user-chip,
  .ghost-action,
  .system-switch {
    display: none;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-count, 4), minmax(0, 1fr));
    gap: 4px;
  }

  .desktop-system-switch {
    display: none;
  }

  .nav-item {
    min-height: 54px;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 4px;
    padding: 0 8px;
    font-size: 11px;
    border-radius: 12px;
  }

  .nav-icon {
    width: 26px;
    height: 24px;
    background: transparent;
  }

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

  .nav-item.active .nav-icon {
    background: transparent;
  }

  .content-shell {
    padding: 14px;
  }

  .topbar,
  .topbar-actions,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar h2 {
    font-size: 22px;
  }

  body[data-page="tracking"] .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
  }

  body[data-page="tracking"] .topbar-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  body[data-page="tracking"] .topbar h2 {
    font-size: 20px;
    margin-top: 0;
  }

  body[data-page="tracking"] .eyebrow {
    margin-bottom: 2px;
  }

  .eyebrow {
    font-size: 11px;
  }

  .metric-grid,
  .system-launcher,
  .dashboard-grid,
  .crud-page,
  .admin-grid,
  .stock-grid,
  .plate-card-grid,
  .field-grid,
  .tag-choice-group,
  .asset-grid,
  .plan-choice-group,
  .checkout-progress,
  .summary-list,
  .finance-alert-list,
  .qr-actions,
    .detail-grid,
    .detail-two-col,
    .photo-grid,
    .attachment-grid,
    .report-builder,
    .field-grid,
    .period-filter,
    .search-row {
    grid-template-columns: 1fr;
  }

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

  .modal-shell {
    align-items: end;
    padding: 10px;
  }

  .modal-card {
    width: 100%;
    max-height: 88vh;
    border-radius: 12px;
  }

  .modal-form,
  .modal-detail-grid {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .kanban-board {
    grid-template-columns: repeat(5, minmax(240px, 78vw));
  }

  .portal-shell {
    width: min(100% - 28px, 680px);
    align-content: start;
    padding-top: 112px;
  }

  .portal-topbar {
    top: 12px;
    width: calc(100% - 24px);
  }

  .portal-user span {
    display: none;
  }

  .portal-hero {
    margin-top: 0;
    text-align: left;
  }

  .portal-hero h1 {
    font-size: 34px;
  }

  .portal-launcher .system-card {
    min-height: 168px;
  }

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

  .metric-card,
  .panel {
    border-radius: 12px;
  }

  .panel {
    padding: 14px;
  }

  .panel h3 {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .public-tag-shell {
    padding: 14px;
    place-items: start center;
  }

  .public-tag-panel {
    padding: 18px;
    border-radius: 12px;
  }

  .public-tag-header h1 {
    font-size: 24px;
  }

  .tag-type-card,
  .asset-option,
  .plan-card {
    min-height: 92px;
  }

  .public-form-actions {
    grid-template-columns: 1fr;
  }

  .qr-panel {
    min-height: 420px;
  }

  .metric-card {
    padding: 13px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .plate-card {
    gap: 8px;
    padding: 13px;
    border-radius: 12px;
  }

  .plate-card-top {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .plate-card-top strong {
    min-width: 0;
    font-size: 19px;
  }

  .plate-card-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    font-size: 11px;
  }

  .record-meta,
  .muted-line {
    font-size: 12px;
  }

  .detail-hero {
    gap: 12px;
  }

  .detail-title {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .detail-title h2 {
    font-size: 24px;
    overflow-wrap: anywhere;
  }

  .asset-badge-large {
    width: 42px;
    height: 42px;
  }

  .detail-grid,
  .info-list {
    gap: 8px;
  }

  .detail-grid div,
  .info-list span {
    padding: 10px;
    border-radius: 9px;
  }

  .period-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .period-filter button {
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  .route-panel {
    padding: 12px;
  }

  .route-point {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
  }

  .route-dot {
    width: 28px;
    height: 28px;
  }

  .route-point:not(:last-child)::after {
    left: 13px;
    top: 36px;
  }

  table {
    min-width: 640px;
  }

  .inline-actions {
    grid-template-columns: 1fr;
  }

  .field-grid {
    gap: 8px;
  }

  .check-card {
    min-height: 42px;
    padding: 9px 10px;
  }
}

.field-hint { display:block; margin-top:4px; color:#64748b; font-size:12px; }

.alert-item {
  border-left: 4px solid var(--red);
  background: #fff7f7;
}

.battery-low {
  color: #991b1b;
  background: #fee2e2;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 900;
}

.map-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
  margin: 14px 0 18px;
}

.ghost-light {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--primary);
  font-weight: 850;
}

.map-view {
  width: 100%;
  height: min(64vh, 620px);
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #eef2f7;
  box-shadow: var(--shadow-soft);
}

.asset-pin {
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #10264a;
  color: #fff;
  border: 2px solid #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

.asset-pin span {
  display: grid;
  place-items: center;
}

.asset-pin svg {
  width: 22px;
  height: 22px;
}

.asset-pin-ok {
  background: #10264a;
}

.asset-pin-warn {
  background: #a16207;
}

.asset-pin-low {
  background: #b42318;
}

.map-popup {
  display: grid;
  gap: 3px;
  min-width: 150px;
}

.map-popup strong {
  font-size: 15px;
}

.map-popup span,
.map-popup small {
  color: #475467;
}

.map-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.map-position-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  background: #fff;
  display: grid;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.map-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.map-card-main span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.ai-assistant-button {
  position: fixed;
  right: 18px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #fff;
  box-shadow: 0 18px 40px rgba(15, 45, 74, 0.28);
  cursor: grab;
  touch-action: none;
}

.ai-assistant-button img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 50%;
  pointer-events: none;
}

.ai-chat-panel {
  position: fixed;
  right: 18px;
  bottom: calc(160px + env(safe-area-inset-bottom));
  z-index: 61;
  width: min(380px, calc(100vw - 28px));
  height: min(560px, 72vh);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}

.ai-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #0f2d4a;
  color: #fff;
}

.ai-chat-head small {
  display: block;
  color: #bdeaf3;
  font-size: 12px;
}

.ai-chat-messages {
  height: calc(100% - 118px);
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  background: #f8fafc;
}

.ai-message {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
  font-size: 14px;
}

.ai-message.assistant {
  background: #fff;
  border: 1px solid var(--line);
}

.ai-message.user {
  justify-self: end;
  background: var(--primary);
  color: #fff;
}

.ai-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.map-position-card span,
.map-position-card small {
  color: var(--muted);
}

.map-position-card p {
  margin: 0;
  color: var(--ink);
}

@media (max-width: 860px) {
  .map-filter {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 8px 0 12px;
  }

  .map-filter label {
    grid-column: 1 / -1;
  }

  .map-view {
    height: calc(100vh - 306px);
    min-height: 390px;
    border-radius: 16px;
  }

  .map-list {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  .map-position-card {
    padding: 12px;
    gap: 4px;
  }

  .map-position-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

.install-action {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: #10264a;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.install-action[hidden] {
  display: none !important;
}

.install-card {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  display: grid;
  gap: 8px;
}

.install-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.install-card small {
  color: var(--muted);
  line-height: 1.35;
}

.install-card .install-action {
  width: 100%;
}

@media (max-width: 720px) {
  .topbar-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .install-action,
  .secondary-action {
    min-height: 42px;
  }
}

/* Premium visual refresh */
:root {
  --ink: #111827;
  --muted: #64748b;
  --soft: #94a3b8;
  --line: #dbe4ef;
  --panel: rgba(255, 255, 255, 0.92);
  --page: #eef4f8;
  --nav: #07111f;
  --nav-2: #102338;
  --primary: #0f2d4a;
  --primary-strong: #071c31;
  --primary-soft: #e5f2fb;
  --accent: #0891b2;
  --accent-2: #22c55e;
  --black: #111827;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

body {
  background:
    linear-gradient(rgba(15, 45, 74, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 45, 74, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #f8fbfd 0%, #eef4f8 48%, #e8f3f2 100%);
  background-size: 28px 28px, 28px 28px, auto;
}

.login-shell {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(145deg, #07111f 0%, #0f2d4a 54%, #064e5f 100%);
  background-size: 30px 30px, 30px 30px, auto;
}

.login-panel,
.metric-card,
.panel,
.plate-card,
.record-item,
.stock-card,
.map-position-card,
.history-card,
.route-panel {
  border-color: rgba(148, 163, 184, 0.28);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.login-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.brand-mark {
  background: linear-gradient(145deg, #0f2d4a, #0891b2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 12px 26px rgba(8, 145, 178, 0.2);
}

.sidebar {
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, var(--nav), var(--nav-2));
  background-size: 24px 24px, 24px 24px, auto;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nav-item {
  color: #c7d2e4;
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  background: rgba(8, 145, 178, 0.18);
  border-color: rgba(34, 197, 94, 0.25);
  color: #fff;
}

.nav-item.active .nav-icon {
  background: #e8fbff;
  color: #0f2d4a;
}

.topbar {
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.eyebrow {
  color: #0891b2;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.topbar h2 {
  color: #0f172a;
}

.metric-card,
.panel {
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.75), rgba(34, 197, 94, 0.72));
  opacity: 0.85;
}

.metric-card strong,
.donut-center strong,
.plate-card-top strong,
.detail-title h2 {
  color: #0f172a;
}

.primary-action,
.secondary-action,
.install-action {
  border-radius: 8px;
  background: linear-gradient(135deg, #0f2d4a, #075985);
  box-shadow: 0 12px 24px rgba(15, 45, 74, 0.18);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.primary-action:hover,
.secondary-action:hover,
.install-action:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 16px 30px rgba(15, 45, 74, 0.22);
}

.ghost-light,
.ghost-action {
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.ghost-light:hover {
  border-color: rgba(8, 145, 178, 0.4);
  background: #f0fbff;
}

input,
select,
textarea {
  border-color: #d8e2ed;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.14);
}

.status-pill,
.battery,
.tag-label,
.asset-badge,
.map-card-main span {
  border: 1px solid rgba(8, 145, 178, 0.12);
  background: #e8f7fb;
  color: #075985;
}

.data-table {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

th {
  background: rgba(15, 45, 74, 0.045);
  color: #475569;
}

td {
  color: #1f2937;
}

tr:hover td {
  background: rgba(8, 145, 178, 0.035);
}

.plate-card:hover,
.map-position-card:hover,
.record-item:hover,
.stock-card:hover {
  border-color: rgba(8, 145, 178, 0.32);
  box-shadow: var(--shadow);
}

.asset-pin {
  background: linear-gradient(145deg, #0f2d4a, #0891b2);
  box-shadow: 0 12px 28px rgba(15, 45, 74, 0.28);
}

.map-view {
  border-color: rgba(148, 163, 184, 0.32);
  box-shadow: var(--shadow);
}

.icon-action {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #f2f7fb;
  color: #0f2d4a;
}

.icon-action:hover {
  border-color: rgba(8, 145, 178, 0.35);
  background: #e8f7fb;
}

.icon-action.danger {
  background: #fff5f5;
}

@media (max-width: 760px) {
  body {
    background-size: 22px 22px, 22px 22px, auto;
  }

  .topbar {
    padding: 12px;
    border-radius: 10px;
  }

  .sidebar {
    background:
      linear-gradient(90deg, rgba(7, 17, 31, 0.98), rgba(15, 45, 74, 0.98));
    backdrop-filter: blur(18px);
  }

  .nav-item.active {
    background: rgba(8, 145, 178, 0.24);
  }

  .metric-card::before,
  .panel::before {
    height: 2px;
  }
}

/* Public QR activation: polished checkout surface */
.public-tag-shell {
  place-items: stretch center;
  grid-template-columns: minmax(280px, 380px) minmax(0, 820px);
  gap: 22px;
  padding: 34px;
  background:
    radial-gradient(circle at 18% 12%, rgba(8, 145, 178, 0.22), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0e2036 46%, #f5f8fb 46.2%, #f7fafc 100%);
}

.public-experience-panel,
.public-tag-panel {
  align-self: start;
}

.public-experience-panel {
  min-height: calc(100vh - 68px);
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(7, 17, 31, 0.72);
  color: #e5eef7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.compact-public-aside {
  min-height: 520px;
}

.public-experience-logo {
  width: 132px;
  max-width: 100%;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.24));
}

.public-experience-panel h1 {
  max-width: 11ch;
  margin: 8px 0 14px;
  color: #fff;
  font-size: 42px;
  line-height: 0.98;
  letter-spacing: 0;
}

.public-experience-panel p {
  max-width: 30ch;
  margin: 0;
  color: rgba(226, 232, 240, 0.76);
  font-weight: 700;
  line-height: 1.6;
}

.public-experience-panel .eyebrow {
  color: #67e8f9;
}

.public-trust-grid {
  display: grid;
  gap: 10px;
}

.public-trust-grid span {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: rgba(248, 250, 252, 0.86);
  font-size: 13px;
  font-weight: 900;
}

.public-trust-grid strong {
  color: #67e8f9;
  font-size: 12px;
}

.public-tag-panel {
  width: 100%;
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

.public-tag-header {
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.public-tag-header .brand-logo {
  width: 108px;
  order: 2;
}

.public-tag-header h1 {
  color: #07111f;
  font-size: 24px;
}

.public-tag-form {
  gap: 20px;
}

.checkout-progress {
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #fff;
}

.checkout-progress li {
  min-height: 50px;
  border: 0;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0;
  background: #fff;
  color: #64748b;
}

.checkout-progress li:last-child {
  border-right: 0;
}

.checkout-progress li.active,
.checkout-progress li.done {
  background: #f1f8fb;
  color: #0f2d4a;
}

.checkout-progress li.active {
  box-shadow: inset 0 -3px 0 #0891b2;
}

.checkout-progress span {
  background: #eef2f7;
  color: #64748b;
}

.checkout-progress li.active span,
.checkout-progress li.done span {
  background: #0f2d4a;
  color: #fff;
}

.section-kicker {
  display: grid;
  gap: 4px;
  padding-top: 4px;
}

.section-kicker span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.section-kicker small {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.public-tag-form label {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.public-tag-form input,
.public-tag-form textarea,
.public-tag-form select {
  min-height: 44px;
  border-color: rgba(148, 163, 184, 0.42);
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  box-shadow: none;
}

.public-tag-form input:focus,
.public-tag-form textarea:focus,
.public-tag-form select:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.tag-type-card,
.asset-option,
.plan-card,
.conditional-fields,
.family-members-field,
.summary-step,
.asaas-payment-box,
.summary-card,
.terms-check,
.payment-step {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: #fff;
}

.tag-type-card,
.asset-option,
.plan-card {
  min-height: 92px;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.tag-type-card:hover,
.asset-option:hover,
.plan-card:hover {
  border-color: rgba(8, 145, 178, 0.34);
  transform: translateY(-1px);
}

.tag-type-card:has(input:checked),
.asset-option:has(input:checked),
.plan-card:has(input:checked) {
  border-color: #0891b2;
  background: #f1f8fb;
  box-shadow: inset 0 0 0 1px rgba(8, 145, 178, 0.22);
}

.choice-icon {
  width: 38px;
  height: 38px;
  background: #edf7fb;
  color: #0f2d4a;
}

.choice-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
}

.plan-card strong {
  color: #0f172a;
}

.plan-total-box,
.payment-summary {
  border: 1px solid rgba(8, 145, 178, 0.2);
  background: linear-gradient(135deg, #0f2d4a, #0a718a);
  box-shadow: 0 14px 36px rgba(15, 45, 74, 0.18);
}

.summary-list div {
  border-color: rgba(148, 163, 184, 0.22);
}

.terms-check {
  color: #334155;
}

.asaas-payment-box {
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(241, 248, 251, 0.88), #fff);
}

.asaas-payment-box h2,
.summary-card h2 {
  color: #0f172a;
}

.done-step {
  display: grid;
  gap: 18px;
  min-height: 430px;
  align-content: center;
  border-color: rgba(22, 101, 52, 0.2);
  background: linear-gradient(180deg, #f3fbf6, #fff);
}

.done-badge {
  background: #0f2d4a;
}

.warning-badge {
  background: #b45309;
}

.getrak-access-result {
  border-color: rgba(22, 101, 52, 0.22);
  background: #f3fbf6;
  text-align: left;
}

@media (max-width: 980px) {
  .public-tag-shell {
    grid-template-columns: 1fr;
    padding: 18px;
    background:
      linear-gradient(180deg, #07111f 0, #0e2036 260px, #f7fafc 260px);
  }

  .public-experience-panel {
    min-height: auto;
    align-content: start;
    padding: 22px;
  }

  .public-experience-panel h1 {
    max-width: 14ch;
    font-size: 32px;
  }

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

@media (max-width: 760px) {
  .public-tag-shell {
    padding: 12px;
  }

  .public-experience-panel {
    display: none;
  }

  .public-tag-panel {
    padding: 18px;
  }

  .public-tag-header {
    align-items: flex-start;
  }

  .public-tag-header .brand-logo {
    width: 86px;
  }

  .checkout-progress {
    grid-template-columns: 1fr;
  }

  .checkout-progress li {
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  }

  .checkout-progress li:last-child {
    border-bottom: 0;
  }

  .tag-choice-group,
  .asset-grid,
  .plan-choice-group,
  .summary-list {
    grid-template-columns: 1fr;
  }

  .asaas-payment-box {
    padding: 20px;
  }
}

/* Platform-wide professional identity */
body:not([data-page^="public"]):not([data-page="activation-return"]):not([data-page="portal"]) {
  background:
    linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 8%, rgba(8, 145, 178, 0.12), transparent 32rem),
    #f6f8fb;
  background-size: 28px 28px, 28px 28px, auto, auto;
}

.login-shell {
  background:
    radial-gradient(circle at 22% 18%, rgba(8, 145, 178, 0.26), transparent 30%),
    linear-gradient(135deg, #07111f 0%, #0e2036 52%, #f7fafc 52.2%, #f7fafc 100%);
}

.login-panel {
  border-color: rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background:
    linear-gradient(180deg, rgba(7, 17, 31, 0.98), rgba(14, 32, 54, 0.98));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
  min-height: 62px;
  padding: 0 8px 18px;
  border-bottom-color: rgba(226, 232, 240, 0.12);
}

.sidebar-brand strong {
  letter-spacing: 0;
}

.sidebar .brand-logo {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.nav-list {
  gap: 7px;
}

.nav-item {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(226, 232, 240, 0.72);
}

.nav-item:hover {
  border-color: rgba(226, 232, 240, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  border-color: rgba(103, 232, 249, 0.22);
  background: rgba(8, 145, 178, 0.15);
  color: #fff;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(226, 232, 240, 0.08);
}

.nav-item.active .nav-icon {
  background: #e8f7fb;
  color: #0f2d4a;
}

.content-shell {
  padding: 28px 30px 34px;
}

.topbar {
  min-height: 74px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.topbar h2 {
  color: #07111f;
  font-size: 28px;
}

.topbar .eyebrow,
.portal-hero .eyebrow,
.panel-heading span {
  color: #64748b;
  font-weight: 850;
}

.primary-action,
.secondary-action,
.ghost-light,
.danger-action {
  border-radius: 8px;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.primary-action {
  background: linear-gradient(135deg, #0f2d4a, #087f9a);
  box-shadow: 0 12px 28px rgba(15, 45, 74, 0.18);
}

.primary-action:hover,
.secondary-action:hover,
.ghost-light:hover {
  transform: translateY(-1px);
}

.secondary-action {
  border: 1px solid rgba(15, 45, 74, 0.16);
  background: #0f172a;
}

.ghost-light {
  border: 1px solid rgba(15, 45, 74, 0.16);
  background: #fff;
  color: #0f2d4a;
}

.panel,
.metric-card,
.system-card,
.plate-card,
.record-item,
.stock-card,
.route-panel,
.notification-popover,
.history-card,
.attachment-card,
.data-table {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 20px;
}

.panel::before,
.metric-card::before,
.system-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #0f2d4a, #0891b2);
  opacity: 0.88;
}

.panel-heading {
  align-items: center;
}

.panel-heading h3,
.panel h3 {
  color: #0f172a;
  letter-spacing: 0;
}

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

.metric-card {
  position: relative;
  padding: 18px;
}

.metric-card span {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
}

.metric-card strong {
  color: #07111f;
  font-size: 28px;
}

.metric-card small {
  color: #64748b;
  font-weight: 800;
}

.shortcut-grid a,
.check-card,
.detail-grid div,
.info-list span {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #fff;
}

.shortcut-grid a:hover,
.check-card:hover {
  border-color: rgba(8, 145, 178, 0.32);
  background: #f1f8fb;
}

.system-card {
  position: relative;
  min-height: 188px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.system-icon {
  width: 56px;
  height: 38px;
  border: 1px solid rgba(8, 145, 178, 0.16);
  background: #f1f8fb;
  color: #0f2d4a;
}

.portal-shell {
  width: min(1120px, calc(100% - 42px));
}

body[data-page="portal"] {
  background:
    radial-gradient(circle at 22% 12%, rgba(8, 145, 178, 0.16), transparent 34rem),
    linear-gradient(135deg, #07111f 0%, #0e2036 42%, #f7fafc 42.2%, #f7fafc 100%);
}

.portal-topbar {
  border-color: rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
}

.portal-hero {
  text-align: left;
}

.portal-hero h1 {
  max-width: 680px;
  color: #fff;
  font-size: clamp(38px, 5vw, 62px);
}

.portal-launcher .system-card {
  min-height: 244px;
}

.data-table {
  overflow: auto;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

th {
  background: #f7fafc;
  color: #64748b;
  font-size: 11px;
}

td {
  color: #1e293b;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: #f8fcfd;
}

.icon-action {
  min-width: 36px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: #f7fafc;
  color: #0f2d4a;
}

.icon-action:hover {
  border-color: rgba(8, 145, 178, 0.36);
  background: #e8f7fb;
  transform: translateY(-1px);
}

.status-pill,
.battery,
.mini-badge,
.tag-label {
  border-radius: 8px;
}

.status-pill {
  min-height: 28px;
  background: #eef6fa;
  color: #0f2d4a;
}

input,
select,
textarea {
  border-color: rgba(148, 163, 184, 0.42);
  background: #fff;
  color: #0f172a;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.modal-shell {
  background: rgba(7, 17, 31, 0.56);
  backdrop-filter: blur(12px);
}

.modal-card {
  border-color: rgba(148, 163, 184, 0.26);
  border-radius: 8px;
  box-shadow: 0 30px 100px rgba(7, 17, 31, 0.34);
}

.modal-head {
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.94);
}

.modal-head h3 {
  color: #0f172a;
}

.modal-form {
  padding: 20px;
}

.admin-hero-panel {
  min-height: 150px;
  align-content: center;
  background:
    linear-gradient(135deg, rgba(15, 45, 74, 0.98), rgba(8, 145, 178, 0.82));
  color: #fff;
}

.admin-hero-panel h3,
.admin-hero-panel .plain-text,
.admin-hero-panel .eyebrow {
  color: #fff;
}

.admin-hero-panel .plain-text {
  opacity: 0.82;
}

.kanban-board {
  gap: 14px;
}

.kanban-column {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.84);
}

.professional-kanban .kanban-column {
  background: linear-gradient(180deg, #f8fafc, #f3f7fa);
}

.kanban-head {
  min-height: 34px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.kanban-head span,
.kanban-card-top span {
  border-radius: 8px;
  background: #e8f7fb;
  color: #075985;
}

.kanban-card {
  border-color: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.kanban-card:hover {
  border-color: rgba(8, 145, 178, 0.32);
  transform: translateY(-1px);
}

.map-view {
  border-radius: 8px;
}

.asset-badge,
.asset-pin,
.profile-avatar {
  border-radius: 8px;
}

.asset-pin {
  background: linear-gradient(145deg, #0f2d4a, #0891b2);
}

@media (max-width: 1120px) {
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .sidebar {
    position: sticky;
    z-index: 20;
    height: auto;
  }

  .content-shell {
    padding: 18px;
  }

  .portal-hero h1 {
    color: #0f172a;
  }
}

@media (max-width: 760px) {
  .content-shell {
    padding: 14px;
  }

  .topbar {
    display: grid;
    align-items: start;
    gap: 12px;
  }

  .metric-grid,
  .system-launcher {
    grid-template-columns: 1fr;
  }

  .portal-shell {
    width: min(100% - 24px, 1120px);
  }

  .portal-topbar {
    top: 12px;
    width: min(100% - 24px, 1120px);
  }

  .portal-hero {
    margin-top: 92px;
  }
}
