@font-face {
  font-family: "MagistralC";
  src: url("../fonts/MagistralC Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #070707;
  --panel: rgba(14, 14, 13, 0.82);
  --panel-2: #15130f;
  --line: rgba(216, 187, 139, 0.22);
  --line-strong: rgba(216, 187, 139, 0.48);
  --text: #eee8de;
  --muted: #a89d8c;
  --gold: #d8bb8b;
  --gold-2: #987a4e;
  --emerald: #0f6b55;
  --emerald-soft: rgba(15, 107, 85, 0.22);
  --ok: #8ccf9b;
  --warn: #e0bd68;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 30px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  width: 100%;
  max-width: 100%;
  scroll-behavior: smooth;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 320px;
  min-height: 100svh;
  background:
    radial-gradient(circle at 12% 0%, rgba(216, 187, 139, 0.1), transparent 30rem),
    linear-gradient(135deg, #050505, #0c0b09 58%, #050505);
  color: var(--text);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(216, 187, 139, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 187, 139, 0.055) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

body.locked {
  overflow: hidden;
}

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  padding:
    max(18px, env(safe-area-inset-top))
    18px
    max(18px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 45%, rgba(216, 187, 139, 0.2), transparent 18rem),
    radial-gradient(circle at 56% 44%, rgba(15, 107, 85, 0.24), transparent 22rem),
    #050505;
  animation: splashAway 2.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  pointer-events: none;
}

.app-splash::before,
.app-splash::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(216, 187, 139, 0.34);
  border-radius: 999px;
  animation: splashRing 2.15s ease forwards;
}

.app-splash::after {
  width: 230px;
  height: 230px;
  border-color: rgba(15, 107, 85, 0.4);
  animation-delay: 0.18s;
}

.splash-orb {
  position: relative;
  width: clamp(104px, 34vw, 168px);
  max-width: 42svw;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(216, 187, 139, 0.62);
  border-radius: 34%;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 221, 142, 0.28), transparent 52%),
    rgba(8, 8, 8, 0.7);
  box-shadow:
    0 0 0 1px rgba(15, 107, 85, 0.32),
    0 28px 90px rgba(216, 187, 139, 0.18),
    0 28px 90px rgba(15, 107, 85, 0.18),
    inset 0 0 30px rgba(216, 187, 139, 0.12);
  animation: splashOrb 2.05s cubic-bezier(0.2, 0.8, 0.18, 1) forwards;
}

.splash-orb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: saturate(1.08) contrast(1.08);
  transform: scale(1.16);
}

.app-splash strong {
  position: relative;
  z-index: 1;
  max-width: min(88vw, 420px);
  font-family: "MagistralC", Inter, "Segoe UI", Arial, sans-serif;
  color: var(--gold);
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1.2;
  letter-spacing: 0.28em;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 0 28px rgba(216, 187, 139, 0.22);
  animation: splashTitle 2s ease forwards;
}

@media (max-width: 520px) {
  .app-splash {
    gap: 14px;
  }

  .app-splash::before {
    width: 138px;
    height: 138px;
  }

  .app-splash::after {
    width: 184px;
    height: 184px;
  }

  .splash-orb {
    width: clamp(102px, 31vw, 138px);
    max-width: 38svw;
    border-radius: 30%;
  }

  .app-splash strong {
    font-size: clamp(15px, 4.2vw, 20px);
    letter-spacing: 0.18em;
  }
}

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

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

img,
canvas {
  display: block;
  max-width: 100%;
}

.eyebrow {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.auth-screen {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(720px, 60vw);
  gap: clamp(28px, 5vw, 86px);
  align-items: center;
  padding: clamp(28px, 5vw, 76px);
}

.auth-back {
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  left: clamp(18px, 3vw, 34px);
  z-index: 20;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(216, 187, 139, 0.12), transparent),
    rgba(8, 8, 8, 0.72);
  color: var(--gold);
  text-decoration: none;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.auth-back span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 187, 139, 0.28);
  border-radius: 50%;
  font-size: 18px;
}

.auth-back strong {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-back:hover {
  transform: translateX(-2px);
  border-color: var(--line-strong);
  background:
    linear-gradient(135deg, rgba(216, 187, 139, 0.18), transparent),
    rgba(8, 8, 8, 0.86);
}

.auth-language {
  position: fixed;
  top: clamp(18px, 3vw, 34px);
  right: clamp(18px, 3vw, 34px);
  z-index: 20;
}

.auth-language__button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(15, 107, 85, 0.14), transparent),
    rgba(8, 8, 8, 0.72);
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.auth-language__button b {
  color: var(--gold);
  font-size: 11px;
}

.auth-language.is-open .auth-language__button,
.auth-language__button:hover {
  border-color: rgba(15, 107, 85, 0.8);
  box-shadow: 0 0 0 1px rgba(15, 107, 85, 0.2), 0 18px 60px rgba(15, 107, 85, 0.18);
  transform: translateY(-1px);
}

.auth-language__menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 230px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(216, 187, 139, 0.26);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 12%, rgba(15, 107, 85, 0.24), transparent 12rem),
    rgba(9, 9, 8, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transform-origin: top right;
  transition: opacity 0.24s ease, visibility 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-language.is-open .auth-language__menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.auth-language__menu button {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(216, 187, 139, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.22s ease, background 0.22s ease, transform 0.22s ease;
}

.auth-language__menu button:hover,
.auth-language__menu button.is-active {
  border-color: rgba(15, 107, 85, 0.82);
  background: rgba(15, 107, 85, 0.18);
  transform: translateX(3px);
}

.auth-brand,
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  text-transform: uppercase;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--gold);
  border-radius: 30px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 28%, rgba(216, 187, 139, 0.3), transparent 58%),
    rgba(216, 187, 139, 0.08);
  color: var(--gold);
  box-shadow:
    0 10px 34px rgba(15, 107, 85, 0.14),
    inset 0 0 24px rgba(216, 187, 139, 0.12);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(216, 187, 139, 0.34);
  border-radius: 13px;
  pointer-events: none;
}

