@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-500.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-600.ttf") format("truetype");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/jetbrains-mono-700.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/manrope-400.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/manrope-500.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/manrope-600.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./fonts/manrope-700.ttf") format("truetype");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("./fonts/manrope-800.ttf") format("truetype");
}

:root {
  --bg: #fbfaf8;
  --milk: #fffdf8;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --violet-950: #002715;
  --violet-800: #015231;
  --violet-600: #038351;
  --violet-500: #079b61;
  --violet-200: #b6e6c9;
  --violet-100: #e9f3ec;
  --blue-500: #4b7fe8;
  --ink: #0f1813;
  --muted: #68756d;
  --soft: #8f9c94;
  --line: rgba(1, 97, 59, 0.13);
  --line-strong: rgba(2, 90, 54, 0.2);
  --green: #38a56f;
  --green-soft: #eaf8f0;
  --red: #da5b6b;
  --red-soft: #fff0f2;
  --coral: #ee7964;
  --amber: #d7952b;
  --amber-soft: #fff5df;
  --shadow: 0 26px 70px rgba(3, 79, 47, 0.12);
  --shadow-tight: 0 16px 38px rgba(3, 79, 47, 0.1);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(9, 157, 99, 0.18), transparent 33rem),
    radial-gradient(circle at 90% 12%, rgba(5, 160, 100, 0.13), transparent 31rem),
    linear-gradient(145deg, #fffefa 0%, #f9f7ff 50%, #f7f9ff 100%);
  font-family: "Manrope", "SF Pro Display", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 81, 48, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 81, 48, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 35%, black, transparent 73%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.95) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(4, 121, 74, .12) 0 1px, transparent 1px);
  background-size: 140px 140px, 90px 90px;
}

body.star-table-mode {
  color: rgba(236, 244, 239, .88);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 224, 113, .11), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(7, 140, 87, .18), transparent 34rem),
    radial-gradient(circle at 50% 85%, rgba(2, 118, 72, .18), transparent 36rem),
    linear-gradient(145deg, #040a06 0%, #0b1023 48%, #03050d 100%);
}

body.star-table-mode::before {
  z-index: -4;
  opacity: .46;
  background-image:
    linear-gradient(rgba(255, 224, 113, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3, 160, 100, .055) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 50% 32%, black, transparent 78%);
}

body.star-table-mode::after {
  z-index: -3;
  opacity: .9;
  background-image:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.92) 0 1px, transparent 1.4px),
    radial-gradient(circle at 58% 38%, rgba(255, 224, 113, .88) 0 1px, transparent 1.5px),
    radial-gradient(circle at 82% 72%, rgba(117, 150, 255, .82) 0 1px, transparent 1.4px),
    radial-gradient(circle at 40% 84%, rgba(255,255,255,.72) 0 1px, transparent 1.3px);
  background-size: 180px 150px, 260px 210px, 210px 170px, 150px 190px;
  animation: starDrift 46s linear infinite;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

body.star-table-mode .ambient {
  opacity: .18;
  filter: saturate(.6) brightness(.55);
}

.space-battle-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: none;
  overflow: hidden;
  pointer-events: none;
}

body.star-table-mode .space-battle-layer {
  display: block;
}

body.auth-locked .space-battle-layer {
  display: none;
}

.space-ship,
.space-laser,
.space-blast {
  position: absolute;
  display: block;
  will-change: transform, opacity;
}

.space-ship {
  width: 76px;
  height: 24px;
  opacity: 0;
  clip-path: polygon(0 50%, 20% 18%, 66% 18%, 100% 50%, 66% 82%, 20% 82%);
  background:
    linear-gradient(90deg, #dfe7ff 0 18%, #7c8bb7 18% 52%, #f4d260 52% 66%, #151a2d 66% 100%);
  box-shadow: 0 0 18px rgba(255, 224, 113, .28), 0 0 38px rgba(86, 120, 255, .18);
}

.space-ship::before,
.space-ship::after {
  position: absolute;
  content: "";
  border-radius: 999px;
}

.space-ship::before {
  top: 7px;
  left: -11px;
  width: 20px;
  height: 10px;
  background: linear-gradient(90deg, rgba(83, 150, 255, 0), rgba(94, 153, 255, .9));
  filter: blur(2px);
}

.space-ship::after {
  top: 9px;
  right: 13px;
  width: 10px;
  height: 6px;
  background: #82f1ff;
  box-shadow: 0 0 16px rgba(130, 241, 255, .8);
}

.space-ship i {
  position: absolute;
  top: -13px;
  left: 32px;
  width: 14px;
  height: 50px;
  border-radius: 999px;
  background: rgba(223, 231, 255, .55);
  transform: rotate(90deg);
}

.ship-a {
  top: 118px;
  left: -120px;
  transform: rotate(-8deg);
  animation: shipRunA 13s linear infinite;
}

.ship-b {
  top: 310px;
  right: -150px;
  width: 58px;
  height: 19px;
  transform: rotate(184deg);
  animation: shipRunB 17s linear 3s infinite;
}

.ship-c {
  top: 46%;
  left: -150px;
  width: 66px;
  height: 21px;
  transform: rotate(4deg);
  animation: shipRunC 19s linear 6s infinite;
}

.space-laser {
  width: 112px;
  height: 3px;
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(90deg, rgba(255, 72, 72, 0), rgba(255, 72, 72, .98), rgba(255, 230, 120, .9));
  box-shadow: 0 0 14px rgba(255, 72, 72, .86);
}

.laser-a {
  top: 150px;
  left: 23%;
  transform: rotate(-9deg);
  animation: laserRunA 3.4s linear 1.1s infinite;
}

.laser-b {
  top: 365px;
  right: 26%;
  background: linear-gradient(90deg, rgba(91, 158, 255, 0), rgba(91, 158, 255, .98), rgba(173, 226, 255, .9));
  box-shadow: 0 0 14px rgba(91, 158, 255, .86);
  transform: rotate(188deg);
  animation: laserRunB 4.2s linear 2.6s infinite;
}

.laser-c {
  top: 56%;
  left: 38%;
  transform: rotate(-4deg);
  animation: laserRunC 3.8s linear 4s infinite;
}

.space-blast {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  opacity: 0;
  background: #ffe071;
  box-shadow: 0 0 0 10px rgba(255, 224, 113, .14), 0 0 28px rgba(255, 224, 113, .75);
}

.blast-a {
  top: 176px;
  right: 27%;
  animation: blastPulse 3.4s linear 2.2s infinite;
}

.blast-b {
  top: 390px;
  left: 28%;
  background: #7bc8ff;
  box-shadow: 0 0 0 10px rgba(123, 200, 255, .14), 0 0 28px rgba(123, 200, 255, .75);
  animation: blastPulse 4.2s linear 3.5s infinite;
}

.mesh {
  position: absolute;
  display: block;
  filter: blur(16px);
  opacity: 0.72;
  transform: translate3d(0, 0, 0);
}

.mesh-a {
  top: -8rem;
  left: 16rem;
  width: 34rem;
  height: 34rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(4, 150, 94, 0.2), rgba(4, 150, 94, 0));
  animation: floatA 16s var(--ease) infinite alternate;
}

.mesh-b {
  right: -9rem;
  top: 18rem;
  width: 42rem;
  height: 42rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(2, 161, 100, 0.15), rgba(2, 161, 100, 0));
  animation: floatB 20s var(--ease) infinite alternate;
}

.mesh-c {
  bottom: -12rem;
  left: 28%;
  width: 30rem;
  height: 30rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(151, 222, 181, 0.52), rgba(151, 222, 181, 0));
  animation: floatC 22s var(--ease) infinite alternate;
}

.orbital {
  position: absolute;
  border: 1px solid rgba(7, 138, 86, 0.16);
  border-radius: 999px;
  transform: rotate(-18deg);
}

.orbital::after {
  position: absolute;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 26px rgba(3, 131, 81, .42);
}

.orbital-a {
  right: 13vw;
  top: 10vh;
  width: 18rem;
  height: 7rem;
}

.orbital-a::after {
  right: 21%;
  top: -4px;
}

.orbital-b {
  left: 9vw;
  bottom: 9vh;
  width: 24rem;
  height: 9rem;
  transform: rotate(16deg);
}

.orbital-b::after {
  left: 17%;
  bottom: 4px;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
  gap: 0;
}

.sidebar {
  display: none;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 24px 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.54);
  background: linear-gradient(160deg, rgba(255, 255, 255, .64), rgba(255, 255, 255, .28));
  box-shadow: inset -1px 0 0 rgba(2, 90, 54, 0.07);
  backdrop-filter: blur(28px) saturate(1.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 10px 18px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.38)),
    radial-gradient(circle at 30% 20%, rgba(3, 162, 101, .5), transparent 58%);
  box-shadow: 0 18px 34px rgba(3, 113, 69, 0.16), inset 0 1px 0 rgba(255,255,255,.8);
}

.brand-mark span {
  width: 18px;
  height: 18px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--violet-800), var(--violet-500) 55%, #60c790);
  box-shadow: 0 0 22px rgba(2, 131, 81, .4);
}

.brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 18px;
  color: #506056;
  font-size: 14px;
  font-weight: 700;
  transition: transform .55s var(--ease), color .55s var(--ease), background .55s var(--ease), border-color .55s var(--ease);
}

.nav-link svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.65;
}

.nav-link::after {
  position: absolute;
  inset: 2px;
  content: "";
  border-radius: 16px;
  opacity: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.58), transparent 80%);
  transform: translateX(-110%);
}

.nav-link:hover {
  color: var(--violet-950);
  transform: translateX(3px);
  background: rgba(255,255,255,.42);
  border-color: rgba(255,255,255,.7);
}

.nav-link.active {
  color: var(--violet-950);
  border-color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(234, 244, 238, .7)),
    radial-gradient(circle at 12% 50%, rgba(6, 144, 90, .2), transparent 70%);
  box-shadow: 0 16px 42px rgba(4, 101, 62, 0.13), inset 0 1px 0 rgba(255,255,255,.86);
}

.nav-link.active::after {
  animation: shimmer 2.8s var(--ease) infinite;
}

.nav-link span:last-child {
  white-space: nowrap;
}

.sidebar-card {
  position: relative;
  margin-top: auto;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(255,255,255,.74), rgba(255,255,255,.38));
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255,255,255,.72);
}

.sidebar-card p,
.sidebar-card strong,
.sidebar-card small {
  position: relative;
  z-index: 1;
  display: block;
  margin: 0;
}

.sidebar-card p {
  color: #4f6357;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-card strong {
  margin: 12px 0 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 24px;
  letter-spacing: -0.08em;
}

.sidebar-card small {
  color: var(--soft);
  font-size: 12px;
  line-height: 1.45;
}

.live-dot {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(56, 165, 111, .1), 0 0 20px rgba(56, 165, 111, .42);
  animation: breathe 2.5s var(--ease) infinite;
}

.workspace {
  position: relative;
  z-index: 1;
  min-width: 0;
  padding: 22px clamp(16px, 2.2vw, 42px) 54px;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 16px;
  align-items: center;
  max-width: 1880px;
  margin: 0 auto 22px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 22px 54px rgba(3, 82, 49, 0.1), inset 0 1px 0 rgba(255,255,255,.8);
  backdrop-filter: blur(26px) saturate(1.45);
}

.search {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid rgba(1, 96, 58, 0.08);
  border-radius: 18px;
  background: rgba(255,255,255,.54);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 14px;
  font-weight: 650;
}

.search input::placeholder {
  color: #95a29a;
}

.search kbd {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(1, 96, 58, .1);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255,255,255,.62);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: -0.04em;
}

.search-icon {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border: 2px solid #7c8e83;
  border-radius: 999px;
}

.search-icon::after {
  position: absolute;
  right: -5px;
  bottom: -3px;
  width: 8px;
  height: 2px;
  content: "";
  border-radius: 999px;
  background: #7c8e83;
  transform: rotate(45deg);
}

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

.profile-shell {
  position: relative;
  min-width: 0;
  flex: 0 0 auto;
}

.filter-chip,
.date-pill,
.profile,
.directory-map-button,
.icon-button,
.glass-button,
.primary-button,
.danger-button,
.approve-button {
  border: 0;
  outline: 0;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease);
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 999px;
  color: #616f66;
  background: rgba(255,255,255,.46);
  font-size: 12px;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--violet-950);
  background: rgba(238, 246, 241, .92);
  box-shadow: 0 12px 26px rgba(2, 101, 62, 0.09), inset 0 1px 0 rgba(255,255,255,.92);
  transform: translateY(-1px);
}

.directory-map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 17px;
  color: var(--violet-950);
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.directory-map-button:hover {
  background: rgba(241, 248, 244, .9);
  box-shadow: 0 14px 28px rgba(2, 101, 62, .1), inset 0 1px 0 rgba(255,255,255,.86);
  transform: translateY(-1px);
}

.icon-button {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 16px;
  background: rgba(255,255,255,.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(2, 101, 62, 0.1), inset 0 1px 0 rgba(255,255,255,.8);
}

.icon-bell {
  position: relative;
  display: block;
  width: 17px;
  height: 18px;
  border: 1.8px solid #4e6055;
  border-bottom: 0;
  border-radius: 9px 9px 4px 4px;
}

.icon-bell::before {
  position: absolute;
  right: -3px;
  bottom: -4px;
  left: -3px;
  height: 2px;
  content: "";
  border-radius: 99px;
  background: #4e6055;
}

.icon-bell::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: #4e6055;
  transform: translateX(-50%);
}

.notify-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(218, 91, 107, .12);
}

.date-pill,
.profile {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 16px;
  background: rgba(255,255,255,.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.date-pill span,
.profile small {
  min-width: 0;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
}

.date-pill strong {
  min-width: 0;
  font-size: 12px;
}

.profile span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(135deg, var(--violet-950), var(--violet-600));
  font-size: 11px;
  font-weight: 800;
}

.profile[data-profile-toggle] {
  cursor: pointer;
}

.profile-chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid #64776b;
  border-bottom: 1.5px solid #64776b;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.profile[aria-expanded="true"] .profile-chevron {
  transform: translateY(2px) rotate(225deg);
}

.profile-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 100px));
  padding: 8px;
  overflow-y: auto;
  border: 1px solid rgba(58, 120, 87, .2);
  border-radius: 8px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 22px 50px rgba(17, 37, 26, .18);
}

.profile-menu-heading {
  display: block;
  padding: 8px 10px 10px;
  color: #616f66;
  font-size: 11px;
  font-weight: 800;
}

.profile-menu-list {
  display: grid;
  gap: 2px;
}

.profile-user-option,
.profile-menu-logout {
  width: 100%;
  border: 0;
  border-radius: 6px;
  color: #16231c;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.profile-user-option {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 7px 9px;
}

.profile-user-option:hover,
.profile-user-option:focus-visible,
.profile-menu-logout:hover,
.profile-menu-logout:focus-visible {
  outline: none;
  background: #eef4f0;
}

.profile-user-option:disabled {
  cursor: wait;
  opacity: .55;
}

.profile-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #03633c;
  font-size: 10px;
  font-weight: 800;
}

.profile-user-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.profile-user-copy strong,
.profile-user-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-user-copy strong {
  font-size: 12px;
  font-weight: 800;
}

.profile-user-copy small {
  color: #77877d;
  font-size: 10px;
  font-weight: 700;
}

.profile-return-option {
  background: #fff7e7;
}

.profile-return-option .profile-user-avatar {
  background: #a35a13;
}

.profile-menu-section-label {
  margin: 6px 4px 2px;
  padding: 8px 6px 5px;
  border-top: 1px solid rgba(58, 120, 87, .12);
  color: #77877d;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-user-option.is-current-preview:disabled {
  cursor: default;
  opacity: 1;
  background: #eef4f0;
  box-shadow: inset 3px 0 0 #03965d;
}

.profile-user-option.is-current-preview .profile-user-avatar {
  background: #03965d;
}

.profile-user-option.is-current-preview .profile-user-copy small {
  color: #057347;
}

.profile-menu-message {
  padding: 12px 10px;
  color: #77877d;
  font-size: 11px;
  font-weight: 700;
}

.profile-menu-logout {
  min-height: 38px;
  margin-top: 7px;
  padding: 8px 10px;
  border-top: 1px solid rgba(58, 120, 87, .12);
  color: #9b2f43;
  font-size: 11px;
  font-weight: 800;
}

body.admin-preview-active .profile {
  border-color: rgba(188, 109, 28, .38);
  background: #fff7e7;
  box-shadow: 0 0 0 3px rgba(209, 132, 47, .08);
}

body.admin-preview-active .profile span {
  background: #a35a13;
}

.view {
  max-width: 1880px;
  margin: 0 auto;
  animation: pageIn .75s var(--ease) both;
}

.page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: 30px 0 22px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(7, 126, 78, .12);
  border-radius: 999px;
  color: var(--violet-800);
  background: rgba(255,255,255,.46);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow::before {
  display: block;
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 999px;
  background: var(--violet-500);
  box-shadow: 0 0 0 5px rgba(7, 155, 97, .1);
}

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

h1 {
  max-width: 880px;
  margin: 14px 0 0;
  color: #101813;
  font-size: clamp(34px, 4.2vw, 72px);
  font-weight: 800;
  letter-spacing: -0.07em;
  line-height: .96;
}

.greeting-title {
  display: grid;
  gap: 6px;
}

.greeting-title > span {
  color: var(--muted);
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.greeting-title > strong {
  color: #101813;
  font-size: clamp(44px, 5.6vw, 86px);
  font-weight: 850;
  letter-spacing: -0.075em;
  line-height: .9;
}

body.pride-mode .greeting-title > strong {
  color: transparent;
  background:
    linear-gradient(
      180deg,
      #ff0018 0 16.66%,
      #ffa52c 16.66% 33.33%,
      #ffff41 33.33% 50%,
      #008018 50% 66.66%,
      #0000f9 66.66% 83.33%,
      #86007d 83.33% 100%
    );
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: saturate(1.45) contrast(1.18);
  text-shadow:
    0 10px 24px rgba(255, 0, 24, .16),
    0 18px 42px rgba(0, 0, 249, .16),
    0 24px 58px rgba(134, 0, 125, .14);
}

h2 {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.045em;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 820;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 620;
  line-height: 1.65;
}

.motto-line,
.motto-subline {
  display: block;
  max-width: 760px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 620;
  letter-spacing: 0;
  line-height: 1.65;
}

.motto-subline {
  margin-top: 0;
}

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

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

.service-tile {
  position: relative;
  display: grid;
  min-height: 170px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  color: var(--ink);
  text-align: left;
  background: rgba(255,255,255,.54);
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255,255,255,.84);
}

.service-tile::after {
  position: absolute;
  right: -32px;
  bottom: -42px;
  width: 128px;
  height: 128px;
  content: "";
  border: 1px solid rgba(2, 127, 78, .12);
  border-radius: 999px;
}

.service-tile:hover {
  background: rgba(255,255,255,.72);
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(2, 101, 62, .13), inset 0 1px 0 rgba(255,255,255,.9);
}

.service-tile-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(1, 130, 80, .12);
  border-radius: 16px;
  color: var(--violet-800);
  background: rgba(238, 246, 241, .82);
}

.service-tile-icon svg {
  width: 23px;
  height: 23px;
  stroke-width: 2.2;
}

.service-tile strong {
  align-self: end;
  margin-top: 24px;
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

.service-tile small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.service-tile i {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  color: var(--violet-950);
  background: rgba(2, 101, 62, .08);
}

.service-tile i svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.service-status-tile b {
  position: absolute;
  right: 18px;
  top: 18px;
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 850;
}

.primary-button,
.glass-button,
.danger-button,
.approve-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  gap: 9px;
  padding: 0 16px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 820;
}

.primary-button {
  color: white;
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.34), transparent 32%),
    linear-gradient(135deg, var(--violet-950), var(--violet-600) 55%, #18af6f);
  box-shadow: 0 18px 38px rgba(4, 99, 61, .24), inset 0 1px 0 rgba(255,255,255,.25);
}

.glass-button {
  border: 1px solid rgba(255,255,255,.76);
  color: var(--violet-950);
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.danger-button {
  color: #9a3342;
  background: rgba(255, 238, 241, .82);
}

.approve-button {
  color: #166640;
  background: rgba(233, 248, 240, .92);
}

.primary-button:hover,
.glass-button:hover,
.danger-button:hover,
.approve-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(4, 99, 61, .16), inset 0 1px 0 rgba(255,255,255,.45);
}

.primary-button:active,
.glass-button:active,
.danger-button:active,
.approve-button:active,
.filter-chip:active,
.icon-button:active {
  transform: translateY(0) scale(.98);
}

.button-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-right: -7px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  transition: transform .45s var(--ease), background .45s var(--ease);
}

.glass-button .button-icon,
.danger-button .button-icon,
.approve-button .button-icon {
  background: rgba(2, 101, 62, .08);
}

.primary-button:hover .button-icon,
.glass-button:hover .button-icon,
.danger-button:hover .button-icon,
.approve-button:hover .button-icon {
  transform: translateX(2px) translateY(-1px);
}

.kpi-strip {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
}

.glass-shell,
.mini-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.78);
  background: rgba(255,255,255,.38);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.74);
}

.glass-shell {
  border-radius: var(--radius-xl);
  padding: 6px;
}

.mini-shell {
  border-radius: 22px;
  padding: 4px;
}

.glass-shell::before,
.mini-shell::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .85;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), transparent 38%),
    radial-gradient(circle at 100% 0, rgba(3, 150, 93, .12), transparent 42%);
}

.glass-core,
.mini-core {
  position: relative;
  height: 100%;
  border: 1px solid rgba(255,255,255,.58);
  background:
    linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,255,255,.45)),
    radial-gradient(circle at 85% 16%, rgba(227, 241, 232, .88), transparent 45%);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.82);
}

.glass-core {
  border-radius: 23px;
  padding: 24px;
}

.mini-core {
  border-radius: 18px;
  padding: 18px;
}

.kpi-card {
  min-height: 152px;
  transform: translateY(14px);
  animation: liftIn .85s var(--ease) both;
  animation-delay: calc(var(--i) * 70ms);
}

.kpi-card:hover,
.hover-lift:hover {
  transform: translateY(-4px);
}

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

.kpi-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 15px;
  color: var(--violet-800);
  background: rgba(236, 246, 240, .96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.kpi-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.65;
}

.trend {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.trend.up {
  color: #156044;
  background: var(--green-soft);
}

.trend.warn {
  color: #965c10;
  background: var(--amber-soft);
}

.trend.danger {
  color: #a63b48;
  background: var(--red-soft);
}

.trend.neutral {
  color: var(--violet-800);
  background: var(--violet-100);
}

.kpi-card strong {
  display: block;
  margin-top: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(25px, 2.2vw, 38px);
  letter-spacing: -0.09em;
  white-space: nowrap;
}

.kpi-card strong.kpi-long {
  font-size: clamp(19px, 1.55vw, 28px);
  letter-spacing: -0.06em;
}

.kpi-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.task-kpi-card {
  width: 100%;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.task-kpi-card.active {
  border-color: rgba(207, 71, 91, .34);
  background:
    linear-gradient(145deg, rgba(255,255,255,.6), rgba(255,246,249,.5));
  box-shadow: 0 22px 56px rgba(166, 59, 72, .12), inset 0 1px 0 rgba(255,255,255,.78);
}

.task-kpi-card.active .mini-core {
  border-color: rgba(207, 71, 91, .18);
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,247,250,.58)),
    radial-gradient(circle at 85% 16%, rgba(255, 232, 237, .9), transparent 45%);
}

.task-card-hint {
  display: inline-flex;
  margin-top: 8px;
  color: #a63b48;
  font-size: 11px;
  font-weight: 850;
}

.spark {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 28px;
  margin-top: 18px;
}

.spark span {
  display: block;
  flex: 1;
  min-width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(6, 136, 84, .8), rgba(6, 136, 84, .16));
  animation: spark 4s var(--ease) infinite alternate;
  animation-delay: calc(var(--s) * 120ms);
}

.command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr .78fr;
  gap: 18px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

.focus-panel .glass-core {
  min-height: 430px;
  background:
    radial-gradient(circle at 78% 24%, rgba(184, 231, 202, .76), transparent 35%),
    linear-gradient(145deg, rgba(255,255,255,.76), rgba(255,255,255,.46));
}

.section-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  font-weight: 690;
  line-height: 1.5;
}

.priority-radar {
  position: relative;
  display: grid;
  min-height: 210px;
  place-items: center;
  margin: 18px 0 22px;
}

.radar-disc {
  position: relative;
  display: grid;
  width: min(310px, 82vw);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  background:
    repeating-radial-gradient(circle, transparent 0 46px, rgba(4, 103, 63, .08) 47px 48px),
    conic-gradient(from 210deg, rgba(218,91,107,.24), rgba(3, 150, 93,.18), rgba(6, 157, 98,.14), rgba(234,181,89,.2), rgba(218,91,107,.24));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 20px 60px rgba(1, 121, 74, .12);
}

.radar-disc::before {
  position: absolute;
  width: 2px;
  height: 50%;
  content: "";
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(1, 138, 85, .65), transparent);
  transform-origin: bottom center;
  animation: radarSpin 5.8s linear infinite;
}

.radar-core {
  position: relative;
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 22px 44px rgba(2, 101, 62, .13), inset 0 1px 0 rgba(255,255,255,.9);
  text-align: center;
}

.radar-core strong {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
  letter-spacing: -0.09em;
}

.radar-core span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.radar-pin {
  position: absolute;
  display: grid;
  min-width: 126px;
  min-height: 38px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  box-shadow: 0 16px 34px rgba(2, 101, 62, .14), inset 0 1px 0 rgba(255,255,255,.8);
  color: #3b4e42;
  font-size: 11px;
  font-weight: 820;
  animation: pinFloat 5s var(--ease) infinite alternate;
}

.pin-a {
  top: 16px;
  left: 3%;
}

.pin-b {
  right: -2%;
  top: 78px;
  animation-delay: .5s;
}

.pin-c {
  bottom: 20px;
  left: 14%;
  animation-delay: .9s;
}

.focus-list,
.event-list,
.decision-list,
.payment-list,
.compact-list,
.timeline-list,
.project-feed {
  display: grid;
  gap: 10px;
}

.focus-item,
.event-item,
.decision-item,
.payment-item,
.compact-item,
.timeline-item,
.project-row {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255,255,255,.66);
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  transition: transform .45s var(--ease), border-color .45s var(--ease), background .45s var(--ease), box-shadow .45s var(--ease);
}

.focus-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 14px;
  border-radius: 20px;
}

.focus-item:hover,
.event-item:hover,
.decision-item:hover,
.payment-item:hover,
.compact-item:hover,
.timeline-item:hover,
.project-row:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 40px rgba(2, 101, 62, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.focus-item.critical {
  animation: softAlert 3.2s var(--ease) infinite;
}

.focus-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, #a3445a, var(--violet-600));
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.focus-copy strong,
.event-copy strong,
.decision-copy strong,
.payment-copy strong,
.compact-item strong,
.timeline-copy strong,
.project-copy strong {
  display: block;
  color: #16211a;
  font-size: 13px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.focus-copy span,
.event-copy span,
.decision-copy span,
.payment-copy span,
.compact-item span,
.timeline-copy span,
.project-copy span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 640;
  line-height: 1.45;
}

.status,
.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 100%;
  min-height: 25px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  overflow-wrap: break-word;
}

.status.critical,
.status.overdue {
  color: #a43c4b;
  background: var(--red-soft);
}

.status.progress,
.status.pending {
  color: var(--violet-800);
  background: var(--violet-100);
}

.status.done,
.status.approved {
  color: #176344;
  background: var(--green-soft);
}

.status.attention,
.status.check {
  color: #8c5a10;
  background: var(--amber-soft);
}

.status.coral,
.status.rejected {
  color: #a94532;
  background: #fff0eb;
}

.type-pill {
  color: #506658;
  background: rgba(237, 244, 240, .86);
}

.today-card .glass-core,
.finance-card .glass-core,
.projects-focus .glass-core,
.decision-card .glass-core {
  min-height: 100%;
}

.timeline-item {
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  min-height: 70px;
  padding: 14px;
  border-radius: 19px;
}

.timeline-time {
  color: var(--violet-800);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.compact-item {
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 70px;
  padding: 14px;
  border-radius: 19px;
}

.finance-amount,
.money {
  font-family: "JetBrains Mono", monospace;
  font-weight: 800;
  letter-spacing: -0.08em;
}

.finance-amount {
  display: block;
  margin: 8px 0 2px;
  font-size: 40px;
}

.finance-micro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.micro-stat {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.52);
}

.micro-stat span {
  display: block;
  color: var(--soft);
  font-size: 11px;
  font-weight: 800;
}

.micro-stat strong {
  display: block;
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  letter-spacing: -0.08em;
}

.progress {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2, 101, 62, .08);
}

.progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-800), var(--violet-500), #4cc286);
}

.budget-bar {
  display: grid;
  gap: 7px;
}

.budget-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .78fr);
  gap: 18px;
  align-items: start;
}

.daily-layout,
.decision-layout,
.finance-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, .82fr);
  gap: 18px;
  align-items: start;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 20px;
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.metric span {
  display: block;
  color: var(--soft);
  font-size: 11px;
  font-weight: 820;
}

.metric strong {
  display: block;
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 25px;
  letter-spacing: -0.09em;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.event-group {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.event-item {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border-radius: 20px;
}

.event-item.active,
.decision-item.active,
.payment-item.active {
  border-color: rgba(3, 143, 89, .36);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(241, 248, 244, .66)),
    radial-gradient(circle at 100% 0, rgba(2, 139, 86, .12), transparent 48%);
  box-shadow: 0 20px 50px rgba(2, 101, 62, .14), inset 0 1px 0 rgba(255,255,255,.84);
}

.event-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 15px;
  color: var(--violet-800);
  background: rgba(238, 246, 241, .92);
}

.event-mark svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.65;
}

.detail-panel {
  position: sticky;
  top: 112px;
}

.detail-hero {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(4, 101, 62, .1);
}

.detail-hero h2 {
  max-width: 620px;
  font-size: clamp(24px, 2vw, 34px);
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.object-delete-button {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 13px;
  font-size: 12px;
}

.object-delete-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.detail-cell {
  padding: 14px;
  border-radius: 17px;
  background: rgba(255,255,255,.48);
}

.detail-cell span {
  display: block;
  color: var(--soft);
  font-size: 11px;
  font-weight: 820;
}

.detail-cell strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  font-weight: 850;
}

.history {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.history-item {
  position: relative;
  padding-left: 20px;
}

.history-item::before {
  position: absolute;
  left: 0;
  top: 5px;
  width: 9px;
  height: 9px;
  content: "";
  border-radius: 999px;
  background: var(--violet-500);
  box-shadow: 0 0 0 5px rgba(7, 155, 97,.11);
}

.history-item strong {
  display: block;
  font-size: 12px;
}

.history-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.project-table {
  display: grid;
  gap: 10px;
}

.project-row {
  grid-template-columns: minmax(220px, 1.25fr) .75fr .72fr .52fr .72fr .9fr minmax(190px, 1fr);
  align-items: center;
  min-height: 88px;
  padding: 16px;
  border-radius: 22px;
}

.project-row.header {
  min-height: auto;
  padding: 0 16px 6px;
  border: 0;
  color: var(--soft);
  background: transparent;
  box-shadow: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.project-row.header:hover {
  transform: none;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.project-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--violet-950), var(--violet-500));
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.project-meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}

.project-detail-hero .glass-core {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, .7fr);
  gap: 26px;
  min-height: 330px;
  align-items: end;
  overflow: hidden;
}

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

.hero-fact {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.52);
}

.hero-fact span {
  display: block;
  color: var(--soft);
  font-size: 11px;
  font-weight: 820;
}

.hero-fact strong {
  display: block;
  margin-top: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 17px;
  letter-spacing: -0.08em;
}

.entity-map {
  position: relative;
  min-height: 260px;
}

.node {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 118px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 38px rgba(2, 101, 62, .12), inset 0 1px 0 rgba(255,255,255,.86);
  color: #3b4e42;
  font-size: 12px;
  font-weight: 850;
}

.node.primary {
  left: 50%;
  top: 48%;
  color: white;
  background: linear-gradient(135deg, var(--violet-950), var(--violet-600));
  transform: translate(-50%, -50%);
}

.node.a { left: 0; top: 12%; }
.node.b { right: 4%; top: 8%; }
.node.c { left: 8%; bottom: 8%; }
.node.d { right: 0; bottom: 18%; }

.entity-map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: rgba(4, 106, 65, .28);
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .72fr);
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}

.project-page-head h1 {
  max-width: 960px;
  overflow-wrap: anywhere;
}

.project-page-nav {
  display: flex;
  align-items: center;
  min-height: 36px;
}

.project-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(31, 82, 56, .78);
  font-size: 12px;
  font-weight: 860;
  text-decoration: none;
}

.project-back-link span {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid rgba(114, 207, 156, .34);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: var(--violet-800);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.project-back-link:hover {
  color: var(--violet-950);
}

.project-stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.project-stat-strip > span {
  display: grid;
  gap: 6px;
  min-width: 0;
  min-height: 74px;
  align-content: center;
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(244, 249, 246,.58));
  box-shadow: 0 14px 32px rgba(2, 101, 62, .07), inset 0 1px 0 rgba(255,255,255,.86);
}

.project-stat-strip > span.needs-attention {
  border-color: rgba(207, 71, 91, .22);
  background:
    linear-gradient(145deg, rgba(255,250,252,.9), rgba(255,255,255,.68));
}

.project-stat-strip small,
.project-route-line small,
.project-passport-list dt,
.project-passport-comment small,
.project-passport-aside small {
  min-width: 0;
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  line-height: 1.15;
  text-transform: uppercase;
}

.project-stat-strip b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.project-passport-card {
  padding: clamp(18px, 2vw, 26px);
}

.project-passport-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, .34fr);
  gap: clamp(18px, 2.2vw, 30px);
  align-items: stretch;
}

.project-passport-main {
  display: grid;
  min-width: 0;
  gap: 16px;
}

.project-passport-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.project-passport-title h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: clamp(25px, 2vw, 34px);
  line-height: 1;
}

.project-route-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(4, 101, 62, .1);
}

.project-route-line span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-route-line b,
.project-passport-list dd,
.project-passport-comment strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #19241d;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.32;
}

.project-passport-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 0;
}

.project-passport-list > div {
  display: grid;
  grid-template-columns: minmax(118px, .42fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(4, 101, 62, .075);
}

.project-passport-list > div.wide {
  grid-column: 1 / -1;
}

.project-passport-list dt,
.project-passport-list dd {
  margin: 0;
}

.project-passport-list .status {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-passport-comment {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding-top: 2px;
}

.project-passport-aside {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
  padding-left: clamp(18px, 2vw, 26px);
  border-left: 1px solid rgba(4, 101, 62, .1);
}

.project-passport-aside span {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid rgba(4, 101, 62, .075);
}

.project-passport-aside b {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--violet-950);
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.project-invoices-card .payments-desktop-table,
.project-invoices-card .payments-mobile-list,
.project-unpaid-invoices-card .payments-desktop-table,
.project-unpaid-invoices-card .payments-mobile-list {
  margin-top: 0;
}

.project-invoices-card .payment-calendar-head {
  align-items: flex-end;
}

.project-invoice-search {
  flex: 0 1 420px;
  width: min(420px, 100%);
}

.project-feed .timeline-item {
  grid-template-columns: 46px 1fr auto;
}

.decision-item,
.payment-item {
  align-items: center;
  min-height: 94px;
  padding: 15px;
  border-radius: 22px;
}

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

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

.decision-meta,
.payment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.decision-option {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.5);
}

.decision-option.recommended {
  border-color: rgba(56,165,111,.22);
  background: rgba(237, 249, 242, .7);
}

.decision-option strong {
  font-size: 13px;
}

.decision-option span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.checkbox {
  position: relative;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(4, 108, 66, .22);
  border-radius: 8px;
  background: rgba(255,255,255,.62);
}

.checkbox input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
}

.checkbox span {
  width: 12px;
  height: 12px;
  border-radius: 5px;
  background: transparent;
  transition: background .35s var(--ease), transform .35s var(--ease);
}

.checkbox input:checked + span {
  background: linear-gradient(135deg, var(--violet-800), var(--violet-500));
  transform: scale(1.08);
}

.payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.approved-pulse {
  animation: successPulse 900ms var(--ease) both;
}

.mobile-nav {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 6;
  display: none;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 7px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 24px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 18px 42px rgba(3, 82, 49, 0.16), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(24px) saturate(1.4);
}

.mobile-nav .nav-link {
  min-height: 48px;
  justify-content: center;
  padding: 8px;
  border-radius: 17px;
}

.mobile-nav .nav-link span:last-child {
  display: none;
}

.mode-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 24;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 50%;
  color: #015231;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.98), rgba(255,255,255,.56)),
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(235, 245, 239,.7));
  box-shadow: 0 18px 44px rgba(3, 82, 49, .18), inset 0 1px 0 rgba(255,255,255,.9);
  backdrop-filter: blur(18px) saturate(1.3);
  cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), color .28s var(--ease);
}

.mode-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .45s var(--ease);
}

.mode-toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 52px rgba(3, 82, 49, .22), inset 0 1px 0 rgba(255,255,255,.94);
}

.mode-toggle:active {
  transform: translateY(0) scale(.96);
}

.star-table-toggle {
  right: 74px;
}

.star-table-toggle svg {
  fill: rgba(1, 82, 49, .12);
}

body.pride-mode .sun-mode-toggle {
  color: #fff;
  background:
    linear-gradient(
      180deg,
      #ff0018 0 16.66%,
      #ffa52c 16.66% 33.33%,
      #ffff41 33.33% 50%,
      #008018 50% 66.66%,
      #0000f9 66.66% 83.33%,
      #86007d 83.33% 100%
    ),
    rgba(255,255,255,.72);
  box-shadow: 0 20px 52px rgba(134, 0, 125, .28), 0 8px 24px rgba(0, 0, 249, .22), inset 0 1px 0 rgba(255,255,255,.5);
}

