:root {
  color-scheme: light;
  --bg: #f3f5f7;
  --surface: rgba(255, 255, 255, .94);
  --surface-solid: #ffffff;
  --sidebar: #0b2d5b;
  --text: #16243a;
  --secondary: #69778a;
  --tertiary: #8c98a8;
  --separator: rgba(11, 45, 91, .12);
  --fill: rgba(11, 45, 91, .07);
  --fill-hover: rgba(11, 45, 91, .12);
  --blue: #07478e;
  --blue-dark: #063b78;
  --petrol: #0b5c70;
  --red: #ff3b30;
  --green: #34c759;
  --shadow: 0 18px 48px rgba(0, 0, 0, .08);
  --small-shadow: 0 1px 2px rgba(0, 0, 0, .05);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 18% 12%, rgba(7, 71, 142, .08), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(52, 199, 89, .08), transparent 24%),
    var(--bg);
  color: var(--text);
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

html.login-active,
html.login-active body,
html.login-active #app {
  min-height: 100%;
  background: #063a52;
}

html.login-active {
  color-scheme: dark;
}

html.login-active body {
  overscroll-behavior: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-screen {
  position: relative;
  isolation: isolate;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  padding: clamp(24px, 5vw, 76px);
  background:
    radial-gradient(circle at 18% 18%, rgba(24, 205, 190, .24), transparent 30%),
    radial-gradient(circle at 86% 76%, rgba(0, 126, 148, .3), transparent 34%),
    linear-gradient(135deg, #0b5c70 0%, #073f59 42%, #062d47 100%);
}

.login-screen::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  content: '';
  background:
    radial-gradient(ellipse at center, transparent 14%, rgba(2, 24, 38, .26) 76%, rgba(2, 19, 31, .58) 100%),
    linear-gradient(0deg, rgba(2, 20, 32, .22), transparent 42%);
}

.login-screen::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: '';
  pointer-events: none;
  opacity: .16;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.login-shade {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(72vw, 920px);
  height: 100%;
  transform: translateX(-50%);
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(3, 28, 42, .38), transparent 66%);
}

