@charset "UTF-8";

:root {
  color-scheme: light;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 16px;
  color: #193138;
  background: #f2f6f6;
  --ink: #193138;
  --muted: #4e656a;
  --line: #dce6e6;
  --teal: #12695e;
  --teal-dark: #0c544c;
  --paper: #fff;
  --radius: 15px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid #2b877a; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.workspace { display: grid; grid-template-columns: 234px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: #102f35; color: #e8f3f3; padding: 34px 19px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 1.16rem; font-weight: 700; line-height: 1.05; letter-spacing: -.018em; }
.sidebar .brand { margin: 0 10px 54px; }
.brand-mark {
  display: grid;
  align-content: center;
  gap: 4px;
  width: 41px;
  height: 41px;
  background: #2e9a86;
  border-radius: 12px;
  padding: 0 10px;
  flex-shrink: 0;
}
.brand-mark i { width: 100%; height: 2px; border-radius: 2px; background: #eefdfa; }
.brand-mark i:nth-child(2) { width: 75%; }
.brand-mark i:nth-child(3) { width: 50%; }
.navigation { display: grid; gap: 7px; }
.nav-link {
  min-height: 48px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 11px;
  color: #c2d7d9;
  font-size: .94rem;
  text-decoration: none;
  font-weight: 600;
}
.nav-link:hover { background: #21484d; }
.nav-link.selected { background: #20484b; color: #d1f9ee; border-color: #35636a; }
.nav-link:focus-visible { outline-color: #7ae6ce; }
.nav-icon { position: relative; display: block; width: 18px; height: 18px; flex-shrink: 0; }
.nav-icon.car::before {
  position: absolute;
  content: "";
  width: 17px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
  left: 0;
  bottom: 3px;
  box-shadow: -4px 5px 0 -3px currentColor, 4px 5px 0 -3px currentColor;
}
.nav-icon.car::after {
  position: absolute;
  content: "";
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  width: 11px;
  height: 5px;
  top: 3px;
  left: 3px;
}
.nav-icon.person::before, .nav-icon.person::after {
  position: absolute;
  content: "";
  border: 1.5px solid currentColor;
}
.nav-icon.person::before { width: 7px; height: 7px; border-radius: 50%; left: 5px; top: 1px; }
.nav-icon.person::after { width: 15px; height: 8px; border-radius: 8px 8px 3px 3px; bottom: 1px; left: 1px; }

.surface { min-width: 0; }
.topbar {
  min-height: 71px;
  padding: 0 clamp(21px, 4vw, 60px);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 13px;
}
.account { display: flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 650; font-size: .88rem; }
.avatar { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: #dfefec; color: var(--teal-dark); }
.top-actions { display: flex; align-items: center; gap: 7px; }
.counter { background: #f9e6b6; color: #603f0b; padding: 2px 7px; min-width: 26px; text-align: center; border-radius: 10px; font-weight: 750; font-size: .875rem; }
.bell {
  position: relative;
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1.55px solid currentColor;
  border-radius: 8px 8px 3px 3px;
  margin-right: 1px;
  flex: 0 0 auto;
}
.bell::after { content: ""; position: absolute; height: 2px; width: 5px; border-radius: 1px; background: currentColor; bottom: -4px; left: 2.5px; }

.main { width: min(100%, 1320px); margin-inline: auto; padding: 40px clamp(21px, 4vw, 60px) 56px; }
.heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 24px; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.035em; line-height: 1.12; }
.button {
  min-height: 44px;
  border-radius: 9px;
  border: 1px solid transparent;
  padding: 8px 13px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: .92rem;
  font-weight: 670;
  line-height: 1.25;
}
.primary { color: #fff; background: var(--teal); border-color: var(--teal); padding-inline: 16px; }
.primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }
.secondary { color: var(--teal-dark); background: #fff; border-color: #bad2ce; }
.secondary:hover, .quiet:hover, .top-button:hover { background: #eaf5f3; }
.quiet { color: var(--muted); background: transparent; }
.top-button { color: var(--teal-dark); background: #f0f7f6; }
.plus { font-size: 1.3rem; font-weight: 500; line-height: .8; }

.tabs { display: flex; gap: 24px; border-bottom: 1px solid #cbdcda; margin: -5px 0 22px; }
.tabs a { text-decoration: none; color: var(--muted); font-weight: 650; padding: 12px 1px; border-bottom: 3px solid transparent; }
.tabs a[aria-current] { color: var(--teal-dark); border-color: var(--teal); }
.tabs a:hover { color: var(--teal-dark); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 24px; }
.metric {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 17px 18px 15px;
  display: grid;
  gap: 7px;
  text-align: start;
  min-width: 0;
}
.metric:hover { border-color: #91b8b2; background: #f9fdfd; }
.metric span { color: var(--muted); font-size: .93rem; line-height: 1.25; align-self: start; }
.metric strong { font-size: 1.82rem; line-height: 1.05; font-variant-numeric: tabular-nums; }
.metric.attention strong { color: #815411; }
.metric.negative strong { color: #a83e38; }

.registry {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.filter-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.scope { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: #eef4f3; }
.scope button {
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  min-height: 40px;
  font-size: .9rem;
  font-weight: 650;
  padding: 0 12px;
}
.scope button:hover { color: var(--teal-dark); }
.scope button[aria-pressed="true"] { background: #fff; border-color: #d8e4e2; color: var(--teal-dark); }
.result-count { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.filter-row { display: flex; gap: 9px; margin-bottom: 15px; }
.search { position: relative; flex: 1 1 240px; min-width: 0; }
.search input { width: 100%; padding-left: 37px; text-overflow: ellipsis; }
.search-icon { position: absolute; width: 12px; height: 12px; border: 1.65px solid var(--muted); border-radius: 50%; left: 14px; top: 15px; pointer-events: none; }
.search-icon::after { content: ""; position: absolute; width: 6px; height: 1.65px; background: var(--muted); top: 9px; left: 7px; transform: rotate(45deg); border-radius: 2px; }
.filter-select { display: block; flex: 0 1 184px; min-width: 0; }
input, select, textarea {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #bccfce;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  padding: 8px 11px;
}
input::placeholder { color: #617378; opacity: 1; }
select {
  appearance: none;
  padding-right: 32px;
  width: 100%;
  background-image: linear-gradient(45deg, transparent 49%, #557474 50%), linear-gradient(135deg, #557474 50%, transparent 51%);
  background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.results { display: grid; gap: 7px; }
.empty {
  min-height: 234px;
  border: 1px dashed #c8dad8;
  border-radius: 11px;
  padding: 30px 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: center;
  background: #fbfdfd;
}
.empty h2 { font-size: 1.16rem; }
.empty-mark { width: 43px; height: 38px; border: 1px solid #cce1dd; background: #e7f3f0; border-radius: 11px; position: relative; }
.empty-mark::before, .empty-mark::after { content: ""; position: absolute; border-radius: 2px; height: 2px; width: 16px; left: 13px; background: #669e95; }
.empty-mark::before { top: 15px; }
.empty-mark::after { top: 21px; width: 11px; }
.record {
  text-align: left;
  width: 100%;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(140px, 1.35fr) minmax(90px, .75fr) minmax(101px, .8fr) minmax(102px, auto) 11px;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 13px 11px 13px 14px;
  min-height: 72px;
}
.record.engineer { grid-template-columns: minmax(140px, 1.35fr) minmax(90px, .75fr) minmax(101px, .8fr) 11px; }
.record:hover { background: #f6fbfa; border-color: #9cc2ba; }
.record-title, .cell { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.record-title > strong { font-size: 1.02rem; line-height: 1.2; }
.record-title > span, .cell > span { color: var(--muted); font-size: .88rem; line-height: 1.25; }
.record-title > span:empty { display: none; }
.cell > strong { font-size: .93rem; font-weight: 650; }
.plate { color: var(--ink); background: #eef3f3; border-radius: 4px; padding: 1px 4px; font-weight: 700; }
.record > .pill { justify-self: start; }
.record-arrow { width: 7px; height: 7px; border-top: 1.5px solid #587775; border-right: 1.5px solid #587775; transform: rotate(45deg); }
.pill { display: inline-block; white-space: nowrap; border-radius: 20px; padding: 4px 8px; font-size: .875rem; line-height: 1.2; font-weight: 650; }
.pill.soon { background: #fff0ce; color: #6e470c; }
.pill.overdue { background: #fde8e4; color: #912d29; }
.pill.current { background: #e4f3ed; color: #205e4f; }
.pill.unset { background: #edf1f2; color: #4b6167; }

.login-layout {
  min-height: 100vh;
  padding: 24px;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse at 10% 12%, #c7e6e1, transparent 50%), #eef4f4;
}
.login-card {
  width: min(100%, 420px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 42px #102f351a;
  padding: clamp(22px, 7vw, 36px);
}
.login-brand { color: #173b3e; margin-bottom: 28px; }
.login-card h1 { font-size: 2rem; margin-bottom: 20px; }
.login-card form { display: grid; gap: 15px; }
.login-submit { margin-top: 4px; }
.starting { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

dialog {
  width: min(650px, calc(100% - 36px));
  max-height: min(88vh, 900px);
  max-height: min(88dvh, 900px);
  padding: 0;
  border: 1px solid #cddcdb;
  border-radius: 17px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 18px 70px #102f3540;
}
dialog::backdrop { background: #09262c88; }
.dialog-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 66px;
  padding: 10px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.dialog-head h2 { font-size: clamp(1.24rem, 4.2vw, 1.55rem); line-height: 1.18; overflow-wrap: anywhere; }
.close { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted); border: 0; border-radius: 8px; background: #eff5f4; font-size: 1.7rem; }
.close:hover { background: #e1f0ed; }
.dialog-body { padding: 20px 22px 24px; }
.form-grid, .info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0; }
.field { display: grid; min-width: 0; gap: 6px; align-content: start; }
.field span { color: var(--ink); font-size: .9rem; font-weight: 650; }
.field input, .field textarea { width: 100%; }
.field textarea { resize: vertical; }
.wide { grid-column: 1 / -1; }
.form-error { margin-top: 10px; color: #912d29; font-size: .93rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.info-grid > div { min-width: 0; background: #f5f9f8; padding: 11px; border-radius: 8px; }
.info-grid dt { font-size: .875rem; color: var(--muted); margin-bottom: 5px; }
.info-grid dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.info-grid dd .pill { margin: 3px 0 0 3px; }
.archive-note { margin-bottom: 14px; color: #4b5d61; padding: 9px 11px; border-radius: 8px; background: #edf1f2; }
.detail-section { margin-top: 19px; border-top: 1px solid var(--line); padding-top: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.section-head h3 { font-size: 1.05rem; }
.detail-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.detail-list li { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 11px; background: #f4f8f7; border-radius: 8px; overflow-wrap: anywhere; }
.detail-list li > div { display: grid; gap: 3px; min-width: 0; }
.detail-list li > span, .detail-list li > div > span { color: var(--muted); font-size: .9rem; }
.detail-list li .quiet { white-space: nowrap; padding-inline: 8px; }
.work-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.muted { color: var(--muted); }
.reminder-caption { margin-bottom: 12px; }
.reminder-empty { padding: 17px 11px; background: #f4f8f7; border-radius: 8px; }
.detail-list li .reminder-type { color: var(--teal-dark); font-weight: 650; }
.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  max-width: min(440px, calc(100% - 40px));
  padding: 12px 16px;
  border-radius: 8px;
  color: #fff;
  background: #134c43;
  box-shadow: 0 4px 16px #102f3540;
  pointer-events: none;
}
.toast.is-error { background: #8a3530; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 192px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .record { grid-template-columns: minmax(125px, 1.3fr) minmax(74px, .65fr) minmax(88px, .8fr) minmax(97px, auto) 9px; }
  .record.engineer { grid-template-columns: minmax(125px, 1.3fr) minmax(74px, .65fr) minmax(88px, .8fr) 9px; }
}

@media (max-width: 800px) {
  .workspace { display: block; }
  .sidebar { padding: 15px 18px 10px; }
  .sidebar .brand { margin: 0 0 14px; }
  .brand { font-size: 1.06rem; }
  .brand-mark { width: 35px; height: 35px; border-radius: 9px; }
  .brand br { display: none; }
  .navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-link { justify-content: center; padding-inline: 8px; min-height: 44px; }
  .topbar { min-height: 57px; padding-inline: 18px; gap: 5px; }
  .main { padding: 27px 18px 35px; }
}

@media (max-width: 620px) {
  .heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 16px; gap: 13px; }
  .heading h1 { width: 100%; }
  .main { padding-inline: 14px; }
  .metrics { gap: 6px; margin-bottom: 13px; }
  .metric { padding: 10px 8px; border-radius: 10px; gap: 7px; }
  .metric span { font-size: .875rem; }
  .metric strong { font-size: 1.5rem; }
  .registry { padding: 10px; border-radius: 11px; }
  .filter-row { flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
  .search { flex-basis: 100%; }
  .filter-select { flex: 1 1 125px; }
  .record, .record.engineer { position: relative; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 11px; }
  .record-title { grid-column: 1 / -1; padding-right: 14px; }
  .record-arrow { position: absolute; right: 13px; top: 17px; }
  .nav-link { gap: 7px; }
  .dialog-head { padding-inline: 13px; }
  .dialog-body { padding: 15px 13px 19px; }
  .form-grid, .info-grid { gap: 10px; }
}

@media (max-width: 380px) {
  .topbar { padding-inline: 10px; }
  .topbar .button { padding-inline: 7px; }
  .account { gap: 4px; }
  .avatar { width: 25px; height: 25px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