body.pride-mode .sun-mode-toggle svg {
  transform: rotate(90deg);
}

body.star-table-mode .star-table-toggle {
  color: #ffe071;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 232, 121, .34), transparent 38%),
    linear-gradient(145deg, rgba(14, 25, 18, .92), rgba(5, 7, 17, .82));
  border-color: rgba(255, 224, 113, .42);
  box-shadow: 0 20px 52px rgba(14, 25, 18, .34), 0 0 0 1px rgba(255, 224, 113, .18), inset 0 1px 0 rgba(255,255,255,.22);
}

body.star-table-mode .star-table-toggle svg {
  fill: rgba(255, 224, 113, .24);
  transform: rotate(36deg) scale(1.05);
}

body.star-table-mode .topbar,
body.star-table-mode .data-filters,
body.star-table-mode .glass-shell,
body.star-table-mode .mini-shell {
  border-color: rgba(255, 224, 113, .2);
  background:
    linear-gradient(145deg, rgba(10, 24, 17, .74), rgba(5, 8, 19, .52));
  box-shadow: 0 26px 70px rgba(0, 0, 0, .2), inset 0 1px 0 rgba(255,255,255,.1);
}

body.star-table-mode .topbar {
  backdrop-filter: blur(24px) saturate(1.15);
}