.login-motion {
  position: absolute;
  inset: -5%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.login-motion svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hex-layer {
  transform-box: fill-box;
  transform-origin: center;
}

.hex-layer-back {
  fill: rgba(37, 202, 194, .11);
  stroke: rgba(87, 236, 225, .08);
  stroke-width: 2;
  animation: hex-drift-back 28s ease-in-out infinite alternate;
}

.hex-layer-mid {
  fill: rgba(27, 215, 202, .2);
  stroke: rgba(99, 247, 232, .16);
  stroke-width: 2;
  animation: hex-drift-mid 22s ease-in-out infinite alternate;
}

.hex-layer-line {
  fill: transparent;
  stroke: rgba(91, 248, 231, .7);
  stroke-width: 4;
  filter: drop-shadow(0 0 9px rgba(60, 237, 222, .28));
  animation: hex-drift-line 18s ease-in-out infinite alternate;
}

.hex-sparks {
  fill: rgba(99, 255, 238, .88);
  filter: url('#login-glow');
  animation: hex-spark-pulse 5s ease-in-out infinite alternate;
}

@keyframes hex-drift-back {
  from { transform: translate3d(-16px, -9px, 0) scale(1); }
  to { transform: translate3d(22px, 14px, 0) scale(1.035); }
}

@keyframes hex-drift-mid {
  from { transform: translate3d(14px, 18px, 0) rotate(-.7deg); }
  to { transform: translate3d(-20px, -12px, 0) rotate(.7deg); }
}

@keyframes hex-drift-line {
  from { transform: translate3d(-8px, 12px, 0); opacity: .65; }
  to { transform: translate3d(14px, -16px, 0); opacity: 1; }
}

@keyframes hex-spark-pulse {
  from { opacity: .4; }
  to { opacity: 1; }
}

.app-layout {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: 258px;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 6%, rgba(20, 112, 137, .28), transparent 24%),
    linear-gradient(180deg, #0d356a 0%, #0a2a56 58%, #071f43 100%);
  color: #fff;
  box-shadow: 10px 0 34px rgba(6, 28, 59, .09);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 88px;
  padding: 22px 24px;
  background: transparent;
  color: #fff;
  text-align: left;
  transition: background .18s ease;
}

.sidebar-brand:hover,
.sidebar-brand:focus-visible {
  background: rgba(255, 255, 255, .055);
}

.sidebar-context-icon {
  display: grid;
  place-items: center;
  width: 1.22rem;
  height: 1.22rem;
  flex: 0 0 auto;
  color: rgba(255, 255, 255, .74);
}

.sidebar-context-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.sidebar-context-name {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: 1.22rem;
  font-weight: 720;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-brand-arrow {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-left: auto;
  fill: none;
  stroke: rgba(255, 255, 255, .58);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform .18s ease, stroke .18s ease;
}

.sidebar-brand:hover .sidebar-brand-arrow {
  stroke: #fff;
  transform: translateX(2px);
}

.nav-icon {
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 22px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-footer span {
  color: rgba(255, 255, 255, .46);
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar-footer strong {
  color: rgba(255, 255, 255, .82);
  font-size: .82rem;
}

.workspace {
  min-width: 0;
}

.workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 13px clamp(24px, 3vw, 42px);
  border-bottom: 1px solid var(--separator);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(20px) saturate(150%);
}

.workspace-heading {
  display: grid;
  gap: 2px;
}

.workspace-heading > span {
  color: var(--secondary);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.workspace-heading h1 {
  margin: 0;
  color: var(--text);
  font-size: 1.42rem;
  font-weight: 760;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 74px;
  padding: 14px clamp(18px, 4vw, 52px);
  border-bottom: 1px solid var(--separator);
  background: var(--sidebar);
  backdrop-filter: blur(24px) saturate(150%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
}

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(145deg, #0b5c70, #07478e);
  color: white;
  font-size: .9rem;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(7, 71, 142, .24);
}

.brand h1 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand.compact h1 {
  font-size: 1.08rem;
}

.context-switcher {
  position: relative;
  display: grid;
  min-width: 0;
  padding-right: 22px;
  cursor: pointer;
}

.context-switcher::after {
  position: absolute;
  right: 2px;
  bottom: 7px;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--secondary);
  border-bottom: 2px solid var(--secondary);
  content: '';
  pointer-events: none;
  transform: rotate(45deg);
}

.context-switcher > span {
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.context-switcher select,
.context-switcher strong {
  min-width: 0;
  max-width: 220px;
  margin: 0;
  padding: 1px 0;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--text);
  font: 700 1.02rem/1.25 "Avenir Next", Avenir, "Helvetica Neue", sans-serif;
  letter-spacing: -.02em;
  text-overflow: ellipsis;
  cursor: pointer;
}

.context-switcher:focus-within select {
  color: var(--blue);
}

.brand span,
.eyebrow,
.muted {
  color: var(--secondary);
  font-size: .88rem;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  justify-self: center;
  padding: 4px;
  border-radius: 16px;
  background: var(--fill);
}

.menu-item {
  width: auto;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: center;
  font-size: .95rem;
  font-weight: 680;
  white-space: nowrap;
}

.menu-item:hover {
  background: var(--fill);
}

.menu-item.active {
  background: var(--surface-solid);
  color: var(--blue);
  box-shadow: var(--small-shadow);
}

.nav-group {
  min-width: 0;
}

.submenu {
  display: grid;
}

.submenu-item {
  color: inherit;
}

.content-area {
  display: grid;
  align-content: start;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(24px, 4vw, 52px);
}

.app-topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 42px;
}

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

.account,
.settings-control {
  position: relative;
  justify-self: end;
}

.account-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--surface-solid);
  box-shadow: var(--small-shadow);
}

.settings-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(7, 71, 142, .08);
  border-radius: 13px;
  background: var(--surface-solid);
  color: var(--blue);
  box-shadow: var(--small-shadow);
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.settings-button:hover {
  background: var(--fill);
  transform: translateY(-1px);
}

.settings-button.active,
.settings-button[aria-expanded="true"] {
  border-color: transparent;
  background: var(--blue);
  color: #fff;
}

.settings-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(145deg, #0b5c70, #07478e);
  color: white;
  font-size: .8rem;
  font-weight: 800;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 12;
  width: min(260px, calc(100vw - 28px));
  max-height: min(460px, calc(100dvh - 90px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .14);
  backdrop-filter: blur(20px) saturate(160%);
  padding: 8px;
}

.settings-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 12;
  width: min(300px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(7, 71, 142, .1);
  border-radius: 18px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 54px rgba(7, 39, 76, .16);
  backdrop-filter: blur(20px) saturate(160%);
}

.settings-menu-heading {
  display: grid;
  gap: 2px;
  margin: 2px 4px 7px;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--separator);
}

.settings-menu-heading span {
  color: var(--secondary);
  font-size: .69rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.settings-menu-heading strong {
  color: var(--text);
  font-size: .95rem;
}

.settings-menu-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 58px;
  padding: 7px 9px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.settings-menu-item:hover,
.settings-menu-item.active {
  background: var(--fill);
  color: var(--blue);
}

.settings-menu-item > span:last-child {
  display: grid;
  gap: 2px;
}

.settings-menu-item strong {
  font-size: .9rem;
}

.settings-menu-item small {
  color: var(--secondary);
  font-size: .74rem;
  line-height: 1.3;
}

.settings-menu-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(7, 71, 142, .08);
  color: var(--blue);
}

.settings-menu-icon .nav-icon {
  width: 19px;
  height: 19px;
}

.context-picker {
  position: fixed;
  inset: 0;
  z-index: 100;
  min-height: 100dvh;
  overflow-y: auto;
  padding: clamp(28px, 5vw, 68px);
  background:
    radial-gradient(circle at 50% -8%, rgba(26, 120, 147, .25), transparent 34%),
    radial-gradient(circle at 90% 80%, rgba(7, 71, 142, .25), transparent 30%),
    linear-gradient(145deg, #07366d 0%, #062c5b 48%, #041f43 100%);
  color: #fff;
  animation: context-picker-in .22s ease-out both;
}

.context-picker::before {
  position: fixed;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: .12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.context-picker-back {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 16px;
  background: rgba(2, 25, 54, .36);
  color: #fff;
  font-size: 1.55rem;
  box-shadow: 0 16px 34px rgba(0, 13, 34, .2);
  transition: background .18s ease, transform .18s ease;
}

.context-picker-back:hover {
  background: rgba(2, 22, 48, .7);
  transform: translateX(-2px);
}

.context-picker-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: clamp(34px, 5vw, 58px);
  width: min(900px, 100%);
  margin: clamp(28px, 5vh, 62px) auto 0;
}

.context-picker-title {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.context-picker-title > span {
  color: #55d8d2;
  font-size: .72rem;
  font-weight: 750;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.context-picker-title h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  font-weight: 680;
  letter-spacing: -.045em;
}

.context-picker-title p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, .58);
  font-size: .96rem;
  line-height: 1.5;
}

.context-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 18px;
  width: min(720px, 100%);
  margin: 0 auto;
}

.context-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 24px;
  min-height: 300px;
  padding: 40px 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 24px;
  background:
    linear-gradient(150deg, rgba(8, 44, 87, .88), rgba(2, 28, 61, .94));
  color: #fff;
  text-align: center;
  box-shadow: 0 24px 54px rgba(0, 15, 37, .22);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.context-card::before {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 20%, rgba(81, 215, 208, .17), transparent 45%);
  transition: opacity .2s ease;
}

.context-card:hover {
  border-color: rgba(81, 215, 208, .4);
  box-shadow: 0 30px 68px rgba(0, 12, 32, .34);
  transform: translateY(-5px);
}

.context-card:hover::before,
.context-card.active::before {
  opacity: 1;
}

.context-card.active {
  border-color: rgba(81, 215, 208, .65);
  box-shadow: inset 0 0 0 1px rgba(81, 215, 208, .18), 0 26px 60px rgba(0, 14, 36, .3);
}

.context-card-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 8px solid rgba(7, 71, 142, .55);
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  box-shadow: 0 18px 38px rgba(0, 11, 28, .25);
}

.context-card-mark svg {
  width: 43px;
  height: 43px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.context-card-copy {
  position: relative;
  display: grid;
  align-content: center;
  gap: 7px;
}

.context-card-copy strong {
  font-size: 1.18rem;
  line-height: 1.25;
}

.context-card-copy small {
  color: rgba(255, 255, 255, .55);
  font-size: .79rem;
  font-weight: 650;
  letter-spacing: .035em;
}

.context-current,
.context-card-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
}