.brand-mark img {
  width: 122%;
  height: 122%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.08);
}

.auth-brand strong,
.brand strong {
  display: block;
  font-family: "MagistralC", Inter, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  letter-spacing: 0.18em;
}

.auth-brand small,
.brand small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.auth-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.05fr);
  column-gap: clamp(34px, 4vw, 72px);
  align-items: start;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(216, 187, 139, 0.08), transparent 35%),
    rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(18px);
  padding: clamp(34px, 4.4vw, 62px);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.auth-card > .eyebrow,
.auth-card > h1,
.auth-card > p {
  grid-column: 1;
}

.auth-card > label,
.auth-card > .auth-actions,
.auth-card > .auth-note {
  grid-column: 2;
}

.auth-card h1 {
  margin: 12px 0 18px;
  font-size: clamp(52px, 4.8vw, 92px);
  line-height: 0.95;
}

.auth-card p {
  max-width: 420px;
  color: var(--muted);
  font-size: clamp(15px, 0.95vw, 18px);
  line-height: 1.8;
  margin-bottom: 24px;
}

.auth-card label {
  display: grid;
  margin-bottom: 14px;
  color: var(--muted);
}

.auth-card .terms-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 14px;
  margin: 10px 0 18px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
  line-height: 1.55;
}

.auth-card .register-only {
  display: none;
}

.auth-card.register-mode .register-only {
  display: grid;
}

.terms-check {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.26);
  color: var(--muted);
}

.terms-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.auth-card.terms-error .terms-check {
  border-color: var(--warn);
  color: var(--warn);
}

.auth-error {
  display: block;
  margin: -2px 0 16px;
  color: #f0aa8d;
  font-size: 13px;
  line-height: 1.45;
}

.auth-error.is-status {
  color: var(--emerald);
}

.auth-error[hidden] {
  display: none;
}

.auth-actions .mail-btn {
  border: 1px solid rgba(15, 107, 85, 0.62);
  background: rgba(15, 107, 85, 0.1);
  color: var(--text);
}

input,
select,
textarea {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: rgba(238, 232, 222, 0.72);
}

textarea {
  min-height: 96px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.auth-note {
  display: block;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.client-app[hidden],
.auth-screen[hidden] {
  display: none;
}

.client-app {
  min-height: 100svh;
  padding: 22px;
}

body.team-mode .client-app {
  padding-left: 252px;
}

.side-menu {
  position: fixed;
  left: 22px;
  top: 96px;
  z-index: 11;
  width: 206px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.76);
  backdrop-filter: blur(16px);
}

.side-menu strong {
  display: block;
  margin-top: 6px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.side-menu a {
  min-height: 36px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(216, 187, 139, 0.12);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.side-menu a:hover {
  color: var(--gold);
}

.role-pill {
  display: none;
}

.project-console {
  margin-bottom: 18px;
}

.project-console-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.36fr) 1fr;
  gap: 14px;
}

.project-rail {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
  padding-right: 4px;
}

.project-rail-item {
  width: 100%;
  min-height: 72px;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.project-rail-item.active {
  border-color: var(--gold);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.1), transparent 58%),
    rgba(255, 255, 255, 0.035);
}

.project-rail-item b,
.project-current-card h3 {
  overflow-wrap: anywhere;
}

.project-rail-item span,
.project-current-card p {
  color: var(--muted);
  line-height: 1.45;
}

.project-current-card {
  min-height: 260px;
  display: grid;
  align-content: end;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.08), transparent 42%),
    linear-gradient(30deg, rgba(15, 107, 85, 0.11), transparent 55%),
    rgba(255, 255, 255, 0.025);
}

.project-current-card > span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-current-card h3 {
  font-size: 42px;
  line-height: 0.95;
}

.project-current-team,
.project-current-actions,
.project-create-form,
.project-invite-form {
  display: grid;
  gap: 8px;
}

.project-current-team b {
  color: var(--muted);
  font-weight: 500;
}

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

.project-current-actions button,
.project-create-form button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  cursor: pointer;
}

.project-create-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.project-create-form button {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.project-current-actions .danger-action {
  border-color: rgba(224, 104, 104, 0.45);
  color: #e8b2a8;
}

.project-invite-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) auto;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid rgba(15, 107, 85, 0.42);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(15, 107, 85, 0.16), transparent 58%),
    rgba(9, 9, 9, 0.52);
}

.project-invite-form > span,
.project-invite-form small {
  grid-column: 1 / -1;
}

.project-invite-form > span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-invite-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(0, 0, 0, 0.34);
  color: var(--text);
}

.project-invite-form button {
  min-height: 42px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 0 18px;
  background: var(--gold);
  color: #111;
  cursor: pointer;
  white-space: nowrap;
}

.project-invite-form button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.project-invite-form small {
  min-height: 18px;
  color: var(--muted);
}

.project-invite-form small.ok {
  color: #9ce0af;
}

.project-invite-form small.error {
  color: #efafa3;
}

.user-area .role-pill {
  display: none !important;
}

.client-profile-panel .avatar-upload {
  display: none !important;
}

.support-panel {
  display: block;
}

.chat-fab,
.chat-dock {
  display: none !important;
}

body.client-mode {
  --client-max: 480px;
  background:
    radial-gradient(circle at 80% 12%, rgba(15, 107, 85, 0.18), transparent 18rem),
    radial-gradient(circle at 50% 0%, rgba(216, 187, 139, 0.12), transparent 24rem),
    #050505;
}

