:root {
  --ink: #111814;
  --ink-soft: #59645c;
  --paper: #f5f7f2;
  --white: #f8faf6;
  --lime: #c7f43d;
  --line: rgba(17, 24, 20, .18);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--ink); }

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(17, 24, 20, .08) 50%, transparent calc(50% + 1px)),
    var(--paper);
}

button,
input { font: inherit; }

a { color: inherit; }

.login-header {
  min-height: calc(88px + var(--safe-top));
  padding: var(--safe-top) clamp(24px, 4vw, 64px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: var(--ink);
  border-top: 3px solid var(--lime);
}

.login-brand {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -.025em;
  text-decoration: none;
}

.login-brand img { width: 48px; height: 48px; }

.back-link {
  min-height: 48px;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.back-link span { color: var(--lime); font-size: 17px; }

.login-main {
  width: min(1380px, calc(100vw - 64px));
  min-height: calc(100vh - 88px - var(--safe-top));
  min-height: calc(100dvh - 88px - var(--safe-top));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  align-items: stretch;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.login-intro {
  padding: clamp(72px, 10vh, 120px) clamp(36px, 7vw, 110px) 70px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-kicker {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.login-kicker span { width: 9px; height: 9px; background: var(--lime); }

.login-intro h1 {
  max-width: 800px;
  margin: 42px 0 0;
  font-size: clamp(58px, 6.2vw, 104px);
  font-weight: 690;
  line-height: .94;
  letter-spacing: -.062em;
}

.login-intro h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.04em;
}

.login-intro > p:not(.login-kicker) {
  max-width: 520px;
  margin: 52px 0 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.58;
}

.cabinet-preview-link {
  width: fit-content;
  min-height: 48px;
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.cabinet-preview-link span { color: #6f9500; font-size: 18px; }
.cabinet-preview-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

.login-panel {
  align-self: center;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  padding: 34px;
  color: var(--white);
  background: var(--ink);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.login-panel-head {
  padding-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
}

.login-panel-head p,
.login-panel-head span {
  margin: 0;
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.login-panel h2 {
  margin: 32px 0 36px;
  font-size: clamp(32px, 3vw, 46px);
  line-height: 1;
  letter-spacing: -.045em;
}

.field {
  margin-top: 22px;
  display: grid;
  gap: 9px;
}

.field > span:first-child {
  color: rgba(255, 255, 255, .68);
  font-size: 12px;
  font-weight: 720;
}

.field input {
  width: 100%;
  min-height: 58px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  outline: none;
  color: var(--white);
  background: rgba(255, 255, 255, .035);
  caret-color: var(--lime);
  appearance: none;
}

.field input:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 1px var(--lime);
}

.field input[aria-invalid="true"] { border-color: #ff8b69; }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 104px; }

.password-field button {
  position: absolute;
  top: 5px;
  right: 6px;
  min-width: 88px;
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  color: rgba(255, 255, 255, .72);
  background: transparent;
  font-size: 11px;
  font-weight: 760;
  cursor: pointer;
}

.password-field button:focus-visible,
.back-link:focus-visible,
.worker-entry a:focus-visible,
.login-brand:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.login-error {
  margin: 18px 0 0;
  padding: 13px 14px;
  color: #ffe1d8;
  background: rgba(164, 51, 24, .34);
  border-left: 3px solid #ff8b69;
  font-size: 13px;
  line-height: 1.4;
}

.submit-button {
  width: 100%;
  min-height: 62px;
  margin-top: 26px;
  padding: 0 18px 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: var(--ink);
  background: var(--lime);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.submit-button b { font-size: 22px; }
.submit-button:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }

.worker-entry {
  margin-top: 28px;
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: rgba(255, 255, 255, .5);
  font-size: 11px;
}

.worker-entry a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-size: 12px;
  font-weight: 740;
  text-decoration: none;
  white-space: nowrap;
}

.worker-entry b { color: var(--lime); font-size: 16px; }

[hidden] { display: none !important; }

.cabinet-showcase {
  padding: clamp(90px, 10vw, 150px) max(32px, calc((100vw - 1380px) / 2)) 56px;
  color: var(--white);
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, .14);
}

.showcase-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, .55fr);
  align-items: end;
  gap: clamp(48px, 8vw, 140px);
}

.section-index {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, .54);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.section-index span { width: 9px; height: 9px; background: var(--lime); }

.showcase-heading h2 {
  max-width: 900px;
  margin: 34px 0 0;
  font-size: clamp(52px, 6.4vw, 96px);
  font-weight: 690;
  line-height: .94;
  letter-spacing: -.06em;
}

.showcase-heading h2 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.04em;
}

.showcase-heading > p {
  max-width: 420px;
  margin: 0 0 8px;
  color: rgba(255, 255, 255, .62);
  font-size: 16px;
  line-height: 1.58;
}

.dashboard-demo {
  min-height: 740px;
  margin-top: clamp(58px, 7vw, 96px);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  overflow: hidden;
  color: var(--ink);
  background: #e9ece6;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .28);
}

.object-rail {
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  background: #17201b;
}

.rail-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 780;
  text-transform: uppercase;
}

.rail-brand img { width: 34px; height: 34px; }

.object-card {
  margin-top: 32px;
  padding: 19px 16px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, .055);
  border-left: 2px solid var(--lime);
}

.object-card span,
.object-card small,
.rail-status small {
  color: rgba(255, 255, 255, .48);
  font-size: 9px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.object-card strong { font-size: 14px; line-height: 1.35; }

.object-rail nav { margin-top: 30px; display: grid; gap: 4px; }

.object-rail nav span {
  min-height: 44px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .58);
  font-size: 12px;
  font-weight: 680;
}

.object-rail nav span.is-active { color: var(--white); background: rgba(255, 255, 255, .07); }
.object-rail nav i { width: 7px; height: 7px; border: 1px solid currentColor; }
.object-rail nav .is-active i { background: var(--lime); border-color: var(--lime); }
.object-rail nav b { margin-left: auto; color: var(--lime); font-size: 10px; }

.rail-status {
  margin-top: auto;
  padding: 18px 10px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

.rail-status > i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(199, 244, 61, .1); }

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

.dashboard-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.dashboard-topline > div { display: grid; gap: 5px; }
.dashboard-topline span { color: #68736b; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.dashboard-topline strong { font-size: 19px; }
.dashboard-topline .demo-label { padding: 8px 10px; color: #4f5b53; background: rgba(17, 24, 20, .07); }

.status-cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.status-cards article {
  min-height: 126px;
  padding: 17px;
  display: grid;
  align-content: space-between;
  background: #f8faf6;
  border: 1px solid rgba(17, 24, 20, .09);
}

.status-cards span { color: #69736c; font-size: 10px; font-weight: 700; }
.status-cards strong { font-size: 36px; line-height: 1; letter-spacing: -.05em; }
.status-cards strong small { font-size: 15px; }
.status-cards em { color: #657169; font-size: 9px; font-style: normal; }
.status-cards em.good { color: #527100; }
.status-cards em.attention { color: #a44b20; }

.dashboard-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
  gap: 12px;
}

.demo-module {
  min-width: 0;
  padding: 18px;
  background: #f8faf6;
  border: 1px solid rgba(17, 24, 20, .09);
}

.demo-module > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.demo-module > header div { display: grid; gap: 5px; }
.demo-module > header span { color: #778079; font-size: 9px; font-weight: 760; text-transform: uppercase; letter-spacing: .08em; }
.demo-module > header strong { font-size: 14px; }
.demo-module > header > b { color: #68736b; font-size: 9px; }
.demo-module > header > b.ready { padding: 5px 8px; color: #415c00; background: rgba(199, 244, 61, .42); }

.schedule-days { margin-top: 22px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.schedule-days > div { min-height: 104px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 7px; background: #eef1eb; border-top: 2px solid transparent; }
.schedule-days > div.today { background: #17201b; border-color: var(--lime); color: var(--white); }
.schedule-days span { display: grid; gap: 2px; text-align: center; color: #6d776f; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.schedule-days span small { color: var(--ink); font-size: 13px; }
.schedule-days .today span { color: rgba(255, 255, 255, .55); }
.schedule-days .today span small { color: var(--white); }
.schedule-days i,
.schedule-module footer i { width: 8px; height: 8px; display: block; border-radius: 50%; }
.schedule-days i.cleaning,
.schedule-module footer i.cleaning { background: var(--lime); }
.schedule-days i.service,
.schedule-module footer i.service { background: #567167; }
.schedule-days .muted { opacity: .35; }
.schedule-module footer { margin-top: 14px; display: flex; gap: 18px; color: #6f7972; font-size: 9px; }
.schedule-module footer span { display: flex; align-items: center; gap: 6px; }

.report-preview { margin-top: 22px; display: grid; grid-template-columns: 94px 1fr; gap: 16px; align-items: center; }
.report-sheet { aspect-ratio: .72; padding: 10px; display: grid; align-content: start; gap: 7px; background: #e8ece5; border: 1px solid #d2d8d0; box-shadow: 0 7px 16px rgba(17, 24, 20, .08); }
.report-sheet span { width: 22px; height: 22px; display: grid; place-items: center; color: var(--ink); background: var(--lime); font-size: 15px; font-weight: 850; }
.report-sheet i { width: 80%; height: 3px; display: block; background: #bac1ba; }
.report-sheet i:nth-of-type(2) { width: 55%; }
.report-sheet small { margin-top: auto; color: #69736c; font-size: 7px; }
.report-preview > div:last-child { display: grid; gap: 8px; }
.report-preview strong { font-size: 13px; }
.report-preview span { color: #6b756e; font-size: 10px; }
.report-preview a { width: fit-content; margin-top: 4px; color: var(--ink); font-size: 10px; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--ink); }
.report-preview a b { color: #6d9200; }

.photo-module { grid-column: 1 / -1; }
.photo-strip { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.photo-strip figure { position: relative; min-height: 156px; margin: 0; overflow: hidden; background: #d9ddd7; }
.photo-strip img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; filter: saturate(.82) contrast(.98); }
.photo-strip figure::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(5, 12, 8, .86)); }
.photo-strip figcaption { position: absolute; z-index: 1; right: 12px; bottom: 11px; left: 12px; display: flex; justify-content: space-between; gap: 10px; color: white; font-size: 10px; font-weight: 700; }
.photo-strip figcaption span { color: var(--lime); }

.tickets-module { grid-column: 1 / -1; }
.ticket-row { min-height: 51px; display: grid; grid-template-columns: 58px minmax(0, 1fr) 96px 102px; align-items: center; gap: 10px; border-top: 1px solid rgba(17, 24, 20, .11); }
.tickets-module > header { margin-bottom: 13px; }
.ticket-id { color: #7a837d; font-size: 9px; font-weight: 760; }
.ticket-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ticket-row small { color: #7b847e; font-size: 9px; text-align: right; }
.status { width: fit-content; padding: 5px 7px; font-size: 8px; font-style: normal; font-weight: 800; }
.status.work { color: #4d650c; background: rgba(199, 244, 61, .34); }
.status.done { color: #395d4d; background: #dceae3; }
.status.accepted { color: #5f5f60; background: #e4e5e3; }

.benefit-list {
  margin-top: clamp(70px, 8vw, 110px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(255, 255, 255, .18);
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.benefit-list article {
  min-height: 260px;
  padding: 28px;
  border-right: 1px solid rgba(255, 255, 255, .18);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.benefit-list span { color: var(--lime); font-size: 10px; font-weight: 800; }
.benefit-list h3 { max-width: 260px; margin: 54px 0 0; font-size: clamp(23px, 2vw, 31px); line-height: 1; letter-spacing: -.04em; }
.benefit-list p { max-width: 320px; margin: 24px 0 0; color: rgba(255, 255, 255, .55); font-size: 13px; line-height: 1.55; }

.showcase-note {
  margin-top: 42px;
  padding-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  border-top: 1px solid rgba(255, 255, 255, .13);
}

.showcase-note span { color: var(--lime); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.showcase-note p { max-width: 520px; margin: 0; color: rgba(255, 255, 255, .42); font-size: 11px; line-height: 1.5; }

@media (max-width: 980px) {
  body { background: var(--paper); }
  .login-main {
    width: min(720px, calc(100vw - 40px));
    min-height: 0;
    grid-template-columns: 1fr;
    border: 0;
  }
  .login-intro { padding: 70px 0 54px; }
  .login-intro h1 { max-width: 700px; font-size: clamp(54px, 10vw, 82px); }
  .login-intro > p:not(.login-kicker) { margin-top: 36px; }
  .login-panel { max-width: none; margin: 0 0 70px; }
  .cabinet-showcase { padding-right: 32px; padding-left: 32px; }
  .showcase-heading { grid-template-columns: 1fr; gap: 32px; }
  .showcase-heading > p { max-width: 600px; }
  .dashboard-demo { grid-template-columns: 196px minmax(0, 1fr); }
  .object-rail { padding-right: 14px; padding-left: 14px; }
  .dashboard-content { padding: 22px; }
  .benefit-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .cabinet-showcase { padding-right: 20px; padding-left: 20px; }
  .dashboard-demo { min-height: 0; grid-template-columns: 1fr; }
  .object-rail { display: none; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .schedule-module,
  .report-module,
  .photo-module,
  .tickets-module { grid-column: 1; }
  .benefit-list { grid-template-columns: 1fr; }
  .benefit-list article { min-height: 220px; }
  .showcase-note { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 560px) {
  .login-header {
    min-height: calc(70px + var(--safe-top));
    padding-right: 14px;
    padding-left: 14px;
  }
  .login-brand { gap: 9px; font-size: 15px; }
  .login-brand img { width: 42px; height: 42px; }
  .back-link { font-size: 12px; }
  .login-main { width: calc(100vw - 28px); }
  .login-intro { padding: 44px 0 32px; }
  .login-kicker { font-size: 10px; }
  .login-intro h1 { margin-top: 24px; font-size: clamp(45px, 13.5vw, 60px); }
  .login-intro > p:not(.login-kicker) { margin-top: 22px; font-size: 16px; }
  .cabinet-preview-link { margin-top: 18px; font-size: 12px; }
  .login-panel { margin-bottom: max(28px, env(safe-area-inset-bottom)); padding: 24px 20px; }
  .login-panel h2 { margin: 24px 0 26px; font-size: 32px; }
  .field { margin-top: 16px; }
  .submit-button { margin-top: 22px; }
  .worker-entry { align-items: flex-start; flex-direction: column; gap: 4px; }
  .cabinet-showcase { padding: 72px 14px 36px; }
  .showcase-heading h2 { margin-top: 24px; font-size: clamp(43px, 12.6vw, 56px); }
  .showcase-heading > p { font-size: 15px; }
  .dashboard-demo { margin-top: 48px; }
  .dashboard-content { padding: 14px; }
  .dashboard-topline { align-items: flex-start; flex-direction: column; gap: 12px; }
  .dashboard-topline .demo-label { font-size: 8px; }
  .status-cards { grid-template-columns: 1fr; gap: 8px; }
  .status-cards article { min-height: 100px; grid-template-columns: 1fr auto; align-items: center; gap: 7px 16px; }
  .status-cards strong { grid-row: 1 / span 2; grid-column: 2; }
  .demo-module { padding: 15px; }
  .schedule-days { gap: 3px; }
  .schedule-days > div { min-height: 94px; padding-right: 3px; padding-left: 3px; }
  .report-preview { grid-template-columns: 78px 1fr; }
  .photo-strip { grid-template-columns: 1fr; }
  .photo-strip figure { min-height: 190px; }
  .ticket-row { min-height: 76px; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-rows: auto auto; padding: 11px 0; }
  .ticket-row strong { white-space: normal; }
  .ticket-row .status { grid-column: 3; grid-row: 1 / span 2; }
  .ticket-row small { grid-column: 2; grid-row: 2; text-align: left; }
  .benefit-list { margin-top: 64px; }
  .benefit-list article { min-height: 205px; padding: 24px 20px; }
  .benefit-list h3 { margin-top: 38px; }
}

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