.context-current {
  padding: 0 12px;
  border: 1px solid rgba(81, 215, 208, .3);
  border-radius: 999px;
  background: rgba(81, 215, 208, .1);
  color: #72e2dc;
  font-size: .7rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.context-card-arrow {
  color: rgba(255, 255, 255, .6);
  font-size: 1.35rem;
}

@keyframes context-picker-in {
  from { opacity: 0; transform: scale(1.012); }
  to { opacity: 1; transform: scale(1); }
}

.account-summary {
  display: grid;
  gap: 4px;
  padding: 10px 10px 12px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 6px;
}

.account-summary strong {
  font-size: .95rem;
}

.account-summary span:not(.pill) {
  color: var(--secondary);
  font-size: .84rem;
}

.account-menu button {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 10px;
  font-weight: 600;
}

.account-menu button:hover {
  background: var(--fill);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  padding: 0 2px 6px;
}

.page-head h2 {
  margin: 4px 0 0;
  font-size: clamp(2.2rem, 4vw, 3.7rem);
  font-weight: 760;
  line-height: 1;
  letter-spacing: -0.045em;
}

.page-head p {
  max-width: 440px;
  margin: 0;
  color: var(--secondary);
  line-height: 1.45;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.table-toolbar h3 {
  margin-bottom: 2px;
}

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

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: var(--surface-solid);
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 340px));
  justify-content: start;
  gap: 18px;
}

.module-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 16px;
  min-height: 142px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(7, 71, 142, .11);
  border-radius: 22px;
  background:
    radial-gradient(circle at 94% 12%, rgba(11, 92, 112, .1), transparent 34%),
    var(--surface-solid);
  color: var(--text);
  text-align: left;
  box-shadow: 0 12px 34px rgba(11, 45, 91, .065);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.module-card:hover,
.module-card:focus-visible {
  border-color: rgba(7, 71, 142, .3);
  box-shadow: 0 18px 42px rgba(7, 39, 76, .12);
  outline: 0;
  transform: translateY(-3px);
}

.module-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(11, 92, 112, .13), rgba(7, 71, 142, .12));
  color: var(--blue);
}

.module-mark .nav-icon {
  width: 29px;
  height: 29px;
}

.module-card-title {
  font-size: 1.18rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.module-card-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(7, 71, 142, .07);
  color: var(--blue);
  font-size: 1.15rem;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.module-card:hover .module-card-arrow,
.module-card:focus-visible .module-card-arrow {
  background: var(--blue);
  color: #fff;
  transform: translateX(2px);
}

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 16px;
  padding: 20px;
}

.vehicle-overview {
  display: grid;
  gap: 18px;
}

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

.vehicle-overview-action {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(7, 71, 142, .11);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--blue);
  box-shadow: var(--small-shadow);
  transition: background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.vehicle-overview-action:hover,
.vehicle-overview-action:focus-visible {
  background: var(--fill);
  box-shadow: 0 10px 24px rgba(7, 39, 76, .1);
  outline: 0;
  transform: translateY(-1px);
}

.vehicle-overview-action.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.vehicle-overview-action.primary:hover,
.vehicle-overview-action.primary:focus-visible {
  background: var(--blue-dark);
}

.vehicle-overview-action .action-icon {
  width: 18px;
  height: 18px;
}

.vehicle-group {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(7, 71, 142, .1);
  border-top: 3px solid var(--petrol);
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 12px 34px rgba(11, 45, 91, .055);
}

.vehicle-group.archived {
  border-top-color: #8793a3;
  background: rgba(238, 241, 245, .7);
}

.vehicle-group-head {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(7, 71, 142, .09);
  background: linear-gradient(90deg, rgba(11, 92, 112, .07), rgba(255, 255, 255, .45));
}

.vehicle-group.archived .vehicle-group-head {
  background: linear-gradient(90deg, rgba(105, 119, 138, .1), rgba(255, 255, 255, .38));
}

.vehicle-group-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 750;
  letter-spacing: -.025em;
}

.vehicle-group-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--petrol);
}

.vehicle-group.archived .vehicle-group-icon {
  color: var(--secondary);
}

.vehicle-group-icon .nav-icon,
.vehicle-group-icon .action-icon {
  width: 21px;
  height: 21px;
}

.vehicle-group-empty {
  padding: 22px 20px;
  color: var(--secondary);
  font-size: .88rem;
  font-weight: 650;
}