body.fixed-view {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 187, 139, 0.12), transparent 22rem),
    radial-gradient(circle at 80% 20%, rgba(15, 107, 85, 0.16), transparent 18rem),
    #050505;
}

body.fixed-view .client-app {
  width: min(450px, calc(100vw - 18px));
  height: min(920px, calc(100svh - 18px));
  min-height: 0;
  margin: 0 auto;
  padding: 12px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(216, 187, 139, 0.48);
  border-radius: 40px;
  background:
    radial-gradient(circle at 82% 0%, rgba(15, 107, 85, 0.14), transparent 18rem),
    radial-gradient(circle at 50% 0%, rgba(216, 187, 139, 0.1), transparent 18rem),
    rgba(6, 6, 6, 0.94);
  box-shadow:
    0 0 0 8px rgba(216, 187, 139, 0.06),
    0 28px 90px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 187, 139, 0.42) transparent;
}

body.fixed-view .client-app::-webkit-scrollbar,
body.fixed-view .designer-project-track::-webkit-scrollbar,
body.fixed-view .chat-dock__tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.fixed-view .client-app::before {
  content: "";
  position: sticky;
  top: 0;
  z-index: 30;
  display: block;
  width: 118px;
  height: 5px;
  margin: 0 auto 8px;
  border-radius: 999px;
  background: rgba(216, 187, 139, 0.26);
}

body.fixed-view .app-header {
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin: 0 -4px 12px;
  padding: 8px 4px 10px;
}

body.fixed-view .brand {
  gap: 10px;
}

body.fixed-view .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

body.fixed-view .brand strong {
  max-width: 150px;
  font-size: 20px;
  line-height: 0.98;
  letter-spacing: 0.14em;
  overflow-wrap: anywhere;
}

body.fixed-view .brand small {
  font-size: 9px;
}

body.fixed-view .user-area {
  gap: 6px;
}

body.fixed-view .user-area button {
  min-height: 40px;
  padding: 0 10px;
  font-size: 14px;
}

body.fixed-view .top-nav {
  display: none;
}

body.fixed-view .side-menu {
  position: static;
  width: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 12px;
}

body.fixed-view .side-menu strong {
  font-size: 24px;
  line-height: 1;
}

body.fixed-view .side-menu div {
  grid-column: 1 / -1;
}

body.fixed-view .side-menu a {
  justify-content: center;
  min-height: 34px;
  padding: 0 6px;
  font-size: 10px;
  text-align: center;
}

body.fixed-view .project-console-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

body.fixed-view .project-rail {
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 72%);
  grid-template-columns: none;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 0 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.fixed-view .project-rail::-webkit-scrollbar {
  display: none;
}

body.fixed-view .project-rail-item {
  min-height: 86px;
  scroll-snap-align: start;
}

body.fixed-view .project-current-card {
  min-height: 250px;
  padding: 16px;
}

body.fixed-view .project-current-card h3 {
  font-size: 36px;
}

body.fixed-view .project-current-actions {
  grid-template-columns: 1fr;
}

body.fixed-view .project-current-actions button {
  min-height: 46px;
}

body.fixed-view .project-invite-form {
  grid-template-columns: 1fr;
}

body.fixed-view .project-create-form {
  display: none;
}

body.fixed-view .receipt-list {
  grid-template-columns: 1fr;
}

body.fixed-view .timeline-row {
  grid-template-columns: 64px 1fr;
}

body.fixed-view .hero-project,
body.fixed-view .dashboard-grid {
  grid-template-columns: 1fr;
}

body.fixed-view .file-board,
body.fixed-view .notification-list,
body.fixed-view .ops-grid {
  grid-template-columns: 1fr;
}

body.fixed-view .designer-home,
body.fixed-view .panel,
body.fixed-view .hero-project {
  border-radius: 26px;
  padding: 20px;
}

body.fixed-view .panel-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 14px;
}

body.fixed-view .panel-head h2 {
  font-size: 34px;
  line-height: 0.95;
}

