:root {
  --bg: #fbfaf8;
  --milk: #fffdf8;
  --surface: rgba(255, 255, 255, 0.66);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --violet-950: #241048;
  --violet-800: #4e268f;
  --violet-600: #7b46d8;
  --violet-500: #8d63e6;
  --violet-200: #dcd1ff;
  --violet-100: #f2edff;
  --blue-500: #4b7fe8;
  --ink: #171321;
  --muted: #756d83;
  --soft: #9b94a8;
  --line: rgba(87, 67, 129, 0.13);
  --line-strong: rgba(83, 54, 139, 0.2);
  --green: #38a56f;
  --green-soft: #eaf8f0;
  --red: #da5b6b;
  --red-soft: #fff0f2;
  --coral: #ee7964;
  --amber: #d7952b;
  --amber-soft: #fff5df;
  --shadow: 0 26px 70px rgba(72, 47, 122, 0.12);
  --shadow-tight: 0 16px 38px rgba(72, 47, 122, 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(142, 102, 233, 0.18), transparent 33rem),
    radial-gradient(circle at 90% 12%, rgba(73, 131, 232, 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(71, 47, 130, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 47, 130, 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(108, 73, 190, .12) 0 1px, transparent 1px);
  background-size: 140px 140px, 90px 90px;
}

body.star-table-mode {
  color: rgba(238, 241, 255, .88);
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 224, 113, .11), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(59, 96, 255, .18), transparent 34rem),
    radial-gradient(circle at 50% 85%, rgba(112, 65, 190, .18), transparent 36rem),
    linear-gradient(145deg, #050713 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(89, 120, 255, .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(139, 89, 235, 0.2), rgba(139, 89, 235, 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(69, 133, 232, 0.15), rgba(69, 133, 232, 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(213, 190, 255, 0.52), rgba(213, 190, 255, 0));
  animation: floatC 22s var(--ease) infinite alternate;
}

.orbital {
  position: absolute;
  border: 1px solid rgba(126, 86, 210, 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(123, 70, 216, .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(83, 54, 139, 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(151, 102, 239, .5), transparent 58%);
  box-shadow: 0 18px 34px rgba(103, 70, 170, 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%, #7eb0ff);
  box-shadow: 0 0 22px rgba(117, 75, 217, .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: #60566f;
  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(244, 238, 255, .7)),
    radial-gradient(circle at 12% 50%, rgba(134, 86, 223, .2), transparent 70%);
  box-shadow: 0 16px 42px rgba(93, 58, 163, 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: #625776;
  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(75, 49, 126, 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(88, 59, 145, 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: #a19aaf;
}

.search kbd {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(88, 59, 145, .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 #8d83a0;
  border-radius: 999px;
}

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

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

.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: #6f667d;
  background: rgba(255,255,255,.46);
  font-size: 12px;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--violet-950);
  background: rgba(246, 241, 255, .92);
  box-shadow: 0 12px 26px rgba(91, 62, 157, 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(248, 244, 255, .9);
  box-shadow: 0 14px 28px rgba(91, 62, 157, .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(91, 62, 157, 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 #615470;
  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: #615470;
}

.icon-bell::after {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 5px;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: #615470;
  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-auth-logout] {
  cursor: pointer;
}

.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(116, 74, 200, .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(141, 99, 230, .1);
}

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

h1 {
  max-width: 880px;
  margin: 14px 0 0;
  color: #19131f;
  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: #19131f;
  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(117, 82, 185, .12);
  border-radius: 999px;
}

.service-tile:hover {
  background: rgba(255,255,255,.72);
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(91, 62, 157, .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(119, 78, 201, .12);
  border-radius: 16px;
  color: var(--violet-800);
  background: rgba(246, 241, 255, .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(91, 62, 157, .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%, #688ff0);
  box-shadow: 0 18px 38px rgba(88, 54, 169, .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(88, 54, 169, .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(91, 62, 157, .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(139, 90, 233, .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(240, 232, 255, .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(245, 240, 255, .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;
}

.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(124, 78, 220, .8), rgba(124, 78, 220, .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(222, 210, 255, .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(95, 61, 159, .08) 47px 48px),
    conic-gradient(from 210deg, rgba(218,91,107,.24), rgba(139,90,233,.18), rgba(75,127,232,.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(109, 70, 194, .12);
}

.radar-disc::before {
  position: absolute;
  width: 2px;
  height: 50%;
  content: "";
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(126, 80, 221, .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(91, 62, 157, .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(91, 62, 157, .14), inset 0 1px 0 rgba(255,255,255,.8);
  color: #4e425f;
  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(91, 62, 157, .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: #211a2a;
  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;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.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: #66587a;
  background: rgba(244, 240, 251, .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(91, 62, 157, .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), #78a7ff);
}

.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(132, 84, 224, .36);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(248, 244, 255, .66)),
    radial-gradient(circle at 100% 0, rgba(128, 83, 218, .12), transparent 48%);
  box-shadow: 0 20px 50px rgba(91, 62, 157, .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(246, 241, 255, .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(93, 58, 163, .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(141,99,230,.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(91, 62, 157, .12), inset 0 1px 0 rgba(255,255,255,.86);
  color: #4e425f;
  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(97, 64, 166, .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-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(98, 70, 157, .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(75, 49, 126, 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: #4e268f;
  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(245,239,255,.7));
  box-shadow: 0 18px 44px rgba(75, 49, 126, .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(75, 49, 126, .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(78, 38, 143, .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(18, 20, 37, .92), rgba(5, 7, 17, .82));
  border-color: rgba(255, 224, 113, .42);
  box-shadow: 0 20px 52px rgba(18, 20, 37, .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(15, 19, 40, .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(8, 11, 27, .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(230, 231, 245, .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: #0b0d18;
  background: linear-gradient(135deg, #fff4a8, #f2c744);
}

body.star-table-mode .page-head .eyebrow {
  color: #ffe071;
  border-color: rgba(255, 224, 113, .2);
  background: rgba(8, 11, 27, .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(230, 231, 245, .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(75, 103, 255, .12), transparent 46%),
    linear-gradient(145deg, rgba(14, 18, 38, .82), rgba(8, 11, 27, .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(230, 231, 245, .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(75, 103, 255, .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(123, 70, 216, .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(109, 74, 181, .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(72, 47, 122, 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(91, 62, 157, .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(132, 84, 224, .36);
  background:
    linear-gradient(135deg, rgba(255,255,255,.76), rgba(248,244,255,.66)),
    radial-gradient(circle at 100% 0, rgba(128,83,218,.12), transparent 48%);
  box-shadow: 0 18px 40px rgba(91, 62, 157, .1), inset 0 1px 0 rgba(255,255,255,.85);
}

.object-main strong,
.payment-card strong {
  display: block;
  color: #211a2a;
  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(91, 62, 157, .08);
}

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

.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(91, 62, 157, .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));
  }

  .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;
  }

  .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: 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-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .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(142, 102, 233, .22), transparent 30rem),
    radial-gradient(circle at 78% 12%, rgba(75, 127, 232, .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(247,244,255,.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(71, 47, 130, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 47, 130, 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(141,99,230,.2), transparent 35rem);
  box-shadow: 0 30px 90px rgba(72,47,122,.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(91, 62, 157, .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(123, 70, 216, .38);
  background: rgba(255,255,255,.88);
  box-shadow: 0 0 0 5px rgba(141, 99, 230, .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(116, 74, 200, .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(116, 74, 200, .34);
}

.object-list {
  min-width: 1840px;
  --object-cols:
    minmax(92px, .48fr)
    minmax(132px, .62fr)
    minmax(230px, 1.25fr)
    minmax(128px, .58fr)
    minmax(158px, .66fr)
    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(89, 77, 108, .72);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,244,255,.68));
  box-shadow: 0 10px 24px rgba(91, 62, 157, .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(149, 104, 238, .22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(245,239,255,.86), rgba(255,255,255,.68)),
    radial-gradient(circle at 4% 20%, rgba(141,99,230,.18), transparent 32%);
  box-shadow: 0 16px 36px rgba(91, 62, 157, .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(91, 62, 157, .2);
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 850;
}

.section-name {
  min-width: 0;
  color: #1b1525;
  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(151, 111, 235, .055), transparent 38%);
  box-shadow: 0 12px 34px rgba(91, 62, 157, .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: #241d2f;
  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-table-row .object-cell:nth-child(5),
.object-table-row .object-cell:nth-child(6) {
  justify-content: flex-end;
  text-align: right;
}

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

.object-muted {
  color: rgba(82, 72, 101, .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: #211a2a;
  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(100, 89, 120, .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(75, 103, 255, .18), transparent 24rem),
    linear-gradient(145deg, rgba(8, 10, 22, .94), rgba(18, 20, 37, .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(230, 231, 245, .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(7, 10, 24, .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(52, 65, 130, .22)),
    rgba(8, 11, 27, .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: #0b0d18;
  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(10, 14, 31, .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(64, 79, 151, .16)),
    rgba(11, 15, 34, .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(238, 241, 255, .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(15, 12, 28, .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(44, 33, 62, .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(249,246,255,.72)),
    radial-gradient(circle at 92% 8%, rgba(141,99,230,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(52, 33, 88, .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(249,246,255,.74)),
    radial-gradient(circle at 92% 8%, rgba(141,99,230,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(52, 33, 88, .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(72, 61, 91, .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: #3a255f;
  background: rgba(244, 239, 255, .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);
}

.supplier-map-table.is-editing {
  --supplier-cols:
    minmax(190px, 1.15fr)
    minmax(116px, .66fr)
    minmax(88px, .42fr)
    minmax(190px, .95fr)
    minmax(124px, .62fr)
    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(193,168,250,.54);
  background:
    linear-gradient(135deg, rgba(255,255,255,.72), rgba(248,244,255,.62)),
    radial-gradient(circle at 100% 0, rgba(141,99,230,.08), transparent 34%);
  box-shadow:
    0 12px 26px rgba(91,62,157,.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(72, 61, 91, .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(107, 96, 126, .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(244, 239, 255, .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(193,168,250,.86);
  box-shadow:
    inset 0 0 0 1px rgba(132,84,224,.16),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.supplier-rule-picker small {
  min-width: 0;
  overflow: hidden;
  color: rgba(107, 96, 126, .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(72, 61, 91, .86);
  font-size: 12px;
  font-weight: 880;
}

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

.supplier-amount-cell.empty {
  color: rgba(107, 96, 126, .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(141,99,230,.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(107, 96, 126, .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(84,69,112,.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(72, 61, 91, .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(193,168,250,.48);
  background: rgba(244, 239, 255, .78);
  box-shadow:
    0 0 0 3px rgba(141,99,230,.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(141,99,230,.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(193,168,250,.86);
  box-shadow:
    inset 0 0 0 1px rgba(132,84,224,.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(91, 62, 157, .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(193, 168, 250, .78);
  box-shadow: 0 0 0 4px rgba(141, 99, 230, .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(91, 62, 157, .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(91, 62, 157, .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(91, 62, 157, .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(91, 62, 157, .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(91, 62, 157, .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 {
  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: 1860px;
  }

  .object-list .object-row {
    --object-cols:
      82px
      118px
      220px
      112px
      146px
      128px
      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(9) {
    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(107, 96, 126, .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(91, 62, 157, .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(8),
  .object-table-row .object-cell:nth-child(9) {
    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(107, 96, 126, .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(91, 62, 157, .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(107, 96, 126, .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: "\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(91, 62, 157, .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(107, 96, 126, .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: #5c3a98;
    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: #20192c;
    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: #171320;
    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 #e6ddfb;
    border-radius: 8mm;
    background:
      radial-gradient(circle at 12% 2%, rgba(137, 88, 232, .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(91,62,157,.055) 1px, transparent 1px),
      linear-gradient(90deg, rgba(91,62,157,.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(147, 113, 213, .28);
    border-radius: 7mm;
    background: rgba(255,255,255,.72);
    box-shadow: 0 8mm 24mm rgba(57, 37, 94, .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, #4f238d, #8f62ff);
    box-shadow: 0 4mm 10mm rgba(95, 54, 164, .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: #857996;
    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: #171320;
    font-size: 29pt;
    font-weight: 900;
    letter-spacing: -.07em;
    line-height: .98;
  }

  .print-title p,
  .print-card p {
    margin: 0;
    color: #655a73;
    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: #563596;
    background: #f0eaff;
    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(147, 113, 213, .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: #171320;
    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: #1d1728;
    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: #20192c;
    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 #e3dbf3;
  }

  .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(249,246,255,.56)),
    radial-gradient(circle at 94% 16%, rgba(141,99,230,.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 {
  --payment-cols: minmax(92px, .45fr) minmax(170px, .95fr) minmax(210px, 1.15fr) minmax(118px, .5fr) minmax(500px, 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: 146px;
  --payment-tomorrow-basis: 130px;
  --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(249,246,255,.62)),
    radial-gradient(circle at 92% 10%, rgba(141,99,230,.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) minmax(150px, 220px);
  gap: 12px;
  margin: 18px 0 18px;
}

.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(84, 72, 103, .52);
}

.payment-search input:focus,
.payment-status-filter select:focus {
  border-color: rgba(193,168,250,.78);
  box-shadow: inset 0 0 0 1px rgba(132,84,224,.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(141, 99, 230, .1), inset 0 0 0 1px rgba(132,84,224,.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-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: #6b607e;
  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(246,242,255,.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);
}

.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(193, 168, 250, .78);
  box-shadow: 0 0 0 4px rgba(141, 99, 230, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.payment-sent-date,
.payment-mobile-sent-date {
  display: block;
  margin-top: 4px;
  color: #7a6b91;
  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(132, 84, 224, .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(141, 99, 230, .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: #756684;
  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: #756684;
  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(132, 84, 224, .22) !important;
  background: rgba(244, 238, 255, .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: #70637f;
  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(233,226,248,.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: #7d708d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.payment-registry-row em {
  margin-top: 4px;
  color: #766884;
  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(246,242,255,.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(141, 99, 230, .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(117, 83, 214, 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(31, 28, 43, 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(117, 83, 214, 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(31, 28, 43, 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(560px, 600px);
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.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(244, 239, 255, .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(150px, 1fr) minmax(390px, 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: minmax(96px, 118px) 70px minmax(112px, 140px) 42px;
  gap: 6px;
  align-items: center;
  justify-content: end;
  min-width: 0;
}

.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(71, 52, 99, .07);
  border-left: 4px solid rgba(117, 83, 214, .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(117, 83, 214, .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(107, 96, 126, .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-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-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-file-action {
  width: 32px;
  padding: 0;
}

.bank-statement-db-pill svg,
.bank-statement-file-action svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  stroke-width: 1.9;
}

.bank-statement-file-action:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.bank-statement-file-action:focus-visible {
  outline: 0;
  border-color: rgba(193, 168, 250, .78);
  box-shadow: 0 0 0 4px rgba(141, 99, 230, .1), inset 0 1px 0 rgba(255,255,255,.78);
}

.bank-statement-entry-right {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(390px, auto);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.bank-statement-entry-actions {
  display: grid;
  grid-template-columns: minmax(96px, 118px) 32px 32px 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-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-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-file-placeholder {
  display: block;
  min-width: 0;
}

.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(141, 99, 230, .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 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(107, 96, 126, .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(71, 52, 99, .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(107, 96, 126, .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: #7d708d;
    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-lines-list .payment-line {
  border-top: 1px solid rgba(71, 52, 99, .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(244, 239, 255, .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(193,168,250,.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: #7c4ee4;
  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;
}

.payment-header-amount {
  display: flex;
  justify-content: flex-end;
}

.payment-actions-title {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.payment-cell {
  min-width: 0;
  color: #4d435d;
  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: #8a7a9d;
  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(107, 96, 126, .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-tomorrow-basis)
    repeat(5, 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-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(132,84,224,.12),
    inset 0 1px 0 rgba(255,255,255,.8);
}

.payment-action:focus-visible,
.payment-icon-action:focus-visible {
  outline: 0;
  border-color: rgba(193, 168, 250, .78);
  box-shadow:
    inset 0 0 0 1px rgba(132,84,224,.2),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.payment-action.approve {
  color: #0d7c62;
}

.payment-action.approve:not(.selected) {
  color: #2b1947;
}

.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-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(141,99,230,.12), transparent 52%);
  box-shadow: 0 22px 54px rgba(52, 33, 88, .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: #594a6d;
  font-size: 12px;
  font-weight: 880;
  text-align: center;
  text-transform: capitalize;
}

.payment-postpone-month button,
.payment-postpone-day {
  border: 1px solid rgba(91, 62, 157, .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: #9286a4;
  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(107, 96, 126, .38);
}

.payment-postpone-day.selected {
  border-color: rgba(132, 84, 224, .42);
  background: linear-gradient(135deg, rgba(132,84,224,.95), rgba(167,125,244,.92));
  color: #fff;
  box-shadow: 0 8px 18px rgba(132, 84, 224, .24);
}

.payment-postpone-day:disabled {
  cursor: not-allowed;
  opacity: .34;
}

.payment-postpone-month button:hover,
.payment-postpone-day:not(:disabled):hover {
  border-color: rgba(132, 84, 224, .22);
  background: rgba(250,247,255,.94);
}

.payment-postpone-month button:focus-visible,
.payment-postpone-day:focus-visible {
  outline: 0;
  border-color: rgba(193, 168, 250, .78);
  box-shadow: 0 0 0 4px rgba(141, 99, 230, .1), inset 0 1px 0 rgba(255,255,255,.92);
}

.payment-postpone-day.selected:hover {
  background: linear-gradient(135deg, rgba(132,84,224,.95), rgba(167,125,244,.92));
}

.payment-action.cancel {
  color: #7a4f10;
}

.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;
  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: 17px;
  height: 17px;
  stroke-width: 1.9;
}

.payment-confirmation-badge.proof {
  border-color: rgba(117, 83, 214, .2);
  background: linear-gradient(135deg, rgba(246, 242, 255, .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(71, 52, 99, .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(249,246,255,.76)),
    radial-gradient(circle at 92% 8%, rgba(141,99,230,.16), transparent 24rem);
  box-shadow: 0 34px 100px rgba(52, 33, 88, .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(246,242,255,.58)),
    radial-gradient(circle at 92% 16%, rgba(137,88,232,.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;
  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(141, 99, 230, .1);
}

.payment-invoice-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(38, 24, 63, .12);
}

.payment-invoice-preview pre {
  margin: 0;
  white-space: pre-wrap;
  color: #352a43;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 1500px) {
  .payments-lines-card {
    --payment-cols: 78px minmax(132px, .8fr) minmax(190px, 1.05fr) 108px 444px;
    --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: 138px;
    --payment-tomorrow-basis: 122px;
    --payment-icon-action-size: 30px;
  }

  .bank-statement-card {
    --payment-cols: 78px minmax(146px, 190px) minmax(0, 1fr) minmax(420px, 450px);
    --payment-row-min-h: 78px;
  }

  .bank-statement-grid-header,
  .bank-statement-entry {
    grid-template-columns: 78px minmax(136px, 176px) minmax(260px, 1fr) minmax(500px, 540px);
  }
}

@media (max-width: 1320px) {
  .payments-lines-card {
    --payment-cols: 70px minmax(112px, .76fr) minmax(162px, .95fr) 104px 410px;
    --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: 132px;
    --payment-tomorrow-basis: 116px;
    --payment-icon-action-size: 26px;
  }

  .bank-statement-card {
    --payment-cols: 70px minmax(118px, 158px) minmax(0, 1fr) minmax(382px, 410px);
    --payment-row-min-h: 74px;
  }

  .bank-statement-grid-header,
  .bank-statement-entry {
    grid-template-columns: 70px minmax(112px, 150px) minmax(200px, 1fr) minmax(440px, 470px);
  }

  .bank-statement-grid-header-right,
  .bank-statement-entry-right {
    grid-template-columns: minmax(118px, 1fr) minmax(306px, auto);
    gap: 8px;
  }

  .bank-statement-entry-actions {
    grid-template-columns: minmax(84px, 96px) 28px 28px minmax(100px, 112px) 34px;
    gap: 6px;
  }

  .bank-statement-grid-header-actions {
    grid-template-columns: minmax(84px, 96px) 62px 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-calendar-actions {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .payments-lines-card {
    --payment-cols: 70px minmax(96px, .95fr) minmax(96px, .95fr) 88px minmax(190px, .72fr);
    --payment-action-gap: 3px;
    --payment-action-height: 32px;
    --payment-text-action-basis: 28px;
    --payment-tomorrow-basis: 28px;
    --payment-icon-action-size: 28px;
  }

  .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-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-db-pill {
    padding: 0;
  }

  .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(178px, .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-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(166px, .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-tomorrow-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-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 1px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .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;
  }

  .profile[data-auth-logout] small {
    display: inline;
  }

  .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(193, 168, 250, .78);
    box-shadow:
      inset 0 0 0 1px rgba(132,84,224,.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(193, 168, 250, .78);
    background: rgba(255,255,255,.9);
    box-shadow: 0 0 0 4px rgba(141, 99, 230, .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(193, 168, 250, .78);
    box-shadow: 0 0 0 4px rgba(141, 99, 230, .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;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(149, 104, 238, .22);
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(245,239,255,.86), rgba(255,255,255,.68)),
      radial-gradient(circle at 6% 20%, rgba(141,99,230,.18), transparent 34%);
    box-shadow: 0 16px 36px rgba(91, 62, 157, .08), inset 0 1px 0 rgba(255,255,255,.9);
  }

  .object-mobile-group-head > span:last-child {
    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-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(151, 111, 235, .07), transparent 36%);
    box-shadow: 0 12px 34px rgba(91, 62, 157, .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(132, 84, 224, .36);
    background:
      linear-gradient(135deg, rgba(255,255,255,.82), rgba(248,244,255,.68)),
      radial-gradient(circle at 100% 0, rgba(128,83,218,.12), transparent 48%);
  }

  .object-mobile-card:focus-visible {
    outline: 0;
    border-color: rgba(193, 168, 250, .78);
    box-shadow:
      0 12px 34px rgba(91, 62, 157, .055),
      inset 0 0 0 1px rgba(132,84,224,.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(91, 62, 157, .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(107, 96, 126, .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: #20192c;
    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;
  }

  .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(141,99,230,.08), transparent 38%);
    box-shadow: 0 12px 34px rgba(91, 62, 157, .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 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(107, 96, 126, .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(91, 62, 157, .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: #7d708d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.15;
    text-transform: uppercase;
  }

  .payment-mobile-main span {
    color: #4d435d;
    font-size: 13px;
    font-weight: 780;
  }

  body[data-route="payments"] .payment-mobile-main span::before {
    content: "Контрагент";
    display: block;
    margin-bottom: 3px;
    color: #7d708d;
    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: #7d708d;
    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 {
    content: "";
    display: none;
  }

  .payment-mobile-meta .payment-mobile-sent-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-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: repeat(5, minmax(44px, 1fr));
    min-width: 0;
    gap: 8px;
  }

  .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 {
    padding: 0;
  }

  .payment-mobile-icon.danger {
    color: #b24351;
  }

  .payment-mobile-control:focus-visible,
  .payment-mobile-icon:focus-visible {
    outline: 0;
    border-color: rgba(193, 168, 250, .78);
    box-shadow:
      inset 0 0 0 1px rgba(132,84,224,.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: min(52vh, 420px);
    max-height: min(52dvh, 420px);
    object-fit: contain;
  }

  .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 .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(112, 80, 255, .34), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(0, 204, 255, .22), transparent 25rem),
    linear-gradient(145deg, #070813 0%, #111321 44%, #171023 100%);
  color: #f6f4ff;
}

body[data-route="procurement"] .workspace {
  color: #f6f4ff;
}

body[data-route="procurement"] .sidebar {
  border-right-color: rgba(255,255,255,.1);
  background:
    linear-gradient(180deg, rgba(10, 13, 27, .82), rgba(12, 10, 24, .72)),
    radial-gradient(circle at 20% 8%, rgba(141, 99, 230, .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(235, 230, 255, .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(139, 110, 255, .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: #f6f4ff;
}

.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(109, 91, 255, .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(226, 224, 245, .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(151, 116, 255, .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(8, 10, 22, .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(226, 224, 245, .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(226, 224, 245, .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(226, 224, 245, .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(226, 224, 245, .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(226, 224, 245, .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(226, 224, 245, .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(246, 244, 255, .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(4, 5, 12, .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(142, 102, 233, 0.18), transparent 33rem),
    radial-gradient(circle at 90% 12%, rgba(73, 131, 232, 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(83, 54, 139, 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: #60566f;
}

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(244, 238, 255, .7)),
    radial-gradient(circle at 12% 50%, rgba(134, 86, 223, .2), transparent 70%);
  box-shadow: 0 16px 42px rgba(93, 58, 163, 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(249,246,255,.56)),
    radial-gradient(circle at 14% 0%, rgba(141, 99, 230, .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(126, 86, 210, .26);
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(242,237,255,.76)),
    radial-gradient(circle at 18% 50%, rgba(141, 99, 230, .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(126, 86, 210, .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(23, 19, 33, .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(242,237,255,.56)),
    radial-gradient(circle at 2% 50%, rgba(141,99,230,.13), transparent 50%);
  box-shadow: inset 3px 0 0 rgba(141,99,230,.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(126,86,210,.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;
  }
}