@media (min-width: 980px) {
  .vehicle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.vehicle-card {
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--small-shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.vehicle-card.frozen {
  background: rgba(255, 255, 255, .72);
}

.vehicle-card.frozen .vehicle-image {
  filter: saturate(.75);
}

.vehicle-card:hover,
.vehicle-card:focus-visible {
  border-color: rgba(7, 71, 142, .28);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
  outline: 0;
}

.vehicle-image {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f5f6f8;
}

.vehicle-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.vehicle-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.vehicle-shape {
  position: relative;
  width: min(68%, 240px);
  height: 44%;
  border-radius: 42% 48% 28% 28% / 58% 58% 34% 34%;
  background: linear-gradient(180deg, #ffffff, #dfe8f5);
  box-shadow: inset 0 -12px 20px rgba(29, 29, 31, .08), 0 18px 34px rgba(7, 71, 142, .14);
}

.vehicle-shape::before {
  content: "";
  position: absolute;
  left: 17%;
  right: 19%;
  top: 17%;
  height: 34%;
  border-radius: 999px 999px 18px 18px;
  background: linear-gradient(180deg, rgba(7, 71, 142, .34), rgba(7, 71, 142, .12));
}

.vehicle-shape span {
  position: absolute;
  bottom: -9px;
  width: 28px;
  height: 28px;
  border: 6px solid #1d1d1f;
  border-radius: 999px;
  background: #f5f5f7;
}

.vehicle-shape span:first-child {
  left: 15%;
}

.vehicle-shape span:last-child {
  right: 15%;
}

.vehicle-card-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.vehicle-card-head,
.detail-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vehicle-card-head h3 {
  margin: 0 0 3px;
  font-size: 1.08rem;
}

.vehicle-sold-note {
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 700;
}

.vehicle-card-stats {
  display: grid;
  gap: 7px;
}

.license-plate {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  max-width: 100%;
  min-height: 40px;
  overflow: hidden;
  border: 2px solid #15171c;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .55), transparent 16%, transparent 84%, rgba(255, 255, 255, .45)),
    linear-gradient(180deg, #fffef8 0%, #f4f4ee 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .9),
    inset 0 0 0 3px rgba(0, 0, 0, .08),
    0 1px 2px rgba(0, 0, 0, .14);
  color: #101114;
  font-family: "DIN 1451 Mittelschrift", "Bahnschrift", "DIN Alternate", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .075em;
}

.license-plate.placeholder {
  opacity: .72;
  filter: saturate(.82);
}

.eu-band {
  align-self: stretch;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  width: 30px;
  padding: 3px 0 4px;
  background: #0646a8;
  color: white;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: 0;
}

.eu-stars {
  position: relative;
  width: 18px;
  height: 18px;
  color: #ffcc00;
  font-size: .33rem;
  line-height: 1;
}

.eu-stars i {
  position: absolute;
  left: 50%;
  top: 50%;
  font-style: normal;
  transform: rotate(calc(var(--i) * 30deg)) translateY(-7px) rotate(calc(var(--i) * -30deg)) translate(-50%, -50%);
}

.plate-district,
.plate-rest {
  display: block;
  min-width: 0;
  padding: 5px 9px 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.02rem, 1.8vw, 1.22rem);
  font-weight: 850;
  line-height: 1.05;
  text-shadow: 0 .4px 0 #fff, 0 0 0 #000;
}

.plate-district {
  padding-left: 11px;
  padding-right: 6px;
}

.plate-rest {
  padding-left: 7px;
  padding-right: 12px;
}

.plate-seals {
  display: grid;
  place-items: center;
  gap: 3px;
  width: 24px;
  flex: 0 0 24px;
}

.plate-seals i {
  width: 13px;
  height: 13px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .65);
  background:
    radial-gradient(circle at 50% 50%, #f8f8f4 0 18%, transparent 19%),
    conic-gradient(#1d7d3a 0 22%, #f4d35e 0 45%, #d44f3a 0 66%, #f4d35e 0 82%, #1d7d3a 0);
}

.plate-seals i:last-child {
  background:
    radial-gradient(circle at 50% 50%, #f8f8f4 0 18%, transparent 19%),
    repeating-conic-gradient(#2f80ed 0 18deg, #fff 18deg 36deg);
}

.vehicle-card-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--fill);
}

.vehicle-card-stats b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: .98rem;
  line-height: 1.15;
}

.vehicle-card-stats small {
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 700;
  text-align: right;
}

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.detail-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

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

.detail-car-thumb {
  width: 76px;
  height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 14px;
  background: #f5f6f8;
  box-shadow: var(--small-shadow);
}

.detail-car-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.detail-title h3 {
  margin: 2px 0 0;
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.detail-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-left: 8px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 760;
  vertical-align: middle;
}

.detail-note {
  margin: 4px 0 0;
  color: var(--secondary);
  font-size: .86rem;
  font-weight: 650;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--blue);
  padding: 0 12px 0 9px;
  font-weight: 760;
  white-space: nowrap;
}

.back-link:hover {
  background: rgba(7, 71, 142, .12);
}

.back-link .action-icon {
  width: 18px;
  height: 18px;
}

.detail-actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.detail-actions .action-icon {
  width: 15px;
  height: 15px;
}

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

.settings-group {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--separator);
  border-radius: 15px;
  background: var(--surface-solid);
}

.settings-group h4 {
  margin: 0;
  font-size: .9rem;
}

.form-section {
  display: grid;
  gap: 12px;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--separator);
}

.form-section.full {
  grid-column: 1 / -1;
}

.form-section:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.form-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.form-section h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 750;
}

.form-section-head span {
  color: var(--secondary);
  font-size: .82rem;
}

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

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

.field-grid.media-fields {
  grid-template-columns: minmax(180px, .8fr) minmax(260px, 1.2fr);
  align-items: end;
}

.vehicle-form {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 16px 18px;
  align-items: start;
}

.vehicle-form .form-section.full {
  grid-column: auto;
}

.vehicle-form .form-section:nth-of-type(1) {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.vehicle-form .form-section:nth-of-type(2) {
  grid-column: 2;
}

.vehicle-form .form-section:nth-of-type(3) {
  grid-column: 2;
}

.vehicle-form .actions {
  grid-column: 1 / -1;
}

.vehicle-form .field-grid.nested.three,
.vehicle-form .field-grid.media-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.file-drop {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 11px 13px;
  border: 1px dashed rgba(7, 71, 142, .35);
  border-radius: 14px;
  background: rgba(7, 71, 142, .07);
  color: var(--blue);
  cursor: pointer;
}

.file-drop:hover {
  background: rgba(7, 71, 142, .11);
}

.file-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop span {
  font-size: .94rem;
  font-weight: 750;
}

.file-drop small {
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 600;
}

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

.sort-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--text);
  font-size: .95rem;
}

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

.sort-actions {
  display: flex;
  gap: 6px;
}

.icon-action:disabled {
  opacity: .35;
  cursor: default;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--separator);
  text-align: left;
  vertical-align: middle;
  font-size: .93rem;
}

.data-table th {
  color: var(--secondary);
  background: #fbfbfd;
  font-size: .78rem;
  font-weight: 700;
}

.data-table tbody tr:nth-child(odd) td {
  background: var(--surface-solid);
}

.data-table tbody tr:nth-child(even) td {
  background: rgba(118, 118, 128, .06);
}

.data-table tbody tr:hover td {
  background: rgba(7, 71, 142, .055);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.plain-action,
.icon-btn,
.icon-action {
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--fill);
  color: var(--blue);
  min-height: 30px;
  padding: 0 10px;
  font-size: .84rem;
  font-weight: 700;
}

.plain-action:hover,
.icon-btn:hover,
.icon-action:hover {
  background: var(--fill-hover);
}

.plain-action.danger,
.icon-action.danger {
  color: var(--red);
}

.icon-action {
  width: 32px;
  padding: 0;
}

.action-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.confirm-text {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--secondary);
  line-height: 1.45;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--secondary);
  font-weight: 700;
  font-size: .85rem;
}

.status-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
}

.status-dot.locked::before {
  background: var(--red);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: rgba(0, 0, 0, .22);
  backdrop-filter: blur(14px);
  z-index: 20;
  overflow-y: auto;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100dvh - 28px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 22px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .18);
  padding: 22px;
  scrollbar-gutter: stable;
}

.modal-card.wide {
  width: min(960px, calc(100vw - 56px));
  max-height: none;
  overflow: visible;
  padding: 20px 24px 18px;
}

.modal-card.vehicle {
  width: min(760px, calc(100vw - 56px));
  max-height: none;
  overflow: visible;
  padding: 20px 22px 18px;
}