body.fixed-view .designer-project-track {
  grid-auto-columns: minmax(0, 100%);
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.fixed-view .designer-project-card {
  min-height: 430px;
  align-content: end;
  gap: 14px;
  padding: 18px;
  scroll-snap-align: center;
  overflow: hidden;
}

body.fixed-view .designer-project-meta {
  grid-template-columns: 1fr;
  gap: 8px;
  font-size: 19px;
  line-height: 1.28;
}

body.fixed-view .designer-project-meta span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.fixed-view .designer-project-card h3 {
  max-width: 100%;
  font-size: clamp(44px, 15vw, 56px);
  line-height: 0.92;
  overflow-wrap: anywhere;
  word-break: normal;
}

body.fixed-view .mini-stage-list {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

body.fixed-view .mini-stage-list span {
  gap: 5px;
  font-size: 10px;
}

body.fixed-view .mini-stage-list b {
  width: 42px;
  height: 42px;
  max-width: 100%;
}

body.fixed-view .mini-stage-list i {
  width: 100%;
  text-align: center;
  font-size: 10px;
}

body.fixed-view .designer-actions button {
  width: 44px;
  height: 44px;
}

body.fixed-view .designer-project-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

body.fixed-view .designer-project-actions button {
  width: 100%;
  min-height: 52px;
  font-size: 18px;
}

body.fixed-view .chat-dock {
  right: max(10px, calc((100vw - 450px) / 2 + 10px));
  bottom: calc(70px + env(safe-area-inset-bottom));
  width: min(430px, calc(100vw - 20px));
  height: min(740px, calc(100svh - 94px - env(safe-area-inset-bottom)));
  grid-template-columns: 1fr;
  border-radius: 30px;
}

body.fixed-view .chat-dock__tabs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  overflow: visible;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

body.fixed-view .chat-context {
  padding: 10px;
}

body.fixed-view .chat-capsules {
  grid-template-columns: 1fr;
}

body.fixed-view .chat-capsules .chat-project-chat {
  min-height: 46px;
}

body.fixed-view .chat-project-folder {
  min-width: 176px;
}

body.fixed-view .chat-fab {
  right: max(22px, calc((100vw - 450px) / 2 + 22px));
  bottom: calc(14px + env(safe-area-inset-bottom));
}

body.client-mode .client-app {
  width: min(100%, var(--client-max));
  margin: 0 auto;
  padding: clamp(10px, 3.4vw, 18px);
  padding-bottom: calc(92px + env(safe-area-inset-bottom));
}

body.client-mode .side-menu {
  position: static;
  width: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
  border-color: rgba(216, 187, 139, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.08), transparent 42%),
    rgba(8, 8, 8, 0.82);
}

body.client-mode .side-menu div {
  grid-column: 1 / -1;
}

body.client-mode .side-menu a {
  justify-content: center;
  min-height: 34px;
  padding: 0 6px;
  font-size: 10px;
  text-align: center;
}

body.client-mode .app-header {
  grid-template-columns: 1fr auto;
  gap: 12px;
  margin: calc(clamp(10px, 3.4vw, 18px) * -1) calc(clamp(10px, 3.4vw, 18px) * -1) 12px;
  padding: clamp(10px, 3.4vw, 16px);
  border-bottom-color: rgba(216, 187, 139, 0.34);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

body.client-mode .brand-mark {
  width: 34px;
  height: 42px;
  font-size: 20px;
}

body.client-mode .brand strong {
  font-size: 14px;
}

body.client-mode .brand small {
  font-size: 8px;
}

body.client-mode .top-nav,
body.client-mode [data-role-bar] {
  display: none;
}

body.client-mode .user-area {
  justify-self: end;
  gap: 6px;
}

body.client-mode .user-area button {
  min-height: 34px;
  padding: 0 9px;
  font-size: 11px;
}

body.client-mode .panel,
body.client-mode .hero-project {
  padding: 14px;
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(216, 187, 139, 0.055), transparent 38%),
    linear-gradient(20deg, rgba(15, 107, 85, 0.06), transparent 42%),
    rgba(14, 14, 13, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

body.client-mode .hero-project {
  min-height: min(560px, 78svh);
  grid-template-columns: 1fr;
  align-content: end;
  gap: 18px;
  margin-bottom: 12px;
  border-color: rgba(216, 187, 139, 0.42);
}

body.client-mode .hero-project h1 {
  font-size: 44px;
}

body.client-mode .project-team {
  display: grid;
}

body.client-mode .stage-row {
  grid-template-columns: 36px 1fr;
}

body.client-mode .stage-row > span {
  grid-column: 2;
}

body.client-mode .dashboard-grid,
body.client-mode .file-board {
  grid-template-columns: 1fr;
}

body.client-mode .dashboard-grid,
body.client-mode .right-stack {
  gap: 12px;
}

body.client-mode .panel-head {
  align-items: flex-start;
  flex-direction: column;
}

body.client-mode .file-tabs {
  display: grid;
  grid-template-columns: 1fr;
}

body.client-mode .file-card {
  min-height: 260px;
  border-radius: 8px;
}

body.client-mode .system-overview,
body.client-mode .notification-list,
body.client-mode .ops-grid {
  grid-template-columns: 1fr;
}

body.client-mode .bubble-map {
  min-height: 360px;
}

body.client-mode .permission-stack article {
  grid-template-columns: 1fr;
}

body.client-mode .material-list div,
body.client-mode .doc-list button,
body.client-mode .note-row {
  align-items: flex-start;
  flex-direction: column;
}

body.client-mode .chat-dock {
  right: max(8px, calc((100vw - var(--client-max)) / 2 + 8px));
  bottom: calc(68px + env(safe-area-inset-bottom));
  width: min(calc(var(--client-max) - 12px), calc(100vw - 16px));
  height: min(740px, calc(100svh - 88px - env(safe-area-inset-bottom)));
  grid-template-columns: 1fr;
  border-radius: 30px;
}

body.client-mode .chat-dock__tabs {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  overflow: visible;
  border-right: 0;
  border-bottom: 1px solid var(--line);
}

body.client-mode .chat-project-folder {
  min-width: 176px;
}

body.client-mode .chat-dock__tabs [data-chat-close] {
  min-width: 46px;
  margin-top: 0;
}

body.client-mode .chat-fab {
  right: max(14px, calc((100vw - var(--client-max)) / 2 + 14px));
  bottom: calc(14px + env(safe-area-inset-bottom));
  min-height: 58px;
  border-radius: 999px;
  box-shadow: 0 18px 50px rgba(216, 187, 139, 0.16), 0 18px 42px rgba(0, 0, 0, 0.45);
}

body.client-mode .support-panel {
  border-color: rgba(15, 107, 85, 0.68);
  background:
    linear-gradient(145deg, var(--emerald-soft), transparent 54%),
    rgba(14, 14, 13, 0.92);
  padding: 16px;
}

body.client-mode .support-panel button {
  width: fit-content;
  min-height: 36px;
  color: var(--emerald);
  border-color: rgba(15, 107, 85, 0.58);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  margin: -22px -22px 18px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 8, 0.88);
  backdrop-filter: blur(16px);
}

.top-nav {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 4vw, 58px);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.top-nav a:hover {
  color: var(--gold);
}

.user-area {
  display: flex;
  gap: 8px;
}

.user-pill,
.role-pill,
.ghost-btn,
.gold-btn,
.upload-btn,
.chat-form button,
.foreman-note button {
  min-height: 42px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.user-pill,
.role-pill,
.ghost-btn {
  padding: 0 16px;
}

.user-pill {
  border-color: var(--gold);
  background: rgba(216, 187, 139, 0.09);
}

.role-pill {
  color: var(--muted);
}

.gold-btn,
.foreman-note button,
.chat-form button:last-child {
  padding: 0 18px;
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.role-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  overflow-x: auto;
}

.role-bar span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.role-bar button,
.file-tabs button,
.chat-dock__tabs button,
.editor-toolbar button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}

.role-bar button.active,
.file-tabs button.active,
.chat-dock__tabs button.active,
.editor-toolbar button.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 20px;
}

.ops-hub {
  margin-bottom: 18px;
}

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

.ops-card,
.revision-item {
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.06), transparent 48%),
    rgba(0, 0, 0, 0.24);
}