body.star-table-mode .search,
body.star-table-mode .date-pill,
body.star-table-mode .profile,
body.star-table-mode .directory-map-button,
body.star-table-mode .service-tile,
body.star-table-mode .filter-control select {
  color: rgba(255, 246, 199, .94);
  border-color: rgba(255, 224, 113, .18);
  background: rgba(5, 15, 9, .72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

body.star-table-mode .search input {
  color: #fff6c7;
}

body.star-table-mode .search input::placeholder,
body.star-table-mode .date-pill span,
body.star-table-mode .profile small,
body.star-table-mode .service-tile small,
body.star-table-mode .filter-control span {
  color: rgba(226, 235, 229, .62);
}

body.star-table-mode .service-tile-icon,
body.star-table-mode .service-tile i {
  color: rgba(255, 246, 199, .94);
  border-color: rgba(255, 224, 113, .16);
  background: rgba(255, 224, 113, .08);
}

body.star-table-mode .search-icon {
  border-color: rgba(255, 224, 113, .72);
}

body.star-table-mode .search-icon::after {
  background: rgba(255, 224, 113, .72);
}

body.star-table-mode .search kbd {
  color: rgba(255, 224, 113, .82);
  border-color: rgba(255, 224, 113, .18);
  background: rgba(255, 224, 113, .07);
}

body.star-table-mode .profile span {
  color: #09100c;
  background: linear-gradient(135deg, #fff4a8, #f2c744);
}

body.star-table-mode .page-head .eyebrow {
  color: #ffe071;
  border-color: rgba(255, 224, 113, .2);
  background: rgba(5, 15, 9, .58);
}

body.star-table-mode .page-head .eyebrow::before {
  background: #ffe071;
  box-shadow: 0 0 0 5px rgba(255, 224, 113, .12), 0 0 18px rgba(255, 224, 113, .42);
}

body.star-table-mode .greeting-title > span,
body.star-table-mode .lead,
body.star-table-mode .motto-line,
body.star-table-mode .motto-subline {
  color: rgba(226, 235, 229, .74);
}

body.star-table-mode:not(.pride-mode) .greeting-title > strong {
  color: #fff6c7;
  text-shadow: 0 0 34px rgba(255, 224, 113, .18);
}

body.star-table-mode .glass-core,
body.star-table-mode .mini-core {
  border-color: rgba(255, 224, 113, .16);
  background:
    radial-gradient(circle at 88% 12%, rgba(0, 147, 91, .12), transparent 46%),
    linear-gradient(145deg, rgba(10, 23, 16, .82), rgba(5, 15, 9, .58));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

body.star-table-mode .kpi-card strong,
body.star-table-mode h2,
body.star-table-mode h3 {
  color: #fff6c7;
}

body.star-table-mode .kpi-card p {
  color: rgba(226, 235, 229, .68);
}

body.star-table-mode .kpi-icon {
  color: #ffe071;
  background: rgba(255, 224, 113, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 113, .16);
}

body.star-table-mode .trend {
  color: #ffe071;
  background: rgba(255, 224, 113, .1);
}

body.star-table-mode .trend.danger {
  color: #ff9a9a;
  background: rgba(255, 104, 104, .12);
}

body.star-table-mode .trend.warn {
  color: #ffd07a;
  background: rgba(255, 174, 74, .12);
}

body.star-table-mode .spark span {
  background: linear-gradient(180deg, rgba(255, 224, 113, .92), rgba(0, 147, 91, .2));
}

.auth-locked .mode-toggle {
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(.92);
}

.skeleton {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.45);
}

.skeleton span {
  display: block;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(3, 131, 81, .08);
}

.skeleton span::after {
  display: block;
  width: 46%;
  height: 100%;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
  animation: skeleton 1.8s var(--ease) infinite;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 158px;
  padding: 22px;
  border: 1px dashed rgba(4, 119, 73, .22);
  border-radius: 22px;
  color: var(--muted);
  background: rgba(255,255,255,.34);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.data-filters {
  display: grid;
  grid-template-columns: repeat(6, minmax(138px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 24px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 18px 46px rgba(3, 79, 47, 0.08), inset 0 1px 0 rgba(255,255,255,.78);
}

.filter-control {
  display: grid;
  gap: 6px;
}

.filter-control span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.filter-control select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(2, 101, 62, .12);
  border-radius: 15px;
  outline: 0;
  color: var(--violet-950);
  background: rgba(255,255,255,.72);
  font-weight: 780;
}

.add-object-button {
  white-space: nowrap;
}

.data-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.dashboard-kpis {
  grid-template-columns: 1.05fr 1.35fr repeat(4, 1fr);
}

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

.object-list.compact .object-row {
  min-height: 76px;
}

.object-row {
  display: grid;
  grid-template-columns: minmax(420px, 1.9fr) 160px 140px 150px minmax(220px, .8fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 20px;
  color: inherit;
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  text-align: left;
  animation: liftIn .65s var(--ease) both;
  animation-delay: calc(var(--i) * 24ms);
  transition: transform .45s var(--ease), border-color .45s var(--ease), background .45s var(--ease), box-shadow .45s var(--ease);
}

.objects-wide-panel .glass-core {
  padding: clamp(22px, 2.1vw, 34px);
}

.object-row:hover,
.object-row.active {
  transform: translateY(-3px);
  border-color: rgba(3, 143, 89, .36);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(241, 248, 244,.66)),
    radial-gradient(circle at 100% 0, rgba(2, 139, 86,.12), transparent 48%);
  box-shadow: 0 18px 40px rgba(2, 101, 62, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.object-main strong,
.payment-card strong {
  display: block;
  color: #16211a;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.object-main small,
.payment-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.object-money {
  color: var(--violet-950);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.07em;
  text-align: right;
}

.object-action {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.35;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.bar-chart {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(120px, .85fr) minmax(120px, 1.4fr) minmax(80px, auto);
  gap: 10px;
  align-items: center;
}

.bar-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 790;
}

.bar-row div {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2, 101, 62, .08);
}

.bar-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--violet-800), var(--violet-500), #4cc286);
}

.bar-row strong {
  color: var(--violet-950);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: -0.07em;
  text-align: right;
}

.payment-stream {
  display: grid;
  gap: 10px;
}

.payment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 20px;
  color: inherit;
  background: rgba(255,255,255,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  text-align: left;
  transition: transform .45s var(--ease), background .45s var(--ease), box-shadow .45s var(--ease);
}

.payment-card:hover {
  transform: translateY(-3px);
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 40px rgba(2, 101, 62, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.payment-card b {
  color: var(--violet-950);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  letter-spacing: -0.07em;
}

@media (max-width: 1280px) {
  .data-filters,
  .dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .project-passport-panel {
    grid-template-columns: 1fr;
  }

  .project-passport-aside {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding-top: 16px;
    padding-left: 0;
    border-top: 1px solid rgba(4, 101, 62, .1);
    border-left: 0;
  }

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

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

  .object-row {
    grid-template-columns: minmax(250px, 1fr) 130px 120px;
  }

  .object-row .status:nth-of-type(2),
  .object-action {
    display: none;
  }
}

@media (max-width: 720px) {
  .data-filters,
  .dashboard-kpis,
  .service-grid {
    grid-template-columns: 1fr;
  }

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

  .project-route-line,
  .project-passport-list,
  .project-passport-aside {
    grid-template-columns: 1fr;
  }

  .project-passport-list > div,
  .project-passport-list > div.wide {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 5px;
    align-items: start;
  }

  .project-passport-title {
    display: grid;
  }

  .service-tile {
    min-height: 148px;
    padding: 18px;
    border-radius: 22px;
  }

  .object-row,
  .payment-card,
  .bar-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .object-money,
  .bar-row strong {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .project-stat-strip {
    grid-template-columns: 1fr;
  }

  .project-stat-strip > span,
  .project-passport-aside span {
    min-height: 0;
  }
}

@media (max-width: 1280px) {
  .kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .command-grid,
  .dashboard-grid,
  .work-grid,
  .daily-layout,
  .decision-layout,
  .finance-layout,
  .project-detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: relative;
    top: 0;
  }

  .project-row {
    grid-template-columns: minmax(260px, 1.3fr) .8fr .7fr .55fr .8fr;
  }

  .project-row > :nth-child(6),
  .project-row > :nth-child(7) {
    display: none;
  }
}

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

  .sidebar {
    display: none;
  }

  .workspace {
    padding: 14px 14px 132px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    padding-right: calc(14px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(14px + env(safe-area-inset-left, 0px));
  }

  body.auth-unlocked .mobile-nav {
    display: grid !important;
  }

  .mobile-nav {
    right: calc(12px + env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: calc(12px + env(safe-area-inset-left, 0px));
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .topbar {
    top: 10px;
    top: calc(10px + env(safe-area-inset-top, 0px));
    grid-template-columns: 1fr;
    border-radius: 23px;
  }

  .topbar-actions {
    justify-content: flex-start;
    overflow: visible;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .mode-toggle {
    display: none;
  }

  .directory-map-button,
  .date-pill,
  .profile {
    flex: 0 0 auto;
  }

  .page-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-head > div {
    min-width: 0;
  }

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

  .page-actions > * {
    min-width: 0;
    max-width: 100%;
  }

  .page-actions .primary-button,
  .page-actions .glass-button,
  .page-actions .danger-button,
  .page-actions .approve-button {
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .page-actions .button-icon {
    flex: 0 0 28px;
  }

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

  .project-detail-hero .glass-core {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  h1 {
    font-size: 40px;
  }

  .lead {
    font-size: 14px;
  }

  .page-head .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .page-head .eyebrow::before {
    flex: 0 0 6px;
  }

  .greeting-title > span,
  .greeting-title > strong,
  .lead,
  .motto-line,
  .motto-subline {
    overflow-wrap: anywhere;
  }

  .kpi-strip,
  .metric-band,
  .finance-micro,
  .detail-grid,
  .hero-facts {
    grid-template-columns: 1fr;
  }

  .detail-cell,
  .detail-cell span,
  .detail-cell strong {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .history-item,
  .history-item strong,
  .history-item span {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .decision-option,
  .decision-option strong,
  .decision-option span {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .glass-core {
    padding: 18px;
    border-radius: 20px;
  }

  .glass-shell {
    border-radius: 24px;
  }

  .project-row,
  .project-row.header {
    grid-template-columns: 1fr;
  }

  .project-row.header {
    display: none;
  }

  .event-item,
  .focus-item,
  .timeline-item,
  .payment-item,
  .decision-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .task-menu-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .task-menu-row > span,
  .task-menu-row strong,
  .task-menu-row small {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .focus-copy,
  .event-copy,
  .decision-copy,
  .payment-copy,
  .compact-item,
  .timeline-copy,
  .project-copy {
    max-width: 100%;
    min-width: 0;
  }

  .focus-copy strong,
  .focus-copy span,
  .event-copy strong,
  .event-copy span,
  .decision-copy strong,
  .decision-copy span,
  .payment-copy strong,
  .payment-copy span,
  .compact-item strong,
  .compact-item span,
  .timeline-copy strong,
  .timeline-copy span,
  .project-copy strong,
  .project-copy span {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .search kbd {
    display: none;
  }

  .filter-chip {
    flex: 0 0 auto;
  }
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes liftIn {
  to {
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% { opacity: 0; transform: translateX(-110%); }
  45% { opacity: .7; }
  100% { opacity: 0; transform: translateX(110%); }
}

@keyframes breathe {
  0%, 100% { transform: scale(.9); opacity: .7; }
  50% { transform: scale(1.06); opacity: 1; }
}

@keyframes softAlert {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.72); }
  50% { box-shadow: 0 0 0 5px rgba(218,91,107,.055), 0 18px 40px rgba(141, 71, 118, .09), inset 0 1px 0 rgba(255,255,255,.82); }
}

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

@keyframes pinFloat {
  to { transform: translateY(-7px); }
}

@keyframes spark {
  to { transform: scaleY(.78); opacity: .72; }
}

@keyframes floatA {
  to { transform: translate3d(5rem, 2rem, 0) scale(1.04); }
}

@keyframes floatB {
  to { transform: translate3d(-4rem, -3rem, 0) scale(.96); }
}

@keyframes floatC {
  to { transform: translate3d(2rem, -4rem, 0) scale(1.08); }
}

@keyframes skeleton {
  from { transform: translateX(-110%); }
  to { transform: translateX(250%); }
}

@keyframes successPulse {
  0% { box-shadow: 0 0 0 rgba(56, 165, 111, 0); }
  45% { box-shadow: 0 0 0 10px rgba(56, 165, 111, .1), 0 18px 42px rgba(56, 165, 111, .18); }
  100% { box-shadow: 0 0 0 rgba(56, 165, 111, 0); }
}

/* Single-screen wide data room mode */
.app-shell {
  display: block !important;
}

.sidebar {
  display: none !important;
}

.workspace {
  width: 100%;
}

.mobile-nav {
  display: none !important;
}

.wide-insights {
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
}

/* Premium access gate */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background:
    radial-gradient(circle at 24% 18%, rgba(9, 157, 99, .22), transparent 30rem),
    radial-gradient(circle at 78% 12%, rgba(6, 157, 98, .13), transparent 28rem),
    radial-gradient(circle at 50% 92%, rgba(255,255,255,.9), transparent 26rem),
    linear-gradient(145deg, rgba(255,253,249,.9), rgba(241, 248, 244,.92));
  transition: opacity .55s var(--ease), visibility .55s var(--ease), transform .55s var(--ease);
}

.auth-gate::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 81, 48, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 81, 48, 0.055) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 42%, black, transparent 75%);
}

.auth-card {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(255,255,255,.52)),
    radial-gradient(circle at 82% 8%, rgba(7, 155, 97,.2), transparent 35rem);
  box-shadow: 0 30px 90px rgba(3, 79, 47,.16), inset 0 1px 1px rgba(255,255,255,.88);
  backdrop-filter: blur(28px);
  animation: liftIn .8s var(--ease) both;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.auth-brand .brand-mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
}

.auth-brand strong {
  display: block;
  font-size: 17px;
  font-weight: 900;
}

.auth-brand small,
.auth-foot {
  color: var(--soft);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-copy h1 {
  max-width: 440px;
  margin: 18px 0 12px;
  color: var(--ink);
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 850;
  letter-spacing: -0.07em;
  line-height: .94;
}

.auth-copy p {
  max-width: 430px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.65;
}

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

.auth-form label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.auth-form label > span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.auth-form input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(2, 101, 62, .14);
  border-radius: 18px;
  outline: 0;
  color: var(--ink);
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  font-weight: 800;
  transition: border-color .28s var(--ease), box-shadow .28s var(--ease), background .28s var(--ease);
}

.auth-form input:focus {
  border-color: rgba(3, 131, 81, .38);
  background: rgba(255,255,255,.88);
  box-shadow: 0 0 0 5px rgba(7, 155, 97, .11), inset 0 1px 0 rgba(255,255,255,.9);
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #a43c4b;
  font-size: 12px;
  font-weight: 800;
}

.auth-submit {
  width: 100%;
  min-height: 54px;
  justify-content: center;
  margin-top: 2px;
}

.auth-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

.auth-foot .live-dot {
  position: static;
  flex: 0 0 10px;
}

.auth-locked {
  overflow: hidden;
}

.auth-locked .app-shell,
.auth-locked .mobile-nav {
  pointer-events: none;
  user-select: none;
  opacity: 0;
  filter: blur(10px);
  transform: scale(.985);
}

.auth-unlocked .auth-gate {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: scale(1.015);
}

.auth-shake {
  animation: authShake .36s var(--ease);
}

@media (max-width: 640px), (max-height: 700px) {
  .auth-gate {
    align-items: start;
    overflow-y: auto;
    padding-top: calc(18px + env(safe-area-inset-top, 0px));
    padding-right: calc(18px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(18px + env(safe-area-inset-left, 0px));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .auth-card {
    margin: auto 0;
    padding: 20px;
    border-radius: 26px;
  }

  .auth-brand {
    margin-bottom: 24px;
  }

  .auth-brand > span:last-child,
  .auth-brand strong,
  .auth-brand small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .auth-copy .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .auth-copy h1 {
    max-width: 100%;
    font-size: clamp(32px, 10vw, 42px);
    letter-spacing: 0;
    line-height: 1.02;
    overflow-wrap: anywhere;
  }

  .auth-copy p {
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.55;
    overflow-wrap: anywhere;
  }

  .auth-form input {
    min-height: 50px;
    height: 50px;
  }

  .auth-submit {
    min-height: 50px;
    height: auto;
    padding-top: 12px;
    padding-bottom: 12px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .auth-submit .button-icon {
    flex: 0 0 28px;
  }

  .auth-form input {
    font-size: 16px;
  }

  .auth-form label > span {
    overflow-wrap: anywhere;
    line-height: 1.15;
  }

  .auth-error {
    overflow-wrap: anywhere;
    line-height: 1.35;
  }

  .auth-foot {
    align-items: flex-start;
    flex-wrap: wrap;
    line-height: 1.35;
  }

  .auth-foot span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Objects table: wide executive register */
.object-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 0 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(7, 126, 78, .28) rgba(255,255,255,.44);
}

.object-table-wrap::-webkit-scrollbar {
  height: 9px;
}

.object-table-wrap::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255,255,255,.44);
}

.object-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid rgba(255,255,255,.58);
  border-radius: 999px;
  background: rgba(7, 126, 78, .34);
}

.object-list {
  min-width: 1980px;
  --object-cols:
    minmax(92px, .48fr)
    minmax(132px, .62fr)
    minmax(230px, 1.25fr)
    minmax(128px, .58fr)
    minmax(158px, .66fr)
    minmax(142px, .58fr)
    minmax(132px, .56fr)
    minmax(138px, .62fr)
    minmax(142px, .68fr)
    minmax(116px, .48fr)
    minmax(124px, .52fr)
    minmax(152px, .68fr)
    minmax(156px, .72fr);
}

.object-list .object-row {
  grid-template-columns: var(--object-cols);
  column-gap: 16px;
  align-items: center;
}

.object-header {
  position: sticky;
  top: 0;
  z-index: 3;
  min-height: 48px;
  margin-bottom: 8px;
  padding: 0 20px;
  border-color: transparent;
  color: rgba(70, 89, 77, .72);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(241, 248, 244,.68));
  box-shadow: 0 10px 24px rgba(2, 101, 62, .05), inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(18px);
  animation: none;
  pointer-events: none;
}

.object-header span {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: .095em;
  line-height: 1.18;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.object-section-row {
  display: grid;
  grid-template-columns: 46px minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  margin: 14px 0 2px;
  padding: 12px 18px;
  border: 1px solid rgba(5, 162, 101, .22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(235, 245, 239,.86), rgba(255,255,255,.68)),
    radial-gradient(circle at 4% 20%, rgba(7, 155, 97,.18), transparent 32%);
  box-shadow: 0 16px 36px rgba(2, 101, 62, .08), inset 0 1px 0 rgba(255,255,255,.9);
  animation: liftIn .65s var(--ease) both;
  animation-delay: calc(var(--i) * 34ms);
}

.section-index {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet-800), var(--violet-500));
  box-shadow: 0 12px 26px rgba(2, 101, 62, .2);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 850;
}

.section-name {
  min-width: 0;
  color: #111b15;
  font-size: clamp(17px, 1.25vw, 22px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.section-meta b {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--violet-800);
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  font-size: 10px;
  font-weight: 880;
  letter-spacing: .01em;
  white-space: nowrap;
}

.object-table-row {
  min-height: 66px;
  padding: 12px 20px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.7), rgba(255,255,255,.5)),
    radial-gradient(circle at 0 0, rgba(6, 166, 104, .055), transparent 38%);
  box-shadow: 0 12px 34px rgba(2, 101, 62, .045), inset 0 1px 0 rgba(255,255,255,.82);
}

.object-cell {
  display: flex;
  align-items: center;
  min-height: 32px;
  min-width: 0;
  overflow: hidden;
  color: #19241d;
  font-size: 12px;
  font-weight: 780;
  line-height: 1.28;
  text-overflow: ellipsis;
}

.mobile-object-card {
  display: none;
}

.object-header span:nth-child(5),
.object-header span:nth-child(6),
.object-header span:nth-child(7),
.object-table-row .object-cell:nth-child(5),
.object-table-row .object-cell:nth-child(6),
.object-table-row .object-cell:nth-child(7) {
  justify-content: flex-end;
  text-align: right;
}

.object-header span:nth-child(4),
.object-header span:nth-child(8),
.object-header span:nth-child(10),
.object-header span:nth-child(11),
.object-table-row .object-cell:nth-child(4),
.object-table-row .object-cell:nth-child(8),
.object-table-row .object-cell:nth-child(10),
.object-table-row .object-cell:nth-child(11) {
  justify-content: center;
  text-align: center;
}

.object-muted {
  color: rgba(65, 83, 72, .78);
  font-weight: 700;
}

.basis-risk-cell {
  color: #b24351;
}

.basis-risk-stack {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.basis-risk-stack b {
  min-width: 0;
  overflow: hidden;
  color: #b24351;
  font-size: inherit;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basis-risk-stack small {
  overflow: hidden;
  color: rgba(178, 67, 81, .82);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-location {
  color: #16211a;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.object-cell .status {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.object-main strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  letter-spacing: -0.015em;
  line-height: 1.18;
  text-overflow: ellipsis;
}

.object-main small {
  color: rgba(81, 101, 89, .82);
}

.object-money {
  color: var(--violet-950);
  font-variant-numeric: tabular-nums;
  font-weight: 830;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.object-table-row.needs-fill {
  border-color: rgba(207, 71, 91, .24);
  background:
    linear-gradient(135deg, rgba(255,255,255,.74), rgba(255,250,252,.56)),
    radial-gradient(circle at 0 0, rgba(207, 71, 91, .08), transparent 36%);
}

.required-missing {
  color: #b24351;
}

.object-cell.required-missing .status {
  color: #b24351;
  background: rgba(255, 233, 238, .96);
}

.missing-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  margin-left: 8px;
  border-radius: 999px;
  color: #b24351;
  background: rgba(255, 232, 237, .9);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 900;
}

body.star-table-mode .objects-wide-panel .glass-core {
  position: relative;
  overflow: hidden;
  border-color: rgba(255, 224, 113, .28);
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 224, 113, .14), transparent 22rem),
    radial-gradient(circle at 92% 18%, rgba(0, 147, 91, .18), transparent 24rem),
    linear-gradient(145deg, rgba(6, 13, 9, .94), rgba(14, 25, 18, .88) 54%, rgba(5, 7, 17, .92));
  box-shadow: 0 34px 92px rgba(4, 6, 18, .25), inset 0 1px 0 rgba(255,255,255,.16);
}

body.star-table-mode .objects-wide-panel .glass-core::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .76;
  background-image:
    radial-gradient(circle at 8% 22%, rgba(255,255,255,.92) 0 1px, transparent 1.4px),
    radial-gradient(circle at 34% 78%, rgba(255,255,255,.66) 0 1px, transparent 1.4px),
    radial-gradient(circle at 70% 18%, rgba(255, 224, 113, .9) 0 1px, transparent 1.6px),
    radial-gradient(circle at 92% 62%, rgba(117, 150, 255, .8) 0 1px, transparent 1.4px);
  background-size: 220px 180px, 170px 210px, 260px 240px, 190px 160px;
  mask-image: linear-gradient(180deg, black, transparent 92%);
}

body.star-table-mode .objects-wide-panel .section-title,
body.star-table-mode .object-table-wrap {
  position: relative;
  z-index: 1;
}

body.star-table-mode .objects-wide-panel .section-title h2 {
  color: #fff6c7;
  text-shadow: 0 0 22px rgba(255, 224, 113, .18);
}

body.star-table-mode .objects-wide-panel .section-title p {
  color: rgba(226, 235, 229, .72);
}

body.star-table-mode .object-header {
  color: rgba(255, 224, 113, .82);
  background:
    linear-gradient(90deg, rgba(255, 224, 113, .14), rgba(255,255,255,.045)),
    rgba(5, 14, 8, .78);
  border: 1px solid rgba(255, 224, 113, .18);
  box-shadow: 0 12px 32px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
}

body.star-table-mode .object-section-row {
  border-color: rgba(255, 224, 113, .34);
  background:
    linear-gradient(90deg, rgba(255, 224, 113, .18), rgba(0, 86, 51, .22)),
    rgba(5, 15, 9, .84);
  box-shadow: 0 18px 38px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.08);
}

body.star-table-mode .section-index {
  color: #09100c;
  background: linear-gradient(135deg, #fff4a8, #f2c744);
  box-shadow: 0 0 26px rgba(255, 224, 113, .3);
}

body.star-table-mode .section-name {
  color: #fff6c7;
}

body.star-table-mode .section-meta b {
  color: #ffe071;
  background: rgba(255, 224, 113, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 224, 113, .16);
}

body.star-table-mode .object-table-row {
  border-color: rgba(255, 224, 113, .12);
  background:
    linear-gradient(90deg, rgba(255, 224, 113, .065), transparent 32%),
    rgba(7, 18, 12, .7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055);
}

body.star-table-mode .object-row:hover,
body.star-table-mode .object-row.active {
  border-color: rgba(255, 224, 113, .42);
  background:
    linear-gradient(90deg, rgba(255, 224, 113, .16), rgba(5, 103, 63, .16)),
    rgba(7, 20, 13, .88);
  box-shadow: 0 0 0 1px rgba(255, 224, 113, .08), 0 18px 44px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}

body.star-table-mode .object-cell,
body.star-table-mode .object-location,
body.star-table-mode .object-muted {
  color: rgba(236, 244, 239, .84);
}

body.star-table-mode .object-main strong,
body.star-table-mode .object-money {
  color: #ffe071;
}

body.star-table-mode .status {
  color: #ffe071;
  background: rgba(255, 224, 113, .12);
}

body.star-table-mode .status.critical,
body.star-table-mode .object-cell.required-missing .status {
  color: #ff8b8b;
  background: rgba(255, 104, 104, .12);
}

body.star-table-mode .object-table-row.needs-fill {
  border-color: rgba(255, 120, 120, .32);
  background:
    linear-gradient(90deg, rgba(255, 99, 99, .12), rgba(255, 224, 113, .045)),
    rgba(7, 18, 12, .78);
}

body.star-table-mode .required-missing {
  color: #ff8b8b;
}

body.star-table-mode .missing-count {
  color: #1a0f16;
  background: linear-gradient(135deg, #ffb0b0, #ff7070);
}

.task-menu {
  margin: -4px 0 18px;
  animation: pageIn .4s var(--ease) both;
}

.task-menu .glass-core {
  padding: 18px;
}

.task-menu-list {
  display: grid;
  max-height: 390px;
  overflow: auto;
  gap: 8px;
  padding-right: 4px;
}

.task-menu-row {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid rgba(207, 71, 91, .18);
  border-radius: 16px;
  color: inherit;
  background: rgba(255,255,255,.58);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.task-menu-row:hover {
  transform: translateY(-2px);
  border-color: rgba(207, 71, 91, .34);
  box-shadow: 0 16px 36px rgba(122, 67, 89, .1), inset 0 1px 0 rgba(255,255,255,.86);
}

.task-menu-row:focus-visible {
  outline: 0;
  transform: translateY(-2px);
  border-color: rgba(207, 71, 91, .34);
  box-shadow: 0 16px 36px rgba(122, 67, 89, .1), inset 0 0 0 1px rgba(207, 71, 91, .16), inset 0 1px 0 rgba(255,255,255,.86);
}

.task-menu-row strong,
.task-menu-row small {
  display: block;
}

.task-menu-row strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.task-menu-row small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.task-menu-row b {
  color: #b24351;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  white-space: nowrap;
}

.overlay-root {
  position: relative;
  z-index: 90;
}

.editor-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(26, 45, 34, .22);
  backdrop-filter: blur(10px);
}

.object-editor {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  width: min(820px, calc(100vw - 48px));
  width: min(820px, calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 2vw, 26px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(244, 249, 246,.72)),
    radial-gradient(circle at 92% 8%, rgba(7, 155, 97,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(2, 57, 33, .22), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(28px);
  animation: modalIn .36s var(--ease) both;
}

.directory-map-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  width: min(980px, calc(100vw - 48px));
  width: min(980px, calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 2vw, 26px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.84), rgba(244, 249, 246,.74)),
    radial-gradient(circle at 92% 8%, rgba(7, 155, 97,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(2, 57, 33, .22), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(28px);
  animation: modalIn .36s var(--ease) both;
}

.direction-map-table {
  display: grid;
  gap: 8px;
}

.direction-map-head,
.direction-map-row {
  display: grid;
  grid-template-columns: 128px 150px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.direction-map-head {
  padding: 0 14px 6px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.direction-map-row {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.direction-map-row strong {
  min-width: 0;
  color: var(--violet-950);
  font-size: 13px;
  font-weight: 880;
  overflow-wrap: anywhere;
}

.direction-map-row > span {
  min-width: 0;
  color: rgba(54, 73, 61, .78);
  font-size: 12px;
  font-weight: 780;
  overflow-wrap: anywhere;
}

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

.station-chip-list b {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #003f24;
  background: rgba(235, 245, 239, .82);
  font-size: 11px;
  font-weight: 830;
  overflow-wrap: anywhere;
  white-space: normal;
}

.supplier-base-modal {
  width: min(1260px, calc(100vw - 48px));
  width: min(1260px, calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
}

.supplier-map-table {
  display: grid;
  gap: 8px;
  --supplier-cols:
    minmax(220px, 1.22fr)
    minmax(142px, .7fr)
    minmax(96px, .42fr)
    minmax(210px, .9fr)
    minmax(128px, .55fr)
    minmax(168px, .72fr);
}

.supplier-map-table.is-editing {
  --supplier-cols:
    minmax(190px, 1.15fr)
    minmax(116px, .66fr)
    minmax(88px, .42fr)
    minmax(190px, .95fr)
    minmax(124px, .62fr)
    minmax(158px, .68fr)
    minmax(92px, .42fr);
}

.supplier-map-head,
.supplier-map-row {
  display: grid;
  grid-template-columns: var(--supplier-cols);
  gap: 14px;
  align-items: center;
}

.supplier-map-head {
  padding: 0 14px 6px;
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.supplier-map-row {
  min-height: 62px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 18px;
  background: rgba(255,255,255,.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.supplier-map-row[role="button"] {
  cursor: pointer;
}

.supplier-map-row[role="button"]:hover,
.supplier-map-row.active {
  border-color: rgba(114, 207, 156,.54);
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(241, 248, 244,.62)),
    radial-gradient(circle at 100% 0, rgba(7, 155, 97,.08), transparent 34%);
  box-shadow:
    0 12px 26px rgba(2, 101, 62,.08),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.supplier-map-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-map-row strong {
  color: var(--violet-950);
  font-size: 13px;
  font-weight: 880;
}

.supplier-map-row span,
.supplier-map-row b,
.supplier-rule-picker,
.supplier-rule-display {
  color: rgba(54, 73, 61, .78);
  font-size: 12px;
  font-weight: 780;
}

.supplier-rule-display {
  display: grid;
  gap: 4px;
}

.supplier-rule-display b,
.supplier-rule-display small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-rule-display b {
  color: var(--violet-950);
  font-size: 12px;
  font-weight: 860;
}

.supplier-rule-display small {
  color: rgba(89, 108, 96, .72);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
}

.supplier-rule-picker {
  display: grid;
  gap: 4px;
}

.supplier-rule-picker select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 999px;
  background: rgba(235, 245, 239, .78);
  color: var(--violet-950);
  font: inherit;
  font-size: 12px;
  font-weight: 860;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.supplier-rule-picker select:focus {
  border-color: rgba(114, 207, 156,.86);
  box-shadow:
    inset 0 0 0 1px rgba(3, 143, 89,.16),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.supplier-rule-picker small {
  min-width: 0;
  overflow: hidden;
  color: rgba(89, 108, 96, .74);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-map-row .mono {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: -0.04em;
}

.supplier-amount-cell {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.supplier-amount-cell b,
.supplier-amount-cell small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-amount-cell b {
  color: rgba(54, 73, 61, .86);
  font-size: 12px;
  font-weight: 880;
}

.supplier-amount-cell small {
  color: rgba(89, 108, 96, .68);
  font-size: 10px;
  font-weight: 760;
}

.supplier-amount-cell.empty {
  color: rgba(89, 108, 96, .68);
  font-size: 12px;
  font-weight: 800;
}

.supplier-detail-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 14px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(250,247,255,.58)),
    radial-gradient(circle at 100% 0, rgba(7, 155, 97,.08), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

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

.supplier-detail-head h3 {
  margin: 10px 0 4px;
  color: var(--ink);
  font-size: 22px;
}

.supplier-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.4;
}

.supplier-detail-head .compact {
  position: static;
  width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 auto;
}

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

.supplier-detail-metrics div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.supplier-detail-metrics span,
.supplier-detail-row-head span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.supplier-detail-metrics b {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-detail-metrics small {
  color: rgba(89, 108, 96, .72);
  font-size: 11px;
  font-weight: 760;
}

.supplier-detail-table {
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,.36);
}

.supplier-detail-row {
  display: grid;
  grid-template-columns: minmax(92px, .55fr) minmax(220px, 1.5fr) minmax(128px, .8fr) minmax(118px, .55fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  border-top: 1px solid rgba(39, 90, 63,.08);
}

.supplier-detail-row:first-child {
  border-top: 0;
}

.supplier-detail-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-detail-row strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 860;
}

.supplier-detail-row b {
  color: rgba(45, 122, 93, .92);
  font-size: 12px;
  font-weight: 860;
}

.supplier-detail-row span {
  color: rgba(54, 73, 61, .78);
  font-size: 12px;
  font-weight: 780;
}

.supplier-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
}

.supplier-add-button,
.supplier-edit-mode-button,
.supplier-row-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.76);
  background: rgba(255,255,255,.68);
  color: var(--violet-950);
  font: inherit;
  font-weight: 860;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.supplier-add-button,
.supplier-edit-mode-button {
  width: max-content;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 15px;
  font-size: 12px;
}

.supplier-edit-mode-button {
  gap: 7px;
}

.supplier-edit-mode-button.active {
  border-color: rgba(114, 207, 156,.48);
  background: rgba(235, 245, 239, .78);
  box-shadow:
    0 0 0 3px rgba(7, 155, 97,.06),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.supplier-edit-mode-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.supplier-row-edit {
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 14px;
  font-size: 11px;
}

.supplier-row-edit svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.supplier-row-edit span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supplier-edit-panel {
  display: grid;
  grid-template-columns: minmax(210px, 1.35fr) minmax(140px, .85fr) minmax(112px, .5fr) minmax(180px, .75fr) auto;
  gap: 10px;
  align-items: end;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.74), rgba(250,247,255,.58)),
    radial-gradient(circle at 100% 0, rgba(7, 155, 97,.08), transparent 36%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.supplier-edit-title {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--violet-950);
  font-size: 13px;
  font-weight: 900;
}

.supplier-edit-title .compact {
  position: static;
  width: 30px;
  height: 30px;
  min-height: 30px;
}

.supplier-edit-panel label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.supplier-edit-panel label span {
  color: var(--soft);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.supplier-edit-panel input,
.supplier-edit-panel select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 15px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  outline: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.supplier-edit-panel input:focus,
.supplier-edit-panel select:focus {
  border-color: rgba(114, 207, 156,.86);
  box-shadow:
    inset 0 0 0 1px rgba(3, 143, 89,.16),
    inset 0 1px 0 rgba(255,255,255,.8);
}

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

.supplier-edit-actions .primary-button,
.supplier-edit-actions .glass-button,
.supplier-edit-actions .danger-button {
  min-height: 40px;
  padding: 0 13px;
  border-radius: 15px;
  font-size: 12px;
}

.supplier-delete-button svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

.editor-head {
  position: relative;
  margin-bottom: 16px;
  padding-right: 42px;
}

.editor-head h2 {
  max-width: 100%;
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: clamp(24px, 2.35vw, 34px);
  font-weight: 880;
  letter-spacing: -0.055em;
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.editor-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.icon-close {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(2, 101, 62, .12);
  border-radius: 50%;
  color: var(--violet-950);
  background: rgba(255,255,255,.66);
  font-size: 24px;
  font-weight: 500;
}

.icon-close:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.editor-form {
  display: grid;
  min-width: 0;
  gap: 14px;
}

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

.edit-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

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

.edit-field span,
.upload-tile span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.edit-field input,
.edit-field select,
.edit-field textarea {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(2, 101, 62, .13);
  border-radius: 16px;
  outline: 0;
  color: var(--ink);
  background: rgba(255,255,255,.72);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.edit-field textarea {
  min-height: 86px;
  padding-top: 11px;
  resize: vertical;
}

.section-choice-field input[hidden] {
  display: none;
}

.money-edit-field input[hidden] {
  display: none;
}

.contractor-choice-field input[hidden] {
  display: none;
}

.contractor-picker {
  display: grid;
  gap: 8px;
}

.contractor-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.contractor-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(2, 101, 62, .13);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.contractor-chip b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contractor-chip button {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: rgba(2, 101, 62, .1);
  color: var(--muted);
  font: inherit;
  line-height: 1;
}

.money-checkbox {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(2, 101, 62, .11);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.money-checkbox input {
  width: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  box-shadow: none;
}

.money-checkbox b {
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.edit-field.missing input,
.edit-field.missing select,
.edit-field.missing textarea {
  border-color: rgba(207, 71, 91, .4);
  background: rgba(255, 246, 248, .88);
  box-shadow: 0 0 0 4px rgba(207, 71, 91, .08), inset 0 1px 0 rgba(255,255,255,.82);
}

.edit-field.basis-risk-field select {
  border-color: rgba(207, 71, 91, .5);
  background: linear-gradient(135deg, rgba(255, 246, 248, .94), rgba(255,255,255,.88));
}

.field-warning {
  color: #b24351;
  font-size: 10px;
  font-weight: 760;
}

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

.upload-tile {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 12px;
  border: 1px dashed rgba(2, 101, 62, .24);
  border-radius: 18px;
  background: rgba(255,255,255,.5);
}

.upload-tile input {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
  text-overflow: ellipsis;
}

.file-list {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.file-chip,
.file-empty {
  display: grid;
  max-width: 100%;
  min-width: 0;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.66);
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.file-chip strong {
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.editor-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 8px;
}

.editor-actions .primary-button,
.editor-actions .glass-button,
.editor-actions .danger-button {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.editor-open {
  overflow: hidden;
}

.print-report {
  display: none;
}

@media (max-width: 920px) {
  .object-list {
    min-width: 2000px;
  }

  .object-list .object-row {
    --object-cols:
      82px
      118px
      220px
      112px
      146px
      128px
      132px
      154px
      128px
      104px
      112px
      140px
      164px;
  }

  .task-menu-list,
  .editor-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .object-editor {
    width: min(640px, calc(100vw - 24px));
    width: min(640px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 18px;
    border-radius: 24px;
  }
}

@media (max-width: 720px) {
  .supplier-base-modal {
    width: min(640px, calc(100vw - 24px));
    width: min(640px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  }

  .supplier-map-head {
    display: none;
  }

  .supplier-map-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px;
  }

  .supplier-map-row > * {
    min-height: 38px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,.52);
    white-space: normal;
  }

  .supplier-map-row strong {
    grid-column: 1 / -1;
  }

  .supplier-rule-picker,
  .supplier-rule-display {
    justify-content: flex-start;
  }

  .supplier-detail-panel {
    padding: 12px;
    border-radius: 18px;
  }

  .supplier-detail-head {
    align-items: flex-start;
  }

  .supplier-detail-head > div {
    min-width: 0;
  }

  .supplier-detail-head h3 {
    font-size: 18px;
  }

  .supplier-detail-head h3,
  .supplier-detail-head p {
    overflow-wrap: anywhere;
  }

  .supplier-head-actions {
    max-width: 100%;
    align-items: stretch;
  }

  .supplier-add-button,
  .supplier-edit-mode-button {
    width: auto;
    max-width: 100%;
    min-height: 44px;
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .supplier-edit-mode-button span {
    min-width: 0;
  }

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

  .supplier-detail-row {
    grid-template-columns: minmax(86px, .65fr) minmax(0, 1.35fr);
    gap: 8px;
  }

  .supplier-detail-row-head {
    display: none;
  }

  .object-table-wrap {
    overflow-x: visible;
    padding: 0;
  }

  .object-table-wrap::-webkit-scrollbar {
    display: none;
  }

  .object-list {
    min-width: 0;
    gap: 12px;
    --object-cols: 1fr 1fr;
  }

  .object-header {
    display: none;
  }

  .object-section-row {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    margin: 16px 0 0;
  }

  .section-meta {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .section-meta b {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .section-name {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.08;
  }

  .object-list .object-row,
  .object-table-row {
    grid-template-columns: var(--object-cols);
    min-height: 0;
    padding: 14px;
    border-radius: 24px;
    column-gap: 10px;
    row-gap: 10px;
    align-items: stretch;
  }

  .object-table-row:hover,
  .object-table-row.active {
    transform: translateY(-2px);
  }

  .object-table-row .object-cell,
  .object-table-row .object-cell:nth-child(5),
  .object-table-row .object-cell:nth-child(6),
  .object-table-row .object-cell:nth-child(7),
  .object-table-row .object-cell:nth-child(10) {
    display: grid;
    min-height: 58px;
    align-content: center;
    justify-content: stretch;
    gap: 5px;
    padding: 11px 12px;
    border-radius: 16px;
    overflow: visible;
    background: rgba(255,255,255,.54);
    text-align: left;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  .object-table-row .object-cell::before {
    content: attr(data-label);
    color: rgba(89, 108, 96, .76);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1;
    text-transform: uppercase;
  }

  .object-table-row .object-main {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    align-items: center;
    padding: 2px 2px 12px;
    border-radius: 0;
    border-bottom: 1px solid rgba(2, 101, 62, .11);
    background: transparent;
    box-shadow: none;
  }

  .object-table-row .object-main::before {
    grid-column: 1 / -1;
  }

  .object-main strong {
    overflow: visible;
    font-size: 16px;
    letter-spacing: -0.03em;
    white-space: normal;
  }

  .object-location {
    grid-column: 1 / -1;
    font-size: 15px;
  }

  .object-money,
  .object-muted {
    white-space: normal;
  }

  .object-cell .status {
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .supplier-detail-row {
    grid-template-columns: 1fr;
  }

  .supplier-detail-row > *,
  .supplier-detail-metrics b {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .object-list {
    --object-cols: 1fr;
  }

  .object-location {
    grid-column: auto;
  }

  .object-editor {
    width: calc(100vw - 16px);
    width: calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 14px;
    border-radius: 22px;
  }

  .editor-head h2 {
    font-size: 23px;
  }

  .editor-head {
    padding-right: 54px;
  }

  .icon-close {
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 980px) {
  .object-table-wrap {
    overflow-x: visible;
    padding: 0;
  }

  .object-table-wrap::-webkit-scrollbar {
    display: none;
  }

  .object-list {
    min-width: 0;
    gap: 12px;
    --object-cols: 1fr;
  }

  .object-header {
    display: none;
  }

  .object-list .object-row,
  .object-table-row {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 14px;
    border-radius: 24px;
    gap: 10px;
    align-items: stretch;
    overflow: visible;
  }

  .object-table-row .object-cell,
  .object-table-row .object-cell:nth-child(5),
  .object-table-row .object-cell:nth-child(6),
  .object-table-row .object-cell:nth-child(7),
  .object-table-row .object-cell:nth-child(9),
  .object-table-row .object-cell:nth-child(10) {
    display: grid;
    grid-template-columns: minmax(96px, .34fr) minmax(0, 1fr);
    min-height: 48px;
    align-items: center;
    justify-content: stretch;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    overflow: visible;
    background: rgba(255,255,255,.54);
    color: var(--ink);
    text-align: left;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  .object-table-row .object-cell::before {
    content: attr(data-label);
    color: rgba(89, 108, 96, .76);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1.1;
    text-transform: uppercase;
  }

  .object-table-row .object-main {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 2px 2px 12px;
    border-radius: 0;
    border-bottom: 1px solid rgba(2, 101, 62, .11);
    background: transparent;
    box-shadow: none;
  }

  .object-table-row .object-main::before {
    grid-column: 1 / -1;
  }

  .object-main strong {
    overflow: visible;
    font-size: 18px;
    letter-spacing: -0.035em;
    white-space: normal;
  }

  .object-location,
  .object-money,
  .object-muted {
    grid-column: auto;
    font-size: 13px;
    white-space: normal;
  }

  .object-cell .status {
    justify-self: start;
  }

  .directory-map-modal {
    width: min(640px, calc(100vw - 24px));
    width: min(640px, calc(100vw - 24px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 18px;
    border-radius: 24px;
  }

  .direction-map-head {
    display: none;
  }

  .direction-map-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .supplier-map-head {
    display: none;
  }

  .supplier-map-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  .supplier-edit-panel {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 12px;
    border-radius: 18px;
  }

  .supplier-edit-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .supplier-map-row strong {
    grid-column: 1 / -1;
  }

  .supplier-rule-picker,
  .supplier-rule-display {
    justify-self: start;
  }

  .supplier-map-row > * {
    display: grid;
    gap: 4px;
    align-content: center;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 14px;
    background: rgba(255,255,255,.52);
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .supplier-map-row > .supplier-rule-picker,
  .supplier-map-row > .supplier-rule-display {
    display: grid;
    justify-content: stretch;
    justify-items: start;
  }

  .supplier-rule-picker select,
  .supplier-rule-picker small,
  .supplier-rule-display b,
  .supplier-rule-display small {
    width: 100%;
  }

  .supplier-map-row > *::before {
    display: block;
    color: rgba(89, 108, 96, .76);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .11em;
    line-height: 1;
    text-transform: uppercase;
  }

  .supplier-map-row > :nth-child(1)::before {
    content: "\00042E\000440\00043B\000438\000446\00043E";
  }

  .supplier-map-row > :nth-child(2)::before {
    content: "\000412\000020\000441\000438\000441\000442\000435\00043C\000435";
  }

  .supplier-map-row > :nth-child(3)::before {
    content: "\000418\00041D\00041D";
  }

  .supplier-map-row > :nth-child(4)::before {
    content: "\00041F\000440\000430\000432\000438\00043B\00043E";
  }

  .supplier-map-row > :nth-child(5)::before {
    content: "\000421\000443\00043C\00043C\000430\000020\00043E\00043F\00043B\000430\000442";
  }

  .supplier-map-row > :nth-child(6)::before {
    content: "\000422\000438\00043F";
  }

  .supplier-map-row > :nth-child(7)::before {
    content: "\00041F\000440\000430\000432\00043A\000430";
  }
}

@media (max-width: 520px) {
  .supplier-map-row {
    grid-template-columns: 1fr;
  }

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

  .supplier-edit-panel input,
  .supplier-edit-panel select {
    height: 44px;
    font-size: 16px;
  }

  .supplier-edit-actions .primary-button,
  .supplier-edit-actions .glass-button,
  .supplier-edit-actions .danger-button {
    min-height: 44px;
    width: 100%;
  }

  .supplier-edit-title .compact,
  .supplier-detail-head .compact {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .supplier-add-button,
  .supplier-edit-mode-button,
  .supplier-row-edit {
    min-height: 44px;
  }

  .supplier-rule-picker,
  .supplier-rule-display {
    justify-self: stretch;
  }

  .supplier-rule-picker select {
    height: 44px;
    font-size: 16px;
  }

  .supplier-rule-picker small,
  .supplier-rule-display b,
  .supplier-rule-display small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .supplier-amount-cell b,
  .supplier-amount-cell small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .mode-toggle {
    right: 16px;
    bottom: 84px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 40px;
    height: 40px;
  }

  .star-table-toggle {
    right: 64px;
  }

  .mobile-nav .nav-link {
    min-height: 56px;
  }

  .mobile-nav .nav-link span:last-child {
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .objects-wide-panel .glass-core {
    padding: 18px 14px;
  }

  .object-list {
    gap: 10px;
  }

  .object-section-row {
    min-height: 0;
    padding: 12px;
    border-radius: 20px;
  }

  .section-index {
    width: 30px;
    height: 30px;
    border-radius: 11px;
    font-size: 12px;
  }

  .object-mobile-group-head .section-index {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 13px;
  }

  .object-mobile-group-head small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .section-name {
    font-size: 19px;
  }

  .section-meta {
    gap: 6px;
  }

  .section-meta b {
    min-height: 24px;
    padding: 0 8px;
    font-size: 9px;
  }

  .object-list .object-row,
  .object-table-row {
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 22px;
  }

  .object-table-row > .object-cell {
    display: none !important;
  }

  .mobile-object-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    width: 100%;
    padding: 15px;
    color: var(--ink);
    text-align: left;
  }

  .mobile-object-head,
  .mobile-object-route,
  .mobile-object-badges,
  .mobile-object-facts {
    display: grid;
    min-width: 0;
  }

  .mobile-object-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(2, 101, 62, .1);
  }

  .mobile-object-head > span {
    min-width: 0;
  }

  .mobile-object-head small,
  .mobile-object-route small,
  .mobile-object-facts small {
    display: block;
    margin-bottom: 4px;
    color: rgba(89, 108, 96, .76);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-object-head strong {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.07;
    text-overflow: clip;
    white-space: normal;
  }

  .mobile-object-head .missing-count {
    width: 27px;
    height: 27px;
    min-width: 27px;
    margin: 0;
  }

  .mobile-object-route {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    align-items: center;
  }

  .mobile-object-route b,
  .mobile-object-route em {
    display: block;
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
    overflow-wrap: anywhere;
    border-radius: 15px;
    background: rgba(255,255,255,.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
    font-size: 13px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
    text-overflow: clip;
    white-space: normal;
  }

  .mobile-object-route small {
    grid-column: 1 / -1;
    min-width: 0;
    margin: -2px 0 0;
    padding-left: 2px;
    overflow-wrap: anywhere;
    color: #03623c;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .mobile-object-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    align-items: center;
  }

  .mobile-object-badges .status {
    width: 100%;
    min-width: 0;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal;
  }

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

  .mobile-object-facts > span {
    min-width: 0;
    min-height: 50px;
    padding: 10px;
    border-radius: 15px;
    background: rgba(255,255,255,.52);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
  }

  .mobile-object-facts b {
    display: block;
    overflow-wrap: anywhere;
    color: #142019;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.18;
  }

  .mobile-object-facts > span:first-child,
  .mobile-object-facts > span:nth-last-child(2),
  .mobile-object-facts > span:last-child {
    grid-column: 1 / -1;
  }
}

@keyframes authShake {
  0%, 100% { transform: translateX(0); }
  24% { transform: translateX(-7px); }
  48% { transform: translateX(6px); }
  72% { transform: translateX(-3px); }
}

@keyframes prideNameFlow {
  from {
    background-position: 0% 50%;
  }

  to {
    background-position: 100% 50%;
  }
}

@keyframes starDrift {
  from {
    background-position: 0 0, 0 0, 0 0, 0 0;
  }

  to {
    background-position: 320px 180px, -260px 210px, 210px -170px, -150px -190px;
  }
}

@keyframes shipRunA {
  0% {
    opacity: 0;
    transform: translate3d(-10vw, 0, 0) rotate(-8deg) scale(.92);
  }

  8%, 72% {
    opacity: .9;
  }

  100% {
    opacity: 0;
    transform: translate3d(118vw, 52px, 0) rotate(-8deg) scale(.92);
  }
}

@keyframes shipRunB {
  0% {
    opacity: 0;
    transform: translate3d(10vw, 0, 0) rotate(184deg) scale(.86);
  }

  10%, 70% {
    opacity: .82;
  }

  100% {
    opacity: 0;
    transform: translate3d(-118vw, -70px, 0) rotate(184deg) scale(.86);
  }
}

@keyframes shipRunC {
  0% {
    opacity: 0;
    transform: translate3d(-12vw, 0, 0) rotate(4deg) scale(.78);
  }

  12%, 64% {
    opacity: .68;
  }

  100% {
    opacity: 0;
    transform: translate3d(120vw, -120px, 0) rotate(4deg) scale(.78);
  }
}

@keyframes laserRunA {
  0%, 32%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-9deg) scaleX(.4);
  }

  40%, 56% {
    opacity: .95;
  }

  72% {
    opacity: 0;
    transform: translate3d(42vw, -62px, 0) rotate(-9deg) scaleX(1);
  }
}

@keyframes laserRunB {
  0%, 26%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(188deg) scaleX(.4);
  }

  34%, 52% {
    opacity: .9;
  }

  70% {
    opacity: 0;
    transform: translate3d(-38vw, 46px, 0) rotate(188deg) scaleX(1);
  }
}

@keyframes laserRunC {
  0%, 30%, 100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-4deg) scaleX(.4);
  }

  42%, 58% {
    opacity: .9;
  }

  74% {
    opacity: 0;
    transform: translate3d(30vw, -32px, 0) rotate(-4deg) scaleX(1);
  }
}

@keyframes blastPulse {
  0%, 48%, 100% {
    opacity: 0;
    transform: scale(.2);
  }

  54% {
    opacity: 1;
    transform: scale(1);
  }

  68% {
    opacity: 0;
    transform: scale(3.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.star-table-mode::after,
  .space-ship,
  .space-laser,
  .space-blast {
    animation: none !important;
  }

  body.star-table-mode .space-battle-layer {
    opacity: .35;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translate(-50%, -48%) scale(.975);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  html,
  body {
    width: 210mm;
    min-height: 297mm;
    margin: 0 !important;
    background: #fff !important;
  }

  body * {
    visibility: hidden !important;
  }

  .print-report,
  .print-report * {
    visibility: visible !important;
  }

  .print-report {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 0;
    color: #101813;
    background: #fff;
    font-family: "Manrope", Arial, sans-serif;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .print-page {
    position: relative;
    min-height: 257mm;
    overflow: hidden;
    padding: 9mm;
    border: 1px solid #d6e8dc;
    border-radius: 8mm;
    background:
      radial-gradient(circle at 12% 2%, rgba(0, 148, 92, .18), transparent 42mm),
      radial-gradient(circle at 92% 12%, rgba(97, 144, 230, .12), transparent 48mm),
      linear-gradient(135deg, #ffffff 0%, #fbf9ff 56%, #f7fbff 100%);
  }

  .print-page::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    content: "";
    background-image:
      linear-gradient(rgba(2, 101, 62,.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(2, 101, 62,.055) 1px, transparent 1px);
    background-size: 13mm 13mm;
  }

  .print-page > * {
    position: relative;
    z-index: 1;
  }

  .print-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7mm;
    min-height: 58mm;
    padding: 8mm;
    border: 1px solid rgba(8, 161, 101, .28);
    border-radius: 7mm;
    background: rgba(255,255,255,.72);
    box-shadow: 0 8mm 24mm rgba(2, 62, 36, .10), inset 0 1px 0 rgba(255,255,255,.92);
    break-inside: avoid;
  }

  .print-brand,
  .print-meta,
  .print-badges,
  .print-footer {
    display: flex;
    align-items: center;
  }

  .print-brand {
    gap: 4mm;
  }

  .print-brand-mark {
    display: block;
    width: 12mm;
    height: 12mm;
    border-radius: 4mm;
    background: linear-gradient(135deg, #005130, #01a164);
    box-shadow: 0 4mm 10mm rgba(0, 101, 61, .22);
  }

  .print-brand strong {
    display: block;
    font-size: 13pt;
    font-weight: 900;
    letter-spacing: -.03em;
  }

  .print-brand small,
  .print-title span,
  .print-meta span,
  .print-kpi-grid span,
  .print-field dt,
  .print-footer {
    color: #728579;
    font-size: 7.5pt;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
  }

  .print-meta {
    justify-content: flex-end;
    gap: 2mm;
    align-self: start;
  }

  .print-meta strong {
    font-size: 9pt;
    font-weight: 850;
  }

  .print-title {
    grid-column: 1 / -1;
  }

  .print-title h1 {
    max-width: 150mm;
    margin: 2mm 0 3mm;
    color: #101813;
    font-size: 29pt;
    font-weight: 900;
    letter-spacing: -.07em;
    line-height: .98;
  }

  .print-title p,
  .print-card p {
    margin: 0;
    color: #54645a;
    font-size: 10pt;
    font-weight: 700;
    line-height: 1.5;
  }

  .print-badges {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 2mm;
  }

  .print-badges b {
    display: inline-flex;
    min-height: 8mm;
    align-items: center;
    padding: 0 3.5mm;
    border-radius: 99mm;
    color: #045d39;
    background: #e5f2e9;
    font-size: 8pt;
    font-weight: 900;
    text-transform: uppercase;
  }

  .print-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3mm;
    margin-top: 4mm;
  }

  .print-kpi-grid div,
  .print-card {
    border: 1px solid rgba(8, 161, 101, .2);
    border-radius: 5mm;
    background: rgba(255,255,255,.78);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  }

  .print-kpi-grid div {
    min-height: 22mm;
    padding: 4mm;
  }

  .print-kpi-grid strong {
    display: block;
    margin-top: 3mm;
    color: #101813;
    font-size: 16pt;
    font-weight: 900;
    letter-spacing: -.05em;
  }

  .print-card {
    margin-top: 4mm;
    padding: 5mm;
    break-inside: avoid;
  }

  .print-card h2 {
    margin: 0 0 4mm;
    color: #131e17;
    font-size: 14pt;
    font-weight: 900;
    letter-spacing: -.04em;
  }

  .print-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3mm;
    margin: 0;
  }

  .print-field {
    min-height: 16mm;
    padding: 3.4mm;
    border-radius: 4mm;
    background: #fbfaff;
    break-inside: avoid;
  }

  .print-field dd {
    margin: 2mm 0 0;
    color: #142019;
    font-size: 10pt;
    font-weight: 850;
    line-height: 1.25;
  }

  .print-attention {
    border-color: rgba(201, 74, 93, .25);
    background: linear-gradient(135deg, #fff, #fff5f7);
  }

  .print-attention p {
    color: #9c3c4a;
    font-weight: 850;
  }

  .print-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4mm;
  }

  .print-footer {
    justify-content: space-between;
    gap: 8mm;
    margin-top: 8mm;
    padding-top: 4mm;
    border-top: 1px solid #d5e4db;
  }

  .print-report .status {
    border: 0;
  }
}

/* Restore left section menu on the public command room. */
body.auth-unlocked .app-shell {
  display: grid !important;
  grid-template-columns: 286px minmax(0, 1fr);
}

body.auth-unlocked .sidebar {
  display: flex !important;
}

body.auth-unlocked .workspace {
  width: auto;
  min-width: 0;
}

.payment-route-list .object-row {
  grid-template-columns: minmax(160px, .8fr) minmax(360px, 1.7fr) minmax(130px, .65fr) minmax(120px, .55fr) minmax(150px, .65fr);
}

@media (max-width: 1180px) {
  body.auth-unlocked .app-shell {
    display: block !important;
  }

  body.auth-unlocked .sidebar {
    display: none !important;
  }

  .payment-route-list .object-row {
    grid-template-columns: minmax(250px, 1fr) 130px 120px;
  }

  .payment-route-list .object-row > :nth-child(4),
  .payment-route-list .object-row > :nth-child(5) {
    display: none;
  }
}

.payments-lines-page {
  display: grid;
  gap: 18px;
  width: min(100%, 1760px);
  margin: 0 auto;
}

.payments-lines-page .empty-state > span {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.payments-lines-page .empty-state strong {
  overflow-wrap: anywhere;
}

.payments-lines-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 112px;
  padding: clamp(18px, 2vw, 28px);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(244, 249, 246,.56)),
    radial-gradient(circle at 94% 16%, rgba(7, 155, 97,.15), transparent 22rem);
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: blur(24px) saturate(1.18);
}

.payments-lines-head > div,
.payment-calendar-head > div {
  min-width: 0;
}

.payments-lines-head h1 {
  margin: 8px 0 8px;
  color: var(--ink);
  font-size: clamp(34px, 3.2vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.02;
}

.payments-lines-head p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 760;
  line-height: 1.45;
}

.payments-lines-card {
  /* Последняя колонка — кнопки. Раньше 600px, и «Согласовать остаток»,
     «Частично», «Перенести», «Платежка» резались многоточием, хотя рядом
     пустовало место (12.08, владелец). Теперь ширина под полные надписи. */
  --payment-cols: minmax(88px, .4fr) minmax(150px, .8fr) minmax(190px, 1fr) minmax(112px, .45fr) minmax(700px, 1fr);
  --payment-gap: 12px;
  --payment-card-pad: 14px;
  --payment-row-pad-x: 14px;
  --payment-row-min-h: 68px;
  --payment-header-min-h: 46px;
  --payment-cell-font: 13px;
  --payment-action-gap: 6px;
  --payment-action-height: 40px;
  --payment-action-radius: 16px;
  --payment-action-font: 12px;
  --payment-text-action-basis: 188px;   /* «Согласовать остаток» целиком */
  --payment-partial-basis: 104px;       /* «Частично» */
  --payment-tomorrow-basis: 120px;      /* «Перенести» */
  --payment-confirmation-basis: 96px;   /* «Платежка» */
  --payment-icon-action-size: 36px;
  position: relative;
  z-index: 1;
  overflow: visible;
  padding: var(--payment-card-pad);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(244, 249, 246,.62)),
    radial-gradient(circle at 92% 10%, rgba(7, 155, 97,.12), transparent 24rem);
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255,255,255,.82);
  backdrop-filter: blur(24px) saturate(1.12);
}

.payments-lines-card:has(.payment-postpone-picker) {
  z-index: 40;
}

.payment-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr);
  gap: 12px;
  margin: 18px 0 18px;
}

.payment-toolbar:has(.payment-search + .payment-status-filter) {
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px);
}

.bank-statement-toolbar {
  grid-template-columns: minmax(240px, 1fr);
  margin: 14px 0 12px;
}

.payment-search,
.payment-status-filter {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.payment-search span,
.payment-status-filter span {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.payment-search input,
.payment-status-filter select {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 780;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  outline: 0;
}

.payment-search input::placeholder {
  color: rgba(65, 84, 72, .52);
}

.payment-search input:focus,
.payment-status-filter select:focus {
  border-color: rgba(114, 207, 156,.78);
  box-shadow: inset 0 0 0 1px rgba(3, 143, 89,.16), inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-search input:focus-visible,
.payment-status-filter select:focus-visible {
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 0 0 1px rgba(3, 143, 89,.16), inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-registry-card {
  margin-top: 18px;
}

.payment-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 8px 8px 18px;
}

.payment-calendar-head.compact {
  padding-bottom: 14px;
}

.payment-calendar-head h2 {
  margin: 10px 0 6px;
  color: var(--ink);
  font-size: clamp(24px, 2.1vw, 38px);
  line-height: .95;
}

.payment-calendar-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.45;
}

.payment-collapse-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid rgba(114, 207, 156, .36);
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  color: var(--violet-950);
  font-size: 12px;
  font-weight: 880;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-collapse-toggle b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(7, 155, 97, .1);
  color: #056e43;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.payment-collapse-toggle:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.payment-collapsible-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.payment-collapsible-head > div {
  min-width: 0;
}

.payment-calendar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: min(640px, 100%);
}

.payment-approval-basket {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 4px 4px 4px 14px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  color: var(--violet-950);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.payment-approval-basket span,
.payment-approval-basket b {
  white-space: nowrap;
}

.payment-approval-basket span {
  color: #596c60;
  font-size: 12px;
  font-weight: 820;
}

.payment-approval-basket strong {
  color: var(--ink);
  font-weight: 920;
}

.payment-approval-basket b {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 900;
}

.payment-approval-basket .payment-bulk-action {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.84), rgba(239, 247, 242,.72));
  font-size: 13px;
}

.payment-approval-basket .payment-bulk-action.send-approved {
  border-color: rgba(199, 69, 88, .2);
  background:
    linear-gradient(135deg, rgba(255, 244, 247, .9), rgba(255,255,255,.74));
  color: #a73548;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 10px 24px rgba(167, 53, 72, .08);
}

.payment-bulk-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: var(--violet-950);
  font-size: 12px;
  font-weight: 880;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.payment-bulk-action.active,
.payment-bulk-action.subtle {
  border-color: rgba(114, 207, 156, .34);
  background: linear-gradient(135deg, rgba(239, 247, 242, .92), rgba(255,255,255,.74));
}

.payment-bulk-action.active {
  color: #056e43;
  box-shadow: 0 12px 24px rgba(2, 135, 83, .1), inset 0 1px 0 rgba(255,255,255,.88);
}

.payments-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  gap: 10px;
}

.payment-bulk-action.danger,
.payment-registry-alert .payment-bulk-action {
  border-color: rgba(205, 43, 67, .28);
  background: linear-gradient(135deg, rgba(255, 235, 239, .94), rgba(255,255,255,.78));
  color: #a51f36;
}

.payment-bulk-action svg {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
}

.payment-bulk-action:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.payment-bulk-action:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.bulk-project-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: -4px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(114, 207, 156, .42);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(239, 247, 242, .94), rgba(255,255,255,.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.86), 0 16px 34px rgba(1, 100, 61, .08);
}

.bulk-project-panel strong,
.bulk-project-panel p {
  display: block;
  margin: 0;
}

.bulk-project-panel strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 920;
}

.bulk-project-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

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

.bulk-project-checkbox {
  display: inline-grid;
  grid-template-columns: 22px;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 32px;
  cursor: pointer;
}

.bulk-project-checkbox input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.bulk-project-checkbox span {
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(2, 135, 83, .28);
  border-radius: 7px;
  background: rgba(255,255,255,.86);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.84);
}

.bulk-project-checkbox input:checked + span {
  border-color: rgba(3, 109, 67, .72);
  background:
    linear-gradient(135deg, rgba(2, 135, 83, .98), rgba(1, 96, 58, .92));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px rgba(1, 100, 61, .16);
}

.bulk-project-checkbox input:checked + span::after {
  content: "";
  display: block;
  width: 10px;
  height: 6px;
  margin: 5px auto 0;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}

.bulk-project-checkbox input:focus-visible + span {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .12), inset 0 1px 0 rgba(255,255,255,.84);
}

.bulk-project-checkbox small {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.bulk-project-checkbox.header {
  height: 34px;
}

.payment-sent-date,
.payment-uploaded-date,
.payment-mobile-sent-date,
.payment-mobile-uploaded-date {
  display: block;
  margin-top: 4px;
  color: #547e66;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
}

.payment-registry-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(205, 43, 67, .3);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 238, 241, .96), rgba(255,255,255,.82)),
    radial-gradient(circle at 96% 12%, rgba(205, 43, 67, .16), transparent 18rem);
  color: #8f162b;
  box-shadow: 0 18px 40px rgba(205, 43, 67, .12), inset 0 1px 0 rgba(255,255,255,.86);
}

.payment-registry-alert > div {
  min-width: 0;
}

.payment-registry-alert strong {
  display: block;
  margin: 6px 0;
  color: #7b1021;
  font-size: 18px;
  font-weight: 950;
}

.payment-registry-alert p {
  margin: 0;
  color: #9d3344;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.45;
}

.payment-registry-index {
  display: grid;
  gap: 18px;
}

.payment-registry-day {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(3, 143, 89, .12);
  border-radius: 24px;
  background: rgba(255,255,255,.52);
}

.payment-registry-day.has-missing {
  border-color: rgba(205, 43, 67, .28);
  background: linear-gradient(135deg, rgba(255,245,247,.86), rgba(255,255,255,.58));
}

.payment-registry-day-head,
.payment-registry-entry header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.payment-registry-day-head > div,
.payment-registry-entry header > div {
  max-width: 100%;
  min-width: 0;
}

.payment-registry-day-head {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-align: left;
}

.payment-registry-day-head:focus-visible {
  outline: 0;
  border-radius: 18px;
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1);
}

.payment-registry-day-head h2,
.payment-registry-entry h3 {
  margin: 6px 0 0;
  color: var(--ink);
  line-height: 1.05;
}

.payment-registry-day-summary {
  margin: 6px 0 0;
  color: #5f7367;
  font-size: 13px;
  font-weight: 820;
  line-height: 1.35;
}

.payment-registry-day-body {
  display: grid;
  gap: 12px;
}

.payment-registry-day-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.payment-registry-day-stats span {
  min-width: 98px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 16px;
  background: rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-registry-day-stats b,
.payment-registry-day-stats small {
  display: block;
}

.payment-registry-day-stats b {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.payment-registry-day-stats small {
  color: #5f7367;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-registry-day-stats .danger b {
  color: #a51f36;
}

.payment-registry-day-toggle-label {
  border-color: rgba(3, 143, 89, .22) !important;
  background: rgba(234, 244, 238, .92) !important;
}

.payment-registry-entry {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.82);
  border-radius: 20px;
  background: rgba(255,255,255,.64);
}

.payment-registry-entry.has-missing {
  border-color: rgba(205, 43, 67, .24);
}

.payment-registry-entry p {
  margin: 6px 0 0;
  color: #5d6f64;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.4;
}

.payment-registry-message {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px !important;
  word-break: break-word;
}

.payment-registry-grid {
  display: grid;
  gap: 8px;
}

.payment-registry-row {
  display: grid;
  grid-template-columns: minmax(130px, .6fr) minmax(220px, 1.1fr) minmax(96px, .45fr) minmax(130px, .6fr) minmax(180px, .8fr) minmax(150px, .65fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(221, 234, 226,.9);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.payment-registry-row.is-missing {
  border-color: rgba(205, 43, 67, .22);
  background: rgba(255,246,248,.86);
}

.payment-registry-row strong,
.payment-registry-row small,
.payment-registry-row em {
  display: block;
  min-width: 0;
}

.payment-registry-row strong {
  color: var(--ink);
  font-weight: 920;
}

.payment-registry-row small {
  color: #697c70;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-registry-row em {
  margin-top: 4px;
  color: #627469;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.payment-registry-row-amount {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-weight: 900;
}

.payment-registry-files {
  display: flex;
  flex-wrap: wrap;
  min-width: 0;
  gap: 6px;
}

.payment-registry-file-link,
.payment-registry-file-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(239, 247, 242,.9);
  color: var(--violet-950);
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}

.payment-registry-file-link svg {
  width: 14px;
  height: 14px;
}

.payment-registry-file-link.proof {
  background: rgba(232, 250, 241, .9);
  color: #136143;
}

.payment-registry-file-link:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.78);
}

.payment-registry-file-note.missing {
  background: rgba(255, 235, 239, .94);
  color: #a51f36;
}

.bank-statement-card {
  --payment-cols: minmax(96px, 112px) minmax(180px, 240px) minmax(0, 1fr) minmax(340px, 380px);
  --payment-row-min-h: 84px;
  border-color: rgba(2, 135, 83, 0.18);
}

.bank-statement-list {
  display: grid;
  gap: 10px;
}

.bank-statement-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.85fr) minmax(220px, 1.5fr) minmax(110px, 0.65fr) minmax(220px, 1.2fr);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(24, 33, 27, 0.08);
  border-left-width: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.bank-statement-row.matched {
  border-left-color: rgba(37, 128, 94, 0.72);
}

.bank-statement-row.possible {
  border-left-color: rgba(189, 126, 40, 0.78);
}

.bank-statement-row.unmatched {
  border-left-color: rgba(2, 135, 83, 0.62);
}

.bank-statement-row strong,
.bank-statement-row small {
  display: block;
  min-width: 0;
}

.bank-statement-row strong {
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.bank-statement-row small {
  color: rgba(24, 33, 27, 0.58);
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 3px;
}

.bank-statement-row-amount {
  color: var(--ink);
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
}

.bank-statement-table {
  margin-top: 4px;
}

.bank-statement-grid-header,
.bank-statement-entry {
  display: grid;
  grid-template-columns: minmax(96px, 112px) minmax(160px, 210px) minmax(300px, 1fr) minmax(820px, 880px);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.bank-statement-table.bulk-select-active .bank-statement-grid-header,
.bank-statement-table.bulk-select-active .bank-statement-entry {
  grid-template-columns: 34px minmax(96px, 112px) minmax(160px, 210px) minmax(300px, 1fr) minmax(820px, 880px);
}

.bank-statement-grid-header {
  min-height: var(--payment-header-min-h);
  padding: 0 var(--payment-row-pad-x);
  border-radius: 22px 22px 16px 16px;
  background: rgba(235, 245, 239, .42);
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.bank-statement-grid-header-right {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(120px, 150px) minmax(540px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bank-statement-grid-header-right .payment-actions-title {
  justify-self: center;
}

.bank-statement-grid-header-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 118px)) minmax(112px, 140px) 42px;
  gap: 6px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.bank-statement-documents-title {
  grid-column: 1 / span 3;
}

.bank-statement-grid-header-actions > span {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.bank-statement-grid-header-actions .payment-sort-button {
  justify-content: center;
  width: 100%;
}

.bank-statement-entry {
  min-height: 84px;
  padding: 12px var(--payment-row-pad-x) 12px calc(var(--payment-row-pad-x) - 4px);
  border-top: 1px solid rgba(10, 76, 46, .07);
  border-left: 4px solid rgba(2, 135, 83, .62);
}

.bank-statement-entry:first-child {
  border-top: 0;
}

.bank-statement-entry.matched {
  border-left-color: rgba(37, 128, 94, .72);
}

.bank-statement-entry.possible {
  border-left-color: rgba(189, 126, 40, .78);
}

.bank-statement-entry.unmatched {
  border-left-color: rgba(2, 135, 83, .62);
}

.bank-statement-entry-date,
.bank-statement-entry-project,
.bank-statement-entry-main {
  min-width: 0;
}

.bank-statement-entry-date strong,
.bank-statement-entry-project strong,
.bank-statement-entry-main strong,
.bank-statement-entry-date small,
.bank-statement-entry-project small,
.bank-statement-entry-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-statement-entry-date strong,
.bank-statement-entry-project strong,
.bank-statement-entry-main strong {
  color: var(--ink);
  font-size: .92rem;
  font-weight: 880;
  line-height: 1.18;
  white-space: nowrap;
}

.bank-statement-entry-date small,
.bank-statement-entry-project small,
.bank-statement-entry-main small {
  margin-top: 3px;
  color: rgba(89, 108, 96, .74);
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.22;
  white-space: nowrap;
}

.bank-statement-entry .bank-statement-entry-purpose {
  display: block;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  white-space: normal;
}

.bank-statement-entry-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin-top: 7px;
}

.bank-statement-doc-action,
.bank-statement-doc-badge,
.bank-statement-db-pill,
.bank-statement-file-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid rgba(34, 153, 106, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(239, 255, 247, .86), rgba(255,255,255,.7));
  color: #176b4b;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.bank-statement-doc-action,
.bank-statement-doc-badge {
  gap: 7px;
  width: 100%;
  padding: 0 10px;
  border-color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.68);
  color: var(--violet-950);
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.bank-statement-doc-badge.proof {
  border-color: rgba(34, 153, 106, .2);
  background: linear-gradient(135deg, rgba(234, 255, 244, .9), rgba(255,255,255,.72));
  color: #166b4d;
  cursor: default;
}

.bank-statement-db-pill {
  gap: 6px;
  padding: 0 9px;
}

.bank-statement-db-pill.missing {
  border-color: rgba(205, 43, 67, .22);
  background: linear-gradient(135deg, rgba(255, 235, 239, .9), rgba(255,255,255,.72));
  color: #a51f36;
}

.bank-statement-db-pill.proof {
  border-color: rgba(34, 153, 106, .2);
  background: linear-gradient(135deg, rgba(234, 255, 244, .92), rgba(255,255,255,.74));
  color: #166b4d;
}

.bank-statement-file-action {
  width: 32px;
  padding: 0;
}

.bank-statement-doc-action svg,
.bank-statement-doc-badge svg,
.bank-statement-db-pill svg,
.bank-statement-file-action svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.bank-statement-doc-action:hover {
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.82);
  box-shadow: inset 0 0 0 1px rgba(3, 143, 89,.12), inset 0 1px 0 rgba(255,255,255,.8);
}

.bank-statement-file-action:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.bank-statement-doc-action:focus-visible,
.bank-statement-file-action:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.78);
}

.bank-statement-entry-right {
  display: grid;
  grid-template-columns: minmax(120px, 150px) minmax(120px, 150px) minmax(540px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bank-statement-entry-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 118px)) minmax(112px, 140px) 42px;
  gap: 6px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.bank-statement-amount {
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: var(--payment-cell-font);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: right;
  white-space: nowrap;
}

.bank-statement-accept,
.bank-statement-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 40px;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 16px;
  background: rgba(255,255,255,.68);
  color: var(--violet-950);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
}

.bank-statement-accept.unlinked,
.bank-statement-accept.unlinked:disabled {
  border-color: rgba(157, 100, 20, .2);
  background: linear-gradient(135deg, rgba(255, 248, 232, .82), rgba(255,255,255,.68));
  color: #9d6414;
}

.bank-statement-accept.selected {
  border-color: rgba(34, 153, 106, .18);
  color: #176b4b;
}

.bank-statement-edit-button {
  width: 42px;
  padding: 0;
}

.bank-statement-entry-actions .bank-statement-doc-action,
.bank-statement-entry-actions .bank-statement-doc-badge,
.bank-statement-entry-actions .bank-statement-doc-placeholder,
.bank-statement-entry-actions .bank-statement-db-pill,
.bank-statement-entry-actions .bank-statement-file-action,
.bank-statement-entry-actions .bank-statement-file-placeholder,
.bank-statement-entry-actions .bank-statement-accept,
.bank-statement-entry-actions .bank-statement-edit-button {
  height: 40px;
  min-height: 40px;
  margin: 0;
}

.bank-statement-entry-actions .bank-statement-doc-action,
.bank-statement-entry-actions .bank-statement-doc-badge,
.bank-statement-entry-actions .bank-statement-doc-placeholder,
.bank-statement-entry-actions .bank-statement-db-pill,
.bank-statement-entry-actions .bank-statement-file-action,
.bank-statement-entry-actions .bank-statement-file-placeholder,
.bank-statement-entry-actions .bank-statement-accept {
  width: 100%;
}

.bank-statement-doc-placeholder,
.bank-statement-file-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.bank-statement-doc-placeholder {
  border: 1px solid rgba(2, 101, 62, .08);
  border-radius: 16px;
  background: rgba(255,255,255,.34);
  color: rgba(47, 96, 69, .52);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.bank-statement-doc-action span,
.bank-statement-doc-badge span,
.bank-statement-db-pill span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-statement-edit-button svg {
  width: 17px;
  height: 17px;
}

.bank-statement-accept:disabled {
  cursor: default;
  opacity: .88;
}

.bank-statement-edit-button:focus-visible,
.bank-statement-accept:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.74);
}

.bank-statement-repair-panel {
  display: grid;
  gap: 12px;
  margin: 20px 4px 0;
  padding: 16px;
  border: 1px solid rgba(205, 43, 67, .22);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 244, 247, .84), rgba(255,255,255,.62)),
    radial-gradient(circle at 96% 10%, rgba(205, 43, 67, .12), transparent 18rem);
}

.bank-statement-repair-panel.all-linked {
  border-color: rgba(34, 153, 106, .18);
  background:
    linear-gradient(135deg, rgba(239, 255, 247, .76), rgba(255,255,255,.62)),
    radial-gradient(circle at 96% 10%, rgba(34, 153, 106, .12), transparent 18rem);
}

.bank-statement-repair-panel.is-collapsed {
  gap: 0;
}

.bank-statement-repair-panel h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(19px, 1.4vw, 24px);
  line-height: 1.05;
}

.bank-statement-repair-panel p {
  margin: 0;
  color: #7c5260;
  font-size: 13px;
  font-weight: 790;
  line-height: 1.45;
}

.bank-statement-repair-panel.all-linked p {
  color: #4e7866;
}

.bank-statement-repair-list {
  display: grid;
  gap: 8px;
}

.bank-statement-repair-row {
  display: grid;
  grid-template-columns: minmax(112px, 140px) minmax(0, 1fr) minmax(104px, 150px) minmax(110px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 16px;
  background: rgba(255,255,255,.7);
}

.bank-statement-repair-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 235, 239, .86);
  color: #a51f36;
  font-size: 10.5px;
  font-weight: 900;
}

.bank-statement-repair-status svg {
  width: 15px;
  height: 15px;
}

.bank-statement-repair-main {
  min-width: 0;
}

.bank-statement-repair-main strong,
.bank-statement-repair-main small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-statement-repair-main strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.bank-statement-repair-main small {
  margin-top: 3px;
  color: rgba(89, 108, 96, .78);
  font-size: 10.5px;
  font-weight: 780;
}

.bank-statement-repair-amount {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.bank-statement-repair-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.payment-bank-statement-context {
  display: grid;
  gap: 5px;
  margin-top: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(10, 76, 46, .09);
  border-radius: 8px;
  background: rgba(255, 255, 255, .66);
}

.payment-bank-statement-context strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.payment-bank-statement-context span {
  color: rgba(89, 108, 96, .82);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .payment-registry-alert,
  .payment-registry-day-head,
  .payment-registry-entry header {
    align-items: stretch;
    flex-direction: column;
  }

  .payments-head-actions,
  .payment-registry-day-stats,
  .payment-registry-entry-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .payment-registry-alert .payment-bulk-action {
    width: 100%;
  }

  .payment-registry-day-toggle-label {
    flex-basis: 100%;
    text-align: center;
  }

  .payment-registry-row {
    grid-template-columns: 1fr;
  }

  .payment-registry-row strong,
  .payment-registry-row small,
  .payment-registry-row em,
  .payment-registry-row-amount {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .payment-registry-row-amount::before {
    content: "Сумма";
    display: block;
    margin-bottom: 4px;
    color: #697c70;
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .bank-statement-row {
    grid-template-columns: 1fr;
  }

  .bank-statement-row-amount {
    text-align: left;
  }
}

.payments-lines-list {
  display: grid;
  gap: 0;
  overflow: visible;
}

.payment-line {
  position: relative;
  display: grid;
  grid-template-columns: var(--payment-cols);
  column-gap: var(--payment-gap);
  align-items: center;
  min-width: 0;
  min-height: var(--payment-row-min-h);
  padding: 0 var(--payment-row-pad-x);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.payments-desktop-table.bulk-select-active .payment-line {
  grid-template-columns: 34px var(--payment-cols);
}

.bulk-project-select-cell,
.bank-statement-select-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.payments-lines-list .payment-line {
  border-top: 1px solid rgba(10, 76, 46, .07);
}

.payments-lines-list .payment-line:first-child {
  border-top: 0;
}

.payment-line-header {
  min-height: var(--payment-header-min-h);
  border-color: transparent;
  border-radius: 22px 22px 16px 16px;
  background: rgba(235, 245, 239, .42);
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.payment-line-header span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  line-height: 1;
  text-transform: inherit;
  cursor: pointer;
}

.payment-sort-button:hover,
.payment-sort-button.active {
  border-color: rgba(114, 207, 156,.46);
  background: rgba(255,255,255,.72);
  color: var(--violet-950);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-sort-button b {
  color: #078a56;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.payment-header-amount .payment-sort-button {
  margin-left: auto;
}

.payment-actions-title .payment-sort-button {
  margin: 0 auto;
}

.payment-line-header span:nth-child(4) {
  text-align: right;
}

.payments-desktop-table.bulk-select-active .payment-line-header span:nth-child(4) {
  text-align: left;
}

.payments-desktop-table.bulk-select-active .payment-line-header span:nth-child(5) {
  text-align: right;
}

.payment-header-amount {
  display: flex;
  justify-content: flex-end;
}

.payment-actions-title {
  display: grid;
  grid-template-columns:
    var(--payment-text-action-basis)
    var(--payment-partial-basis)
    var(--payment-tomorrow-basis)
    var(--payment-icon-action-size)
    var(--payment-confirmation-basis)
    repeat(3, var(--payment-icon-action-size));
  gap: var(--payment-action-gap);
  align-items: center;
  justify-content: center;
  text-align: center;
}

.payment-status-title {
  grid-column: 1 / span 2;
  justify-self: center;
  min-width: 0;
}

.payment-confirmation-title {
  grid-column: 4 / -1;
  justify-self: center;
  min-width: 0;
  color: #4f7e63;
}

.payment-cell {
  min-width: 0;
  color: #3d4d43;
  font-size: var(--payment-cell-font);
  font-weight: 770;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-counterparty {
  display: grid;
  gap: 2px;
  white-space: normal;
}

.payment-counterparty > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-manager-note {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #72897b;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-project strong,
.payment-amount {
  color: var(--ink);
  font-weight: 880;
}

.payment-amount {
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0;
  text-align: right;
  white-space: nowrap;
}

.payment-amount-stack {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 0;
  white-space: normal;
}

.payment-amount-stack strong {
  color: var(--ink);
  font-family: "JetBrains Mono", monospace;
  font-size: inherit;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.payment-amount-stack small {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: rgba(89, 108, 96, .76);
  font-family: Inter, system-ui, sans-serif;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: right;
}

.payment-line.is-partial {
  background: linear-gradient(90deg, rgba(255, 249, 236, .42), transparent 64%);
}

.payment-line.is-partial .payment-amount-stack strong {
  color: #8c5a10;
}

.payment-actions {
  display: grid;
  grid-template-columns:
    var(--payment-text-action-basis)
    var(--payment-partial-basis)
    var(--payment-tomorrow-basis)
    var(--payment-icon-action-size)
    var(--payment-confirmation-basis)
    repeat(3, var(--payment-icon-action-size));
  align-items: center;
  justify-content: end;
  gap: var(--payment-action-gap);
  min-width: 0;
  max-width: 100%;
  margin-top: 0;
  padding: 2px 0;
  border-top: 0;
  overflow: visible;
}

.payment-actions.paid-document-actions {
  grid-template-columns: minmax(var(--payment-text-action-basis), 1.1fr) repeat(3, minmax(92px, 118px));
}

.payment-line.is-approved {
  background: transparent;
}

.payment-line.is-postponed {
  background: transparent;
}

.payment-line.is-blocked {
  background: transparent;
}

.payment-line.is-review {
  background: linear-gradient(90deg, rgba(255, 248, 232, .34), transparent 58%);
}

.payment-line.invoice-deleted {
  opacity: .72;
}

.payment-action,
.payment-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: var(--payment-action-height);
  min-height: var(--payment-action-height);
  border: 1px solid rgba(255,255,255,.78);
  border-radius: var(--payment-action-radius);
  background: rgba(255,255,255,.68);
  color: var(--violet-950);
  font-size: var(--payment-action-font);
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
  transition: background .28s var(--ease), border-color .28s var(--ease), box-shadow .28s var(--ease);
}

.payment-action {
  gap: 7px;
  width: 100%;
  padding: 0 10px;
}

.payment-action.tomorrow {
  width: 100%;
}

.payment-action span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-action svg,
.payment-icon-action svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.payment-action:hover,
.payment-icon-action:hover {
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.82);
  box-shadow:
    inset 0 0 0 1px rgba(3, 143, 89,.12),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.payment-action:focus-visible,
.payment-icon-action:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow:
    inset 0 0 0 1px rgba(3, 143, 89,.2),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-action.approve {
  color: #0d7c62;
}

.payment-action.approve:not(.selected) {
  color: #012e19;
}

.payment-action.approve.selected {
  border-color: rgba(75, 166, 126, .18);
  background:
    linear-gradient(135deg, rgba(240, 255, 248, .82), rgba(255,255,255,.7));
  color: #0d7c62;
}

.payment-action.approve.selected:disabled {
  cursor: default;
  opacity: 1;
}

.payment-action.tomorrow {
  color: #9d6414;
}

.payment-action.partial {
  color: #7b4a08;
}

.payment-action.partial:not(:disabled) {
  border-color: rgba(186, 129, 28, .18);
  background:
    linear-gradient(135deg, rgba(255, 250, 235, .86), rgba(255,255,255,.72));
}

.payment-postpone-slot {
  position: relative;
  display: block;
  width: 100%;
  height: var(--payment-action-height);
}

.payment-postpone-picker {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  width: 254px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.86);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(250,247,255,.88)),
    radial-gradient(circle at 100% 0, rgba(7, 155, 97,.12), transparent 52%);
  box-shadow: 0 22px 54px rgba(2, 57, 33, .18), inset 0 1px 0 rgba(255,255,255,.92);
  backdrop-filter: blur(22px);
}

.payment-postpone-picker strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.payment-postpone-month {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  min-width: 0;
  gap: 6px;
  align-items: center;
  margin-bottom: 9px;
}

.payment-postpone-month span {
  color: #42584b;
  font-size: 12px;
  font-weight: 880;
  text-align: center;
  text-transform: capitalize;
}

.payment-postpone-month button,
.payment-postpone-day {
  border: 1px solid rgba(2, 101, 62, .08);
  background: rgba(255,255,255,.72);
  color: var(--violet-950);
  font: inherit;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

.payment-postpone-month button {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  font-size: 18px;
  line-height: 1;
}

.payment-postpone-weekdays,
.payment-postpone-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
  gap: 5px;
}

.payment-postpone-weekdays {
  margin-bottom: 5px;
}

.payment-postpone-weekdays span {
  color: #7f9286;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.payment-postpone-day {
  width: 100%;
  height: 26px;
  border-radius: 10px;
  font-size: 11px;
}

.payment-postpone-day.muted {
  color: rgba(89, 108, 96, .38);
}

.payment-postpone-day.selected {
  border-color: rgba(3, 143, 89, .42);
  background: linear-gradient(135deg, rgba(3, 143, 89,.95), rgba(6, 181, 114,.92));
  color: #fff;
  box-shadow: 0 8px 18px rgba(3, 143, 89, .24);
}

.payment-postpone-day:disabled {
  cursor: not-allowed;
  opacity: .34;
}

.payment-postpone-month button:hover,
.payment-postpone-day:not(:disabled):hover {
  border-color: rgba(3, 143, 89, .22);
  background: rgba(250,247,255,.94);
}

.payment-postpone-month button:focus-visible,
.payment-postpone-day:focus-visible {
  outline: 0;
  border-color: rgba(114, 207, 156, .78);
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.payment-postpone-day.selected:hover {
  background: linear-gradient(135deg, rgba(3, 143, 89,.95), rgba(6, 181, 114,.92));
}

.payment-action.cancel {
  color: #7a4f10;
}

.paid-doc-action {
  color: var(--violet-950);
}

.paid-doc-action svg {
  width: 16px;
  height: 16px;
}

.paid-doc-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--payment-action-height);
  min-height: var(--payment-action-height);
  border: 1px solid rgba(2, 101, 62, .08);
  border-radius: var(--payment-action-radius);
  background: rgba(255,255,255,.34);
  color: rgba(47, 96, 69, .52);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.payment-mobile-icon-row .paid-doc-placeholder {
  height: var(--payment-icon-action-size);
  min-height: var(--payment-icon-action-size);
}

.payment-mobile-icon.paid-doc-mobile {
  width: auto;
  min-width: 76px;
  gap: 5px;
  padding: 0 8px;
}

.payment-mobile-icon.paid-doc-mobile span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-icon-action {
  width: 100%;
  padding: 0;
}

.payment-confirmation-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: var(--payment-action-height);
  min-height: var(--payment-action-height);
  min-width: 0;
  padding: 0 8px;
  border: 1px solid rgba(34, 153, 106, .18);
  border-radius: var(--payment-action-radius);
  background: linear-gradient(135deg, rgba(239, 255, 247, .88), rgba(255,255,255,.72));
  color: #176b4b;
  font-size: var(--payment-action-font);
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.76);
}

.payment-confirmation-badge svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.payment-confirmation-badge span {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-confirmation-badge.complete {
  border-color: rgba(37, 128, 94, .24);
  background:
    linear-gradient(135deg, rgba(235, 255, 246, .94), rgba(239, 247, 242, .72));
  color: #12664d;
}

.payment-confirmation-badge.proof {
  border-color: rgba(2, 135, 83, .2);
  background: linear-gradient(135deg, rgba(239, 247, 242, .9), rgba(255,255,255,.72));
  color: var(--violet-950);
}

.payment-confirmation-badge.batch {
  border-color: rgba(194, 126, 18, .26);
  background: linear-gradient(135deg, rgba(255, 248, 226, .94), rgba(255,255,255,.74));
  color: #7a4f10;
}

.payment-confirmation-badge.batch small {
  position: absolute;
  right: 5px;
  bottom: 4px;
  padding: 1px 4px;
  border-radius: 999px;
  background: rgba(122, 79, 16, .12);
  color: inherit;
  font-size: 9px;
  font-weight: 950;
  line-height: 1.1;
}

.payment-confirmation-badge.missing {
  border-color: rgba(205, 43, 67, .24);
  background: linear-gradient(135deg, rgba(255, 235, 239, .94), rgba(255,255,255,.72));
  color: #a51f36;
}

.payment-confirmation-badge.missing::after {
  position: absolute;
  top: 5px;
  right: 7px;
  content: "!";
  color: inherit;
  font-size: 10px;
  font-weight: 950;
  line-height: 1;
}

.payment-action-placeholder {
  display: block;
  width: 100%;
  height: var(--payment-action-height);
  pointer-events: none;
}

.payment-icon-action.danger {
  color: #b24351;
}

.payment-action:disabled,
.payment-icon-action:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.payment-action.approve.blocked,
.payment-action.approve.blocked:disabled {
  border-color: rgba(178, 67, 81, .24);
  background:
    linear-gradient(135deg, rgba(255, 241, 244, .82), rgba(255,255,255,.68));
  color: #b24351;
}

.payment-action.approve.unlinked,
.payment-action.approve.unlinked:disabled {
  border-color: rgba(157, 100, 20, .2);
  background:
    linear-gradient(135deg, rgba(255, 248, 232, .82), rgba(255,255,255,.68));
  color: #9d6414;
}

.payment-review-divider {
  display: grid;
  gap: 10px;
  margin: 24px 8px 0;
  padding: 18px 14px 12px;
  border-top: 1px solid rgba(10, 76, 46, .1);
}

.payment-review-divider h3 {
  margin: 0 0 5px;
  color: var(--ink);
  font-size: clamp(19px, 1.35vw, 24px);
  line-height: 1.05;
}

.payment-review-divider p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.45;
}

.payment-review-continuation {
  margin-top: 0;
}

.payment-icon-action:disabled {
  cursor: not-allowed;
  opacity: .42;
  transform: none;
}

.payment-action:disabled {
  cursor: default;
  opacity: .88;
}

.payment-invoice-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 80;
  width: min(760px, calc(100vw - 48px));
  width: min(760px, calc(100vw - 48px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(18px, 2vw, 26px);
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(244, 249, 246,.76)),
    radial-gradient(circle at 92% 8%, rgba(7, 155, 97,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(2, 57, 33, .22), inset 0 1px 0 rgba(255,255,255,.86);
  backdrop-filter: blur(28px);
  transform: translate(-50%, -50%);
  animation: modalIn .36s var(--ease) both;
}

.payment-invoice-modal .editor-head h2 {
  max-width: 100%;
  overflow-wrap: anywhere;
  letter-spacing: 0;
}

.payment-invoice-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.payment-invoice-details div {
  min-width: 0;
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}

.payment-invoice-details dt {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.payment-invoice-details dd {
  margin: 7px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 840;
}

.payment-vat-panel {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.74);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(239, 247, 242,.58)),
    radial-gradient(circle at 92% 16%, rgba(0, 148, 92,.12), transparent 18rem);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
}

.payment-vat-panel h3 {
  margin: 5px 0 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 20px;
  font-weight: 880;
  letter-spacing: 0;
}

.payment-vat-panel.with-vat {
  border-color: rgba(95, 181, 137, .22);
}

.payment-vat-panel.without-vat {
  border-color: rgba(178, 111, 24, .2);
}

.payment-vat-panel.unknown-vat {
  border-color: rgba(207, 71, 91, .22);
}

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

.payment-vat-grid div {
  min-width: 0;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.62);
}

.payment-vat-grid dt {
  color: var(--soft);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.payment-vat-grid dd {
  min-width: 0;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-invoice-preview {
  min-height: 420px;
  max-height: min(72dvh, 760px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 20px;
  background: rgba(255,255,255,.62);
}

.payment-invoice-preview iframe {
  display: block;
  width: 100%;
  height: min(66vh, 680px);
  border: 0;
  border-radius: 14px;
  background: #ffffff;
}

.payment-invoice-image-link {
  display: block;
}

.payment-invoice-image-link:focus-visible {
  outline: 0;
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(7, 155, 97, .1);
}

.payment-invoice-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(0, 42, 22, .12);
}

.payment-invoice-preview pre {
  margin: 0;
  white-space: pre-wrap;
  color: #24342b;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 1500px) {
  .payments-lines-card {
    --payment-cols: 140px minmax(110px, .8fr) minmax(150px, 1fr) 96px 508px;
    --payment-gap: 8px;
    --payment-card-pad: 12px;
    --payment-row-pad-x: 10px;
    --payment-row-min-h: 60px;
    --payment-header-min-h: 42px;
    --payment-cell-font: 12px;
    --payment-action-gap: 4px;
    --payment-action-height: 38px;
    --payment-action-radius: 14px;
    --payment-action-font: 11.5px;
    --payment-text-action-basis: 176px;
    --payment-partial-basis: 116px;
    --payment-tomorrow-basis: 34px;   /* только значок, надпись в подсказке */
    --payment-confirmation-basis: 34px;  /* только значок, текст в подсказке */
    --payment-icon-action-size: 30px;
  }

  .bank-statement-card {
    --payment-cols: 78px minmax(146px, 190px) minmax(0, 1fr) minmax(640px, 690px);
    --payment-row-min-h: 78px;
  }

  .bank-statement-grid-header,
  .bank-statement-entry {
    grid-template-columns: 78px minmax(136px, 176px) minmax(220px, 1fr) minmax(640px, 690px);
  }
}

@media (max-width: 1320px) {
  .payments-lines-card {
    --payment-cols: 128px minmax(96px, .8fr) minmax(130px, 1fr) 88px 462px;
    --payment-gap: 5px;
    --payment-card-pad: 10px;
    --payment-row-pad-x: 6px;
    --payment-row-min-h: 54px;
    --payment-header-min-h: 38px;
    --payment-cell-font: 11.5px;
    --payment-action-gap: 4px;
    --payment-action-height: 36px;
    --payment-action-radius: 12px;
    --payment-action-font: 11px;
    --payment-text-action-basis: 164px;
    --payment-partial-basis: 104px;
    --payment-tomorrow-basis: 30px;   /* только значок */
    --payment-confirmation-basis: 30px;  /* только значок */
    --payment-icon-action-size: 26px;
  }

  .bank-statement-card {
    --payment-cols: 70px minmax(118px, 158px) minmax(0, 1fr) minmax(540px, 580px);
    --payment-row-min-h: 74px;
  }

  .bank-statement-grid-header,
  .bank-statement-entry {
    grid-template-columns: 70px minmax(112px, 150px) minmax(180px, 1fr) minmax(540px, 580px);
  }

  .bank-statement-grid-header-right,
  .bank-statement-entry-right {
    grid-template-columns: minmax(118px, 1fr) minmax(414px, auto);
    gap: 8px;
  }

  .bank-statement-entry-actions {
    grid-template-columns: repeat(3, minmax(84px, 96px)) minmax(100px, 112px) 34px;
    gap: 6px;
  }

  .bank-statement-grid-header-actions {
    grid-template-columns: repeat(3, minmax(84px, 96px)) minmax(100px, 112px) 34px;
    gap: 6px;
  }

  .bank-statement-edit-button {
    width: 34px;
  }

  .payment-action {
    gap: 5px;
    padding: 0 7px;
  }
}

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

  .payment-calendar-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .payment-collapse-toggle,
  .payment-collapsible-head .payment-collapse-toggle {
    align-self: flex-start;
  }

  .payment-collapsible-head {
    flex-direction: column;
    gap: 10px;
  }

  .payment-calendar-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .project-invoice-search {
    flex-basis: auto;
    width: 100%;
  }

  .payments-lines-card {
    --payment-cols: 70px minmax(96px, .95fr) minmax(96px, .95fr) 88px minmax(222px, .72fr);
    --payment-action-gap: 3px;
    --payment-action-height: 32px;
    --payment-text-action-basis: 28px;
    --payment-partial-basis: 28px;
    --payment-tomorrow-basis: 28px;
    --payment-confirmation-basis: 28px;
    --payment-icon-action-size: 28px;
  }

  .payment-confirmation-title {
    display: none;
  }

  .payment-actions.paid-document-actions {
    grid-template-columns: var(--payment-text-action-basis) repeat(3, var(--payment-icon-action-size));
  }

  .payment-confirmation-badge {
    padding: 0;
  }

  .payment-confirmation-badge span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .bank-statement-grid-header,
  .bank-statement-entry {
    grid-template-columns: 70px minmax(104px, 132px) minmax(0, 1fr) minmax(104px, 124px);
  }

  .bank-statement-entry-right,
  .bank-statement-grid-header-right {
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: end;
  }

  .bank-statement-entry-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
  }

  .bank-statement-entry-actions .bank-statement-doc-action,
  .bank-statement-entry-actions .bank-statement-doc-badge,
  .bank-statement-entry-actions .bank-statement-doc-placeholder,
  .bank-statement-entry-actions .bank-statement-db-pill,
  .bank-statement-entry-actions .bank-statement-file-action,
  .bank-statement-entry-actions .bank-statement-file-placeholder,
  .bank-statement-entry-actions .bank-statement-accept,
  .bank-statement-entry-actions .bank-statement-edit-button {
    width: var(--payment-icon-action-size);
    height: var(--payment-icon-action-size);
    min-height: var(--payment-icon-action-size);
  }

  .bank-statement-entry-actions .bank-statement-doc-action,
  .bank-statement-entry-actions .bank-statement-doc-badge,
  .bank-statement-entry-actions .bank-statement-db-pill {
    padding: 0;
  }

  .bank-statement-entry-actions .bank-statement-doc-action span,
  .bank-statement-entry-actions .bank-statement-doc-badge span,
  .bank-statement-entry-actions .bank-statement-db-pill span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .bank-statement-grid-header-actions {
    display: none;
  }

  .bank-statement-accept,
  .bank-statement-edit-button {
    width: var(--payment-icon-action-size);
    height: var(--payment-icon-action-size);
    min-height: var(--payment-icon-action-size);
    overflow: hidden;
    border-radius: 10px;
  }

  .bank-statement-accept {
    color: transparent;
  }

  .bank-statement-accept::before {
    content: "✓";
    color: var(--violet-950);
  }

  .bank-statement-accept.unlinked::before {
    content: "+";
    color: #9d6414;
  }

  .bank-statement-grid-header-right .payment-actions-title {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .bank-statement-repair-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .bank-statement-repair-status,
  .bank-statement-repair-amount,
  .bank-statement-repair-actions {
    justify-self: start;
    text-align: left;
  }

  .payment-action {
    padding: 0;
  }

  .payment-action span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (max-width: 820px) {
  .payments-lines-card {
    --payment-cols: 64px minmax(86px, .9fr) minmax(86px, .9fr) 82px minmax(210px, .72fr);
    --payment-gap: 4px;
    --payment-card-pad: 8px;
    --payment-row-pad-x: 5px;
    --payment-row-min-h: 50px;
    --payment-header-min-h: 34px;
    --payment-cell-font: 11px;
    --payment-action-gap: 2px;
    --payment-action-height: 28px;
    --payment-action-radius: 10px;
    --payment-action-font: 10.5px;
    --payment-text-action-basis: 26px;
    --payment-partial-basis: 26px;
    --payment-tomorrow-basis: 26px;
    --payment-icon-action-size: 26px;
  }

  .payments-lines-head {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
  }

  .payment-line-header {
    letter-spacing: .07em;
  }
}

@media (max-width: 760px) {
  .payment-line-header span:not(:first-child) {
    display: block;
  }

  .payment-actions {
    justify-content: center;
    flex-wrap: nowrap;
  }

  .payment-action {
    flex: 0 1 var(--payment-text-action-basis);
  }

  .payment-invoice-details,
  .payment-vat-grid {
    grid-template-columns: 1fr;
  }

  .payment-invoice-details dt,
  .payment-vat-grid dt {
    overflow-wrap: anywhere;
    line-height: 1.15;
  }

  .payment-invoice-details dd,
  .payment-vat-grid dd {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-invoice-preview pre {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 820px) {
  .payment-bulk-action {
    flex: 1 1 150px;
    padding: 0 10px;
  }

  .payment-approval-basket {
    flex-wrap: wrap;
    min-width: 0;
  }

  .payment-approval-basket span,
  .payment-approval-basket b {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-registry-alert .payment-bulk-action {
    flex: 0 1 auto;
    width: 100%;
  }

  .payment-calendar-head h2 {
    font-size: 24px;
  }

  .payments-lines-card {
    --payment-cols: 58px minmax(76px, .85fr) minmax(76px, .85fr) 76px minmax(198px, .7fr);
    --payment-gap: 3px;
    --payment-card-pad: 6px;
    --payment-row-pad-x: 4px;
    --payment-cell-font: 10.5px;
    --payment-icon-action-size: 24px;
    --payment-text-action-basis: 24px;
    --payment-partial-basis: 24px;
    --payment-tomorrow-basis: 24px;
    --payment-confirmation-basis: 24px;
  }

  .payment-action svg,
  .payment-icon-action svg {
    width: 15px;
    height: 15px;
  }
}

.object-desktop-table {
  display: grid;
  gap: 10px;
}

.object-mobile-groups,
.payments-mobile-list {
  display: none;
}

@media (max-width: 820px) {
  button,
  a {
    touch-action: manipulation;
  }

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

  body.auth-unlocked .app-shell {
    display: block !important;
  }

  body.auth-unlocked .sidebar {
    display: none !important;
  }

  body.auth-unlocked .mobile-nav {
    display: grid !important;
  }

  .workspace {
    width: 100%;
    max-width: 100vw;
    padding: 10px 10px 132px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    padding-right: calc(10px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(132px + env(safe-area-inset-bottom, 0px));
    padding-left: calc(10px + env(safe-area-inset-left, 0px));
    overflow-x: hidden;
  }

  .view,
  .payments-lines-page,
  .data-dashboard-grid,
  .objects-wide-panel,
  .object-table-wrap,
  .object-list,
  .payments-lines-card {
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  .topbar {
    top: 8px;
    top: calc(8px + env(safe-area-inset-top, 0px));
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px;
    border-radius: 22px;
  }

  .search {
    width: 100%;
    min-height: 48px;
    border-radius: 16px;
  }

  .search input {
    font-size: 16px;
  }

  .search kbd {
    display: none;
  }

  .topbar-actions {
    max-width: 100%;
    justify-content: flex-start;
    gap: 7px;
    overflow: visible;
  }

  .topbar-actions::-webkit-scrollbar {
    display: none;
  }

  .topbar-actions .directory-map-button {
    min-width: 0;
    max-width: min(220px, 72vw);
    line-height: 1.15;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .section-title {
    min-width: 0;
    flex-wrap: wrap;
  }

  .section-title > div,
  .section-title h2,
  .section-title p {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .eyebrow {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .eyebrow::before {
    flex: 0 0 6px;
  }

  .status,
  .type-pill {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .directory-map-button,
  .date-pill,
  .profile {
    min-height: 44px;
    flex: 0 0 auto;
    border-radius: 15px;
  }

  .date-pill {
    max-width: min(160px, 52vw);
    min-width: 0;
  }

  .date-pill span,
  .date-pill strong {
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .profile small {
    display: none;
  }

  body.admin-preview-active .profile small {
    display: inline;
    max-width: min(190px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-menu {
    right: auto;
    left: 0;
    width: min(360px, calc(100vw - 44px));
  }

  .mobile-nav {
    right: 10px;
    right: calc(10px + env(safe-area-inset-right, 0px));
    bottom: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    left: calc(10px + env(safe-area-inset-left, 0px));
    z-index: 45;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 7px;
    border-radius: 22px;
  }

  .mode-toggle {
    display: none;
  }

  .mobile-nav .nav-link {
    min-width: 0;
    max-width: 100%;
    min-height: 48px;
    gap: 7px;
    padding: 7px 8px;
    border-radius: 16px;
  }

  .mobile-nav .nav-link:focus-visible {
    outline: 0;
    border-color: rgba(114, 207, 156, .78);
    box-shadow:
      inset 0 0 0 1px rgba(3, 143, 89,.2),
      inset 0 1px 0 rgba(255,255,255,.82);
  }

  .mobile-nav .nav-link svg {
    flex: 0 0 20px;
  }

  .mobile-nav .nav-link span:last-child {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: 11px;
    font-weight: 860;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .mode-toggle {
    bottom: 84px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }

  .data-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 8px;
    align-items: stretch;
    margin-bottom: 14px;
    padding: 9px;
    overflow: visible;
    border-radius: 22px;
  }

  .filter-control {
    min-width: 0;
  }

  .filter-control span {
    font-size: 8.5px;
    letter-spacing: .09em;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .filter-control select,
  .summary-pdf-button,
  .reset-filters {
    min-height: 44px;
    border-radius: 15px;
    font-size: 12px;
  }

  .filter-control select {
    font-size: 16px;
  }

  .filter-control select:focus-visible {
    border-color: rgba(114, 207, 156, .78);
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
  }

  .edit-field input,
  .edit-field select,
  .edit-field textarea {
    font-size: 16px;
  }

  .summary-pdf-button,
  .reset-filters {
    min-width: 0;
    padding: 0 12px;
  }

  .summary-pdf-button:focus-visible,
  .reset-filters:focus-visible {
    outline: 0;
    border-color: rgba(114, 207, 156, .78);
    box-shadow: 0 0 0 4px rgba(7, 155, 97, .1), inset 0 1px 0 rgba(255,255,255,.92);
  }

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

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

  .kpi-card {
    min-height: 126px;
  }

  .bar-row {
    grid-template-columns: minmax(0, .9fr) minmax(82px, 1.15fr) minmax(0, auto);
    min-width: 0;
    gap: 8px;
  }

  .bar-row span,
  .bar-row strong {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

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

  .objects-wide-panel .glass-core {
    padding: 14px;
    border-radius: 24px;
  }

  .object-desktop-table,
  .payments-desktop-table {
    display: none;
  }

  .object-mobile-groups,
  .payments-mobile-list {
    display: grid;
    gap: 12px;
  }

  .payments-mobile-list {
    min-width: 0;
  }

  .object-mobile-groups {
    min-width: 0;
  }

  .object-mobile-group {
    display: grid;
    min-width: 0;
    gap: 10px;
    animation: liftIn .55s var(--ease) both;
    animation-delay: calc(var(--i) * 35ms);
  }

  .object-mobile-group-head {
    display: grid;
    width: 100%;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    color: inherit;
    text-align: left;
    border: 1px solid rgba(5, 162, 101, .22);
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(235, 245, 239,.86), rgba(255,255,255,.68)),
      radial-gradient(circle at 6% 20%, rgba(7, 155, 97,.18), transparent 34%);
    box-shadow: 0 16px 36px rgba(2, 101, 62, .08), inset 0 1px 0 rgba(255,255,255,.9);
  }

  .object-mobile-group.is-open .object-mobile-group-head {
    border-color: rgba(3, 125, 77, .32);
    background:
      linear-gradient(135deg, rgba(224, 239, 229,.92), rgba(255,255,255,.74)),
      radial-gradient(circle at 6% 20%, rgba(7, 155, 97,.22), transparent 34%);
  }

  .object-mobile-group-head > span:last-child {
    min-width: 0;
  }

  .object-mobile-group-title {
    min-width: 0;
  }

  .object-mobile-group-head strong {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-group-head small {
    display: block;
    margin-top: 5px;
    overflow: visible;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-group-toggle {
    display: inline-grid;
    grid-template-columns: minmax(0, auto) 24px;
    gap: 7px;
    align-items: center;
    justify-self: end;
    min-width: 0;
    min-height: 34px;
    padding: 5px 6px 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--violet-800), var(--violet-500));
    box-shadow: 0 10px 22px rgba(2, 101, 62, .18);
  }

  .object-mobile-group-toggle b {
    display: block;
    min-width: 0;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .object-mobile-group-toggle i {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255,255,255,.22);
    font-style: normal;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
  }

  .object-mobile-cards {
    display: grid;
    min-width: 0;
    gap: 10px;
  }

  .object-mobile-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 22px;
    color: var(--ink);
    background:
      linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.52)),
      radial-gradient(circle at 0 0, rgba(6, 166, 104, .07), transparent 36%);
    box-shadow: 0 12px 34px rgba(2, 101, 62, .055), inset 0 1px 0 rgba(255,255,255,.82);
    text-align: left;
    animation: liftIn .55s var(--ease) both;
    animation-delay: calc(var(--i) * 20ms);
  }

  .object-mobile-card.needs-fill {
    border-color: rgba(207, 71, 91, .24);
    background:
      linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,250,252,.56)),
      radial-gradient(circle at 0 0, rgba(207, 71, 91, .08), transparent 36%);
  }

  .object-mobile-card.active {
    border-color: rgba(3, 143, 89, .36);
    background:
      linear-gradient(135deg, rgba(255,255,255,.82), rgba(241, 248, 244,.68)),
      radial-gradient(circle at 100% 0, rgba(2, 139, 86,.12), transparent 48%);
  }

  .object-mobile-card:focus-visible {
    outline: 0;
    border-color: rgba(114, 207, 156, .78);
    box-shadow:
      0 12px 34px rgba(2, 101, 62, .055),
      inset 0 0 0 1px rgba(3, 143, 89,.2),
      inset 0 1px 0 rgba(255,255,255,.82);
  }

  .object-mobile-head,
  .object-mobile-route,
  .object-mobile-statuses,
  .object-mobile-money,
  .object-mobile-facts {
    display: grid;
    min-width: 0;
  }

  .object-mobile-head {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(2, 101, 62, .1);
  }

  .object-mobile-head strong {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
    text-overflow: clip;
    white-space: normal;
    -webkit-line-clamp: unset;
  }

  .object-mobile-head > span,
  .payment-mobile-top > span {
    min-width: 0;
  }

  .payment-mobile-top > span {
    overflow-wrap: anywhere;
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
    white-space: normal;
  }

  .object-mobile-card small,
  .payment-mobile-card small {
    display: block;
    min-width: 0;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
    color: rgba(89, 108, 96, .76);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .12em;
    line-height: 1.15;
    text-overflow: clip;
    text-transform: uppercase;
    white-space: normal;
  }

  .object-mobile-route,
  .object-mobile-money,
  .object-mobile-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .object-mobile-route > span,
  .object-mobile-money > span,
  .object-mobile-fact {
    min-width: 0;
    min-height: 54px;
    padding: 10px;
    border-radius: 15px;
    background: rgba(255,255,255,.54);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  .object-mobile-route b,
  .object-mobile-money b,
  .object-mobile-fact b {
    display: block;
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    color: #142019;
    font-size: 12.5px;
    font-weight: 850;
    line-height: 1.22;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
  }

  .object-mobile-statuses .status {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-fact:first-child,
  .object-mobile-fact:last-child {
    grid-column: 1 / -1;
  }

  .object-mobile-money > span.required-missing,
  .object-mobile-fact.required-missing {
    background: rgba(255, 233, 238, .74);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.78);
  }

  .object-mobile-money > span.required-missing b {
    color: #b24351;
  }

  .payments-lines-page {
    gap: 12px;
  }

  .payments-lines-head {
    min-height: 0;
    padding: 18px;
    border-radius: 26px;
  }

  .payments-lines-head h1 {
    margin: 8px 0 7px;
    font-size: 42px;
    line-height: .98;
  }

  .payments-lines-head p {
    font-size: 13px;
  }

  .payment-toolbar {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 0 0 12px;
  }

  .bulk-project-panel {
    grid-template-columns: 1fr;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 20px;
  }

  .bulk-project-panel-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .bulk-project-panel-actions .payment-bulk-action {
    width: 100%;
  }

  .payment-search input,
  .payment-status-filter select {
    height: 44px;
    border-radius: 16px;
    font-size: 16px;
  }

  .payments-lines-card {
    padding: 12px;
    border-radius: 26px;
  }

  .payment-calendar-head {
    gap: 12px;
    padding: 4px 4px 12px;
  }

  .payment-calendar-head h2 {
    margin: 7px 0 5px;
    font-size: 24px;
    line-height: 1.05;
  }

  .payment-calendar-head p {
    font-size: 12px;
  }

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

  body[data-route="payments"] .payment-calendar-actions > .payment-bulk-action:last-child {
    grid-column: 1 / -1;
  }

  .payment-approval-basket {
    flex-wrap: wrap;
    grid-column: 1 / -1;
    justify-content: space-between;
    min-width: 0;
  }

  .payment-approval-basket span,
  .payment-approval-basket b {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-bulk-action {
    min-height: 44px;
    padding: 0 9px;
    border-radius: 15px;
    font-size: 11px;
  }

  .payment-bulk-action span {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    width: 100%;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.72);
    border-radius: 22px;
    background:
      linear-gradient(135deg, rgba(255,255,255,.76), rgba(255,255,255,.54)),
      radial-gradient(circle at 100% 0, rgba(7, 155, 97,.08), transparent 38%);
    box-shadow: 0 12px 34px rgba(2, 101, 62, .055), inset 0 1px 0 rgba(255,255,255,.82);
  }

  .payment-mobile-card.is-approved {
    border-color: rgba(75, 166, 126, .18);
    background:
      linear-gradient(135deg, rgba(240, 255, 248, .78), rgba(255,255,255,.58)),
      radial-gradient(circle at 100% 0, rgba(75, 166, 126, .08), transparent 38%);
  }

  .payment-mobile-card.is-postponed {
    border-color: rgba(178, 111, 24, .18);
    background:
      linear-gradient(135deg, rgba(255, 249, 236, .74), rgba(255,255,255,.58)),
      radial-gradient(circle at 100% 0, rgba(178, 111, 24, .08), transparent 38%);
  }

  .payment-mobile-card.is-blocked {
    border-color: rgba(178, 67, 81, .2);
    background:
      linear-gradient(135deg, rgba(255, 241, 244, .74), rgba(255,255,255,.58)),
      radial-gradient(circle at 100% 0, rgba(178, 67, 81, .08), transparent 38%);
  }

  .payment-mobile-card.is-review {
    border-color: rgba(157, 100, 20, .18);
    background:
      linear-gradient(135deg, rgba(255, 248, 232, .76), rgba(255,255,255,.58)),
      radial-gradient(circle at 100% 0, rgba(157, 100, 20, .08), transparent 38%);
  }

  .payment-mobile-card.is-partial {
    border-color: rgba(178, 111, 24, .2);
    background:
      linear-gradient(135deg, rgba(255, 249, 236, .78), rgba(255,255,255,.58)),
      radial-gradient(circle at 100% 0, rgba(178, 111, 24, .08), transparent 38%);
  }

  .payment-mobile-top {
    display: grid;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
  }

  .payment-mobile-top .bulk-project-checkbox {
    justify-self: start;
    margin-bottom: -4px;
  }

  .payment-mobile-top strong {
    display: block;
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-family: "JetBrains Mono", monospace;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.12;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-top b {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 28px;
    max-width: 100%;
    justify-self: start;
    padding: 0 10px;
    overflow: visible;
    overflow-wrap: anywhere;
    border-radius: 999px;
    color: var(--violet-800);
    background: var(--violet-100);
    font-size: 10px;
    font-weight: 880;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-card.is-approved .payment-mobile-top b {
    color: #176344;
    background: var(--green-soft);
  }

  .payment-mobile-card.is-postponed .payment-mobile-top b {
    color: #8c5a10;
    background: var(--amber-soft);
  }

  .payment-mobile-card.is-blocked .payment-mobile-top b {
    color: #b24351;
    background: rgba(255, 241, 244, .82);
  }

  .payment-mobile-card.is-review .payment-mobile-top b {
    color: #8c5a10;
    background: var(--amber-soft);
  }

  .payment-mobile-card.is-partial .payment-mobile-top b {
    color: #8c5a10;
    background: var(--amber-soft);
  }

  .payment-mobile-card.is-partial .payment-amount-stack strong {
    color: #8c5a10;
  }

  .payment-mobile-top .payment-amount-stack {
    justify-items: start;
  }

  .payment-mobile-top .payment-amount-stack small {
    margin-top: 4px;
    margin-bottom: 0;
    color: rgba(89, 108, 96, .82);
    font-family: Inter, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    line-height: 1.2;
    text-align: left;
    text-transform: none;
  }

  .payment-mobile-main {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(2, 101, 62, .1);
  }

  .payment-mobile-main strong,
  .payment-mobile-main span {
    min-width: 0;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .payment-mobile-main strong {
    color: var(--ink);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.2;
  }

  body[data-route="payments"] .payment-mobile-main strong::before {
    content: "Проект";
    display: block;
    margin-bottom: 3px;
    color: #697c70;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .payment-mobile-main span {
    color: #3d4d43;
    font-size: 13px;
    font-weight: 780;
  }

  body[data-route="payments"] .payment-mobile-main span::before {
    content: "Контрагент";
    display: block;
    margin-bottom: 3px;
    color: #697c70;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .payment-mobile-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 8px;
  }

  .payment-mobile-meta span {
    min-width: 0;
    min-height: 44px;
    padding: 10px;
    overflow: visible;
    overflow-wrap: anywhere;
    border-radius: 14px;
    background: rgba(255,255,255,.54);
    color: var(--muted);
    font-size: 12px;
    font-weight: 820;
    text-overflow: clip;
    white-space: normal;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
  }

  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span::before {
    display: block;
    margin-bottom: 4px;
    color: #697c70;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span:nth-child(1)::before {
    content: "Дата";
  }

  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span:nth-child(2)::before {
    content: "Счет";
  }

  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta .payment-mobile-sent-date::before,
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta .payment-mobile-uploaded-date::before {
    content: "";
    display: none;
  }

  .payment-mobile-meta .payment-mobile-sent-date,
  .payment-mobile-meta .payment-mobile-uploaded-date {
    grid-column: 1 / -1;
  }

  .payment-mobile-decision {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    gap: 8px;
  }

  .payment-mobile-decision .payment-mobile-control:only-child {
    grid-column: 1 / -1;
  }

  .payment-mobile-control,
  .payment-mobile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 15px;
    background: rgba(255,255,255,.68);
    color: var(--violet-950);
    font-size: 12px;
    font-weight: 880;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.74);
  }

  .payment-mobile-control {
    gap: 7px;
    padding: 0 10px;
  }

  .payment-mobile-control span {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-control.approve.selected {
    color: #0d7c62;
    background:
      linear-gradient(135deg, rgba(240, 255, 248, .82), rgba(255,255,255,.7));
  }

  .payment-mobile-control.approve.selected:disabled {
    cursor: default;
    opacity: 1;
  }

  .payment-mobile-control.tomorrow {
    color: #9d6414;
  }

  .payment-mobile-control.partial {
    color: #7b4a08;
    background:
      linear-gradient(135deg, rgba(255, 250, 235, .86), rgba(255,255,255,.72));
  }

  .payment-postpone-slot.mobile {
    width: 100%;
    min-width: 0;
    height: auto;
    grid-column: 1 / -1;
  }

  .payment-postpone-picker.mobile {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .payment-postpone-picker.mobile strong {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }

  .payment-postpone-day {
    height: 40px;
  }

  .payment-postpone-weekdays span,
  .payment-postpone-day {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: clip;
  }

  .payment-postpone-month {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .payment-postpone-month span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
  }

  .payment-postpone-month button {
    width: 44px;
    height: 44px;
  }

  .payment-mobile-control.cancel {
    color: #7a4f10;
  }

  .payment-mobile-control.approve.blocked,
  .payment-mobile-control.approve.blocked:disabled {
    border-color: rgba(178, 67, 81, .24);
    background:
      linear-gradient(135deg, rgba(255, 241, 244, .82), rgba(255,255,255,.7));
    color: #b24351;
  }

  .payment-mobile-control.approve.unlinked,
  .payment-mobile-control.approve.unlinked:disabled {
    border-color: rgba(157, 100, 20, .2);
    background:
      linear-gradient(135deg, rgba(255, 248, 232, .82), rgba(255,255,255,.7));
    color: #9d6414;
  }

  .payment-mobile-icon-row {
    display: grid;
    grid-template-columns: 44px minmax(80px, 1.25fr) 44px 44px 44px;
    min-width: 0;
    gap: 8px;
  }

  .payment-mobile-icon-row.paid-document-mobile-actions {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

  .payment-mobile-icon,
  .payment-confirmation-badge {
    width: 100%;
    height: 44px;
    min-height: 44px;
    border-radius: 15px;
  }

  .payment-mobile-icon-row .payment-action-placeholder {
    height: 44px;
  }

  .payment-mobile-icon-row .paid-doc-placeholder {
    height: 44px;
    min-height: 44px;
    border-radius: 15px;
  }

  .payment-mobile-icon-row .payment-confirmation-badge {
    padding: 0 7px;
  }

  .payment-mobile-icon-row .payment-confirmation-badge span {
    position: static;
    width: auto;
    height: auto;
    overflow: hidden;
    clip: auto;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .payment-mobile-icon {
    padding: 0;
  }

  .payment-mobile-icon.danger {
    color: #b24351;
  }

  .payment-mobile-control:focus-visible,
  .payment-mobile-icon:focus-visible {
    outline: 0;
    border-color: rgba(114, 207, 156, .78);
    box-shadow:
      inset 0 0 0 1px rgba(3, 143, 89,.2),
      inset 0 1px 0 rgba(255,255,255,.82);
  }

  .payment-mobile-control svg,
  .payment-mobile-icon svg {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    stroke-width: 1.8;
  }
}

@media (max-width: 520px) {
  .payments-lines-head {
    align-items: stretch;
    flex-direction: column;
  }

  .payments-lines-head h1 {
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.02;
  }

  .payments-lines-head p {
    overflow-wrap: anywhere;
  }

  .payments-lines-head .eyebrow,
  .payment-calendar-head .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .payment-calendar-head h2 {
    font-size: clamp(21px, 6vw, 24px);
    line-height: 1.08;
  }

  .payment-calendar-head p {
    overflow-wrap: anywhere;
  }

  .payment-search span,
  .payment-status-filter span {
    overflow-wrap: anywhere;
    line-height: 1.15;
  }

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

  .payment-registry-alert .eyebrow,
  .payment-registry-alert strong,
  .payment-registry-alert p {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .payment-approval-basket .payment-bulk-action {
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
    width: 100%;
  }

  .payment-registry-entry h3,
  .payment-registry-entry p,
  .payment-registry-entry .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .payment-registry-entry .eyebrow {
    line-height: 1.15;
  }

  .payment-registry-entry-actions .payment-bulk-action {
    width: 100%;
  }

  .payment-registry-day-head h2,
  .payment-registry-day-summary,
  .payment-registry-day-head .eyebrow {
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .payment-registry-day-head .eyebrow {
    line-height: 1.15;
  }

  .payment-registry-day-stats span {
    flex: 1 1 132px;
    min-width: 0;
  }

  .payment-registry-day-stats b,
  .payment-registry-day-stats small {
    overflow-wrap: anywhere;
    line-height: 1.15;
    white-space: normal;
  }

  .payment-registry-day-toggle-label {
    flex-basis: 100%;
    text-align: center;
  }

  .payment-registry-files {
    width: 100%;
  }

  .payment-registry-file-link,
  .payment-registry-file-note {
    justify-content: center;
    width: 100%;
  }

  .payment-registry-row strong,
  .payment-registry-row small,
  .payment-registry-row em,
  .payment-registry-row-amount,
  .bank-statement-row strong,
  .bank-statement-row small,
  .bank-statement-row-amount,
  .payment-registry-file-link,
  .payment-registry-file-link span,
  .payment-registry-file-note {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .workspace {
    padding-right: calc(8px + env(safe-area-inset-right, 0px));
    padding-left: calc(8px + env(safe-area-inset-left, 0px));
    padding-bottom: calc(152px + env(safe-area-inset-bottom, 0px));
  }

  .search {
    gap: 8px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .directory-map-button,
  .date-pill,
  .profile {
    padding-right: 10px;
    padding-left: 10px;
  }

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

  .mobile-nav .nav-link {
    flex-direction: column;
    min-height: 56px;
    gap: 5px;
    padding: 6px 4px;
    text-align: center;
  }

  .mobile-nav .nav-link span:last-child {
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .mode-toggle {
    bottom: 154px;
    bottom: calc(154px + env(safe-area-inset-bottom, 0px));
  }

  .dashboard-kpis,
  .object-mobile-route,
  .object-mobile-money,
  .object-mobile-facts,
  .payment-mobile-meta {
    grid-template-columns: 1fr;
  }

  .bar-row span,
  .bar-row strong {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .bar-row strong {
    letter-spacing: 0;
  }

  .object-mobile-fact:first-child,
  .object-mobile-fact:last-child {
    grid-column: auto;
  }

  .payment-mobile-meta span {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-top {
    display: grid;
  }

  .payment-mobile-top b {
    max-width: 100%;
    justify-self: start;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-top strong {
    overflow: visible;
    overflow-wrap: anywhere;
    font-size: clamp(21px, 7vw, 26px);
    line-height: 1.12;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-main strong,
  .payment-mobile-main span {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-route b,
  .object-mobile-money b,
  .object-mobile-fact b {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-statuses .status {
    overflow: visible;
    overflow-wrap: anywhere;
    text-align: left;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-head strong {
    display: block;
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    -webkit-line-clamp: unset;
  }

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

  .payment-mobile-decision {
    grid-template-columns: 1fr;
  }

  .payment-calendar-actions .payment-bulk-action {
    min-width: 0;
    padding-right: 6px;
    padding-left: 6px;
    font-size: 11px;
  }

  .payment-calendar-actions .payment-bulk-action span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  body[data-route="payments"] .payments-head-actions .payment-bulk-action,
  body[data-route="payment-ledger"] .payments-head-actions .payment-bulk-action,
  body[data-route="payment-registries"] .payments-head-actions .payment-bulk-action {
    flex-basis: 100%;
    width: 100%;
  }

  .payment-invoice-modal {
    width: min(100%, calc(100vw - 16px));
    width: min(100%, calc(100vw - 16px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 14px;
    border-radius: 22px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .payment-invoice-details div,
  .payment-vat-grid div {
    min-height: 0;
    padding: 11px;
  }

  .payment-invoice-preview {
    min-height: 280px;
    padding: 12px;
  }

  .payment-invoice-preview iframe {
    height: min(52vh, 420px);
    height: min(52dvh, 420px);
  }

  .payment-invoice-preview img {
    max-height: none;
  }

  .payment-approval-basket {
    align-items: stretch;
    flex-wrap: wrap;
    padding: 8px;
  }

  .payment-approval-basket span,
  .payment-approval-basket b {
    flex: 1 1 100%;
    overflow: visible;
    overflow-wrap: anywhere;
    text-align: center;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-approval-basket .payment-bulk-action {
    min-height: 44px;
    width: 100%;
  }

  .payment-bulk-action span {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-postpone-day {
    height: 40px;
  }

  .payment-postpone-month {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
  }

  .payment-postpone-month button {
    width: 44px;
    height: 44px;
  }

  .payment-mobile-control span {
    overflow: visible;
    overflow-wrap: anywhere;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
  }

  .payment-mobile-icon-row {
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  }

  .payment-mobile-icon-row.paid-document-mobile-actions {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
  }

  .payment-mobile-icon-row .confirmation-placeholder {
    display: none;
  }

  .object-mobile-group-head strong,
  .object-mobile-group-head small {
    overflow: visible;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }

  .object-mobile-group-head .section-index {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 13px;
  }
}

@media (min-width: 641px) {
  body[data-route="payment-registries"] .mode-toggle {
    top: 96px;
    bottom: auto;
  }
}

/* Procure Radar MVP */
body[data-route="procurement"] {
  background:
    radial-gradient(circle at 16% 8%, rgba(5, 143, 89, .34), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(0, 204, 255, .22), transparent 25rem),
    linear-gradient(145deg, #050b07 0%, #0e1711 44%, #0b1810 100%);
  color: #f1f8f3;
}

body[data-route="procurement"] .workspace {
  color: #f1f8f3;
}

body[data-route="procurement"] .sidebar {
  border-right-color: rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(8, 17, 11, .82), rgba(6, 15, 9, .72)),
    radial-gradient(circle at 20% 8%, rgba(7, 155, 97, .26), transparent 18rem);
  box-shadow: inset -1px 0 0 rgba(255,255,255,.06);
}

body[data-route="procurement"] .brand strong,
body[data-route="procurement"] .nav-link.active,
body[data-route="procurement"] .sidebar-card strong {
  color: #fff;
}

body[data-route="procurement"] .nav-link {
  color: rgba(223, 238, 229, .72);
}

body[data-route="procurement"] .nav-link:hover,
body[data-route="procurement"] .nav-link.active {
  border-color: rgba(255,255,255,.16);
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), rgba(6, 166, 104, .18)),
    radial-gradient(circle at 12% 50%, rgba(65, 216, 255, .16), transparent 70%);
}

.procurement-page {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: calc(100vh - 46px);
  padding: 2px;
  color: #f1f8f3;
}

.procurement-page::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 16%, black, transparent 74%);
}

.proc-hero,
.proc-gate-card,
.proc-kpi-card,
.proc-task-card,
.proc-panel,
.proc-detail-card,
.proc-command {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background:
    linear-gradient(135deg, rgba(255,255,255,.13), rgba(255,255,255,.05)),
    radial-gradient(circle at 8% 0%, rgba(1, 147, 92, .2), transparent 22rem);
  box-shadow: 0 24px 80px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(26px) saturate(1.35);
}

.proc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  min-height: 230px;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 30px;
}

.proc-hero h1,
.proc-gate-card h1 {
  max-width: 920px;
  margin: 10px 0 12px;
  color: #fff;
  font-size: clamp(34px, 5.2vw, 72px);
  line-height: .92;
  letter-spacing: 0;
}

.proc-hero p,
.proc-gate-card p,
.proc-setting-card p {
  max-width: 820px;
  margin: 0;
  color: rgba(218, 230, 222, .74);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.proc-role-switch,
.proc-tabs,
.proc-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.proc-role-switch button,
.proc-tabs button,
.proc-action-row button,
.proc-action-row a,
.proc-toolbar button,
.proc-gate-card button,
.proc-supplier-row button,
.proc-excel-preview button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  background: rgba(255,255,255,.09);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.proc-role-switch button.active,
.proc-tabs button.active,
.proc-action-row button:hover,
.proc-action-row a:hover {
  border-color: rgba(126, 222, 255, .45);
  background: linear-gradient(135deg, rgba(126, 222, 255, .2), rgba(0, 173, 108, .2));
}

.proc-tabs {
  position: sticky;
  top: 14px;
  z-index: 6;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  background: rgba(6, 13, 9, .66);
  backdrop-filter: blur(22px);
}

.proc-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 10px;
}

.proc-toolbar label,
.proc-toolbar form,
.proc-gate-card form {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
}

.proc-toolbar span {
  flex: 0 0 auto;
  color: rgba(218, 230, 222, .68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.proc-toolbar input,
.proc-gate-card input,
.proc-command input {
  width: 100%;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  color: #fff;
  font: inherit;
  font-weight: 760;
  padding: 0 14px;
}

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

.proc-kpi-card {
  min-height: 128px;
  padding: 18px;
  border-radius: 22px;
}

.proc-kpi-card span,
.proc-task-top span,
.proc-detail-tags span,
.proc-feed-item small,
.proc-supplier-row small {
  color: rgba(218, 230, 222, .64);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.proc-kpi-card strong {
  display: block;
  margin: 14px 0 6px;
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 34px;
}

.proc-kpi-card small {
  color: rgba(126, 222, 255, .82);
  font-weight: 800;
}

.proc-burning h2 {
  margin: 8px 0 12px;
  color: #fff;
  font-size: 24px;
}

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

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

.proc-task-card {
  cursor: pointer;
  min-height: 210px;
  padding: 18px;
  border-radius: 24px;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}

.proc-task-card:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 222, 255, .32);
  box-shadow: 0 28px 90px rgba(0,0,0,.38), 0 0 0 1px rgba(126, 222, 255, .08);
}

.proc-task-card.is-overdue,
.proc-detail-card.is-overdue {
  border-color: rgba(255, 79, 112, .48);
  box-shadow: 0 24px 90px rgba(255, 52, 92, .13), inset 0 1px 0 rgba(255,255,255,.12);
}

.proc-task-top,
.proc-panel-head,
.proc-detail-card {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.proc-task-card h3,
.proc-panel h3,
.proc-detail-card h2 {
  margin: 12px 0 8px;
  color: #fff;
  font-size: 20px;
  line-height: 1.08;
}

.proc-task-card p,
.proc-detail-card p {
  color: rgba(218, 230, 222, .72);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.45;
}

.proc-task-meta,
.proc-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.proc-status,
.proc-sla,
.proc-detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 900;
}

.proc-status.overdue,
.proc-sla-overdue,
.proc-sla-danger {
  border-color: rgba(255, 80, 112, .45);
  background: rgba(255, 80, 112, .14);
  color: #ffd9df;
}

.proc-sla-warning {
  border-color: rgba(255, 198, 92, .45);
  background: rgba(255, 198, 92, .14);
  color: #ffe3a8;
}

.proc-sla-calm,
.proc-sla-done {
  border-color: rgba(126, 222, 255, .35);
  background: rgba(126, 222, 255, .12);
  color: #c5f3ff;
}

.proc-detail-card {
  align-items: flex-start;
  padding: 22px;
  border-radius: 26px;
}

.proc-detail-main {
  min-width: 0;
}

.proc-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
}

.proc-panel {
  padding: 18px;
  border-radius: 24px;
}

.proc-brief dl {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 12px 0 0;
}

.proc-brief dt {
  color: rgba(218, 230, 222, .58);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.proc-brief dd {
  min-width: 0;
  margin: 0;
  color: #fff;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.proc-supplier-panel {
  margin-top: 14px;
}

.proc-supplier-table {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.proc-supplier-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.1fr .75fr .7fr .62fr;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
}

.proc-supplier-row.head {
  background: transparent;
  color: rgba(218, 230, 222, .62);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.proc-supplier-row.fresh {
  border-color: rgba(126, 222, 255, .34);
  background: rgba(126, 222, 255, .08);
}

.proc-supplier-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.proc-supplier-row strong,
.proc-supplier-row b {
  display: block;
  color: #fff;
}

.proc-feed {
  align-self: start;
}

.proc-feed-item {
  display: grid;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.proc-feed-item b {
  color: #c5f3ff;
  font-size: 12px;
}

.proc-feed-item span {
  color: rgba(218, 230, 222, .74);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.proc-excel-preview,
.proc-empty-row {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 222, 255, .22);
  border-radius: 18px;
  background: rgba(126, 222, 255, .08);
  color: rgba(241, 248, 243, .86);
  font-weight: 780;
}

.proc-gate-card {
  width: min(620px, 100%);
  margin: min(14vh, 120px) auto;
  padding: clamp(24px, 5vw, 48px);
  border-radius: 30px;
}

.proc-gate-card form {
  margin-top: 22px;
}

.proc-gate-card small {
  display: block;
  min-height: 20px;
  margin-top: 10px;
  color: #ffd9df;
  font-weight: 800;
}

.proc-command-backdrop {
  position: fixed;
  z-index: 70;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: 12vh 16px 16px;
  background: rgba(3, 6, 4, .72);
  backdrop-filter: blur(18px);
}

.proc-command {
  width: min(760px, 100%);
  padding: 14px;
  border-radius: 24px;
}

.proc-command input {
  height: 56px;
  font-size: 18px;
}

.proc-command-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.proc-command-results button {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  background: rgba(255,255,255,.06);
  color: #fff;
  text-align: left;
}

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

@media (max-width: 1180px) {
  .proc-kpi-grid,
  .proc-card-grid,
  .proc-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 760px) {
  .procurement-page {
    gap: 12px;
  }

  .proc-hero,
  .proc-detail-card,
  .proc-panel-head,
  .proc-toolbar,
  .proc-gate-card form {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .proc-hero {
    min-height: 0;
    padding: 22px;
    border-radius: 24px;
  }

  .proc-hero h1,
  .proc-gate-card h1 {
    font-size: clamp(32px, 11vw, 48px);
  }

  .proc-kpi-grid,
  .proc-card-grid,
  .proc-task-list,
  .proc-settings-grid {
    grid-template-columns: 1fr;
  }

  .proc-tabs {
    position: relative;
    top: auto;
  }

  .proc-tabs button,
  .proc-role-switch button,
  .proc-action-row button,
  .proc-action-row a,
  .proc-toolbar button {
    flex: 1 1 140px;
  }

  .proc-brief dl,
  .proc-supplier-row,
  .proc-supplier-row.head {
    grid-template-columns: 1fr;
  }

  .proc-supplier-row.head {
    display: none;
  }

  .proc-task-card {
    min-height: 0;
  }
}

/* Procure Radar: align with the main site visual language */
body[data-route="procurement"] {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 7%, rgba(9, 157, 99, 0.18), transparent 33rem),
    radial-gradient(circle at 90% 12%, rgba(5, 160, 100, 0.13), transparent 31rem),
    linear-gradient(145deg, #fffefa 0%, #f9f7ff 50%, #f7f9ff 100%);
}

body[data-route="procurement"] .workspace,
.procurement-page {
  color: var(--ink);
}

body[data-route="procurement"] .sidebar {
  border-right-color: rgba(255, 255, 255, 0.54);
  background: linear-gradient(160deg, rgba(255, 255, 255, .64), rgba(255, 255, 255, .28));
  box-shadow: inset -1px 0 0 rgba(2, 90, 54, 0.07);
}

body[data-route="procurement"] .brand strong,
body[data-route="procurement"] .sidebar-card strong {
  color: var(--ink);
}

body[data-route="procurement"] .nav-link {
  color: #506056;
}

body[data-route="procurement"] .nav-link:hover,
body[data-route="procurement"] .nav-link.active {
  color: var(--violet-950);
  border-color: rgba(255, 255, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(234, 244, 238, .7)),
    radial-gradient(circle at 12% 50%, rgba(6, 144, 90, .2), transparent 70%);
  box-shadow: 0 16px 42px rgba(4, 101, 62, 0.13), inset 0 1px 0 rgba(255,255,255,.86);
}

.procurement-page {
  gap: 14px;
  padding: 0;
}

.procurement-page::before,
.proc-tabs {
  display: none;
  content: none;
}

.proc-hero,
.proc-gate-card,
.proc-kpi-card,
.proc-task-card,
.proc-panel,
.proc-detail-card,
.proc-command {
  border: 1px solid rgba(255,255,255,.78);
  background:
    linear-gradient(145deg, rgba(255,255,255,.78), rgba(244, 249, 246,.56)),
    radial-gradient(circle at 14% 0%, rgba(7, 155, 97, .14), transparent 22rem);
  box-shadow: var(--shadow-tight), inset 0 1px 0 rgba(255,255,255,.82);
}

.proc-hero {
  min-height: 0;
  padding: clamp(18px, 3vw, 30px);
  border-radius: var(--radius-lg);
}

.proc-hero h1,
.proc-gate-card h1 {
  color: var(--ink);
  font-size: clamp(28px, 3.8vw, 48px);
  line-height: 1.02;
}

.proc-hero p,
.proc-gate-card p,
.proc-setting-card p,
.proc-task-card p,
.proc-detail-card p,
.proc-feed-item span {
  color: var(--muted);
}

.proc-role-switch button,
.proc-action-row button,
.proc-action-row a,
.proc-toolbar button,
.proc-gate-card button,
.proc-supplier-row button,
.proc-excel-preview button {
  min-height: 38px;
  border-color: rgba(255,255,255,.76);
  background: rgba(255,255,255,.58);
  color: var(--violet-950);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
}

.proc-role-switch button.active,
.proc-action-row button:hover,
.proc-action-row a:hover {
  border-color: rgba(7, 138, 86, .26);
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(233, 243, 236,.76)),
    radial-gradient(circle at 18% 50%, rgba(7, 155, 97, .2), transparent 70%);
}

.proc-toolbar {
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
}

.proc-toolbar label,
.proc-toolbar form,
.proc-gate-card form {
  border-color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.58);
}

.proc-toolbar span,
.proc-kpi-card span,
.proc-task-top span,
.proc-detail-tags span,
.proc-feed-item small,
.proc-supplier-row small {
  color: var(--soft);
}

.proc-toolbar input,
.proc-gate-card input,
.proc-command input {
  height: 40px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
}

.proc-kpi-grid {
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 10px;
}

.proc-kpi-card {
  min-height: 82px;
  padding: 12px 14px;
  border-radius: 18px;
}

.proc-kpi-card strong {
  margin: 6px 0 2px;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.04em;
}

.proc-kpi-card small {
  color: var(--violet-600);
  font-size: 12px;
}

.proc-burning h2,
.proc-task-card h3,
.proc-detail-card h2,
.proc-panel h3,
.proc-feed-item b,
.proc-supplier-row strong,
.proc-supplier-row b,
.proc-command-results strong {
  color: var(--ink);
}

.proc-task-card,
.proc-detail-card {
  border-radius: var(--radius-lg);
}

.proc-status,
.proc-sla,
.proc-detail-tags span,
.proc-task-meta span {
  border-color: rgba(7, 138, 86, .16);
  background: rgba(255,255,255,.58);
  color: var(--violet-950);
}

.proc-sla-warning,
.proc-sla-danger {
  color: #8a5a00;
  background: var(--amber-soft);
}

.proc-sla-overdue,
.proc-status.overdue {
  color: #9f2738;
  background: var(--red-soft);
}

.proc-sla-done {
  color: #18754c;
  background: var(--green-soft);
}

.proc-supplier-row,
.proc-excel-preview,
.proc-empty-row,
.proc-command-results button {
  border-color: rgba(255,255,255,.72);
  background: rgba(255,255,255,.52);
  color: var(--ink);
}

.proc-supplier-row.fresh {
  background: rgba(234, 248, 240, .78);
}

.proc-sheet-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.proc-sheet-state .danger {
  color: #9f2738;
}

.proc-supplier-row {
  grid-template-columns: minmax(220px, 1.35fr) minmax(150px, .8fr) minmax(110px, .55fr) minmax(220px, 1.3fr);
}

.proc-supplier-row a {
  color: inherit;
  text-decoration: none;
}

.proc-supplier-row a:hover {
  color: var(--violet-800);
}

.proc-command-backdrop {
  background: rgba(15, 24, 19, .22);
}

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

/* Procure Radar: task registry list */
.proc-task-list-panel {
  overflow: hidden;
  padding: 0;
}

.proc-task-list-panel .proc-panel-head {
  align-items: center;
  padding: 18px 20px;
}

.proc-task-list-panel .proc-panel-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  line-height: 1.45;
}

.proc-task-table {
  display: grid;
}

.proc-task-row {
  display: grid;
  grid-template-columns: 64px minmax(260px, 1.8fr) minmax(130px, .72fr) minmax(116px, .62fr) minmax(148px, .74fr) minmax(104px, .55fr) minmax(86px, .45fr) 84px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 68px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

button.proc-task-row {
  cursor: pointer;
  transition: background .28s var(--ease), box-shadow .28s var(--ease), transform .28s var(--ease);
}

button.proc-task-row:hover,
button.proc-task-row.is-selected {
  background:
    linear-gradient(135deg, rgba(255,255,255,.7), rgba(233, 243, 236,.56)),
    radial-gradient(circle at 2% 50%, rgba(7, 155, 97,.13), transparent 50%);
  box-shadow: inset 3px 0 0 rgba(7, 155, 97,.34);
}

.proc-task-row.is-overdue {
  box-shadow: inset 3px 0 0 rgba(218,91,107,.62);
}

button.proc-task-row.is-overdue:hover,
button.proc-task-row.is-overdue.is-selected {
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,240,242,.58)),
    radial-gradient(circle at 2% 50%, rgba(218,91,107,.13), transparent 50%);
  box-shadow: inset 3px 0 0 rgba(218,91,107,.72);
}

.proc-task-row-head {
  min-height: 42px;
  background: rgba(255,255,255,.44);
  color: var(--soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.proc-row-id {
  color: var(--soft);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 800;
}

.proc-row-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.proc-row-title strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proc-row-title small,
.proc-row-meta,
.proc-row-count,
.proc-row-priority {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.proc-row-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid rgba(7, 138, 86,.16);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  color: var(--violet-950);
  font-size: 12px;
  font-weight: 900;
}

@media (max-width: 1180px) {
  .proc-task-row {
    grid-template-columns: 56px minmax(220px, 1fr) minmax(112px, .5fr) minmax(132px, .58fr) minmax(96px, .42fr) 76px;
  }

  .proc-task-row > span:nth-child(3),
  .proc-task-row > span:nth-child(7) {
    display: none;
  }
}

@media (max-width: 760px) {
  .proc-task-list-panel .proc-panel-head {
    align-items: flex-start;
    padding: 16px;
  }

  .proc-task-row-head {
    display: none;
  }

  .proc-task-row {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px 10px;
    min-height: 0;
    padding: 14px 16px;
  }

  .proc-row-title {
    grid-column: 2;
  }

  .proc-task-row > span:nth-child(n+3) {
    grid-column: 2;
  }

  .proc-row-title strong,
  .proc-row-title small,
  .proc-row-meta,
  .proc-row-count,
  .proc-row-priority {
    white-space: normal;
  }

  .proc-row-open {
    display: none;
  }
}

.invoice-noview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--violet-100);
  color: var(--ink);
  font-size: 13px;
}

.workflow-scope-switch { display: inline-flex; gap: 6px; margin-right: 12px; }
.scope-chip {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 12px; font-weight: 700; cursor: pointer; color: var(--muted);
}
.scope-chip.active { background: var(--violet-100); color: var(--violet-800); border-color: var(--violet-200); }


/* --- Классификация поставщиков: тип «Материалы/Подрядчик» (инлайн) --- */
.supplier-map-row > .supplier-type-cell {
  overflow: visible;
}

.supplier-type-cell {
  display: flex;
  align-items: center;
}

.supplier-type-seg {
  display: inline-flex;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(7, 155, 97, .3);
  background: rgba(255, 255, 255, .55);
}

.supplier-type-opt {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 6px 9px;
  font: inherit;
  font-size: 11px;
  font-weight: 820;
  line-height: 1;
  color: rgba(54, 73, 61, .6);
  white-space: nowrap;
  transition: background .12s ease, color .12s ease;
}

.supplier-type-opt + .supplier-type-opt {
  border-left: 1px solid rgba(7, 155, 97, .18);
}

.supplier-type-opt:hover {
  background: rgba(7, 155, 97, .1);
}

.supplier-type-opt.hint {
  color: rgba(7, 155, 97, .58);
  font-style: italic;
}

.supplier-type-opt.active[data-type="material"] {
  background: linear-gradient(135deg, #079b61, #017f4e);
  color: #fff;
}

.supplier-type-opt.active[data-type="contractor"] {
  background: linear-gradient(135deg, #2fb3a3, #1f9488);
  color: #fff;
}

.supplier-type-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.supplier-type-chip.material { background: rgba(7, 155, 97, .14); color: #017f4e; }
.supplier-type-chip.contractor { background: rgba(47, 179, 163, .16); color: #1f9488; }
.supplier-type-chip.unset { background: rgba(103, 121, 110, .12); color: rgba(54, 73, 61, .58); }

.supplier-type-overview {
  padding: 2px 14px 4px;
}

.supplier-type-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.supplier-type-counters .count-chip {
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  color: rgba(54, 73, 61, .8);
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(7, 155, 97, .16);
}

.supplier-type-counters .count-chip b { font-weight: 900; }
.supplier-type-counters .count-chip.material b { color: #017f4e; }
.supplier-type-counters .count-chip.contractor b { color: #1f9488; }

.supplier-type-counters .count-chip.unset {
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}

.supplier-type-counters .count-chip.unset:hover {
  border-color: rgba(7, 155, 97, .4);
}

.supplier-type-counters .count-chip.unset.active {
  background: linear-gradient(135deg, #079b61, #017f4e);
  color: #fff;
  border-color: transparent;
}

.supplier-type-counters .count-chip.unset.active b { color: #fff; }

.supplier-type-turnover {
  margin: 7px 0 0;
  color: rgba(54, 73, 61, .72);
  font-size: 11px;
  font-weight: 720;
}

.supplier-type-turnover b { font-weight: 860; }

/* ===== Полная карточка оплаты ===== */
.payment-card-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  margin-right: 10px;
  vertical-align: middle;
  border: 1px solid rgba(7, 142, 88, .32);
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(255,255,255,.92), rgba(236, 245, 239,.78));
  color: #057d4e;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  box-shadow: 0 2px 8px rgba(2, 84, 50, .10);
}
.payment-card-open svg { width: 16px; height: 16px; }
.payment-card-open:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 142, 88, .6);
  box-shadow: 0 6px 16px rgba(2, 84, 50, .18);
}
.payment-card-open:active { transform: translateY(0); }
.payment-card-open.registry { width: 28px; height: 28px; margin: 0 8px 4px 0; }
.payment-mobile-top .payment-card-open.mobile { margin-right: 4px; }

.payment-card-modal { width: min(860px, calc(100vw - 48px)); }

.pcard-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(7, 142, 88, .18);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255,255,255,.8), rgba(240, 247, 243,.6));
}
.pcard-amount { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.pcard-partial { font-size: 13px; color: #418761; font-weight: 600; }
.pcard-status {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}
.pcard-status.paid { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.pcard-status.partial { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.pcard-status.progress { background: #f0f7f2; color: #057d4e; border: 1px solid #cbe3d4; }

.pcard-title {
  margin: 20px 0 10px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #669479;
}
.pcard-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .pcard-details { grid-template-columns: 1fr; } }

.pcard-files { display: flex; flex-direction: column; gap: 10px; }
.pcard-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(7, 142, 88, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
.pcard-file-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: none;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e8f3ec;
  color: #057d4e;
}
.pcard-file-icon svg { width: 18px; height: 18px; }
.pcard-file-name { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pcard-file-name b { font-size: 14px; }
.pcard-file-name small { color: #669479; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-file-actions { display: inline-flex; gap: 8px; flex: none; }
.pcard-download-all { margin-top: 12px; }
.pcard-download-all .glass-button { display: inline-flex; align-items: center; gap: 8px; }
.pcard-download-all svg { width: 16px; height: 16px; }

.pcard-proofs { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pcard-proofs th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #669479;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(7, 142, 88, .18);
}
.pcard-proofs td { padding: 9px 10px; border-bottom: 1px solid rgba(7, 142, 88, .1); vertical-align: top; }
.pcard-proofs td small { display: block; color: #669479; }
.pcard-proof-amount { font-weight: 700; white-space: nowrap; }
.pcard-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
  color: #057d4e;
  font-weight: 600;
  text-decoration: none;
}
.pcard-proof-link svg { width: 15px; height: 15px; }
.pcard-proof-link:hover { text-decoration: underline; }
.pcard-proof-nofile { color: #669479; font-size: 12.5px; }
.pcard-empty { color: #669479; font-size: 13.5px; }

/* Карточка оплаты: согласование и история */
.pcard-decision { font-weight: 700; }
.pcard-decision.ok { color: #047857; }
.pcard-decision.no { color: #b91c1c; }
.pcard-approvals td small { display: block; color: #669479; font-weight: 400; }
.pcard-history { list-style: none; margin: 0; padding: 0; }
.pcard-history li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(7, 142, 88, .09);
  font-size: 13.5px;
}
.pcard-history li b { flex: none; font-size: 12.5px; color: #057d4e; font-weight: 700; white-space: nowrap; }
.pcard-history li span { color: #18442d; }

/* ============================================================================
   ПЛАНИРОВЩИК ЗАТРАТ ПО НЕДЕЛЯМ  —  добавить в конец styles.css
   ----------------------------------------------------------------------------
   Оформление намеренно спокойное: белая таблица, тонкие линии, без стекла.
   Шрифты — сайтовые: Manrope для текста, JetBrains Mono для всех сумм.
   Свои токены живут внутри .wplan-page и наружу не текут.
   Все классы с префиксом .wplan- → ничего на сайте не задевает.

   Хотите фирменный фиолетовый вместо синего — поменяйте две строки:
     --w-accent: var(--violet-600);
     --w-accent-soft: var(--violet-100);
   ============================================================================ */

.wplan-page {
  --w-paper: #ffffff;
  --w-ink: #16191d;
  --w-ink-2: #5b636e;
  --w-ink-3: #8b939e;
  --w-line: #e3e6ea;
  --w-line-2: #eef0f3;
  --w-accent: #2f6feb;
  --w-accent-soft: #eaf1fe;
  --w-danger: #c9372c;
  --w-danger-soft: #fdeceb;
  --w-now: #fff8e8;
  --w-now-line: #e6c56a;

  --wplan-col: 146px;                 /* ширина колонки недели */
  --wplan-first: 224px;               /* ширина колонки проекта */
  --wplan-max-h: min(66vh, 780px);    /* дальше таблица прокручивается внутри себя */
  --wplan-cols: var(--wplan-first) repeat(var(--wplan-weeks, 13), var(--wplan-col));

  display: grid;
  max-width: 1880px;
  margin: 0 auto;
  color: var(--w-ink);
  font-family: "Manrope", "SF Pro Display", system-ui, sans-serif;
}

/* ---------- карточка ---------- */
.wplan {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--w-line);
  border-radius: 14px;
  background: var(--w-paper);
  box-shadow: 0 1px 2px rgba(22, 25, 29, .04);
}

/* ---------- панель ---------- */
.wplan-bar {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--w-line);
}
.wplan-range {
  min-width: 0;
  padding: 0 8px;
  color: var(--w-ink-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.wplan-spacer {
  flex: 1;
  min-width: 0;
}

/* ---------- кнопки ---------- */
.wplan-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--w-line);
  border-radius: 7px;
  background: var(--w-paper);
  color: var(--w-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.wplan-btn:hover {
  border-color: #d2d7de;
  background: #f4f6f8;
}
.wplan-btn:focus-visible {
  outline: 0;
  border-color: var(--w-accent);
  box-shadow: 0 0 0 3px var(--w-accent-soft);
}
.wplan-btn-pri {
  border-color: var(--w-accent);
  background: var(--w-accent);
  color: #fff;
}
.wplan-btn-pri:hover {
  border-color: #2a62d2;
  background: #2a62d2;
}
.wplan-btn-del {
  border-color: transparent;
  background: transparent;
  color: var(--w-danger);
}
.wplan-btn-del:hover {
  border-color: transparent;
  background: var(--w-danger-soft);
}
.wplan-nav {
  width: 32px;
  padding: 0;
  color: var(--w-ink-2);
  font-size: 13px;
}

/* ---------- итоги внизу ---------- */
.wplan-stats {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 26px;
  min-width: 0;
  padding: 11px 16px;
  border-top: 1px solid var(--w-line);
  background: #fcfcfd;
}
.wplan-stats > span {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
}
.wplan-stats small {
  color: var(--w-ink-3);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wplan-stats b {
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- прокрутка ---------- */
.wplan-scroll {
  order: 2;
  min-width: 0;
  max-height: var(--wplan-max-h);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #cfd5dc transparent;
}
.wplan-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.wplan-scroll::-webkit-scrollbar-thumb {
  border: 3px solid var(--w-paper);
  border-radius: 20px;
  background: #cfd5dc;
}
.wplan-scroll::-webkit-scrollbar-thumb:hover {
  background: #b5bdc7;
}
.wplan-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.wplan-grid {
  display: grid;
  min-width: max-content;
}

/* ---------- строки ---------- */
.wplan-row {
  display: grid;
  grid-template-columns: var(--wplan-cols);
  align-items: stretch;
  min-width: 0;
}
.wplan-row + .wplan-row {
  border-top: 1px solid var(--w-line-2);
}
.wplan-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--w-paper);
}
.wplan-head {
  border-bottom: 1px solid var(--w-line);
}

/* первая колонка приклеена слева */
.wplan-first {
  position: sticky;
  left: 0;
  z-index: 2;
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
  padding: 9px 12px;
  background: var(--w-paper);
  box-shadow: 1px 0 0 var(--w-line);
}
.wplan-total .wplan-first {
  z-index: 5;
  background: #fbfcfd;
}
.wplan-head .wplan-first {
  z-index: 5;
}
.wplan-first .t {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--w-ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.wplan-first .s {
  min-width: 0;
  color: var(--w-ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.wplan-head .wplan-first .t,
.wplan-total .wplan-first .t {
  color: var(--w-ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}
.wplan-head .wplan-first .s,
.wplan-total .wplan-first .s {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 500;
}

/* ---------- заголовок недели: дата и под ней итог этой недели ----------
   Было две строки шапки («Проект / N в плане» и «Итого за неделю / сумма
   затрат») — владелец 11.08: «не понимаю, переформатируй». Стало одно место:
   неделя и её сумма вместе. ------------------------------------------------ */
.wplan-wk {
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  padding: 8px 10px;
  white-space: nowrap;
}
.wplan-wk-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.wplan-wk-top .d {
  min-width: 0;
  overflow: hidden;
  color: var(--w-ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
}
/* номер недели — плашкой в правом углу ячейки (11.08, владелец) */
.wplan-wk-top b {
  flex: none;
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 5px;
  background: #f0f2f5;
  color: var(--w-ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
}
.wplan-wk-sum {
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.wplan-wk-sum.zero {
  color: #b9bfc7;
  font-weight: 500;
}
.wplan-col-now {
  background: var(--w-now);
}
.wplan-head .wplan-col-now .wplan-wk-top .d {
  color: #7a5f10;
}
.wplan-head .wplan-col-now .wplan-wk-top b {
  background: var(--w-now-line);
  color: #4a3a08;
}

/* ---------- числа ---------- */
.wplan-num {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 46px;
  padding: 0 10px;
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.wplan-num.zero {
  color: var(--w-ink-3);
  font-weight: 500;
}

/* ---------- ячейка недели ---------- */
.wplan-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  min-height: 62px;
  padding: 5px;
  cursor: cell;
}
.wplan-entry {
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--w-line-2);
  border-radius: 6px;
  background: var(--w-paper);
  cursor: grab;
  transition: background .12s, border-color .12s;
}
.wplan-entry:active {
  cursor: grabbing;
}
.wplan-entry:hover {
  border-color: #cfd6de;
  background: #f7f9fb;
}
.wplan-entry .a {
  display: block;
  min-width: 0;
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.wplan-entry .n {
  display: block;
  min-width: 0;
  margin-top: 1px;
  color: var(--w-ink-2);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.wplan-entry.dragging {
  opacity: .35;
}
.wplan-cell.drop {
  border-radius: 8px;
  outline: 2px dashed var(--w-accent);
  outline-offset: -3px;
  background: var(--w-accent-soft);
}
.wplan-add {
  min-height: 22px;
  padding: 2px;
  border: 1px dashed transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--w-ink-3);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .1s;
}
.wplan-cell:hover .wplan-add {
  border-color: #d8dde3;
  opacity: 1;
}
.wplan-add:hover {
  border-color: var(--w-accent);
  background: var(--w-accent-soft);
  color: var(--w-accent);
}

/* ---------- ввод суммы ---------- */
.wplan-ed {
  position: relative;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: 216px;
  max-width: calc(100vw - 48px);
  padding: 7px;
  border: 1px solid var(--w-accent);
  border-radius: 8px;
  background: var(--w-paper);
  box-shadow: 0 6px 22px rgba(22, 25, 29, .12);
}
.wplan-ed input {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--w-line);
  border-radius: 5px;
  outline: 0;
  background: var(--w-paper);
  color: var(--w-ink);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
}
.wplan-ed input:focus {
  border-color: var(--w-accent);
  box-shadow: 0 0 0 3px var(--w-accent-soft);
}
.wplan-ed input.amt {
  font-family: "JetBrains Mono", monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-align: right;
}
.wplan-ed-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin-top: 1px;
}
.wplan-ed-row .wplan-btn {
  flex: none;
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}
.wplan-move {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  gap: 5px;
  align-items: center;
}
.wplan-move .wplan-btn {
  min-height: 26px;
  padding: 0;
  color: var(--w-ink-2);
}
.wplan-move span {
  color: var(--w-ink-3);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}
.wplan-hint {
  color: var(--w-ink-3);
  font-size: 10px;
  font-weight: 500;
  text-align: center;
}

/* ---------- добавить проект ---------- */
.wplan-addrow .wplan-first {
  padding: 7px;
  overflow: visible;
}
.wplan-addproj {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px dashed transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--w-accent);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.wplan-addproj:hover {
  border-color: var(--w-accent);
  background: var(--w-accent-soft);
}
.wplan-picker {
  position: relative;
  z-index: 12;
  display: grid;
  gap: 6px;
  width: 300px;
  padding: 8px;
  border: 1px solid var(--w-accent);
  border-radius: 8px;
  background: var(--w-paper);
  box-shadow: 0 6px 22px rgba(22, 25, 29, .12);
}
.wplan-picker input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--w-line);
  border-radius: 6px;
  outline: 0;
  background: var(--w-paper);
  color: var(--w-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
}
.wplan-picker input:focus {
  border-color: var(--w-accent);
  box-shadow: 0 0 0 3px var(--w-accent-soft);
}
.wplan-plist {
  display: grid;
  gap: 1px;
  max-height: 264px;
  overflow-y: auto;
}
.wplan-pitem {
  min-width: 0;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--w-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
  text-align: left;
}
.wplan-pitem:hover,
.wplan-pitem:focus-visible {
  outline: 0;
  background: var(--w-accent-soft);
  color: var(--w-accent);
}
.wplan-pempty {
  padding: 8px;
  color: var(--w-ink-3);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

/* ---------- удаление проекта ---------- */
.wplan-prow .wplan-first {
  position: sticky;
}
.wplan-x {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--w-ink-3);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s;
}
.wplan-prow:hover .wplan-x {
  opacity: 1;
}
.wplan-x:hover {
  background: var(--w-danger-soft);
  color: var(--w-danger);
}
.wplan-x.confirm {
  width: auto;
  padding: 0 7px;
  background: var(--w-danger);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  opacity: 1;
}

@media (max-width: 980px) {
  .wplan-page {
    --wplan-first: 176px;
    --wplan-col: 130px;
    --wplan-max-h: min(70vh, 620px);
  }
  .wplan-range {
    order: 3;
    width: 100%;
    padding: 2px 0 0;
    text-align: center;
  }
}

/* ============================================================================
   ТЕЛЕФОН — режим одной недели (JS переключает разметку ниже 820 px).
   Таблица на 13 недель шириной 2000 px на телефоне не читается: вместо неё
   лента недель с суммами сверху и список проектов под ней.
   ============================================================================ */

/* строка состояния сохранения — видно всегда, «молча не сохранилось» запрещено */
.wplan-save {
  margin: 0 0 10px;
  color: var(--w-ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: -0.02em;
  min-height: 16px;
}
.wplan-save.ok { color: #2f8f5b; }
.wplan-save.wait { color: #a8791f; }
.wplan-save.bad { color: var(--w-danger); font-weight: 700; }

/* карточка — flex-колонка с порядком: панель, лента, итог, список, низ.
   Без явного order блоки встают перед панелью (у неё order: 1). */
.wplan-mbar { order: 1; gap: 8px; padding: 10px; }
.wplan-mstrip { order: 2; }
.wplan-msum { order: 3; }
.wplan-mlist { order: 4; }
.wplan-mstats { order: 5; }
.wplan-mweek {
  display: flex;
  flex: 1;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.wplan-mweek b {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--w-accent-soft);
  color: var(--w-accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
}
.wplan-mweek span {
  overflow: hidden;
  color: var(--w-ink);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* лента недель: прокручивается пальцем, выбранная подсвечена */
.wplan-mstrip {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--w-line);
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.wplan-mstrip::-webkit-scrollbar { height: 0; }
.wplan-mchip {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 104px;
  padding: 8px 10px;
  border: 1px solid var(--w-line);
  border-radius: 10px;
  background: var(--w-paper);
  text-align: left;
  scroll-snap-align: center;
}
.wplan-mchip b {
  color: var(--w-ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 600;
}
.wplan-mchip span {
  color: var(--w-ink-2);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.wplan-mchip i {
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.wplan-mchip i.zero { color: var(--w-ink-3); font-weight: 500; }
.wplan-mchip.now { background: var(--w-now); border-color: var(--w-now-line); }
.wplan-mchip.on {
  border-color: var(--w-accent);
  background: var(--w-accent-soft);
  box-shadow: 0 0 0 1px var(--w-accent);
}
.wplan-mchip.on b, .wplan-mchip.on span { color: var(--w-accent); }

.wplan-msum {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--w-line);
  background: #fafbfc;
}
.wplan-msum small {
  color: var(--w-ink-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.wplan-msum b {
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.wplan-mlist { display: flex; flex-direction: column; }
.wplan-mproj { border-bottom: 1px solid var(--w-line-2); }
.wplan-mhead {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px 4px;
}
.wplan-mhead .t {
  flex: 1;
  min-width: 0;
  color: var(--w-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}
.wplan-mhead .v {
  color: var(--w-ink);
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.wplan-mhead .v.zero { color: var(--w-ink-3); font-weight: 500; }
.wplan-mhead .wplan-x { position: static; opacity: .5; }

/* ячейка на телефоне — обычный блок, палец попадает без прицеливания */
.wplan-mproj .wplan-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 0 14px 12px;
  border: 0;
}
.wplan-mproj .wplan-entry {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--w-line);
  border-radius: 10px;
}
.wplan-mproj .wplan-entry .a { font-size: 15px; }
.wplan-mproj .wplan-entry .n { flex: 1; text-align: right; }
.wplan-mproj .wplan-add {
  position: static;
  width: 100%;
  min-height: 40px;
  opacity: 1;
}
.wplan-mproj .wplan-ed { position: static; width: 100%; box-shadow: none; }
.wplan-mproj .wplan-ed .amt { font-size: 16px; }   /* 16px — iOS иначе зумит страницу */
.wplan-mproj .wplan-ed .note { font-size: 16px; }

.wplan-maddrow { padding: 12px 14px 14px; border-bottom: 0; }
.wplan-maddrow .wplan-picker { position: static; width: 100%; box-shadow: none; }
.wplan-maddrow .wplan-picker input { font-size: 16px; }
.wplan-maddrow .wplan-addproj { width: 100%; min-height: 44px; }

.wplan-mempty {
  padding: 22px 14px;
  color: var(--w-ink-3);
  font-size: 13px;
  text-align: center;
}

.wplan-mstats {
  display: flex;
  gap: 18px;
  padding: 12px 14px;
  border-top: 1px solid var(--w-line);
}

@media (max-width: 820px) {
  .wplan-page {
    --wplan-max-h: none;
    /* нижнее меню сайта висит поверх экрана — отступаем, чтобы последняя
       строка и «+ Проект» не прятались под ним */
    padding-bottom: 104px;
  }
  .wplan { border-radius: 12px; }
}

/* ============================================================================
   СВЁРНУТЫЙ ВИД И ПЕЧАТЬ (11.08, владелец: «чтобы не было перегруза»)
   ============================================================================ */

/* нажатая кнопка-переключатель */
.wplan-btn-on {
  border-color: var(--w-accent);
  background: var(--w-accent-soft);
  color: var(--w-accent);
}

/* ячейка, свёрнутая в одну сумму: без описаний, счётчик записей справа */
.wplan-entry-sum {
  display: flex;
  align-items: baseline;
  gap: 8px;
  cursor: pointer;
}
.wplan-entry-sum .c {
  margin-left: auto;
  padding: 0 5px;
  border-radius: 4px;
  background: #f0f2f5;
  color: var(--w-ink-3);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}
.wplan-mtoggle {
  width: 36px;
  padding: 0;
  font-size: 15px;
}

/* шапка листа — видна только в распечатке */
.wplan-print-head { display: none; }

@media print {
/* Всё оформление сайта с листа убираем. Селекторы через body.auth-unlocked:
     у сайта там !important, иначе меню осталось бы на распечатке. */
  body[data-route="cost-planner"].auth-unlocked .sidebar,
  body[data-route="cost-planner"] .sidebar,
  body[data-route="cost-planner"].auth-unlocked .mobile-nav,
  body[data-route="cost-planner"] .mobile-nav,
  body[data-route="cost-planner"] .ambient,
  body[data-route="cost-planner"] .topbar,
  body[data-route="cost-planner"] .overlay-root,
  body[data-route="cost-planner"] .wplan-bar,
  body[data-route="cost-planner"] .wplan-save,
  body[data-route="cost-planner"] .payments-lines-head,
  body[data-route="cost-planner"] .wplan-add,
  body[data-route="cost-planner"] .wplan-x,
  body[data-route="cost-planner"] .wplan-addrow,
  body[data-route="cost-planner"] .wplan-ed,
  body[data-route="cost-planner"] .wplan-picker { display: none !important; }

  body[data-route="cost-planner"] { background: #fff !important; }
  body[data-route="cost-planner"].auth-unlocked .app-shell,
  body[data-route="cost-planner"] .app-shell { display: block !important; }
  body[data-route="cost-planner"].auth-unlocked .workspace,
  body[data-route="cost-planner"] .workspace { padding: 0 !important; }
  body[data-route="cost-planner"] .view { max-width: none !important; padding: 0 !important; }

  body[data-route="cost-planner"] .wplan-print-head {
    display: block;
    margin: 0 0 8px;
    color: #16191d;
    font-family: "Manrope", system-ui, sans-serif;
  }
  body[data-route="cost-planner"] .wplan-print-head h2 { margin: 0 0 3px; font-size: 16px; font-weight: 800; }
  body[data-route="cost-planner"] .wplan-print-head p { margin: 0; font-size: 10.5px; line-height: 1.5; }
  body[data-route="cost-planner"] .wplan-print-when { color: #6b7280; }

  /* колонки уже: 13 недель должны влезть в альбомный лист */
  body[data-route="cost-planner"] .wplan-page {
    --wplan-col: 68px;
    --wplan-first: 128px;
    --wplan-max-h: none;
    display: block !important;
    margin: 0 auto 0 0 !important;   /* по ширине таблицы, прижата к левому полю */
    max-width: none;
  }
  body[data-route="cost-planner"] .wplan { border: 1px solid #c9ced6; border-radius: 0; box-shadow: none; }
  body[data-route="cost-planner"] .wplan-scroll { max-height: none !important; overflow: visible !important; }
  body[data-route="cost-planner"] .wplan-grid { min-width: 0; }

  body[data-route="cost-planner"] .wplan-row { break-inside: avoid; page-break-inside: avoid; }
  body[data-route="cost-planner"] .wplan-head { position: static; border-bottom: 1px solid #9aa1ab; }
  body[data-route="cost-planner"] .wplan-first { position: static; box-shadow: none; border-right: 1px solid #c9ced6; padding: 5px 7px; }
  body[data-route="cost-planner"] .wplan-first .t { font-size: 9.5px; }
  body[data-route="cost-planner"] .wplan-first .s { font-size: 8px; }

  /* на листе колонка узкая: номер недели ставим ПЕРЕД датой и без плашки,
     иначе дата обрезается многоточием */
  body[data-route="cost-planner"] .wplan-wk { min-height: 0; padding: 4px 5px; }
  /* номер недели отдельной строкой сверху — иначе длинные даты
     («31 авг–6 сен») не влезают в узкую печатную колонку */
  body[data-route="cost-planner"] .wplan-wk-top {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 0;
  }
  body[data-route="cost-planner"] .wplan-wk-top .d { font-size: 8px; }
  body[data-route="cost-planner"] .wplan-wk-top b {
    order: -1;
    margin-left: 0;
    padding: 0;
    background: none;
    font-size: 7.5px;
  }
  body[data-route="cost-planner"] .wplan-wk-sum { font-size: 9.5px; letter-spacing: -0.05em; }

  body[data-route="cost-planner"] .wplan-cell { min-height: 0; gap: 2px; padding: 3px; }
  body[data-route="cost-planner"] .wplan-entry { padding: 2px 4px; border-color: #d7dbe1; border-radius: 3px; }
  body[data-route="cost-planner"] .wplan-entry .a { font-size: 9px; letter-spacing: -0.05em; }
  body[data-route="cost-planner"] .wplan-entry .n { font-size: 7.5px; }
  body[data-route="cost-planner"] .wplan-entry-sum .c { display: none; }

  body[data-route="cost-planner"] .wplan-col-now { background: #fdf3dc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body[data-route="cost-planner"] .wplan-stats { padding: 6px 8px; border-top: 1px solid #9aa1ab; background: #fff; }
  body[data-route="cost-planner"] .wplan-stats small { font-size: 8px; }
  body[data-route="cost-planner"] .wplan-stats b { font-size: 10px; }

  /* на телефоне печатаем то же, что видно: неделя списком */
  body[data-route="cost-planner"] .wplan-mstrip { display: none !important; }
}

/* Реестры, платёжный календарь, оплаты и выписка до бота — во всю ширину
   рабочей области, вровень с верхней панелью поиска (12.08, владелец).
   Карточки проектов используют ту же обёртку, но их ширину не трогаем. */
body[data-route="payment-registries"] .payments-lines-page,
body[data-route="payments"] .payments-lines-page,
body[data-route="payment-ledger"] .payments-lines-page,
body[data-route="bank-prebot"] .payments-lines-page {
  width: min(100%, 1880px);
}


/* Узкие экраны: место отдаём главным кнопкам и датам. «Перенести» и метка
   подтверждения остаются значками — полный текст в подсказке при наведении. */
@media (max-width: 1500px) {
  .payments-desktop-table .payment-action.tomorrow span,
  .payments-desktop-table .payment-confirmation-badge span,
  .payments-desktop-table .payment-confirmation-badge small { display: none; }
  .payments-desktop-table .payment-action.tomorrow,
  .payments-desktop-table .payment-confirmation-badge { padding: 0; justify-content: center; }
}

/* Фильтр периода в шапке платёжного календаря (12.08) */
.payment-period-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  white-space: nowrap;
}
.payment-period-filter select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  outline: none;
}

/* сколько по счёту реально ушло — мелкой строкой в истории поставщика (16.08) */
.supplier-detail-paid {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

/* ===== Проработка КП (20.08.2026): минимализм как у планировщика ===== */
/* Экранная раскладка ШТАТНАЯ, как у планировщика (20.08: скрытая боковина
   ломала сетку — «как будто на сотике открылось»). */

.kpw-page { position: relative; }
.kpw-save { min-height: 18px; font-size: 12.5px; color: var(--muted); margin: -6px 0 10px; }
.kpw-save.ok { color: #1e7d32; }
.kpw-save.bad { color: #b3261e; font-weight: 600; }
.kpw-save.wait { color: var(--violet-600); }
.kpw-note { color: var(--muted); font-size: 12.5px; margin-top: 18px; }
.kpw-hidden { display: none !important; }
.kpw-btn { font: inherit; cursor: pointer; border-radius: 10px; border: 1px solid rgba(15, 24, 19,.12); background: #ffffff; color: var(--ink); padding: 7px 14px; }
.kpw-btn:hover { border-color: var(--violet-500); }
.kpw-drop { border: 1.5px dashed rgba(15, 24, 19,.16); border-radius: 16px; background: #ffffff; padding: 32px 20px; text-align: center; color: var(--muted); margin-bottom: 22px; transition: border-color .15s, background .15s; }
.kpw-drop.over { border-color: var(--violet-500); background: var(--violet-100); }
.kpw-drop h3 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }
.kpw-drop .kpw-hint { font-size: 12.5px; margin-top: 8px; }
.kpw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.kpw-card { background: #ffffff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 16px; padding: 16px 18px; cursor: pointer; position: relative; display: flex; flex-direction: column; gap: 10px; }
.kpw-card:hover { border-color: var(--violet-500); }
.kpw-card h3 { margin: 0; font-size: 15px; line-height: 1.3; padding-right: 30px; }
.kpw-meta { font-size: 12.5px; color: var(--muted); }
.kpw-row2 { display: flex; gap: 18px; flex-wrap: wrap; }
.kpw-kv b { display: block; font-size: 15px; font-weight: 600; }
.kpw-kv span { font-size: 11.5px; color: var(--muted); }
.kpw-del { position: absolute; top: 10px; right: 10px; border: none; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 4px 8px; border-radius: 8px; }
.kpw-del:hover { color: #b3261e; background: rgba(179,38,30,.08); }
.kpw-progress { height: 6px; border-radius: 4px; background: var(--violet-100); overflow: hidden; }
.kpw-progress i { display: block; height: 100%; background: var(--violet-600); border-radius: 4px; }
.kpw-backrow { margin-bottom: 10px; }
.kpw-back { color: var(--violet-600); font-weight: 600; cursor: pointer; text-decoration: none; }
.kpw-toolbar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; background: #ffffff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 16px; padding: 14px 18px; }
.kpw-toolbar .grow { flex: 1; min-width: 240px; }
.kpw-toolbar label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 3px; }
.kpw-toolbar input { font: inherit; padding: 7px 10px; border-radius: 10px; border: 1px solid rgba(15, 24, 19,.12); background: #fff; color: var(--ink); }
.kpw-toolbar .grow input { width: 100%; font-weight: 600; font-size: 15px; }
.kpw-toolbar input[type="number"] { width: 92px; text-align: right; }
.kpw-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpw-tile { background: #ffffff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 14px; padding: 12px 14px; }
.kpw-tile.accent { border-color: var(--violet-500); }
.kpw-tile .lab { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.kpw-tile .val { font-size: 18px; font-weight: 650; white-space: nowrap; }
.kpw-tile .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpw-tile .val.good { color: #1e7d32; }
.kpw-tile .val.warn { color: #8a6400; }
.kpw-tile .val.bad { color: #b3261e; }
.kpw-check { font-size: 12.5px; margin: 0 0 14px; color: #1e7d32; }
.kpw-check.bad { color: #8a6400; }
.kpw-filters { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.kpw-filters input[type="search"] { min-width: 260px; font: inherit; padding: 7px 12px; border-radius: 10px; border: 1px solid rgba(15, 24, 19,.12); background: #fff; }
.kpw-chip { border: 1px solid rgba(15, 24, 19,.12); border-radius: 999px; padding: 5px 12px; font-size: 12.5px; background: #ffffff; cursor: pointer; color: var(--muted); }
.kpw-chip.on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.kpw-tblwrap { background: #ffffff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 16px; overflow-x: auto; }
.kpw-items { border-collapse: collapse; width: 100%; min-width: 1080px; }
.kpw-items th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 10px 10px 8px; border-bottom: 1px solid rgba(15, 24, 19,.08); position: sticky; top: 0; background: #ffffff; z-index: 2; }
.kpw-items th.r, .kpw-items td.r { text-align: right; }
.kpw-items td { padding: 9px 10px; border-bottom: 1px solid rgba(15, 24, 19,.06); vertical-align: top; font-variant-numeric: tabular-nums; }
.kpw-items tr:last-child td { border-bottom: none; }
.kpw-items tr.section td { background: var(--violet-100); font-weight: 700; font-size: 13px; color: var(--violet-800); padding: 8px 10px; }
.kpw-items td.name { max-width: 300px; }
.kpw-items td.name .nm { font-weight: 600; }
.kpw-items td.name .desc { font-size: 12px; color: var(--muted); margin-top: 2px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kpw-items td.name .desc.open { display: block; -webkit-line-clamp: unset; }
.kpw-items .mini { font-size: 11.5px; color: var(--muted); }
.kpw-items td.maxbuy b { color: var(--ink); }
.kpw-items td input { font: inherit; border: 1px solid rgba(15, 24, 19,.12); border-radius: 8px; background: #fff; }
.kpw-buy { display: flex; flex-direction: column; gap: 5px; min-width: 170px; }
.kpw-buy .line1 { display: flex; gap: 6px; }
.kpw-buy input[type="number"] { width: 108px; padding: 5px 8px; text-align: right; }
.kpw-items td input.slim { width: 130px; padding: 5px 8px; font-size: 12.5px; }
.kpw-vatswitch { display: inline-flex; border: 1px solid rgba(15, 24, 19,.12); border-radius: 8px; overflow: hidden; }
.kpw-vatswitch button { border: none; padding: 4px 8px; font-size: 11.5px; background: transparent; color: var(--muted); cursor: pointer; }
.kpw-vatswitch button.on { background: var(--violet-600); color: #fff; font-weight: 600; }
.kpw-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.kpw-badge.good { background: rgba(30,125,50,.10); color: #1e7d32; }
.kpw-badge.warn { background: rgba(250,178,25,.16); color: #8a6400; }
.kpw-badge.bad { background: rgba(179,38,30,.10); color: #b3261e; }
.kpw-badge.none { background: rgba(15, 24, 19,.05); color: var(--muted); font-weight: 400; }
.kpw-empty { text-align: center; color: var(--muted); padding: 26px; }

/* КП: деньги не переносятся в три строки (20.08, владелец) + «Закуплено» */
.kpw-items { min-width: 1180px; }
.kpw-items td.r { white-space: nowrap; }
.kpw-items td .mini { white-space: nowrap; }
.kpw-items td.maxbuy { white-space: nowrap; }
.kpw-lockbtn {
  font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid #1e7d32; color: #1e7d32; background: rgba(30,125,50,.06);
  border-radius: 8px; padding: 4px 10px; align-self: flex-start;
}
.kpw-lockbtn:hover { background: rgba(30,125,50,.12); }
.kpw-unlock { font-size: 11.5px; color: var(--muted); cursor: pointer; text-decoration: underline; margin-left: 6px; }
.kpw-unlock:hover { color: #b3261e; }

/* КП: доставка на позицию (20.08) */
.kpw-buy input.ship { width: 100%; padding: 4px 8px; font-size: 12px; color: var(--ink); }
.kpw-buy input.ship::placeholder { color: var(--soft); }

/* КП: галочка «доставка включена» (20.08, решение владельца — вместо поля суммы) */
.kpw-ship { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); cursor: pointer; user-select: none; }
.kpw-ship input { accent-color: var(--violet-600); margin: 0; }
.kpw-ship.warn { color: #8a6400; font-weight: 600; }
.kpw-noship { color: #8a6400; font-weight: 600; }

/* КП: папки + компактная полоска загрузки (20.08) */
.kpw-dropbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1.5px dashed rgba(15, 24, 19,.16); border-radius: 12px; background: #fff;
  padding: 9px 14px; margin-bottom: 12px; color: var(--muted); font-size: 13px;
}
.kpw-dropbar b { color: var(--ink); font-size: 13.5px; }
.kpw-dropbar.over { border-color: var(--violet-500); background: var(--violet-100); }
.kpw-folders { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.kpw-folder-del { margin-left: 7px; color: inherit; opacity: .55; cursor: pointer; text-decoration: none; }
.kpw-folder-del:hover { opacity: 1; color: #b3261e; }
.kpw-chip.on .kpw-folder-del { color: #fff; }
.kpw-chip.dragover { outline: 2px solid var(--violet-500); outline-offset: 1px; }
.kpw-card.dragging { opacity: .5; }
.kpw-folder-add { border-style: dashed; }
.kpw-buy input[type="number"] { width: 92px; }
.kpw-toolbar select {
  font: inherit; padding: 7px 10px; border-radius: 10px;
  border: 1px solid rgba(15, 24, 19,.12); background: #fff; color: var(--ink); max-width: 220px;
}

/* КП: автопоиск поставщиков (ТЗ №2, тест) */
.kpw-spacer { flex: 1; }
.kpw-auto.on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; font-weight: 600; }
.kpw-findbtn, .kpw-candbtn {
  font: inherit; font-size: 12px; cursor: pointer; border-radius: 8px; padding: 4px 10px;
  border: 1px solid rgba(15, 24, 19,.14); background: #fff; color: var(--ink);
}
.kpw-findbtn:hover, .kpw-candbtn:hover { border-color: var(--violet-500); }
.kpw-candbtn { border-color: var(--violet-500); color: var(--violet-800); font-weight: 600; }
.kpw-candbtn.on { background: var(--violet-100); }
.kpw-searching { font-size: 12px; color: var(--violet-600); }
.kpw-sfail { font-size: 12px; color: #8a6400; }
.kpw-sslot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpw-srow > td { background: var(--violet-100); padding: 12px 14px; }
.kpw-panel { display: flex; flex-direction: column; gap: 10px; }
.kpw-panel-head { display: flex; gap: 12px; align-items: center; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.kpw-panel-head select { font: inherit; font-size: 12px; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(15, 24, 19,.14); background: #fff; }
.kpw-panel-close { margin-left: auto; cursor: pointer; }
.kpw-panel-close:hover { color: #b3261e; }
.kpw-cand { background: #fff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 12px; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.kpw-cand-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpw-ctag { font-size: 11.5px; color: var(--muted); background: rgba(15, 24, 19,.05); border-radius: 6px; padding: 2px 8px; }
.kpw-cand-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.kpw-cand-meta { font-size: 12.5px; color: var(--muted); flex: 1; }
.kpw-take { border-color: var(--violet-600); color: var(--violet-800); font-weight: 600; }
.kpw-risk { font-size: 12px; color: #b3261e; font-weight: 600; }
.kpw-sprogress-wrap .mini { color: var(--violet-600); }

/* КП: запрос КП поставщикам (21.08) */
.kpw-rfqall { border-color: var(--violet-600); color: var(--violet-800); font-weight: 600; }
.kpw-rfq-ok { color: #1e7d32; font-weight: 600; }

/* КП: личная почта менеджера для запросов (22.08) */
.kpw-mail { font-size: 12.5px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.kpw-mail.ok { color: #1e7d32; }
.kpw-mail.warn { color: #8a6400; }
.kpw-mail a { color: var(--violet-600); cursor: pointer; text-decoration: underline; }
.kpw-mailform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kpw-mailform input { font: inherit; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(15, 24, 19,.14); min-width: 200px; }

.kpw-rfq-bad { color: #a33; }

.kpw-rfqmail { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpw-mailin { font: inherit; font-size: 12.5px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(15, 24, 19,.14); width: 200px; background: #ffffff; }

.kpw-items th.kpw-sort { cursor: pointer; user-select: none; }
.kpw-items th.kpw-sort:hover { color: var(--violet-600); }
.kpw-sortmark { font-size: 10px; margin-left: 4px; color: var(--violet-600); }

/* Выписка до бота: спокойный вид (24.08) — без колонок ПП/Счёт/Статус и цветной полоски */
.bank-prebot-card .bank-statement-grid-header-actions { display: none; }
.bank-prebot-card .bank-statement-entry-actions > *:not(.bank-statement-edit-button) { display: none; }
.bank-prebot-card .bank-statement-entry { border-left: none; }
.bank-prebot-card .bank-statement-entry:first-child { border-left: none; }

/* Выписка до бота: без «Без НДС», сумма = платёжное поручение, таблица дышит на всю ширину */
.bank-prebot-card .bank-statement-entry-right > .bank-statement-novat-cell:first-child { display: none; }
.bank-prebot-card .bank-statement-grid-header,
.bank-prebot-card .bank-statement-entry {
  grid-template-columns: minmax(96px, 112px) minmax(200px, 300px) minmax(420px, 1fr) minmax(240px, 300px);
}
.bank-prebot-card .bank-statement-entry-right { justify-content: flex-end; }
.bank-prebot-card .bank-statement-entry-purpose {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Выписка до бота: правка кривой сетки (24.08) — правый блок из трёх дорожек стал двумя,
   пустые дорожки скрытых колонок больше не ломают ряд */
.bank-prebot-card .bank-statement-grid-header-right,
.bank-prebot-card .bank-statement-entry-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.bank-prebot-card .bank-statement-entry-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.bank-prebot-card .bank-statement-grid-header,
.bank-prebot-card .bank-statement-entry {
  grid-template-columns: minmax(96px, 110px) minmax(190px, 260px) minmax(360px, 1fr) minmax(230px, 320px);
}

/* КП-карточки: «заказано» деньгами (24.08) */
.kpw-of { font-weight: 600; opacity: .55; font-size: .9em; }
.kpw-progress-money i { background: linear-gradient(90deg, #028753, #25805e); }

/* Пара «⚡ ИИ угадал» + «✎ вручную» вместо оранжевой «Привяжите проект» (28.08) */
.payment-guess-pair { display: inline-flex; gap: 6px; align-items: stretch; max-width: 100%; min-width: 0; }
.payment-guess-btn {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0;
  font: inherit; font-size: 10.5px; font-weight: 600; line-height: 1.2; letter-spacing: 0;
  color: #005734; background: rgba(2, 135, 83, .07);
  border: 1px dashed rgba(2, 135, 83, .4); border-radius: 9px;
  padding: 4px 8px; cursor: pointer; text-align: left;
}
.payment-guess-btn > span { white-space: normal; overflow: visible; max-width: none; word-break: break-word; }

.payment-guess-btn:hover { background: linear-gradient(135deg, rgba(2, 135, 83,.24), rgba(37,128,94,.2)); }
.payment-guess-manual {
  width: 26px; flex: 0 0 26px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 11px; padding: 4px 0;
}

/* Вилка: ИИ сузил до двух проектов — человек нажимает верный (28.08) */
.payment-guess-fork {
  display: inline-flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px;
  justify-content: flex-end;
  padding: 0; border: 0; background: none; max-width: 100%; min-width: 0; font-size: 12px;
}
.payment-guess-option {
  display: inline-block; width: auto;
  font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.2; text-align: left;
  color: #004025; background: rgba(2, 135, 83, .08); border: 1px dashed rgba(2, 135, 83, .45);
  border-radius: 9px; padding: 5px 9px; cursor: pointer; word-break: break-word;
}
.payment-guess-option::before { content: "⚡ "; }
.payment-guess-option:hover { background: rgba(2, 135, 83, .14); border-color: rgba(2, 135, 83, .6); }
.payment-guess-or { display: none; }
.payment-guess-other {
  background: none; border: 0; width: auto; align-self: center;
  color: #539671; font-weight: 600; font-size: 10.5px; padding: 1px 2px;
  text-decoration: underline; text-underline-offset: 2px;
}
.payment-guess-other::before { content: ""; }
.payment-guess-other:hover { color: #03653d; background: none; border: 0; }

/* Вилка = два таких же «⚡»-пилюли, как одиночная (стиль «как Пенза»), в строку с переносом */
.payment-guess-forkrow { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; }

/* Планировщик: доска платёжных окон (31.08) */
.cboard-page { padding: 0 clamp(14px, 3vw, 34px) 40px; }
.cboard-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 14px; }
.cboard-sum b { display: block; font-size: 15px; }
.cboard-sum span { font-size: 12px; color: var(--soft); }
.cboard-warn {
  font-size: 12px; font-weight: 700; color: #8a6400; text-decoration: none;
  background: rgba(189, 126, 40, .1); border: 1px solid rgba(189, 126, 40, .3);
  border-radius: 999px; padding: 6px 12px;
}
.cboard-warn:hover { background: rgba(189, 126, 40, .18); }
.cboard-nav { margin-left: auto; display: inline-flex; gap: 6px; }
.cboard-grid { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.cboard-col {
  flex: 0 0 210px; background: #fff; border: 1px solid rgba(15, 24, 19,.09);
  border-radius: 16px; padding: 10px; min-height: 140px;
}
.cboard-col.is-over { border-color: rgba(2, 135, 83,.6); background: rgba(2, 135, 83,.05); }
.cboard-col header { display: grid; gap: 1px; margin-bottom: 8px; }
.cboard-col header b { font-size: 13px; }
.cboard-col header small { font-size: 10.5px; color: var(--soft); text-transform: uppercase; letter-spacing: .06em; }
.cboard-col header i { font-style: normal; font-size: 11.5px; color: var(--violet-600); font-weight: 700; }
.cboard-inbox { flex-basis: 240px; background: rgba(235, 245, 239,.5); }
.cboard-late { flex-basis: 220px; background: rgba(189,126,40,.07); border-color: rgba(189,126,40,.25); }
.cboard-drop { display: grid; gap: 6px; min-height: 60px; }
.cboard-empty { font-size: 11px; color: var(--soft); padding: 10px 4px; }
.cboard-card {
  display: grid; gap: 1px; padding: 7px 9px; border-radius: 10px; cursor: grab;
  background: rgba(2, 135, 83,.07); border: 1px solid rgba(2, 135, 83,.18);
}
.cboard-card:hover { background: rgba(2, 135, 83,.13); }
.cboard-card.is-drag { opacity: .4; }
.cboard-card b { font-family: "JetBrains Mono", monospace; font-size: 12.5px; }
.cboard-cp { font-size: 11.5px; font-weight: 700; }
.cboard-pr { font-size: 10.5px; color: var(--soft); }
.cboard-flag { font-size: 10px; color: #1e7d32; font-weight: 700; }
.cboard-card.is-sent { cursor: default; opacity: .75; background: rgba(37,128,94,.08); border-color: rgba(37,128,94,.22); }
@media (max-width: 820px) { .cboard-col { flex-basis: 78vw; } }

.payment-plan-link { margin-top: 4px; font-size: 12px; }
.payment-plan-link a { color: var(--violet-600); font-weight: 700; text-decoration: none; }
.payment-plan-link a:hover { text-decoration: underline; }
.payment-plan-link span { color: var(--soft); }

/* Доплата к существующему счёту (09.09.2026) */
.payment-supplement { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #fff3cd; color: #7a5b00; border: 1px solid #f0d78a; vertical-align: middle; white-space: nowrap; }

/* Проработка КП: доставка 3 вида + готовность (10.09.2026) */
.kpw-shipctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 4px; }
.kpw-shipctl select.slim { font-size: 11.5px; padding: 2px 6px; border: 1px solid rgba(15, 24, 19,.15); border-radius: 6px; background: #fff; color: var(--text); }
.kpw-ready { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--muted); }
.kpw-ready input[type=date] { font-size: 11.5px; padding: 2px 4px; border: 1px solid rgba(15, 24, 19,.15); border-radius: 6px; background: #fff; color: var(--text); }
.kpw-chipsep { font-size: 12px; color: var(--muted); margin-left: 10px; align-self: center; }
.kpw-shipctl select.warn { border-color: #e0b84a; color: #8a6400; font-weight: 600; }


/* ---------------- Почта (15.09.2026) ---------------- */
.mail-page { display: grid; grid-template-columns: 220px 380px minmax(0, 1fr); gap: 14px; min-height: 70vh; align-items: start; }
.mail-note { color: var(--muted); font-size: 13px; padding: 14px; line-height: 1.5; }
.mail-note.bad { color: var(--red); }
.mail-left { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 1101px) { .mail-left { position: sticky; top: 12px; } }
.mail-acc, .mail-acc-one { font-size: 12.5px; color: var(--muted); padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-views { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.mail-view { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; border-radius: 10px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.mail-view:hover { background: var(--violet-100); }
.mail-view.on { background: var(--violet-600); color: #fff; }
.mail-view b { background: var(--violet-600); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.mail-view.on b { background: #fff; color: var(--violet-800); }
.mail-view i { font-style: normal; font-size: 11.5px; color: var(--soft); }
.mail-view.on i { color: #d8ebdf; }
.mail-ai-line { font-size: 11.5px; color: var(--soft); padding: 10px 12px 0; }
.mail-rules-link { font-size: 12.5px; color: var(--violet-600); padding: 4px 12px; cursor: pointer; }
.mail-list { background: #fff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 170px); }
.mail-search { display: flex; gap: 6px; padding: 10px; border-bottom: 1px solid rgba(15, 24, 19,.08); }
.mail-search input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font-size: 13px; }
.mail-items { overflow-y: auto; }
.mail-item { padding: 10px 12px; border-bottom: 1px solid rgba(15, 24, 19,.06); cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.mail-item:hover { background: #faf8ff; }
.mail-item.on { background: var(--violet-100); }
.mail-item.unseen .mail-from, .mail-item.unseen .mail-subj { font-weight: 700; }
.mail-item-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.mail-from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.mail-date { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.mail-subj { font-size: 13.5px; line-height: 1.3; }
.mail-clip { font-size: 12px; }
.mail-thread { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 5px; }
.mail-snip { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.mail-tag { font-size: 10.5px; font-weight: 600; border-radius: 999px; padding: 1px 7px; background: var(--violet-100); color: var(--violet-800); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-tag.hot { background: var(--red-soft); color: var(--red); }
.mail-tag.reply { background: #fff4e0; color: #a35d00; }
.mail-tag.muted { background: #f1f0f4; color: var(--muted); }
.mail-tag.cp { background: #e8f1ff; color: #24559a; }
.mail-tag.proj { background: var(--green-soft); color: #1e7d32; }
.mail-tag.wait { background: #f1f0f4; color: var(--soft); font-weight: 500; }
.mail-tag.cat-invoice { background: #e6f5ec; color: #1e7d32; }
.mail-tag.cat-claim { background: var(--red-soft); color: var(--red); }
.mail-tag.cat-kp { background: #e8f1ff; color: #24559a; }
.mail-view-pane { background: #fff; border: 1px solid rgba(15, 24, 19,.10); border-radius: 16px; padding: 18px 20px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.mail-head h2 { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.mail-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.mail-meta b { color: var(--ink); font-weight: 600; }
.mail-bucketsrc { color: var(--soft); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.mail-btn { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 11px; font-size: 12.5px; cursor: pointer; color: var(--ink); }
.mail-btn:hover { background: var(--violet-100); }
.mail-chips { display: inline-flex; gap: 4px; margin-left: auto; }
.mail-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--muted); }
.mail-chip.on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.mail-ai { background: linear-gradient(180deg, #f0f7f3, #fbfaff); border: 1px solid var(--violet-200); border-radius: 14px; padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.mail-ai p { margin: 0; }
.mail-ai-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--violet-800); font-weight: 700; display: flex; justify-content: space-between; }
.mail-ai-title i { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted); }
.mail-ai-title a { cursor: pointer; font-size: 14px; }
.mail-ai-sum { font-size: 14px; font-weight: 600; color: var(--ink); }
.mail-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 4px; }
.mail-links label { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.mail-links select { font-size: 12.5px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; max-width: 100%; }
.mail-atts { display: flex; flex-direction: column; gap: 4px; }
.mail-att { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; text-decoration: none; color: var(--ink); font-size: 12.5px; }
.mail-att:hover { background: var(--violet-100); }
.mail-att-meta { color: var(--muted); font-size: 11.5px; }
.mail-threadlist { font-size: 12.5px; display: flex; flex-direction: column; gap: 3px; }
.mail-threadlist span { color: var(--muted); }
.mail-threadlist a { color: var(--violet-600); cursor: pointer; }
.mail-body { border-top: 1px solid rgba(15, 24, 19,.08); padding-top: 12px; }
.mail-imgnote { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mail-imgnote a { color: var(--violet-600); cursor: pointer; }
.mail-frame { width: 100%; min-height: 480px; border: 0; background: #fff; }
.mail-pre { white-space: pre-wrap; font: 14px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; margin: 0; word-break: break-word; }
.mail-modal-wrap { position: fixed; inset: 0; background: rgba(15, 24, 19,.35); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 16px; }
.mail-modal { background: #fff; border-radius: 16px; padding: 18px 20px; max-width: 720px; width: 100%; max-height: 85vh; overflow: auto; }
.mail-modal h3 { margin: 0 0 6px; }
.mail-rules { width: 100%; border-collapse: collapse; font-size: 13px; }
.mail-rules th, .mail-rules td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(15, 24, 19,.08); }
.mail-rules a { cursor: pointer; color: var(--red); font-size: 16px; }
.mail-modal-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
@media (max-width: 1100px) { .mail-page { grid-template-columns: 200px minmax(0, 1fr); } .mail-view-pane { grid-column: 1 / -1; } }
@media (max-width: 720px) { .mail-page { grid-template-columns: 1fr; } .mail-list { max-height: none; } .mail-links { grid-template-columns: 1fr; } .mail-chips { margin-left: 0; } }
.mail-more { margin: 10px; align-self: center; }
.mail-ai-do { font-size: 16px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.mail-ai-sum { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.mail-ai-empty { color: var(--muted); font-size: 13px; }
.mail-details { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; }
.mail-details summary { cursor: pointer; color: var(--violet-600); font-weight: 600; }
.mail-details .mail-meta { margin: 8px 0; gap: 4px; }
.mail-details .mail-links { margin-bottom: 8px; }
.mail-details .mail-actions { margin-top: 4px; }
.mail-details .mail-chips { margin-left: 0; }
.mail-att { flex-direction: row; justify-content: space-between; gap: 10px; }
.mail-item .mail-tags:empty { display: none; }
.mail-btn.good { background: var(--green-soft); border-color: #bfe6cf; color: #1e7d32; font-weight: 600; }

/* ---- Почта на телефоне (15.09): виды — лентой, письмо — на весь экран ---- */
.mail-back { display: none; }
@media (max-width: 720px) {
  .mail-page { gap: 10px; }
  .mail-acc-one, .mail-acc { display: none; }
  .mail-ai-line { display: none; }
  .mail-left { flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
  .mail-left::-webkit-scrollbar { display: none; }
  .mail-views { flex-direction: row; gap: 6px; margin: 0; }
  .mail-view { flex: 0 0 auto; white-space: nowrap; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); background: #fff; border-radius: 999px; font-size: 13px; }
  .mail-view.on { border-color: var(--violet-600); }
  .mail-rules-link { flex: 0 0 auto; white-space: nowrap; }
  .mail-view-pane { display: none; }
  .mail-page.open .mail-view-pane { display: flex; position: fixed; inset: 0; z-index: 40; overflow-y: auto; -webkit-overflow-scrolling: touch; border: 0; border-radius: 0; padding: calc(12px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px)); background: #fff; }
  .mail-page.open .mail-list, .mail-page.open .mail-left { display: none; }
  body.mail-open { overflow: hidden; }
  body.mail-open .mobile-nav { display: none !important; }
  .mail-back { display: inline-block; border: 0; background: var(--violet-100); color: var(--violet-800); border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600; margin-bottom: 10px; }
  .mail-head h2 { font-size: 17px; }
  .mail-frame { min-height: 60vh; }
}

/* ---- Мобильное меню одной строкой с прокруткой (15.09: девять пунктов не влезали в три ряда) ---- */
@media (max-width: 720px) {
  body.auth-unlocked .mobile-nav { display: flex !important; grid-template-columns: none; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; padding: 6px; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav .nav-link { flex: 0 0 auto; width: 84px; min-height: 52px; flex-direction: column; gap: 3px; padding: 5px 4px; }
  .mobile-nav .nav-link span:last-child { font-size: 10px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
}

/* ================= Почта на телефоне как приложение (15.09) ================= */
.mm-head, .mm-searchrow, .mm-drawer-wrap, .mm-msg-head, .mm-bar { display: none; }
@media (max-width: 720px) {
  /* шапка сайта — поиск и профиль в одну строку, чтобы не терять место */
  .topbar { grid-template-columns: minmax(0, 1fr) auto !important; gap: 8px; padding: 6px 8px; }
  .topbar-actions { justify-content: flex-end !important; }
  /* заголовок страницы «Почта» и подпись — не нужны на телефоне */
  body[data-route="mail"] .mail-desktop-head { display: none; }
  body[data-route="mail"] #view { padding-top: 0; }

  .mail-page { display: block; min-height: 0; padding-bottom: 96px; }
  .mail-page > .mail-left, .mail-page > .mail-list { display: none; }
  .mm-head { display: grid; grid-template-columns: 40px 1fr 40px 40px; align-items: center; gap: 2px; padding: 4px 0 8px; }
  .mm-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.01em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mm-ib { width: 40px; height: 40px; border: 0; background: transparent; font-size: 22px; line-height: 1; color: var(--ink); border-radius: 12px; padding: 0; }
  .mm-ib:active { background: var(--violet-100); }
  .mm-ib:disabled { opacity: .3; }
  .mm-searchrow { display: block; padding: 0 0 8px; }
  .mm-searchrow[hidden] { display: none; }
  .mm-searchrow input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: #fff; }

  .mm-list { background: #fff; border-radius: 16px; border: 1px solid rgba(15, 24, 19,.08); overflow: hidden; }
  .mm-day { font-size: 13px; color: var(--muted); padding: 10px 14px 4px; }
  .mm-item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 10px 14px 12px; border-bottom: 1px solid rgba(15, 24, 19,.06); }
  .mm-item:active { background: var(--violet-100); }
  .mm-ava { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
  .mm-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .mm-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
  .mm-from { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
  .mm-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff7a45; flex-shrink: 0; }
  .mm-time { font-size: 13px; color: var(--muted); flex-shrink: 0; }
  .mm-subj { font-size: 15px; color: var(--ink); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mm-item.unseen .mm-from, .mm-item.unseen .mm-subj { font-weight: 700; }
  .mm-snip { font-size: 13.5px; color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .mm-item .mail-tags { margin-top: 3px; }
  .mail-more { display: block; margin: 12px auto; }

  /* выдвижная панель папок */
  .mm-drawer-wrap { display: block; position: fixed; inset: 0; background: rgba(15, 24, 19,.4); z-index: 45; }
  .mm-drawer-wrap[hidden] { display: none; }
  .mm-drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 340px); background: #fff; padding: calc(14px + env(safe-area-inset-top, 0px)) 12px calc(20px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; box-shadow: 8px 0 40px rgba(15, 24, 19,.18); display: flex; flex-direction: column; gap: 4px; }
  .mm-drawer-acc { font-size: 16px; font-weight: 700; padding: 6px 10px 12px; display: flex; flex-direction: column; gap: 2px; }
  .mm-drawer-acc small { font-weight: 400; color: var(--muted); font-size: 13px; }
  .mm-views { display: flex; flex-direction: column; gap: 2px; }
  .mm-view { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 12px; font-size: 16px; color: var(--ink); }
  .mm-view.on { color: var(--violet-600); font-weight: 700; background: var(--violet-100); }
  .mm-view .mm-ico { font-style: normal; width: 24px; text-align: center; font-size: 18px; color: var(--muted); }
  .mm-view.on .mm-ico { color: var(--violet-600); }
  .mm-view span { flex: 1; }
  .mm-view b { background: var(--violet-600); color: #fff; border-radius: 999px; font-size: 12px; padding: 2px 8px; }
  .mm-view em { font-style: normal; font-size: 13px; color: var(--soft); }
  .mm-ico { display: none; }
  .mm-drawer .mm-ico { display: inline-block; }

  /* письмо на весь экран */
  .mm-msg { display: none; }
  .mail-page.open .mm-msg { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 50; background: #fff; border: 0; border-radius: 0; padding: 0; overflow: hidden; }
  body.mail-open { overflow: hidden; }
  body.mail-open .mobile-nav, body.mail-open .topbar { display: none !important; }
  .mm-msg-head { display: grid; grid-template-columns: 44px 1fr 44px 44px; align-items: center; padding: calc(6px + env(safe-area-inset-top, 0px)) 6px 4px; border-bottom: 1px solid rgba(15, 24, 19,.06); flex-shrink: 0; }
  .mm-msg-head .mm-ib { font-size: 26px; }
  .mm-msg-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px 14px calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
  .mm-subject { margin: 4px 0 0; font-size: 22px; font-weight: 800; line-height: 1.2; letter-spacing: -.01em; }
  .mm-sender { display: flex; align-items: center; gap: 12px; }
  .mm-sender b { font-size: 15px; }
  .mm-sender-meta { font-size: 13px; color: var(--muted); }
  .mm-sum-title { font-size: 12px; font-weight: 700; color: var(--violet-800); text-transform: uppercase; letter-spacing: .05em; }
  .mail-ai { border-radius: 16px; }
  .mm-sum-actions { margin-top: 4px; }
  .mm-sum-actions .mail-btn { font-size: 13px; }
  .mail-frame { min-height: 40vh; }
  .mm-bar { display: grid; grid-template-columns: repeat(5, 1fr); flex-shrink: 0; border-top: 1px solid rgba(15, 24, 19,.08); background: rgba(255,255,255,.96); padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .mm-bar-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--ink); text-decoration: none; font-size: 11px; padding: 4px 0; }
  .mm-bar-btn i { font-style: normal; font-size: 20px; line-height: 1.1; }
  .mm-bar-btn.on { color: var(--violet-600); }
  .mm-bar-btn:active { color: var(--violet-600); }
  .mail-details { border-radius: 14px; }
  .mail-links { grid-template-columns: 1fr; }
  .mail-chips { margin-left: 0; flex-wrap: wrap; }
}

@media (max-width: 720px) {
  /* меню — к самому низу экрана (15.09, владелец) */
  .mobile-nav { bottom: calc(4px + env(safe-area-inset-bottom, 0px)) !important; left: 8px !important; right: 8px !important; }
}
@media (max-width: 720px) {
  .mail-page.open .mm-msg { top: 0; left: 0; right: 0; height: 100vh; height: 100dvh; max-height: 100dvh; }
  body.mail-open { position: fixed; width: 100%; top: 0; }
}
/* десктоп: меню слева без мобильных иконок, подписи слева, счётчики без курсива (15.09) */
.mail-view .mm-ico { display: none; }
.mail-view span { flex: 1; text-align: left; }
.mail-view em { font-style: normal; font-size: 11.5px; color: var(--soft); }
.mail-view.on em { color: #d8ebdf; }
.mm-ico { display: none; }
@media (max-width: 720px) { .mm-drawer .mm-ico { display: inline-block; } }
.mail-frame { overflow: hidden; min-height: 120px; display: block; width: 100%; }
@media (max-width: 720px) { .mail-frame { min-height: 120px; } }
.mail-btn.cal { background: var(--violet-100); border-color: var(--violet-200); color: var(--violet-800); font-weight: 600; text-decoration: none; }
.mail-search-hint { flex: 1; font-size: 12.5px; color: var(--muted); align-self: center; }
@media (max-width: 720px) { .mm-head { grid-template-columns: 40px 1fr 40px; } .mm-searchrow { font-size: 13px; color: var(--muted); padding: 0 4px 8px; } }

/* иконки почты — линейные, как в меню сайта (15.09) */
.mm-ib svg, .mm-bar-btn i svg, .mail-btn-ico svg, .mm-view .mm-ico svg, .mail-view .mm-ico svg { width: 22px; height: 22px; display: block; }
.mm-bar-btn i { display: flex; align-items: center; justify-content: center; height: 24px; }
.mm-bar-btn i svg { width: 24px; height: 24px; }
.mm-clip { display: inline-flex; vertical-align: -3px; color: var(--muted); }
.mm-clip svg { width: 15px; height: 15px; }
.mail-btn-ico { padding: 6px 8px; display: inline-flex; }
.mail-btn-ico svg { width: 18px; height: 18px; }
@media (max-width: 720px) { .mm-view .mm-ico { display: inline-flex; color: var(--muted); } .mm-view.on .mm-ico { color: var(--violet-600); } .mm-view .mm-ico svg { width: 22px; height: 22px; } }

/* причёсывание 15.09 */
.mail-view-pane { max-width: 980px; }
.mm-subj .mail-thread { font-size: 10.5px; }
@media (max-width: 720px) {
  .mm-head { position: sticky; top: 0; z-index: 5; background: var(--bg); }
  .mail-more { width: calc(100% - 24px); }
}

/* окно ответа / пересылки (15.09) */
.mail-compose-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(15, 24, 19,.35); display: flex; align-items: center; justify-content: center; padding: 16px; }
.mail-compose { background: #fff; border-radius: 18px; width: 100%; max-width: 720px; max-height: 92vh; display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 16px; box-shadow: 0 30px 80px rgba(15, 24, 19,.25); }
.mail-compose-head { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 8px; }
.mail-compose-head h3 { margin: 0; font-size: 18px; }
.mail-compose label { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.mail-compose input[type="text"] { border: 0; border-bottom: 1px solid var(--line); padding: 8px 4px; font-size: 15px; min-width: 0; outline: none; }
.mail-compose-check { grid-template-columns: auto 1fr !important; }
.mail-compose textarea { flex: 1; min-height: 220px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; resize: vertical; }
.mail-compose-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mail-compose-note { font-size: 12px; color: var(--soft); }
body.mail-compose-open { overflow: hidden; }
@media (max-width: 720px) {
  .mail-compose-wrap { padding: 0; align-items: stretch; }
  .mail-compose { border-radius: 0; max-height: none; height: 100dvh; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .mail-compose textarea { min-height: 160px; font-size: 16px; }
  .mail-compose input[type="text"] { font-size: 16px; }
}

/* «Подробнее» не шире экрана (15.09) */
.mail-details { max-width: 100%; overflow: hidden; box-sizing: border-box; }
.mail-details .mail-meta div { overflow-wrap: anywhere; word-break: break-word; }
.mail-links { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.mail-links label { min-width: 0; }
.mail-links select { width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; text-overflow: ellipsis; }
.mail-details .mail-actions { flex-wrap: wrap; }
.mail-details .mail-chips { flex-wrap: wrap; }
.mm-msg-body, .mail-view-pane { overflow-x: hidden; }
@media (max-width: 720px) { .mail-links { grid-template-columns: minmax(0, 1fr); } }
/* блоки письма не сжимаются во флекс-колонке (15.09: «Подробнее» схлопывалось, «Ещё» не открывало) */
.mm-msg-body > *, .mail-view-pane > * { flex-shrink: 0; }
.mail-details { min-height: 0; }
.mail-details[open] { overflow: visible; }
.mail-frame { flex-shrink: 0; }
/* плавный старт (16.09): без формы входа во время проверки сессии и без мигания при первых загрузках */
body.auth-checking .auth-gate { visibility: hidden; }
.app-shell, .topbar, .mobile-nav { transition: opacity .25s ease; }
body.app-booting .app-shell, body.app-booting .topbar, body.app-booting .mobile-nav { opacity: 0 !important; pointer-events: none; }
body.app-booting::after, body.auth-checking::after { content: "Константа С"; position: fixed; inset: 0; display: grid; place-items: center; font: 700 22px/1 -apple-system, "Segoe UI", Roboto, sans-serif; color: #015231; letter-spacing: .02em; z-index: 3; pointer-events: none; animation: bootPulse 1.2s ease-in-out infinite; }
@keyframes bootPulse { 0%, 100% { opacity: .35; } 50% { opacity: .9; } }
/* заставка старта, вариант 2 (16.09): логотип + вордмарк + бегущая полоска */
body.app-booting::before, body.auth-checking::before {
  content: "К"; position: fixed; left: 50%; top: 42%; width: 84px; height: 84px; margin: -42px 0 0 -42px; z-index: 3;
  border-radius: 22px; background: linear-gradient(135deg, #02784a 0%, #079b61 100%); color: #fff;
  font: 800 50px/84px -apple-system, "Segoe UI", Roboto, sans-serif; text-align: center;
  box-shadow: 0 24px 48px rgba(3, 82, 49, .28), inset 0 1px 0 rgba(255,255,255,.35);
  animation: bootFloat 1.8s ease-in-out infinite;
}
body.app-booting::after, body.auth-checking::after {
  content: "КОНСТАНТА С"; position: fixed; left: 0; right: 0; top: calc(42% + 62px); z-index: 3; display: block;
  text-align: center; font: 700 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .34em; text-indent: .34em; color: #015231; opacity: .8;
  padding: 0 0 26px; animation: none;
  background: linear-gradient(90deg, rgba(3, 131, 81,0) 0%, #038351 50%, rgba(3, 131, 81,0) 100%) no-repeat; background-size: 140px 3px; background-position: -140px 100%;
  animation: bootBar 1.4s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes bootFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes bootBar { 0% { background-position: calc(50% - 120px) 100%; } 100% { background-position: calc(50% + 120px) 100%; } }
/* заставка старта: совпадает с картинкой-заставкой iOS по месту и размеру, растворяется плавно (16.09) */
body.app-booting::before, body.auth-checking::before { top: 44%; width: min(22vw, 96px); height: min(22vw, 96px); margin: calc(min(22vw, 96px) / -2) 0 0 calc(min(22vw, 96px) / -2); border-radius: 22%; font-size: calc(min(22vw, 96px) * .6); line-height: min(22vw, 96px); transition: opacity .4s ease; }
body.app-booting::after, body.auth-checking::after { top: calc(44% + min(22vw, 96px) / 2 + 22px); transition: opacity .4s ease; }
body.app-boot-fade::before, body.app-boot-fade::after { opacity: 0 !important; }
body.app-boot-fade .app-shell, body.app-boot-fade .topbar, body.app-boot-fade .mobile-nav { opacity: 1 !important; pointer-events: auto; }
.mail-push { margin-top: 10px; padding: 0 12px; display: flex; flex-direction: column; gap: 6px; }
.mail-push-note { font-size: 12px; color: var(--muted); line-height: 1.4; }
.mail-push-on { font-size: 12.5px; color: #1e7d32; font-weight: 600; }
.mail-push-row { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 720px) { .mail-push { padding: 8px 10px 0; } .mail-push .mail-btn { font-size: 14px; padding: 9px 14px; } }
.push-ask { position: fixed; inset: 0; z-index: 80; background: rgba(15, 24, 19,.45); display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
.push-ask-card { background: #fff; border-radius: 22px; padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px)); width: 100%; max-width: 440px; text-align: center; box-shadow: 0 30px 80px rgba(15, 24, 19,.3); }
.push-ask-ico { font-size: 44px; line-height: 1; margin-bottom: 8px; }
.push-ask-card h3 { margin: 0 0 8px; font-size: 22px; }
.push-ask-card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.push-ask-yes { width: 100%; border: 0; border-radius: 14px; padding: 15px; font: 700 17px -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; background: linear-gradient(135deg, #02784a, #079b61); box-shadow: 0 12px 28px rgba(2, 120, 74,.35); }
.push-ask-later { width: 100%; border: 0; background: transparent; padding: 12px; margin-top: 4px; font-size: 15px; color: var(--muted); }
@media (min-width: 721px) { .push-ask { align-items: center; } }
/* заставка v3 (16.09): совпадает с картинкой iOS — тот же градиент, логотип по координатам экрана */
body.app-booting::after, body.auth-checking::after {
  content: "КОНСТАНТА С"; position: fixed; inset: 0; top: 0 !important; z-index: 2; display: block; padding: 0;
  background: linear-gradient(180deg, #ecf5ef 0%, #fbfaf8 100%);
  text-align: center; font: 700 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: .34em; text-indent: .34em; color: #015231;
  line-height: 1; padding-top: calc(var(--splash-cy, 44vh) + var(--splash-s, 22vw) / 2 + 26px); box-sizing: border-box;
  animation: none; opacity: 1; transition: opacity .4s ease;
}
body.app-booting::before, body.auth-checking::before {
  top: var(--splash-cy, 44vh) !important; left: 50%; width: var(--splash-s, 22vw) !important; height: var(--splash-s, 22vw) !important;
  margin: calc(var(--splash-s, 22vw) / -2) 0 0 calc(var(--splash-s, 22vw) / -2) !important; z-index: 3;
  border-radius: 22% !important; font-size: calc(var(--splash-s, 22vw) * .6) !important; line-height: var(--splash-s, 22vw) !important;
  background: linear-gradient(135deg, #02784a 0%, #079b61 100%); box-shadow: 0 calc(var(--splash-s, 22vw) * .12) calc(var(--splash-s, 22vw) * .5) rgba(3, 82, 49, .28);
  animation: none !important;
}
body.app-booting .ambient, body.auth-checking .ambient, body.app-booting .space-battle-layer, body.auth-checking .space-battle-layer { visibility: hidden; }
body.app-boot-fade::before, body.app-boot-fade::after { opacity: 0 !important; }
body.app-boot-fade .ambient, body.app-boot-fade .space-battle-layer { visibility: visible; }
/* карточки-показатели (16.09, владелец): иконки декоративные — на телефоне убрать, на компе уменьшить */
.kpi-icon { width: 28px; height: 28px; border-radius: 10px; }
.kpi-icon svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  .kpi-card .kpi-icon { display: none; }
  .kpi-card .kpi-top { justify-content: flex-end; min-height: 0; }
  .kpi-card { padding: 14px 16px 12px; gap: 6px; }
  .kpi-card strong { font-size: 26px; }
}
/* ===== Платёжный календарь и Оплаты на телефоне (16.09, владелец): шапки компактные, без разрозненности ===== */
@media (max-width: 720px) {
  .payments-lines-page { gap: 10px; }
  /* шапка страницы: одна строка заголовка, короткая подпись, кнопка «Реестры» справа */
  .payments-lines-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; padding: 12px 14px 10px; margin: 0; }
  .payments-lines-head .eyebrow { display: none; }
  .payments-lines-head h1 { font-size: 24px; line-height: 1.1; margin: 0 0 4px; letter-spacing: -.01em; }
  .payments-lines-head p { font-size: 13px; line-height: 1.35; margin: 0; }
  .payments-lines-head p + p { display: none; }
  .payments-head-actions { display: flex; align-items: center; }
  .payments-head-actions .payment-bulk-action { padding: 7px 10px; font-size: 12.5px; min-height: 0; border-radius: 10px; }
  .payments-head-actions .payment-bulk-action svg { width: 14px; height: 14px; }
  .vat-unknown-flag { display: inline-flex; width: auto; margin: 8px 0 0; padding: 7px 10px; font-size: 12.5px; border-radius: 10px; }
  /* карточка дня: без второго заголовка-дубля и длинных пояснений */
  .payments-lines-card { padding: 12px 12px 10px; border-radius: 16px; }
  .payment-calendar-head { display: block; margin-bottom: 8px; }
  .payment-calendar-head .eyebrow { display: inline-block; font-size: 10.5px; padding: 3px 9px; margin-bottom: 4px; }
  .payment-calendar-head h2 { font-size: 16px; line-height: 1.2; margin: 0 0 2px; }
  .payment-calendar-head > div > p { display: none; }
  .payment-calendar-head > div > p.payment-plan-link { display: block; font-size: 12px; margin: 0 0 8px; }
  .payment-calendar-head.compact h2 { font-size: 16px; }
  /* фильтры и действия: в две колонки, кнопки компактные */
  .payment-calendar-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
  .payment-calendar-actions .payment-period-filter { min-height: 40px; padding: 4px 10px; font-size: 13px; border-radius: 10px; }
  .payment-calendar-actions .payment-approval-basket { grid-column: 1 / -1; }
  .payment-calendar-actions .payment-bulk-action { min-height: 40px; padding: 6px 10px; font-size: 13px; border-radius: 10px; justify-content: center; }
  .payment-calendar-actions .payment-bulk-action svg { width: 14px; height: 14px; }
  .payment-calendar-actions .payment-bulk-action[data-payment-bulk-action="download-today"] { grid-column: 1 / -1; }
  /* «Оплаченные счета»: заголовок и кнопки в одну линию */
  .payment-registry-card .payment-calendar-head.compact { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .payment-registry-card .payment-calendar-head.compact .eyebrow { display: none; }
  .payment-registry-card .payment-collapse-toggle, .payment-registry-card .payment-bulk-action { min-height: 36px; padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
}
@media (max-width: 720px) {
  .payment-calendar-actions .payment-approval-basket { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 8px 10px; }
  .payment-calendar-actions .payment-approval-basket strong { font-size: 16px; }
  .payment-calendar-actions .payment-approval-basket .payment-bulk-action { margin-left: auto; }
}
@media (max-width: 720px) {
  /* ничего не вылезает за экран: колонки могут сжиматься, элементы — переносить текст */
  .payment-calendar-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-width: 0; width: 100%; box-sizing: border-box; }
  .payment-calendar-actions > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .payment-calendar-actions .payment-period-filter { display: flex; width: 100%; height: auto; white-space: normal; overflow: hidden; }
  .payment-calendar-actions .payment-period-filter select { min-width: 0; flex: 1; width: 100%; text-overflow: ellipsis; }
  .payment-calendar-actions .payment-approval-basket { width: 100%; min-width: 0; padding: 8px 10px; }
  .payment-calendar-actions .payment-approval-basket > * { min-width: 0; }
  .payment-calendar-actions .payment-approval-basket .payment-bulk-action { flex: 0 1 auto; white-space: normal; text-align: center; }
  .payment-calendar-actions .payment-bulk-action { min-width: 0; white-space: normal; line-height: 1.15; text-align: center; }
  .payment-calendar-actions .payment-bulk-action span { min-width: 0; }
  .payments-lines-page, .payments-lines-card { max-width: 100%; overflow-x: hidden; box-sizing: border-box; }
}
@media (max-width: 720px) {
  .payment-calendar-actions .payment-bulk-action { min-height: 46px; height: 46px; padding: 4px 8px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; }
  .payment-calendar-actions .payment-bulk-action span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.15; }
  .payment-calendar-actions .payment-bulk-action[data-payment-bulk-action="download-today"] { grid-column: auto; }
  .payment-calendar-actions .payment-approval-basket .payment-bulk-action { height: auto; min-height: 40px; }
  .payment-calendar-head .eyebrow { margin-bottom: 2px; }
}
/* экран запуска iOS = цвет манифеста + иконка по центру; живой логотип — туда же (16.09) */
body.app-booting::before, body.auth-checking::before { top: 50% !important; }
body.app-booting::after, body.auth-checking::after { background: #fbfaf8; padding-top: calc(50% + 0px); }
@media (max-width: 720px) { body.app-booting::after, body.auth-checking::after { padding-top: calc(50vh + var(--splash-s, 22vw) / 2 + 26px); } }
@media (max-width: 720px) {
  .payments-lines-page .payment-calendar-actions .payment-bulk-action[data-payment-bulk-action="download-today"] { grid-column: auto !important; }
  .payments-lines-page .payment-calendar-actions .payment-approval-basket { display: grid !important; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; }
  .payments-lines-page .payment-calendar-actions .payment-approval-basket > span { font-size: 13px; color: var(--muted); }
  .payments-lines-page .payment-calendar-actions .payment-approval-basket > strong { justify-self: end; font-size: 17px; }
  .payments-lines-page .payment-calendar-actions .payment-approval-basket > .payment-bulk-action { grid-column: 1 / -1; width: 100%; margin: 4px 0 0; }
}
@media (max-width: 720px) { .payment-calendar-head .eyebrow { display: inline-flex !important; align-items: center; gap: 6px; white-space: nowrap; line-height: 1; padding: 4px 10px; font-size: 10.5px; } }
/* живая заставка = та же картинка, что у iOS (16.09): ни сдвига, ни другого фона */
body.app-booting::before, body.auth-checking::before { display: none !important; content: none !important; }
body.app-booting::after, body.auth-checking::after {
  content: "" !important; position: fixed !important; inset: 0 !important; top: 0 !important; padding: 0 !important; z-index: 3;
  background: #ecf5ef url("/pwa/splash5/1179x2556.png") center center / cover no-repeat !important;
  animation: none !important; transition: opacity .35s ease;
}
/* заставка v4 (16.09, владелец выбрал): светлый фон, светящийся логотип, название компании под ним.
   Координаты — от центра окна; картинка iOS отрисована из тех же правил с поправкой на статус-бар. */
body.app-booting::before, body.auth-checking::before {
  content: "К" !important; display: block !important; position: fixed !important; left: 50% !important; top: 50% !important;
  width: 96px !important; height: 96px !important; margin: -48px 0 0 -48px !important; z-index: 4;
  border-radius: 24px !important; box-shadow: none !important; animation: none !important;
  background: radial-gradient(circle at 50% 38%, #057d4d 0%, #079960 34%, #63c590 62%, rgba(182, 230, 201, .55) 82%, rgba(251, 250, 248, 0) 100%) !important;
  color: #fff !important; font: 800 56px/96px -apple-system, "SF Pro Display", "Segoe UI", Roboto, sans-serif !important; text-align: center !important;
  transition: opacity .35s ease;
}
body.app-booting::after, body.auth-checking::after {
  content: "КОНСТАНТА С" !important; position: fixed !important; inset: 0 !important; top: 0 !important; z-index: 3; display: block !important;
  background: #fbfaf8 !important; padding: calc(50vh + 112px) 0 0 !important; box-sizing: border-box;
  text-align: center; color: #015231 !important; font: 700 13px/1 -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif !important;
  letter-spacing: .34em !important; text-indent: .34em !important; animation: none !important; transition: opacity .35s ease;
}
/* Реестры на телефоне (16.09): три кнопки в шапке сжимали текст до одной буквы в строке и наезжали на заголовок */
@media (max-width: 720px) {
  .payments-lines-head > div:first-child { min-width: 0; }
  .payments-lines-head p { overflow-wrap: anywhere; }
  .payments-head-actions { min-width: 0; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
  .payments-lines-head:has(.payments-head-actions > *:nth-child(2)) { grid-template-columns: minmax(0, 1fr); }
  .payments-lines-head:has(.payments-head-actions > *:nth-child(2)) .payments-head-actions { margin-top: 8px; justify-content: flex-start; }
  .payments-lines-head:has(.payments-head-actions > *:nth-child(2)) .payments-head-actions > * { flex: 1 1 auto; justify-content: center; }
}
/* Нижнее меню и нижний отступ страниц на телефоне (16.09, по итогам тестирования) */
@media (max-width: 720px) {
  /* 1) видно, что меню прокручивается: пункты уже, у правого края — затухание */
  .mobile-nav .nav-link { width: 76px; scroll-snap-align: center; }
  .mobile-nav { scroll-snap-type: x proximity; -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%); mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%); }
  .mobile-nav.scrollable { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 26px), transparent 100%); }
  /* 2) меню больше не закрывает конец списков и карточек */
  body.auth-unlocked #view { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .mail-page { padding-bottom: 0; }
  .mail-page.open .mm-msg { padding-bottom: 0; }
}
/* Телефон в горизонтальной ориентации (16.09, по итогам тестирования): меню разрасталось в три ряда
   поверх содержимого, а боковое меню скрыто по высоте экрана. Делаем ту же компактную строку, что и в портрете. */
@media (max-height: 700px) and (pointer: coarse) {
  body.auth-unlocked .mobile-nav { display: flex !important; grid-template-columns: none !important; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; padding: 6px; bottom: calc(4px + env(safe-area-inset-bottom, 0px)); left: 8px; right: 8px; }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav .nav-link { flex: 0 0 auto; width: 76px; min-height: 46px; flex-direction: column; gap: 3px; padding: 4px; }
  .mobile-nav .nav-link span:last-child { display: block; font-size: 10px; line-height: 1.1; text-align: center; overflow-wrap: anywhere; }
  body.auth-unlocked #view { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .mail-desktop-head { display: none; }
}
/* Панель профиля на телефоне не должна уезжать за правый край (16.09) */
@media (max-width: 720px) {
  .profile-menu { position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; width: auto; max-width: none; max-height: calc(100vh - 140px); }
}
/* По итогам тестирования 16.09: зоны нажатия, контраст мелких подписей, индикатор загрузки */
/* 1) мелкие иконки-кнопки получают «невидимый запас» до 44×44, внешний вид не меняется */
@media (pointer: coarse) {
  .payment-card-open, .payment-mobile-icon, .payment-icon-action, .wplan-x, .wplan-add, .kpw-del, .kpw-folder-del, .mail-btn-ico {
    position: relative;
  }
  .payment-card-open::after, .payment-mobile-icon::after, .payment-icon-action::after, .wplan-x::after, .kpw-del::after, .kpw-folder-del::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; transform: translate(-50%, -50%);
  }
}
/* 2) мелкие серые подписи — читаемее (было 9–11px с низким контрастом) */
.payment-manager-note, .payment-mobile-uploaded-date, .payment-sent-date, .payment-uploaded-date, .mail-att-meta, .mm-sender-meta {
  font-size: 12px; color: #5f6c64;
}
/* 3) на стартовом экране видно, что идёт загрузка, а не «зависло» */
body.app-booting::after { background-image: linear-gradient(90deg, rgba(3, 131, 81,0) 0%, #038351 50%, rgba(3, 131, 81,0) 100%); background-repeat: no-repeat; background-size: 160px 3px; background-position: -160px calc(50% + 92px); animation: bootProgress 1.25s cubic-bezier(.4,0,.2,1) infinite !important; }
@keyframes bootProgress { 0% { background-position: calc(50% - 160px) calc(50% + 92px); } 100% { background-position: calc(50% + 160px) calc(50% + 92px); } }


/* Подсказки «раньше этот поставщик шёл в…» в правке счёта (16.09) */
.project-hint-box { grid-column: 1 / -1; margin: 2px 0 4px; }
.project-hint-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.project-hint-label span { color: #9ca3af; }
.project-hint-chip {
  display: inline-block; padding: 7px 11px; margin: 3px 6px 3px 0; border-radius: 10px;
  background: rgba(3, 141, 88, 0.12); color: #046840; font-size: 13px; line-height: 1.2;
  border: 1px solid transparent; font-family: inherit; text-align: left;
}
button.project-hint-chip { cursor: pointer; min-height: 36px; }
button.project-hint-chip:hover { background: rgba(3, 141, 88, 0.2); }
button.project-hint-chip:active { transform: translateY(1px); }
button.project-hint-chip.is-on { background: #038d58; color: #fff; }
.project-guess-note { grid-column: 1 / -1; margin: 0 0 4px; font-size: 12px; color: #6b7280; }

/* Компактная карточка оплаты на телефоне (16.09): реестр листается, а не изучается */
@media (max-width: 768px) {
  .payment-mobile-card { gap: 8px; padding: 11px 12px; border-radius: 18px; }

  /* сумма и статус — в одну строку */
  .payment-mobile-top { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
  .payment-mobile-card .payment-mobile-top > span > small { display: none; }
  .payment-mobile-top > span { font-size: 21px; }
  .payment-mobile-top b { font-size: 11px; }

  /* проект и контрагент — без крупных подписей */
  .payment-mobile-main { gap: 1px; padding-bottom: 8px; }
  body[data-route="payments"] .payment-mobile-main strong::before,
  body[data-route="payments"] .payment-mobile-main span::before { display: none; }
  .payment-mobile-main strong { font-size: 15px; }
  .payment-mobile-main span { font-size: 12.5px; font-weight: 720; }
  .payment-mobile-card .payment-manager-note { margin-bottom: 0; font-size: 10.5px; letter-spacing: .02em; }

  /* даты и номер счёта — одной серой строкой вместо четырёх плиток */
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px;
  }
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span {
    min-height: 0; padding: 0; border-radius: 0; background: none; box-shadow: none;
    font-size: 11.5px; font-weight: 750;
  }
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span::before {
    display: inline; margin: 0 4px 0 0; color: #7b8980; font-size: 11.5px;
    font-weight: 750; letter-spacing: 0; text-transform: none;
  }
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span:nth-child(1)::before { content: "к оплате"; }
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta span:nth-child(2)::before { content: "счёт №"; }
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta .payment-mobile-sent-date,
  .payment-mobile-card:not(.bank-statement-mobile-card) .payment-mobile-meta .payment-mobile-uploaded-date { grid-column: auto; }

  /* кнопки пониже, иконки мельче */
  .payment-mobile-decision { gap: 6px; }
  .payment-mobile-card .payment-mobile-control { min-height: 40px; font-size: 12px; }
  .payment-mobile-card .payment-mobile-icon { min-height: 34px; height: 34px; border-radius: 12px; }
  .payment-mobile-icon-row { gap: 6px; }
}


/* 16.09: превью счёта — несколько страниц подряд */
.payment-invoice-preview img + img { margin-top: 10px; }

/* 16.09: спокойная подсказка в карточке вместо красной плашки */
.editor-soft-note {
  margin: 8px 0 0; padding: 9px 12px; border-radius: 12px;
  background: rgba(3, 141, 88, .1); color: #046840; font-size: 13px; font-weight: 700; line-height: 1.35;
}

/* 16.09: поля правки читаются как поля */
.edit-field input, .edit-field select, .edit-field textarea {
  border-color: rgba(2, 101, 62, .3); background: #fff;
}
.edit-field input:focus, .edit-field select:focus, .edit-field textarea:focus {
  border-color: #038d58; box-shadow: 0 0 0 3px rgba(3, 141, 88, .16);
}
.edit-field input::placeholder { color: #95a49b; font-weight: 600; }

/* 16.09: карточка правки на телефоне не уезжает вбок */
@media (max-width: 720px) {
  .object-editor, .payment-edit-modal { overflow-x: hidden; }
  .editor-form, .editor-grid { max-width: 100%; min-width: 0; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-grid > * { min-width: 0; max-width: 100%; }
  .edit-field input, .edit-field select, .edit-field textarea { max-width: 100%; box-sizing: border-box; }
  .project-guess-note, .project-hint-box, .editor-soft-note { white-space: normal; overflow-wrap: anywhere; }
}


/* 18.09: вопрос «похожий счёт» в карточке правки */
.similar-question {
  display: grid; gap: 6px; margin: 10px 0 2px; padding: 12px 14px; border-radius: 14px;
  background: #fff7e6; border: 1px solid #f0d9a8; color: #5b4310;
}
.similar-question strong { font-size: 14px; line-height: 1.3; }
.similar-question span { font-size: 12.5px; line-height: 1.35; color: #7a6230; }
.similar-question-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.similar-question-actions .glass-button { min-height: 40px; padding: 0 14px; font-size: 13px; }


/* 19.09: «Организация доставки» в «Проработке КП» */
.kpw-dlv-open { font-weight: 700; border-color: var(--violet-500); color: var(--violet-600); }
.kpw-dlv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; }
.kpw-dlv-top h2 { margin: 0; font-size: 20px; }
.kpw-dlv-search { min-width: 0; flex: 0 1 320px; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(15, 24, 19,.16); background: #fff; font: inherit; }
.kpw-dlv-total { margin-left: auto; font-size: 13px; font-weight: 700; color: var(--ink); align-self: center; }
.kpw-dlv-table { border: 1px solid rgba(15, 24, 19,.08); border-radius: 14px; background: #fff; overflow: hidden; }
.kpw-dlv-row { display: grid; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; border-top: 1px solid rgba(15, 24, 19,.06);
  grid-template-columns: 30px minmax(76px,1fr) 74px minmax(120px,2.2fr) 132px minmax(84px,1.1fr) minmax(76px,.8fr) 100px 268px 64px; column-gap: 8px; }
.kpw-dlv-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpw-dlv-row:first-child { border-top: 0; }
.kpw-dlv-head { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(3, 141, 88,.05); }
.kpw-dlv-row.is-set { background: rgba(75,166,126,.05); }
.kpw-dlv-num { font-weight: 700; }
.kpw-dlv-sum { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.kpw-dlv-inn, .kpw-dlv-date { font-variant-numeric: tabular-nums; color: var(--muted); }
.kpw-dlv-row > .kpw-dlv-seg { display: grid; grid-template-columns: .8fr 1.4fr 1.15fr; gap: 4px; overflow: visible; }
.kpw-dlv-opt { min-height: 34px; padding: 0 6px; border-radius: 9px; border: 1px solid rgba(15, 24, 19,.14); background: #fff; color: var(--muted); font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.kpw-dlv-opt:hover { border-color: var(--violet-500); color: var(--ink); }
.kpw-dlv-opt.on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
@media (max-width: 1240px) {
  .kpw-dlv-head { display: none; }
  .kpw-dlv-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 12px 14px; }
  .kpw-dlv-row > span { white-space: normal; overflow: visible; }
  .kpw-dlv-row > span::before { content: attr(data-l); display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .kpw-dlv-row { grid-template-areas: "num sum" "sup sup" "proj city" "inn date" "seg seg"; gap: 4px 12px; }
  .kpw-dlv-num { grid-area: num; font-size: 15px; } .kpw-dlv-sum { grid-area: sum; text-align: right; font-size: 15px; }
  .kpw-dlv-sup { grid-area: sup; font-weight: 600; } .kpw-dlv-proj { grid-area: proj; } .kpw-dlv-city { grid-area: city; }
  .kpw-dlv-inn { grid-area: inn; font-size: 12px; } .kpw-dlv-date { grid-area: date; font-size: 12px; }
  .kpw-dlv-row > .kpw-dlv-seg { grid-area: seg; margin-top: 6px; }
  .kpw-dlv-row > .kpw-dlv-num::before, .kpw-dlv-row > .kpw-dlv-sum::before, .kpw-dlv-row > .kpw-dlv-sup::before { display: none; }
  .kpw-dlv-row > .kpw-dlv-seg::before { display: none; }
  .kpw-dlv-opt { min-height: 42px; font-size: 13px; }
  .kpw-dlv-search { flex: 1 1 100%; }
  .kpw-dlv-total { margin-left: 0; flex-basis: 100%; }
}

/* kpw-dlv: две строки для длинных поставщика и проекта — ничего не прячется */
.kpw-dlv-row > .kpw-dlv-sup, .kpw-dlv-row > .kpw-dlv-proj {
  white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25;
}

/* kpw-dlv: ряды фильтров с подписью */
.kpw-dlv-filters { align-items: center; margin-bottom: 6px; }
.kpw-dlv-filters > b { min-width: 68px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpw-dlv-reset { border-style: dashed; color: #b3261e; }
@media (max-width: 720px) { .kpw-dlv-filters > b { min-width: 100%; } }

/* kpw-dlv: выпадающие фильтры */
.kpw-dlv-selects { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.kpw-dlv-select { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 340px; }
.kpw-dlv-select > span { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); min-width: 68px; }
.kpw-dlv-select select { flex: 1; min-width: 0; min-height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(15, 24, 19,.16); background: #fff; font: inherit; font-size: 13px; }
@media (max-width: 720px) { .kpw-dlv-select { flex: 1 1 100%; } .kpw-dlv-select select { min-height: 44px; } }

/* 21.09 kpw-dlv: кто занёс, открыть счёт, убрать из раздела */
.kpw-dlv-author { display: block; margin-top: 1px; font-size: 11px; font-weight: 500; color: var(--muted); }
.kpw-dlv-row > .kpw-dlv-act { display: flex; gap: 4px; justify-content: flex-end; overflow: visible; }
.kpw-dlv-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0; border-radius: 9px;
  border: 1px solid rgba(15, 24, 19,.14); background: #fff; color: var(--violet-600); font-size: 14px; cursor: pointer; }
.kpw-dlv-icon svg { width: 16px; height: 16px; }
.kpw-dlv-icon:hover { border-color: var(--violet-500); }
.kpw-dlv-icon.danger { color: #b3261e; }
.kpw-dlv-viewer { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 12px; }
.kpw-dlv-viewer-back { position: absolute; inset: 0; background: rgba(15, 24, 19,.45); }
.kpw-dlv-viewer-card { position: relative; display: flex; flex-direction: column; width: min(900px, 100%); max-height: calc(100dvh - 24px);
  border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(15, 24, 19,.35); overflow: hidden; }
.kpw-dlv-viewer-head { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 16px 18px 12px; border-bottom: 1px solid rgba(15, 24, 19,.08); }
.kpw-dlv-viewer-head h3 { margin: 0 0 4px; font-size: 17px; line-height: 1.25; }
.kpw-dlv-viewer-head p { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.35; }
.kpw-dlv-viewer-head .kpw-dlv-viewer-what { color: var(--ink); }
.kpw-dlv-viewer-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px; background: #f4f2f8; }
.kpw-dlv-viewer-body img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.kpw-dlv-viewer-body img + img { margin-top: 10px; }
.kpw-dlv-viewer-foot { padding: 10px 18px; border-top: 1px solid rgba(15, 24, 19,.08); text-align: right; }
.kpw-dlv-viewer-foot .kpw-btn { display: inline-block; text-decoration: none; }
@media (max-width: 1240px) {
  .kpw-dlv-row { grid-template-areas: "num sum" "sup sup" "proj city" "inn date" "seg seg" "act act"; }
  .kpw-dlv-row > .kpw-dlv-act { grid-area: act; justify-content: flex-start; margin-top: 4px; }
  .kpw-dlv-row > .kpw-dlv-act::before { display: none; }
  .kpw-dlv-icon { width: 44px; height: 40px; }
}

/* 21.09 kpw-dlv: пометка к счёту */
.kpw-dlv-row > .kpw-dlv-note { grid-column: 1 / -1; white-space: normal; overflow: visible; margin-top: -2px; padding: 6px 10px; border-radius: 9px;
  background: #fff7e0; color: #5b4310; font-size: 12.5px; line-height: 1.35; cursor: pointer; }
.kpw-dlv-row > .kpw-dlv-note.editing { display: flex; gap: 8px; align-items: center; background: transparent; padding: 0; cursor: default; }
.kpw-dlv-note input { flex: 1; min-width: 0; min-height: 36px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--violet-500); background: #fff; font: inherit; font-size: 13px; }
.kpw-dlv-icon.has-note { background: #fff7e0; border-color: #e9cf8a; color: #8a6514; }
@media (max-width: 1240px) {
  .kpw-dlv-row { grid-template-areas: "num sum" "sup sup" "proj city" "inn date" "seg seg" "act act" "note note"; }
  .kpw-dlv-row > .kpw-dlv-note { grid-area: note; margin-top: 2px; }
  .kpw-dlv-row > .kpw-dlv-note::before { display: none; }
  .kpw-dlv-note input { min-height: 44px; font-size: 16px; }
}

/* 21.09 kpw-dlv: сортировка по заголовкам */
.kpw-dlv-sortable { cursor: pointer; user-select: none; }
.kpw-dlv-sortable:hover, .kpw-dlv-sortable.on { color: var(--violet-600); }

/* 21.09 kpw-dlv: поле пометки всегда на виду */
.kpw-dlv-row > .kpw-dlv-note { background: transparent; padding: 0; margin-top: -3px; cursor: default; }
.kpw-dlv-note input { width: 100%; min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px dashed rgba(15, 24, 19,.16);
  background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); }
.kpw-dlv-note input::placeholder { color: #a8b4ad; }
.kpw-dlv-note input:hover { border-color: rgba(3, 141, 88,.5); }
.kpw-dlv-note input:focus { outline: 0; border: 1px solid var(--violet-500); background: #fff; box-shadow: 0 0 0 3px rgba(3, 141, 88,.14); }
.kpw-dlv-note input.has-note { border: 1px solid #e9cf8a; background: #fff7e0; color: #5b4310; font-weight: 600; }
.kpw-dlv-note input.saved { border-color: #4ba67e; box-shadow: 0 0 0 3px rgba(75,166,126,.18); }
@media (max-width: 1240px) { .kpw-dlv-note input { min-height: 42px; font-size: 16px; } }

/* 21.09 kpw-dlv: галочка «решено» */
.kpw-dlv-row { transition: opacity .3s ease, background-color .3s ease; }
.kpw-dlv-row.is-set { background: transparent; }
.kpw-dlv-row.is-done { background: #e9f7ef; opacity: .62; }
.kpw-dlv-row.is-done:hover, .kpw-dlv-row.is-done:focus-within { opacity: 1; }
.kpw-dlv-row > .kpw-dlv-chk { overflow: visible; display: flex; align-items: center; }
.kpw-dlv-check { width: 26px; height: 26px; padding: 0; border-radius: 8px; border: 2px solid rgba(15, 24, 19,.25); background: #fff; color: #fff;
  font-size: 15px; font-weight: 900; line-height: 1; cursor: pointer; }
.kpw-dlv-check:hover { border-color: #4ba67e; }
.kpw-dlv-check.on { background: #4ba67e; border-color: #4ba67e; }
@media (max-width: 1240px) {
  .kpw-dlv-row { grid-template-columns: 38px 1fr 1fr; column-gap: 10px;
    grid-template-areas: "chk num sum" "chk sup sup" ". proj city" ". inn date" "seg seg seg" "act act act" "note note note"; }
  .kpw-dlv-row > .kpw-dlv-chk { grid-area: chk; align-items: flex-start; }
  .kpw-dlv-row > .kpw-dlv-chk::before { display: none; }
  .kpw-dlv-check { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
}

/* kpw-dlv: город и автор целиком */
.kpw-dlv-row > .kpw-dlv-sup { -webkit-line-clamp: 3; }
.kpw-dlv-row > .kpw-dlv-city { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.kpw-dlv-author { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* kpw-dlv: спокойная пометка — обычный текст под строкой, рамка только когда пишешь */
.kpw-dlv-row > .kpw-dlv-note { margin-top: -6px; }
.kpw-dlv-note input, .kpw-dlv-note input.has-note {
  min-height: 24px; padding: 0 0 0 2px; border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  background: transparent; box-shadow: none; font-size: 12.5px; font-weight: 500; color: #4f5f55;
}
.kpw-dlv-note input::placeholder { color: #c0cac4; font-weight: 400; }
.kpw-dlv-note input:hover { border-bottom-color: rgba(15, 24, 19,.14); }
.kpw-dlv-note input:focus, .kpw-dlv-note input.has-note:focus {
  outline: 0; border: 0; border-bottom: 1px solid var(--violet-500); background: transparent; box-shadow: none; color: var(--ink);
}
.kpw-dlv-note input.saved { border-bottom-color: #4ba67e; box-shadow: none; }
.kpw-dlv-icon.has-note { background: #fff; border-color: rgba(15, 24, 19,.14); color: var(--violet-600); }
@media (max-width: 1240px) { .kpw-dlv-note input, .kpw-dlv-note input.has-note { min-height: 36px; font-size: 16px; } }

/* kpw-dlv: город не рвём посреди слова */
.kpw-dlv-row > .kpw-dlv-city { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; overflow-wrap: normal; }
@media (max-width: 1240px) { .kpw-dlv-row > .kpw-dlv-city { white-space: normal; } }

/* 22.09 kpw-dlv: бейдж «у поставщика несколько счетов» */
.kpw-dlv-many { margin-left: 6px; padding: 1px 7px; border-radius: 999px; border: 0; background: var(--violet-600); color: #fff;
  font: inherit; font-size: 11px; font-weight: 800; line-height: 1.5; vertical-align: 1px; cursor: pointer; }
.kpw-dlv-many:hover { background: var(--violet-500); }
.kpw-dlv-row.is-done .kpw-dlv-many { background: #8fb8a3; }

/* 23.09: контакт поставщика в базе */
.supplier-contact-line { display: block; margin-top: 2px; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 23.09 kpw-dlv: откуда и адрес груза */
.kpw-dlv-row > .kpw-dlv-origin { grid-column: 2 / -1; display: grid; grid-template-columns: minmax(120px, 180px) 1fr; gap: 8px; overflow: visible; white-space: normal; margin-top: -4px; }
.kpw-dlv-origin input { min-height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid rgba(15, 24, 19,.12); background: #fff; font: inherit; font-size: 12.5px; color: var(--ink); }
.kpw-dlv-origin input::placeholder { color: #a8b4ad; }
.kpw-dlv-origin input:focus { outline: 0; border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(3, 141, 88,.14); }
.kpw-dlv-origin input.has-note { border-color: rgba(3, 141, 88,.35); background: #f2f8f4; font-weight: 600; }
.kpw-dlv-origin input.saved { border-color: #4ba67e; }
@media (max-width: 1240px) {
  .kpw-dlv-row { grid-template-areas: "chk num sum" "chk sup sup" ". proj city" ". inn date" "seg seg seg" "act act act" "orig orig orig" "note note note"; }
  .kpw-dlv-row > .kpw-dlv-origin { grid-area: orig; grid-template-columns: 1fr; margin-top: 4px; }
  .kpw-dlv-row > .kpw-dlv-origin::before { display: none; }
  .kpw-dlv-origin input { min-height: 42px; font-size: 16px; }
}

/* 24.09 kpw-dlv: машина */
.kpw-dlv-row > .kpw-dlv-origin { grid-template-columns: 84px minmax(120px, 180px) 1fr; }
.kpw-dlv-origin input.kpw-dlv-vehicle { text-align: center; font-weight: 800; }
.kpw-dlv-origin input.kpw-dlv-vehicle.has-note { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.kpw-chip-vehicle.on { background: var(--violet-600); }
.kpw-dlv-vehicle-sum { font-size: 12.5px; font-weight: 700; color: var(--ink); align-self: center; }
@media (max-width: 1240px) { .kpw-dlv-row > .kpw-dlv-origin { grid-template-columns: 90px 1fr; } .kpw-dlv-origin input[data-dlv-field="pickupAddress"] { grid-column: 1 / -1; } }

/* 24.09 kpw-dlv: части груза */
.kpw-dlv-row > .kpw-dlv-parts { grid-column: 2 / -1; display: grid; gap: 4px; overflow: visible; white-space: normal; margin-top: -2px; }
.kpw-dlv-part { display: grid; grid-template-columns: 26px 84px 1fr 30px; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 9px; background: rgba(3, 141, 88,.06); }
.kpw-dlv-part.is-hit { background: rgba(3, 141, 88,.16); }
.kpw-dlv-part.is-done { opacity: .6; background: #e9f7ef; }
.kpw-dlv-part input { min-height: 26px; padding: 0 8px; border-radius: 7px; border: 1px solid rgba(15, 24, 19,.12); background: #fff; font: inherit; font-size: 12.5px; }
.kpw-dlv-part input:focus { outline: 0; border-color: var(--violet-500); box-shadow: 0 0 0 3px rgba(3, 141, 88,.14); }
.kpw-dlv-part input.kpw-dlv-vehicle { text-align: center; font-weight: 800; }
.kpw-dlv-part input.kpw-dlv-vehicle.has-note { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.kpw-dlv-check.small { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.kpw-dlv-part .kpw-dlv-icon { width: 26px; height: 26px; }
@media (max-width: 1240px) {
  .kpw-dlv-row { grid-template-areas: "chk num sum" "chk sup sup" ". proj city" ". inn date" "seg seg seg" "act act act" "orig orig orig" "parts parts parts" "note note note"; }
  .kpw-dlv-row > .kpw-dlv-parts { grid-area: parts; }
  .kpw-dlv-row > .kpw-dlv-parts::before { display: none; }
  .kpw-dlv-part { grid-template-columns: 34px 80px 1fr 40px; }
  .kpw-dlv-part input { min-height: 40px; font-size: 16px; }
  .kpw-dlv-check.small { width: 32px; height: 32px; }
}

/* 24.09 kpw-dlv: свёрнутые поставщики */
.kpw-dlv-collapse.on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.kpw-dlv-group { cursor: pointer; }
.kpw-dlv-group:hover { background: rgba(3, 141, 88,.06); }
.kpw-dlv-group > .kpw-dlv-group-hint { grid-column: span 1; font-size: 12px; color: var(--violet-600); font-weight: 700; white-space: nowrap; }
@media (max-width: 1240px) {
  .kpw-dlv-group { grid-template-areas: "chk num sum" "chk sup sup" ". proj city" ". inn date" "hint hint hint"; }
  .kpw-dlv-group > .kpw-dlv-group-hint { grid-area: hint; }
  .kpw-dlv-group > .kpw-dlv-group-hint::before { display: none; }
}

/* 24.09 kpw-dlv: объём */
.kpw-dlv-row > .kpw-dlv-origin { grid-template-columns: 84px 76px minmax(120px, 180px) 1fr; }
.kpw-dlv-origin input.kpw-dlv-volume, .kpw-dlv-part input.kpw-dlv-volume { text-align: center; font-variant-numeric: tabular-nums; }
.kpw-dlv-origin input.kpw-dlv-volume.has-note, .kpw-dlv-part input.kpw-dlv-volume.has-note { background: #eef9f2; border-color: #9ed2b6; color: #1e6b47; font-weight: 700; }
.kpw-dlv-part { grid-template-columns: 26px 84px 76px 1fr 30px; }
@media (max-width: 1240px) {
  .kpw-dlv-row > .kpw-dlv-origin { grid-template-columns: 80px 70px minmax(0, 1fr); }
  .kpw-dlv-origin input { min-width: 0; }
  .kpw-dlv-part { grid-template-columns: 34px 80px 72px 1fr 40px; }
}

/* 24.09 kpw-dlv: контакт поставщика из бота */
.kpw-dlv-row > .kpw-dlv-inn { white-space: normal; overflow: visible; }
.kpw-dlv-contact { display: block; width: 100%; min-width: 0; margin-top: 2px; min-height: 22px; padding: 0 4px; border: 0; border-bottom: 1px solid transparent; border-radius: 0;
  background: transparent; font: inherit; font-size: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpw-dlv-contact::placeholder { color: #c0cac4; }
.kpw-dlv-contact:hover { border-bottom-color: rgba(15, 24, 19,.14); }
.kpw-dlv-contact:focus { outline: 0; border-bottom-color: var(--violet-500); }
.kpw-dlv-contact.has-note { font-weight: 700; }
.kpw-dlv-contact.saved { border-bottom-color: #4ba67e; }
@media (max-width: 1240px) { .kpw-dlv-contact { min-height: 36px; font-size: 15px; } }

/* 25.09 kpw-dlv: забор груза */
.kpw-dlv-row > .kpw-dlv-seg { grid-template-columns: .8fr 1.4fr 1.15fr; grid-template-rows: auto auto; row-gap: 4px; }
.kpw-dlv-pickup { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 4px; }
.kpw-dlv-pickup-btn { min-height: 26px; padding: 0 6px; border-radius: 8px; border: 1px dashed rgba(15, 24, 19,.18); background: #fff; color: var(--muted);
  font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.kpw-dlv-pickup-btn:hover { border-style: solid; color: var(--ink); }
.kpw-dlv-pickup-btn.taken.on { background: #2f9e6b; border-color: #2f9e6b; color: #fff; }
.kpw-dlv-pickup-btn.partial.on { background: #d98c1f; border-color: #d98c1f; color: #fff; }
.kpw-dlv-pickup-btn.none.on { background: #b3261e; border-color: #b3261e; color: #fff; }
.kpw-dlv-row.pickup-taken:not(.is-done) { background: rgba(47,158,107,.06); }
.kpw-dlv-row.pickup-partial { background: rgba(217,140,31,.08); }
.kpw-chip-pickup-taken.on { background: #2f9e6b; border-color: #2f9e6b; }
.kpw-chip-pickup-partial.on { background: #d98c1f; border-color: #d98c1f; }
.kpw-chip-pickup-none.on { background: #b3261e; border-color: #b3261e; }
@media (max-width: 1240px) { .kpw-dlv-pickup-btn { min-height: 40px; font-size: 13px; } }

/* 25.09 kpw-dlv: «В пути» */
.kpw-dlv-pickup { grid-template-columns: 1fr 1fr 1fr 1.15fr; }
.kpw-dlv-pickup-btn.transit.on { background: #3b6fd6; border-color: #3b6fd6; color: #fff; }
.kpw-dlv-row.pickup-transit { background: rgba(59,111,214,.07); }
.kpw-chip-pickup-transit.on { background: #3b6fd6; border-color: #3b6fd6; }
@media (max-width: 1240px) { .kpw-dlv-pickup { grid-template-columns: 1fr 1fr; } }

/* 25.09 pickup-btn компактнее — четыре кнопки в ряд */
.kpw-dlv-pickup-btn { font-size: 10.5px; padding: 0 4px; letter-spacing: -.01em; }
@media (max-width: 1240px) { .kpw-dlv-pickup-btn { font-size: 13px; padding: 0 8px; } }

/* 25.09 «Доставлено» (код transit): тёмно-зелёный, строка гаснет как решённая */
.kpw-dlv-pickup-btn.transit.on { background: #1e6b47; border-color: #1e6b47; color: #fff; }
.kpw-dlv-row.pickup-transit { background: #e9f7ef; opacity: .75; }
.kpw-dlv-row.pickup-transit:hover, .kpw-dlv-row.pickup-transit:focus-within { opacity: 1; }
.kpw-chip-pickup-transit.on { background: #1e6b47; border-color: #1e6b47; }