.modal-card.entry {
  width: min(760px, calc(100vw - 56px));
  max-height: none;
  overflow: visible;
  padding: 20px 22px 18px;
}

.modal-card.chart-detail {
  width: min(1120px, calc(100vw - 56px));
  max-height: none;
  overflow: hidden;
  padding: 20px 22px 18px;
}

.modal-card.wide .section-title,
.modal-card.vehicle .section-title,
.modal-card.entry .section-title,
.modal-card.chart-detail .section-title {
  position: static;
  margin: 0 0 14px;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}

.modal-card.wide .actions,
.modal-card.vehicle .actions,
.modal-card.entry .actions,
.modal-card.chart-detail .actions {
  position: static;
  margin: 0;
  padding: 4px 0 0;
  background: transparent;
  backdrop-filter: none;
}

.modal-card.vehicle .vehicle-form {
  grid-template-columns: 1fr;
  gap: 13px;
}

.modal-card.entry .entry-form {
  grid-template-columns: 1fr;
  gap: 13px;
}

.modal-card.vehicle .vehicle-form .form-section.full,
.modal-card.vehicle .vehicle-form .form-section:nth-of-type(1),
.modal-card.vehicle .vehicle-form .form-section:nth-of-type(2),
.modal-card.vehicle .vehicle-form .form-section:nth-of-type(3),
.modal-card.vehicle .vehicle-form .form-section:nth-of-type(4) {
  grid-column: 1;
  grid-row: auto;
}

.modal-card.vehicle .form-section {
  gap: 9px;
  padding-bottom: 12px;
}

.modal-card.entry .form-section {
  gap: 9px;
  padding-bottom: 12px;
}

.modal-card.vehicle .field-grid.nested.three {
  grid-template-columns: 1.4fr 1fr 1fr;
}

.modal-card.entry .field-grid.nested.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-card.vehicle .field-grid.nested.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.modal-card.vehicle .field-grid.media-fields {
  grid-template-columns: 1fr 1.2fr;
}

.modal-card.vehicle input,
.modal-card.vehicle select,
.modal-card.entry input,
.modal-card.entry select {
  min-height: 38px;
  padding-block: 8px;
}

.modal-card.entry textarea {
  min-height: 64px;
}

.modal-card.vehicle .file-drop {
  min-height: 50px;
  padding: 8px 11px;
}

.modal-card .section-title {
  position: sticky;
  top: -22px;
  z-index: 1;
  margin: -22px -22px 16px;
  padding: 22px 22px 14px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px) saturate(160%);
}

.modal-card .actions {
  position: sticky;
  bottom: -22px;
  margin: 4px -22px -22px;
  padding: 14px 22px 22px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(18px) saturate(160%);
}

.icon-btn {
  width: 32px;
  min-height: 32px;
  padding: 0;
  color: var(--secondary);
  font-size: 1.3rem;
  line-height: 1;
}

.narrow-panel {
  max-width: 620px;
}

.data-panel,
.form-panel,
.stat,
.vehicle-row,
.entry-row,
.user-row {
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--small-shadow);
  backdrop-filter: blur(20px) saturate(160%);
}

.data-panel,
.form-panel {
  padding: clamp(18px, 3vw, 26px);
}

.login-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: clamp(28px, 3.5vw, 36px);
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 27px;
  background: rgba(255, 255, 255, .97);
  color: #07478e;
  box-shadow: 0 32px 90px rgba(0, 18, 36, .3), inset 0 1px 0 #fff;
  backdrop-filter: blur(26px) saturate(120%);
  animation: login-panel-in .7s cubic-bezier(.2, .8, .2, 1) both;
}

.login-tabbar {
  position: relative;
  margin-bottom: 28px;
  padding: 0 0 16px;
  border-bottom: 2px solid #e0e5ea;
  text-align: center;
}

.login-tabbar::after {
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: min(56%, 180px);
  height: 5px;
  border-radius: 999px;
  background: #07478e;
  content: '';
  transform: translateX(-50%);
}

.login-panel .login-tabbar h1 {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, sans-serif;
  font-size: clamp(1.45rem, 3vw, 1.65rem);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -.025em;
}

.login-panel .field-grid {
  gap: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}

.login-panel input {
  min-height: 56px;
  border: 2px solid #0a4e96;
  border-radius: 14px;
  background: #fff;
  color: #07478e;
  caret-color: #07478e;
  padding: 0 19px;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, sans-serif;
  font-size: 1rem;
  font-weight: 650;
}

.login-panel input:hover {
  background: #fafdff;
}

.login-panel input:focus {
  border-color: #0875c9;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(8, 117, 201, .13);
}

.login-panel input::placeholder {
  color: #07478e;
  opacity: 1;
}

.login-password-field {
  position: relative;
}

.login-password-field input {
  padding-right: 56px;
}

.login-password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 12px;
  background: transparent;
  color: #6488b7;
  transform: translateY(-50%);
}

.login-password-toggle:hover {
  background: #eef3f8;
  color: #07478e;
}

.login-password-toggle svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.login-panel .actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 2px;
}

.login-panel .btn {
  min-height: 54px;
  border-radius: 999px;
  font-family: ui-rounded, "SF Pro Rounded", "Avenir Next", Avenir, sans-serif;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -.01em;
}

.login-panel .login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: #07478e;
  color: #fff;
  box-shadow: 0 8px 18px rgba(7, 71, 142, .2);
}

.login-panel .login-submit:hover {
  background: #063b78;
  transform: translateY(-1px);
}

.login-submit-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #07478e;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1;
}

.login-separator {
  height: 2px;
  margin: 7px 0 0;
  background: #e0e5ea;
}

.login-panel .btn.login-passkey {
  border: 0;
  background: #f0f2f6;
  color: #07478e;
}

.login-panel .btn.login-passkey:hover {
  background: #e6ebf1;
}

.login-passkey svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.login-panel .message {
  color: #b42318;
  text-align: center;
}