.ops-card {
  min-height: 132px;
  padding: 14px;
}

.ops-card span,
.revision-item span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ops-card b {
  display: block;
  margin: 14px 0 8px;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.ops-card p,
.revision-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.revision-form {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.revision-form button {
  min-height: 40px;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: #111;
  cursor: pointer;
}

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

.revision-item {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.revision-item b {
  display: block;
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.2;
}

.revision-item img {
  max-height: 150px;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.revision-item button {
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.revision-item.closed {
  opacity: 0.72;
  border-color: rgba(15, 107, 85, 0.52);
}

.revision-item.closed button {
  color: var(--ok);
  cursor: default;
}

.system-overview {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.bubble-map {
  min-height: 260px;
  position: relative;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 187, 139, 0.16);
  background:
    radial-gradient(circle at center, rgba(216, 187, 139, 0.14), transparent 36%),
    radial-gradient(circle at 80% 20%, var(--emerald-soft), transparent 28%);
}

.core-bubble,
.bubble-branch {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.84);
}

.core-bubble {
  width: 140px;
  height: 140px;
  color: var(--gold);
}

.core-bubble span {
  font-family: Georgia, serif;
  font-size: 42px;
}

.core-bubble b,
.bubble-branch small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.bubble-branch {
  position: absolute;
  width: 132px;
  min-height: 68px;
  padding: 10px;
  color: var(--text);
  font-size: 13px;
}

.bubble-branch:nth-child(2) { left: 24px; top: 28px; }
.bubble-branch:nth-child(3) { right: 24px; top: 28px; }
.bubble-branch:nth-child(4) { left: 42px; bottom: 24px; }
.bubble-branch:nth-child(5) { right: 42px; bottom: 24px; }

.bubble-branch.emerald {
  border-color: rgba(15, 107, 85, 0.8);
  box-shadow: 0 0 0 1px var(--emerald-soft), 0 18px 45px rgba(15, 107, 85, 0.14);
}

.permission-stack {
  display: grid;
  gap: 10px;
}

.permission-stack article,
.notification-item,
.profile-grid div {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.permission-stack article {
  display: grid;
  grid-template-columns: minmax(120px, 0.28fr) 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.permission-stack span,
.support-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.permission-stack button,
.questionnaire-form button,
.support-panel button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
}

.permission-stack button.allowed {
  border-color: var(--emerald);
  background: var(--emerald-soft);
  color: var(--ok);
}

.notifications-panel {
  margin-bottom: 18px;
}

.notification-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.notification-item {
  min-height: 112px;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.notification-item span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.notification-item b {
  display: block;
  margin: 12px 0 6px;
}

.notification-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.notification-item i {
  display: inline-flex;
  width: fit-content;
  margin-top: 14px;
  padding: 7px 10px;
  border: 1px solid rgba(216, 187, 139, 0.28);
  border-radius: 999px;
  color: var(--gold);
  font-size: 11px;
  font-style: normal;
}

.notification-item:hover {
  border-color: rgba(216, 187, 139, 0.66);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.045);
}

.notification-item.approval {
  border-color: rgba(15, 107, 85, 0.62);
}

.avatar-upload {
  position: relative;
  cursor: pointer;
}

.avatar-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.avatar-upload span {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--emerald);
  border-radius: 50%;
  background:
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
    var(--avatar-image, var(--emerald-soft));
  background-size: cover;
  background-position: center;
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 24px;
}

.profile-grid {
  display: grid;
  gap: 8px;
}

.profile-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
}

.profile-grid span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-grid b {
  font-weight: 500;
  line-height: 1.35;
}

.questionnaire-form {
  display: grid;
  gap: 10px;
}

.questionnaire-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.questionnaire-form button,
.support-panel button {
  width: fit-content;
  background: var(--gold);
  color: #111;
}

.support-panel button {
  background: rgba(15, 107, 85, 0.14);
  color: var(--emerald);
  border-color: rgba(15, 107, 85, 0.58);
}

.designer-home {
  margin-bottom: 18px;
}

.designer-actions {
  display: inline-flex;
  gap: 10px;
}

.designer-actions button {
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.designer-project-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(360px, 48%);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
}

.designer-project-card {
  min-height: 310px;
  display: grid;
  align-content: end;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent 58%),
    var(--project-image) center/cover,
    #080808;
  cursor: pointer;
  scroll-snap-align: start;
}

.designer-project-card.active {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(216, 187, 139, 0.25);
}

.designer-project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  color: var(--muted);
}

.designer-project-card h3 {
  max-width: 360px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.9;
}

.mini-stage-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.mini-stage-list span {
  min-width: 0;
  display: grid;
  gap: 7px;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
}

.mini-stage-list b {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-weight: 400;
}

.mini-stage-list .done b {
  border-color: var(--ok);
  color: var(--ok);
}

.mini-stage-list .current b {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.mini-stage-list i {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: normal;
  white-space: nowrap;
}

.designer-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.designer-project-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.42);
  color: var(--text);
  cursor: pointer;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head.compact {
  align-items: center;
}

.hero-project {
  min-height: 315px;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(340px, 0.75fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.2)),
    url("../luchi/2.jpg") center/cover;
}