@keyframes login-panel-in {
  from { opacity: 0; transform: translate3d(0, 18px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.empty-panel {
  max-width: 620px;
  padding: 34px;
}

.notice {
  border-radius: 14px;
  background: rgba(52, 199, 89, .14);
  color: #1f7a3a;
  padding: 12px 14px;
  font-weight: 600;
}

.login-panel h2,
.login-panel h3,
.form-panel h3,
.data-panel h3 {
  margin: 0 0 16px;
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

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

.compact-form {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.field {
  display: grid;
  gap: 7px;
}

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

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

label {
  color: var(--secondary);
  font-size: .82rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--fill);
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

input:hover,
select:hover,
textarea:hover {
  background: var(--fill-hover);
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(7, 71, 142, .45);
  background: var(--surface-solid);
  box-shadow: 0 0 0 4px rgba(7, 71, 142, .14);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--blue);
  color: white;
  font-size: .94rem;
  font-weight: 700;
  transition: background .15s ease, transform .15s ease;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn:active {
  transform: scale(.985);
}

.btn.secondary {
  background: var(--fill);
  color: var(--text);
}

.btn.secondary:hover {
  background: var(--fill-hover);
}

.btn.warn {
  background: rgba(255, 59, 48, .12);
  color: var(--red);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.compact-actions .btn {
  min-height: 34px;
  padding-inline: 12px;
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: var(--red);
  font-size: .9rem;
}

.policy-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--secondary);
  font-size: .84rem;
  line-height: 1.35;
}

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

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

.dense-stats .stat {
  padding: 12px;
}

.dense-stats .stat b {
  margin-top: 5px;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  letter-spacing: 0;
}

.yearly-stats {
  margin-bottom: 14px;
}

.charts-section {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.section-mini-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.section-mini-head h3 {
  margin: 0 0 2px;
  font-size: 1.02rem;
}

.section-mini-head span {
  color: var(--secondary);
  font-size: .84rem;
  font-weight: 600;
}

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

.chart-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px 14px 22px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: var(--surface-solid);
}

.chart-card[role="button"] {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.chart-card[role="button"]:hover,
.chart-card[role="button"]:focus-visible {
  border-color: rgba(7, 71, 142, .28);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .07);
  outline: 0;
  transform: translateY(-1px);
}

.chart-card.large {
  cursor: default;
  transform: none;
}

.chart-card:nth-child(3) {
  grid-column: 1 / -1;
}

.chart-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.chart-head h4 {
  margin: 0 0 3px;
  font-size: .95rem;
  font-weight: 760;
}

.chart-head span,
.chart-legend span,
.chart-legend button {
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 650;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.chart-legend span,
.chart-legend button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend button {
  min-height: 28px;
  border-radius: 999px;
  background: var(--fill);
  padding: 0 9px;
}

.chart-legend button:hover {
  background: var(--fill-hover);
}

.chart-legend button.muted-off {
  opacity: .42;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.line-chart {
  width: 100%;
  max-height: 52vh;
  height: auto;
  overflow: visible;
}

.chart-axis {
  stroke: rgba(60, 60, 67, .22);
  stroke-width: 1.2;
}

.chart-month-band {
  fill: rgba(242, 243, 245, .92);
}

.chart-month-band.alt {
  fill: rgba(224, 228, 234, .88);
}

.chart-month-separator {
  stroke: rgba(60, 60, 67, .11);
  stroke-width: 1;
}

.chart-year-marker {
  stroke: rgba(29, 29, 31, .38);
  stroke-width: 1.5;
  stroke-dasharray: 4 5;
}

.chart-year-label {
  fill: var(--secondary);
  font-size: 11px;
  font-weight: 800;
}

.chart-unit-label {
  fill: var(--secondary);
  font-size: 12px;
  font-weight: 760;
}

.chart-x.mid {
  text-anchor: middle;
}

.chart-grid line {
  stroke: rgba(60, 60, 67, .12);
  stroke-width: 1;
}

.chart-grid text,
.chart-x {
  fill: var(--tertiary);
  font-size: 11px;
  font-weight: 650;
}

.chart-y {
  text-anchor: end;
}

.chart-x.end {
  text-anchor: end;
}

.chart-line {
  fill: none;
  stroke: var(--line);
  stroke-width: 3;
  stroke-dasharray: var(--dash);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-dot {
  fill: var(--surface-solid);
  stroke: var(--line);
  stroke-width: 2.5;
}

.chart-hit {
  fill: transparent;
  stroke: transparent;
}

.chart-tooltip {
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}

.chart-point:hover .chart-tooltip,
.chart-point:focus .chart-tooltip {
  opacity: 1;
}

.chart-tooltip rect {
  fill: rgba(29, 29, 31, .92);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .22));
}

.chart-tooltip text {
  fill: #fff;
  font-size: 11px;
  font-weight: 720;
}

.chart-tooltip text + text {
  fill: rgba(255, 255, 255, .78);
  font-weight: 650;
}

.chart-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 12px;
  background: var(--fill);
  color: var(--secondary);
  font-size: .88rem;
  font-weight: 650;
}

.monthly-compact {
  gap: 14px;
}

.monthly-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.monthly-average {
  align-self: start;
  border-radius: 999px;
  background: var(--fill);
  color: var(--secondary);
  padding: 6px 10px;
  font-size: .78rem;
  font-weight: 760;
  white-space: nowrap;
}

.monthly-average.muted {
  background: transparent;
  color: var(--secondary);
  box-shadow: inset 0 0 0 1px var(--separator);
}

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

.monthly-row {
  display: grid;
  grid-template-columns: 66px minmax(60px, 1fr) 86px;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.monthly-row span,
.monthly-row strong {
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 760;
  white-space: nowrap;
}

.monthly-row strong {
  color: var(--text);
  text-align: right;
}

.monthly-row i {
  position: relative;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: rgba(118, 118, 128, .13);
}

.monthly-row i::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--avg);
  width: 2px;
  border-radius: 999px;
  background: rgba(29, 29, 31, .58);
  transform: translateX(-1px);
}

.monthly-row b,
.monthly-row em {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  height: 100%;
  border-radius: inherit;
}

.monthly-row b {
  width: var(--base);
  background: #5d728c;
}

.monthly-row em {
  left: var(--over-left);
  width: var(--over);
  background: #9b5a00;
}

.monthly-row.above-average strong {
  color: #8a4d00;
}

.bar-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--bar-count, 12), minmax(0, 1fr));
  align-items: end;
  gap: clamp(2px, .55vw, 10px);
  min-height: 286px;
  max-width: 100%;
  overflow: visible;
  padding: 20px 0 24px;
}

.bar-item {
  position: relative;
  display: grid;
  grid-template-rows: 220px 42px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.bar-item i {
  position: relative;
  display: block;
  justify-self: center;
  width: min(42px, 82%);
  height: var(--bar-height);
  min-height: 8px;
  border-radius: 10px 10px 5px 5px;
  overflow: hidden;
  background: rgba(118, 118, 128, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38);
}

.bar-item.no-data i {
  visibility: hidden;
  min-height: 0;
  background: transparent;
  box-shadow: none;
}

.bar-item i > b,
.bar-item i > em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
}

.bar-item i > b {
  height: var(--base);
  background: linear-gradient(180deg, #5d728c, #9fb0c3);
  z-index: 1;
}

.bar-item i > em {
  bottom: var(--over-bottom);
  height: var(--over);
  background: linear-gradient(180deg, #9b5a00, #c88a35);
  z-index: 2;
}

.bar-tooltip {
  position: absolute;
  left: 50%;
  bottom: var(--tip-bottom);
  z-index: 10;
  display: grid;
  gap: 6px;
  width: 210px;
  opacity: 0;
  transform: translateX(-50%) translateY(4px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(29, 29, 31, .94);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .22);
  color: #fff;
  padding: 10px 11px;
  pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
}

.bar-item:first-child .bar-tooltip {
  left: 0;
  transform: translateX(0) translateY(4px);
}

.bar-item:first-child:hover .bar-tooltip,
.bar-item:first-child:focus-within .bar-tooltip {
  transform: translateX(0) translateY(0);
}

.bar-item:first-child .bar-tooltip::after {
  left: 24px;
}

.bar-item:last-child .bar-tooltip {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(4px);
}

.bar-item:last-child:hover .bar-tooltip,
.bar-item:last-child:focus-within .bar-tooltip {
  transform: translateX(0) translateY(0);
}

.bar-item:last-child .bar-tooltip::after {
  left: auto;
  right: 24px;
}

.bar-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: rgba(29, 29, 31, .94);
  transform: translateX(-50%) rotate(45deg);
}

.bar-tooltip strong {
  color: #fff;
  font-size: .78rem;
  font-weight: 780;
  text-align: left;
}

.bar-tooltip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, .74);
  font-size: .7rem;
  font-weight: 650;
}

.bar-tooltip small {
  font: inherit;
}

.bar-tooltip b {
  overflow: hidden;
  max-width: 108px;
  color: #fff;
  font-size: .72rem;
  font-weight: 760;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-item:hover .bar-tooltip,
.bar-item:focus-within .bar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.bar-item > b {
  overflow: hidden;
  align-self: center;
  color: var(--tertiary);
  font-size: .72rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-item.above-average > b {
  color: #8a4d00;
}

.bar-average {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(66px + var(--avg-bottom));
  border-top: 1px dashed rgba(29, 29, 31, .26);
  pointer-events: none;
}


.chart-detail-body {
  display: grid;
  gap: 12px;
}

.chart-detail-body .chart-card {
  padding: 16px 16px 28px;
}

.chart-detail-body .bar-chart {
  min-height: 286px;
}

.chart-detail-body .bar-item {
  height: auto;
}

.chart-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.range-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: var(--fill);
}

.range-tabs button,
.compare-toggle {
  min-height: 30px;
  border-radius: 999px;
  background: transparent;
  color: var(--secondary);
  padding: 0 10px;
  font-size: .78rem;
  font-weight: 740;
}

.range-tabs button.active,
.compare-toggle.active {
  background: var(--surface-solid);
  color: var(--blue);
  box-shadow: var(--small-shadow);
}

.compare-toggle {
  background: var(--fill);
  white-space: nowrap;
}

.detail-stat-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-group {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid var(--separator);
  border-radius: 16px;
  background: var(--surface-solid);
}

.stat-group h4 {
  margin: 0;
  font-size: .95rem;
  font-weight: 760;
}

.stat-lines {
  display: grid;
  gap: 2px;
}

.stat-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 10px;
}

.stat-line:nth-child(odd) {
  background: rgba(118, 118, 128, .075);
}

.stat-line:nth-child(even) {
  background: rgba(118, 118, 128, .035);
}

.stat-line span {
  color: var(--secondary);
  font-size: .84rem;
  font-weight: 650;
}

.stat-line b {
  color: var(--text);
  font-size: .96rem;
  text-align: right;
}

.chart-detail-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--separator);
  border-radius: 14px;
}

.chart-detail-table div {
  display: grid;
  grid-template-columns: minmax(110px, .7fr) minmax(0, 1fr);
  gap: 12px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--separator);
}

.chart-detail-table div:nth-child(odd) {
  background: var(--surface-solid);
}

.chart-detail-table div:nth-child(even) {
  background: rgba(118, 118, 128, .06);
}

.chart-detail-table div:last-child {
  border-bottom: 0;
}

.detail-stat-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px dashed var(--separator);
  border-radius: 16px;
  background: var(--surface-solid);
}

.stat {
  padding: 18px;
  box-shadow: none;
}

.stat b {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.list {
  display: grid;
  gap: 10px;
}

.vehicle-row,
.entry-row,
.user-row {
  width: 100%;
  padding: 14px;
  text-align: left;
  box-shadow: none;
}

.vehicle-row {
  background: var(--surface-solid);
}

.vehicle-row:hover {
  background: #f9f9fb;
}

.vehicle-row.active {
  border-color: rgba(7, 71, 142, .38);
  background: rgba(7, 71, 142, .10);
}

.row-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.row-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--secondary);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}

.entry-row {
  display: grid;
  grid-template-columns: 110px minmax(130px, 1.2fr) repeat(4, minmax(82px, .7fr));
  gap: 12px;
  align-items: center;
  background: var(--surface-solid);
}

.entry-row strong {
  display: block;
}

.table-head {
  display: grid;
  grid-template-columns: 110px minmax(130px, 1.2fr) repeat(4, minmax(82px, .7fr));
  gap: 12px;
  color: var(--secondary);
  font-size: .78rem;
  font-weight: 700;
  padding: 0 14px;
}

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

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

.divider {
  height: 1px;
  background: var(--separator);
  margin: 18px 0;
}

.empty {
  padding: 18px;
  border-radius: 14px;
  background: var(--fill);
  color: var(--secondary);
}

.empty.slim {
  padding: 14px;
}