.hero-project h1 {
  margin: 12px 0 14px;
  font-size: clamp(44px, 6vw, 90px);
  line-height: 0.9;
}

.hero-project p {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.project-team {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.project-team span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
}

.stage-strip {
  display: grid;
  gap: 10px;
}

.stage-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
}

.stage-row b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 400;
}

.stage-row.done b {
  border-color: var(--ok);
  color: var(--ok);
}

.stage-row.current b {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.stage-row strong {
  font-weight: 500;
}

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

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

.upload-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  overflow: hidden;
}

.upload-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.file-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.file-card {
  min-width: 0;
  min-height: 250px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), transparent 62%),
    var(--file-image) center/cover;
  border-radius: 18px;
}

.file-card.file-doc {
  background:
    linear-gradient(160deg, rgba(216, 187, 139, 0.12), transparent 45%),
    #0b0a08;
}

.file-card span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.file-card h3 {
  font-size: 24px;
  line-height: 1;
}

.file-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.file-status {
  width: fit-content;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(224, 189, 104, 0.44);
  background: rgba(224, 189, 104, 0.07);
  color: var(--warn);
  font-size: 11px;
}

.file-status.approved {
  border-color: rgba(15, 107, 85, 0.72);
  background: var(--emerald-soft);
  color: var(--ok);
}

.file-status.rejected {
  border-color: rgba(224, 104, 104, 0.54);
  background: rgba(224, 104, 104, 0.08);
  color: #e8b2a8;
}

.person-line,
.project-team span,
.project-current-team b,
.profile-grid b {
  color: var(--emerald);
}

.material-comments {
  display: grid;
  gap: 8px;
}

.material-comments div {
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border: 1px solid rgba(15, 107, 85, 0.42);
  border-radius: 14px;
  background: rgba(4, 22, 18, 0.7);
}

.material-comments b {
  color: var(--emerald);
  font-size: 12px;
}

.material-comment-form {
  width: 100%;
  min-width: 0;
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 6px 14px;
  border: 1px solid rgba(216, 187, 139, 0.34);
  border-radius: 999px;
  background: rgba(6, 6, 6, 0.72);
}

.material-comment-form:focus-within {
  border-radius: 18px;
}

.material-comment-form textarea {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  max-height: 120px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  resize: none;
  overflow: hidden;
  line-height: 1.25;
}

.file-card .material-comment-form button {
  width: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #111;
  text-align: center;
}

.approval-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-card button {
  width: fit-content;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  cursor: pointer;
}

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

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ok);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(140, 207, 155, 0.1);
}

.budget-mini strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 42px;
  font-weight: 400;
}

.budget-mini span {
  color: var(--muted);
  font-size: 13px;
}

.budget-mini i {
  display: block;
  height: 6px;
  margin: 18px 0;
  background:
    linear-gradient(90deg, var(--gold) var(--progress), rgba(255, 255, 255, 0.08) var(--progress));
}

.material-list,
.doc-list,
.note-list,
.receipt-list,
.timeline-list {
  display: grid;
  gap: 10px;
}

.material-list div,
.doc-list button,
.note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.doc-list button {
  width: 100%;
  min-height: 58px;
  cursor: pointer;
}

.doc-list button:hover span {
  color: var(--text);
}

.doc-list button:disabled {
  cursor: default;
  opacity: 0.82;
}

.material-list span,
.doc-list span,
.note-row span {
  color: var(--muted);
}

.legal-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.doc-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.32);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.doc-status.signed {
  border-color: rgba(140, 207, 155, 0.55);
  color: var(--ok);
  background: rgba(140, 207, 155, 0.08);
}

.doc-status.review {
  border-color: rgba(216, 187, 139, 0.56);
  color: var(--gold);
  background: rgba(216, 187, 139, 0.08);
}

.doc-status.waiting {
  border-color: rgba(224, 189, 104, 0.46);
  color: var(--warn);
  background: rgba(224, 189, 104, 0.07);
}

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

.receipt-card,
.timeline-row,
.empty-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
  overflow: hidden;
}

.receipt-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #050505;
}

.receipt-card div,
.empty-row {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.receipt-card span,
.timeline-row span,
.empty-row p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.receipt-card p {
  color: var(--gold);
}

.timeline-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.timeline-row time {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(216, 187, 139, 0.34);
  border-radius: 16px;
  color: var(--gold);
}

.timeline-row.done {
  border-color: rgba(140, 207, 155, 0.45);
}

.timeline-row.done time {
  border-color: rgba(140, 207, 155, 0.55);
  color: var(--ok);
}

.foreman-note {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.chat-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: #111;
  cursor: pointer;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.42);
}

.chat-fab b {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111;
  color: var(--gold);
  font-size: 12px;
}

.chat-dock {
  position: fixed;
  right: 24px;
  bottom: 92px;
  z-index: 25;
  width: min(720px, calc(100vw - 48px));
  height: min(560px, calc(100svh - 124px));
  display: grid;
  grid-template-columns: 180px 1fr;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: rgba(8, 8, 8, 0.97);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.52);
  overflow: hidden;
  transform: translateY(22px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.chat-dock.open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.chat-dock__tabs {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border-right: 1px solid var(--line);
  overflow-y: auto;
  position: relative;
}

.chat-context {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.08), transparent 58%),
    rgba(255, 255, 255, 0.025);
}