@media (min-width: 881px) {
  .sidebar .menu {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    align-self: stretch;
    justify-content: stretch;
    justify-items: stretch;
    gap: 0;
    width: inherit;
    min-width: inherit;
    inline-size: inherit;
    max-width: inherit;
    margin: 0;
    padding: 14px 0 0;
    border-radius: 0;
    background: transparent;
  }

  .sidebar .nav-group {
    display: block;
    width: 100%;
    min-width: 100%;
    inline-size: 100%;
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .075);
  }

  .sidebar .nav-group:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, .075);
  }

  .sidebar .menu-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    inline-size: 100%;
    min-height: 58px;
    padding: 0 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(255, 255, 255, .63);
    text-align: left;
    font-size: .96rem;
    font-weight: 650;
  }

  .sidebar .menu-item:hover {
    background: rgba(255, 255, 255, .07);
    color: #fff;
  }

  .sidebar .menu-item.active {
    background: rgba(2, 23, 54, .48);
    color: #fff;
    box-shadow: inset 4px 0 0 #51d7d0;
  }

  .sidebar .submenu {
    padding: 0 14px 10px 38px;
  }

  .sidebar .submenu-item {
    min-height: 36px;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 255, 255, .14);
    border-radius: 0 9px 9px 0;
    background: transparent;
    color: rgba(255, 255, 255, .53);
    text-align: left;
    font-size: .82rem;
    font-weight: 600;
  }

  .sidebar .submenu-item:hover,
  .sidebar .submenu-item.active {
    background: rgba(255, 255, 255, .06);
    color: #fff;
  }

  .workspace .content-area {
    width: min(1340px, calc(100% - 48px));
    padding: clamp(24px, 3vw, 42px) 0 64px;
  }

  .workspace .content-area > .page-head {
    display: none;
  }

  .data-panel,
  .form-panel,
  .stat,
  .vehicle-row,
  .entry-row,
  .user-row {
    border-color: rgba(7, 71, 142, .09);
    box-shadow: 0 10px 30px rgba(11, 45, 91, .055);
  }
}

@media (max-width: 880px) {
  .login-screen,
  .two-column {
    grid-template-columns: 1fr;
  }

  .app-layout {
    display: block;
  }

  .sidebar {
    position: static;
    display: grid;
    width: 100%;
    height: auto;
    overflow: visible;
    padding-bottom: 12px;
  }

  .sidebar-brand {
    min-height: 76px;
    padding: 16px 18px 10px;
  }

  .sidebar-footer {
    display: none;
  }

  .context-switcher select,
  .context-switcher strong {
    max-width: min(56vw, 260px);
  }

  .sidebar .menu {
    width: calc(100% - 28px);
    max-width: none;
    margin: 0 14px;
    overflow-x: auto;
    justify-content: flex-start;
    background: rgba(255, 255, 255, .08);
  }

  .sidebar .nav-group {
    flex: 0 0 auto;
  }

  .sidebar .menu-item {
    color: rgba(255, 255, 255, .68);
  }

  .sidebar .menu-item.active {
    background: #fff;
    color: var(--blue);
  }

  .workspace-topbar {
    position: static;
    min-height: 68px;
    padding: 10px 16px;
  }

  .workspace .content-area > .page-head {
    display: none;
  }

  .page-head {
    display: grid;
    align-items: start;
  }

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

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

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

  .detail-stat-groups {
    grid-template-columns: 1fr;
  }

  .detail-settings-grid {
    grid-template-columns: 1fr;
  }

  .detail-header,
  .detail-title,
  .detail-identity {
    align-items: stretch;
  }

  .detail-title,
  .detail-identity {
    flex-wrap: wrap;
  }

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

  .chart-card:nth-child(3) {
    grid-column: auto;
  }

  .entry-row,
  .table-head {
    grid-template-columns: 1fr 1fr;
  }

  .table-head {
    display: none;
  }
}

@media (max-width: 560px) {
  .login-screen,
  .content-area,
  .top-nav {
    padding-inline: 14px;
  }

  .login-screen {
    justify-content: center;
    align-content: center;
    padding:
      max(18px, env(safe-area-inset-top))
      max(18px, env(safe-area-inset-right))
      max(18px, env(safe-area-inset-bottom))
      max(18px, env(safe-area-inset-left));
  }

  .login-screen::before {
    background: linear-gradient(0deg, rgba(2, 23, 37, .72), rgba(2, 23, 37, .16) 78%);
  }

  .login-panel {
    margin: 0;
    padding: 27px 20px 23px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .97);
  }

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

  .field-grid,
  .field-grid.nested,
  .field-grid.nested.three,
  .field-grid.nested.four,
  .field-grid.media-fields,
  .stats,
  .stats-grid,
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-card:nth-child(3) {
    grid-column: auto;
  }

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

  .detail-header {
    display: grid;
    gap: 14px;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .bar-chart {
    overflow: visible;
  }

  .chart-detail-table div {
    display: grid;
  }

  .modal-card.wide,
  .modal-card.vehicle,
  .modal-card.entry,
  .modal-card.chart-detail {
    width: 100%;
    max-height: calc(100dvh - 28px);
    overflow-y: auto;
  }

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

  .vehicle-form .form-section:nth-of-type(1),
  .vehicle-form .form-section:nth-of-type(2),
  .vehicle-form .form-section:nth-of-type(3),
  .vehicle-form .form-section:nth-of-type(4) {
    grid-column: 1;
    grid-row: auto;
  }

  .modal-card.vehicle .field-grid.nested.three,
  .modal-card.vehicle .field-grid.nested.four,
  .modal-card.entry .field-grid.nested.three,
  .modal-card.vehicle .field-grid.media-fields {
    grid-template-columns: 1fr;
  }

  .btn {
    width: 100%;
  }

  .account-menu {
    position: fixed;
    top: 70px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .settings-menu {
    position: fixed;
    top: 70px;
    right: 14px;
    left: 14px;
    width: auto;
  }

  .context-picker {
    padding: 18px;
  }

  .context-picker-back {
    width: 46px;
    height: 46px;
  }

  .context-picker-inner {
    margin-top: 24px;
  }

  .context-cards {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
  }

  .context-card {
    grid-template-columns: 78px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    justify-items: start;
    align-items: center;
    min-height: 112px;
    padding: 16px;
    text-align: left;
  }

  .context-card-mark {
    width: 72px;
    height: 72px;
    border-width: 5px;
  }

  .context-card-mark svg {
    width: 31px;
    height: 31px;
  }

  .context-card-copy {
    justify-items: start;
  }

  .modal-backdrop {
    place-items: start center;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 28px);
    border-radius: 18px;
    padding: 18px;
  }

  .modal-card .section-title {
    top: -18px;
    margin: -18px -18px 14px;
    padding: 18px 18px 12px;
  }

  .modal-card .actions {
    bottom: -18px;
    margin: 4px -18px -18px;
    padding: 12px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-panel,
  .hex-layer,
  .hex-sparks {
    animation: none;
  }
}