.chat-context span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-context b {
  font-size: 16px;
  line-height: 1.2;
}

.chat-capsules {
  display: grid;
  gap: 8px;
}

.chat-menu-toggle {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--gold);
  cursor: pointer;
}

.chat-menu-toggle span {
  display: none;
}

.chat-menu-panel {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  z-index: 3;
  width: min(310px, calc(100% - 24px));
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.08), transparent 52%),
    rgba(8, 8, 8, 0.96);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.62);
  transform: translateX(calc(-100% - 18px));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.chat-dock.menu-open .chat-menu-panel {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.chat-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-menu-head button {
  width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.chat-support-slot {
  align-self: end;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.chat-dock__tabs button {
  width: 100%;
  text-align: left;
}

.chat-dock__tabs [data-chat-close] {
  margin-top: 8px;
  min-height: 42px;
  border-radius: 50%;
  text-align: center;
}

.chat-tree-label {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-project-folder {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.chat-project-folder.selected {
  border-color: rgba(216, 187, 139, 0.5);
}

.chat-dock__tabs .chat-project-title,
.chat-dock__tabs .chat-project-chat {
  min-height: 38px;
  border: 0;
  background: transparent;
}

.chat-dock__tabs .chat-project-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.chat-project-title i {
  color: var(--gold);
  font-style: normal;
}

.chat-project-chats {
  display: none;
  padding: 0 8px 8px;
}

.chat-project-folder.open .chat-project-chats {
  display: grid;
  gap: 6px;
}

.chat-dock__tabs .chat-project-chat {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.chat-capsules .chat-project-chat {
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-align: left;
}

.chat-dock__tabs .chat-project-chat.active {
  border-color: var(--gold);
  background: rgba(216, 187, 139, 0.12);
  color: var(--gold);
}

.chat-dock__body {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-people {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.chat-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 14px;
}

.message {
  max-width: 82%;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.message.mine {
  align-self: flex-end;
  border-color: rgba(216, 187, 139, 0.5);
  background: rgba(216, 187, 139, 0.08);
}

.message-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

.message p {
  line-height: 1.5;
}

.message img {
  margin-top: 10px;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.monitor-card {
  max-width: none;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.monitor-card.ok {
  border-color: rgba(15, 107, 85, 0.72);
  background: var(--emerald-soft);
}

.monitor-card.warn {
  border-color: rgba(224, 189, 104, 0.58);
  background: rgba(224, 189, 104, 0.08);
}

.monitor-card span {
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.monitor-card b {
  display: block;
  margin: 10px 0 6px;
  font-size: 20px;
}

.monitor-card p {
  color: var(--muted);
  line-height: 1.45;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

.chat-form button {
  padding: 0 12px;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(8px);
}

.editor-modal[hidden] {
  display: none;
}

.editor-card {
  width: min(1120px, 100%);
  max-height: calc(100svh - 44px);
  overflow: auto;
  border: 1px solid var(--line-strong);
  background: #0b0a08;
  padding: 20px;
}

.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.editor-head button {
  width: 42px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.canvas-wrap {
  overflow: hidden;
  border: 1px solid var(--line);
  background: #050505;
}

canvas {
  width: 100%;
  height: auto;
  touch-action: none;
}

.editor-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.panel,
.side-menu,
.role-bar,
.stage-row,
.ops-card,
.revision-item,
.permission-stack article,
.notification-item,
.profile-grid div,
.designer-project-card,
.hero-project,
.file-card,
.doc-status,
.chat-dock,
.chat-project-folder,
.message,
.monitor-card,
.editor-card,
.canvas-wrap,
.doc-list button,
.note-row,
.material-list div {
  border-radius: var(--radius);
}

button,
input,
select,
textarea,
.user-pill,
.role-pill,
.ghost-btn,
.gold-btn,
.upload-btn,
.chat-form button,
.foreman-note button,
.designer-project-actions button,
.file-card button,
.permission-stack button,
.questionnaire-form button,
.support-panel button {
  border-radius: var(--radius-sm);
}

.panel,
.chat-dock,
.editor-card,
.approval-card {
  backdrop-filter: blur(18px) saturate(1.12);
}

button,
.designer-project-card,
.file-card,
.chat-project-folder,
.message,
.stage-row,
.revision-item {
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    opacity 0.22s ease;
}

button:hover,
.designer-project-card:hover,
.file-card:hover {
  transform: translateY(-1px);
}

.chat-project-chats {
  overflow: hidden;
  transition: grid-template-rows 0.22s ease, opacity 0.22s ease, padding 0.22s ease;
}

.approval-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(10px);
}

.approval-card {
  width: min(430px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(216, 187, 139, 0.12), transparent 42%),
    linear-gradient(25deg, rgba(15, 107, 85, 0.16), transparent 60%),
    rgba(8, 8, 8, 0.94);
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.62);
}

.approval-card h2 {
  font-size: 34px;
  line-height: 1;
}

.approval-card p {
  color: var(--muted);
  line-height: 1.55;
}

.approval-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(216, 187, 139, 0.26);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  line-height: 1.45;
}

.approval-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--gold);
}

.approval-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.approval-actions button {
  min-height: 46px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.approval-actions [data-approval-confirm] {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.approval-actions [data-approval-confirm]:disabled {
  opacity: 0.42;
  cursor: default;
}

@keyframes splashOrb {
  0% {
    opacity: 0;
    border-radius: 50%;
    transform: scale(0.42);
    filter: blur(10px);
  }
  24% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  66% {
    border-radius: 50%;
    transform: scale(1.08);
  }
  82% {
    border-radius: 50%;
    transform: scale(1.42);
    opacity: 0.88;
  }
  100% {
    border-radius: 50%;
    transform: scale(2.7);
    opacity: 0;
    filter: blur(18px);
  }
}

@keyframes splashRing {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  34% {
    opacity: 0.72;
    transform: scale(1);
  }
  82% {
    opacity: 0.32;
    transform: scale(1.42);
  }
  100% {
    opacity: 0;
    transform: scale(2.65);
  }
}

@keyframes splashTitle {
  0%,
  18% {
    opacity: 0;
    transform: translateY(10px);
  }
  34%,
  70% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@keyframes splashAway {
  0%,
  76% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (min-width: 700px) {
  body.client-mode {
    min-height: 100svh;
    display: grid;
    place-items: start center;
    padding: 20px 0;
  }

  body.client-mode .client-app {
    min-height: calc(100svh - 40px);
    border: 1px solid rgba(216, 187, 139, 0.38);
    border-radius: 38px;
    background:
      radial-gradient(circle at 80% 0%, rgba(15, 107, 85, 0.16), transparent 18rem),
      rgba(7, 7, 7, 0.78);
    box-shadow:
      0 0 0 8px rgba(216, 187, 139, 0.06),
      0 34px 100px rgba(0, 0, 0, 0.58);
    overflow: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-splash {
    animation-duration: 0.5s;
  }

  .splash-orb,
  .app-splash::before,
  .app-splash::after,
  .app-splash strong {
    animation-duration: 0.5s;
  }
}

@media (max-width: 1120px) {
  .auth-screen {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .auth-card {
    grid-template-columns: minmax(240px, 0.85fr) minmax(340px, 1.15fr);
  }

  body.team-mode .client-app {
    padding-left: 22px;
  }

  .side-menu {
    position: static;
    width: auto;
    grid-template-columns: repeat(6, auto);
    margin-bottom: 18px;
    overflow-x: auto;
  }

  .side-menu div {
    min-width: 160px;
  }

  .app-header {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 12px;
  }

  .hero-project,
  .dashboard-grid,
  .system-overview {
    grid-template-columns: 1fr;
  }

  .notification-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .file-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .designer-project-track {
    grid-auto-columns: minmax(320px, 72%);
  }
}

@media (max-width: 760px) {
  body.team-mode .client-app {
    padding-left: 14px;
  }

  .auth-screen {
    grid-template-columns: 1fr;
    align-content: center;
    padding-top: 86px;
  }

  .auth-back {
    min-height: 42px;
    padding-right: 13px;
  }

  .auth-back strong {
    font-size: 10px;
  }

  .auth-card {
    display: block;
    padding: 24px;
  }

  .auth-card h1 {
    font-size: clamp(42px, 13vw, 64px);
  }

  .auth-card p {
    max-width: none;
    font-size: 14px;
  }

  .auth-actions,
  .foreman-note,
  .chat-form {
    grid-template-columns: 1fr;
  }

  .client-app {
    padding: 14px;
  }

  .side-menu {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .side-menu div {
    grid-column: 1 / -1;
  }

  .app-header {
    margin: -14px -14px 14px;
    padding: 12px 14px;
  }

  .user-area {
    justify-self: stretch;
    grid-column: 1 / -1;
  }

  .user-area button {
    flex: 1;
  }

  .panel,
  .hero-project,
  .editor-card {
    padding: 14px;
  }

  .hero-project h1 {
    font-size: 44px;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .file-board {
    grid-template-columns: 1fr;
  }

  .notification-list,
  .ops-grid,
  .permission-stack article {
    grid-template-columns: 1fr;
  }

  .bubble-map {
    min-height: 380px;
  }

  .bubble-branch {
    width: 118px;
    font-size: 12px;
  }

  .designer-project-track {
    grid-auto-columns: minmax(280px, 88%);
  }

  .designer-project-meta {
    grid-template-columns: 1fr;
  }

  .chat-dock {
    right: 12px;
    bottom: 82px;
    width: calc(100vw - 24px);
    height: min(620px, calc(100svh - 104px));
    grid-template-columns: 1fr;
  }

  .chat-dock__tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-project-folder {
    min-width: 180px;
  }

  .chat-dock__tabs [data-chat-close] {
    min-width: 46px;
    margin-top: 0;
  }

  .chat-fab {
    right: 14px;
    bottom: 14px;
  }
}

@media (min-width: 600px) {
  body.client-mode {
    --client-max: 520px;
  }

  body.client-mode .client-app {
    padding-inline: 18px;
  }

  body.client-mode .side-menu {
    grid-template-columns: 1.2fr repeat(6, minmax(0, 1fr));
    align-items: stretch;
  }

  body.client-mode .side-menu div {
    grid-column: auto;
    align-self: center;
  }

  body.client-mode .side-menu a {
    min-height: 42px;
  }

  body.client-mode .hero-project {
    min-height: 520px;
  }

  body.client-mode .hero-project h1 {
    font-size: 56px;
  }

  body.client-mode .notification-list,
  body.client-mode .file-board,
  body.client-mode .ops-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.client-mode .permission-stack article {
    grid-template-columns: minmax(110px, 0.34fr) 1fr;
  }

  body.client-mode .permission-stack button {
    grid-column: 1 / -1;
  }

  body.client-mode .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.client-mode .support-panel {
    position: relative;
  }
}

@media (max-width: 380px) {
  body.client-mode .client-app {
    padding: 10px;
  }

  body.client-mode .side-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.client-mode .hero-project {
    min-height: 500px;
  }

  body.client-mode .hero-project h1 {
    font-size: 38px;
  }

  body.client-mode .user-area {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  body.client-mode .user-area button {
    flex: 1;
  }
}
