:root {
  --brand: #176b57;
  --brand-strong: #0d4f40;
  --brand-soft: #e9f5f1;
  --accent: #eab75f;
  --ink: #18221f;
  --muted: #66736f;
  --line: #e1e7e4;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --canvas: #f1f5f3;
  --danger: #c84242;
  --danger-soft: #fff0f0;
  --warning: #a66512;
  --warning-soft: #fff7e8;
  --success: #157458;
  --success-soft: #e9f7f1;
  --info: #3166a8;
  --info-soft: #edf4ff;
  --shadow-sm: 0 1px 2px rgba(17, 38, 31, 0.05);
  --shadow-md: 0 10px 32px rgba(17, 38, 31, 0.09);
  --shadow-lg: 0 24px 70px rgba(17, 38, 31, 0.16);
  --radius-sm: 9px;
  --radius: 14px;
  --radius-lg: 22px;
  --sidebar: 248px;
}

[data-theme="dark"] {
  --ink: #f4f4f5;
  --muted: #a1a1aa;
  --line: #2f3037;
  --surface: #18181b;
  --surface-2: #222226;
  --canvas: #0f0f11;
  --brand-soft: #232624;
  --danger-soft: #321d20;
  --warning-soft: #302718;
  --success-soft: #17261f;
  --info-soft: #1c2432;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 32px rgba(0, 0, 0, 0.23);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

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

.app-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 20px;
}

.loading-bar {
  width: 120px;
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.loading-bar span {
  display: block;
  width: 50%;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  animation: loading 1s ease-in-out infinite alternate;
}

@keyframes loading {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(150%);
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark-lg {
  width: 92px;
  height: 92px;
  margin: auto;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(9, 55, 45, 0.2));
}

.brand em {
  color: var(--brand);
  font-style: normal;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.icon-sm {
  width: 15px;
  height: 15px;
}

.icon-lg {
  width: 22px;
  height: 22px;
}

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

.small {
  font-size: 12px;
}

.text-right {
  text-align: right;
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.nowrap {
  white-space: nowrap;
}

.btn {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  transition:
    transform 0.15s ease,
    background 0.15s ease,
    border 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 7px 18px rgba(23, 107, 87, 0.19);
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}

.btn-secondary:hover {
  border-color: #bac8c3;
  background: var(--surface-2);
}

.btn-danger {
  color: var(--danger);
  border-color: #f1caca;
  background: var(--danger-soft);
}

.btn-ghost {
  padding-inline: 10px;
  color: var(--muted);
  background: transparent;
}

.btn-ghost:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.btn-sm {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.btn-lg {
  min-height: 48px;
  padding-inline: 22px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
}

.icon-btn:hover {
  color: var(--ink);
  border-color: #bdcac5;
}

.field {
  display: grid;
  gap: 7px;
}

.field > span,
.field-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.field-hint {
  margin-top: -2px;
  color: var(--muted);
  font-size: 11px;
}

.form-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  color: #7a1f2b;
  background: #fff1f3;
  border: 1px solid #ffc9d1;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 750;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--ink);
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    border 0.15s ease,
    box-shadow 0.15s ease;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(23, 107, 87, 0.12);
}

.textarea {
  min-height: 92px;
  resize: vertical;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted);
  transform: translateY(-50%);
}

.input-with-icon .input {
  padding-left: 39px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.form-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.form-section-title {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-section-title h3 {
  margin: 0;
  font-size: 15px;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 0.85fr) minmax(520px, 1.15fr);
  background: var(--surface);
}

.auth-panel {
  padding: 44px clamp(28px, 6vw, 86px);
  display: flex;
  flex-direction: column;
}

.auth-panel .brand {
  margin-bottom: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 430px;
  margin: 70px auto;
}

.auth-form-wrap h1 {
  margin-bottom: 9px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.auth-subtitle {
  margin-bottom: 32px;
  color: var(--muted);
  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-form .btn {
  margin-top: 5px;
}

.demo-box {
  margin-top: 22px;
  padding: 14px;
  border: 1px solid #cfe3dc;
  border-radius: 12px;
  background: var(--brand-soft);
}

.demo-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
}

.demo-box button {
  margin-top: 8px;
  padding: 0;
  border: 0;
  color: var(--brand);
  cursor: pointer;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
}

.auth-foot {
  color: var(--muted);
  font-size: 12px;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  padding: clamp(40px, 7vw, 100px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #f4fff9;
  background:
    radial-gradient(circle at 82% 12%, rgba(234, 183, 95, 0.28), transparent 22%),
    radial-gradient(circle at 18% 90%, rgba(89, 185, 154, 0.25), transparent 27%),
    linear-gradient(145deg, #0a3d33, #176b57 58%, #225f51);
}

.auth-visual::after {
  position: absolute;
  right: -100px;
  bottom: -130px;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
  box-shadow:
    0 0 0 70px rgba(255, 255, 255, 0.03),
    0 0 0 140px rgba(255, 255, 255, 0.025);
}

.auth-visual-copy {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.auth-kicker {
  margin-bottom: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #bce4d8;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.auth-kicker::before {
  width: 24px;
  height: 1px;
  content: "";
  background: currentColor;
}

.auth-visual h2 {
  max-width: 580px;
  margin-bottom: 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5.5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1;
}

.auth-visual p {
  max-width: 520px;
  color: #cbe1da;
  font-size: 16px;
}

.visual-proof {
  position: relative;
  z-index: 1;
  margin-top: 58px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.visual-proof > div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
}

.visual-proof strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 20px;
}

.visual-proof span {
  color: #b9d6cd;
  font-size: 11px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.sidebar .brand {
  padding: 2px 10px 23px;
}

.company-switcher {
  margin-bottom: 18px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.company-avatar,
.avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 10px;
  background: var(--brand);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.company-avatar {
  width: 34px;
  height: 34px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.company-switcher strong,
.company-switcher span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switcher strong {
  max-width: 148px;
  font-size: 12px;
}

.company-switcher span {
  max-width: 148px;
  color: var(--muted);
  font-size: 10px;
}

.nav-label {
  margin: 13px 10px 7px;
  color: #94a09c;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 3px;
}

.nav-item {
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  transition:
    color 0.15s ease,
    background 0.15s ease;
}

.nav-item:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-item.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-item .nav-badge {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  color: var(--muted);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 10px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: auto;
}

.upgrade-card {
  margin: 16px 4px;
  padding: 14px;
  border: 1px solid #cfe3dc;
  border-radius: 13px;
  background: var(--brand-soft);
}

.upgrade-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 12px;
}

.upgrade-card span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.sidebar-user {
  padding: 12px 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-info strong,
.sidebar-user-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-info strong {
  font-size: 11px;
}

.sidebar-user-info span {
  color: var(--muted);
  font-size: 9px;
}

.sidebar-user .icon-btn {
  width: 30px;
  height: 30px;
  margin-left: auto;
  border: 0;
  background: transparent;
}

.main {
  min-width: 0;
  grid-column: 2;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 72px;
  padding: 0 clamp(20px, 3.2vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(225, 231, 228, 0.8);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(14px);
}

[data-theme="dark"] .topbar {
  border-color: rgba(44, 57, 53, 0.8);
}

.mobile-menu {
  display: none;
}

.topbar-title strong {
  display: block;
  font-size: 14px;
}

.topbar-title span {
  color: var(--muted);
  font-size: 11px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.notification-button {
  position: relative;
}

.notification-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--danger);
}

.impersonation-banner {
  min-height: 42px;
  padding: 8px clamp(20px, 3.2vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #6f4709;
  background: #fff1d4;
  font-size: 12px;
  font-weight: 650;
}

.content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 32px clamp(20px, 3.2vw, 44px) 60px;
}

.page-head {
  margin-bottom: 26px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.page-head h1 {
  margin-bottom: 5px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.metrics-grid {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  position: relative;
  min-width: 0;
  padding: 19px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card::after {
  position: absolute;
  top: -32px;
  right: -32px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  content: "";
  background: var(--metric-color, var(--brand-soft));
  opacity: 0.62;
}

.metric-top {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--brand);
  border-radius: 10px;
  background: var(--brand-soft);
}

.metric-trend {
  color: var(--success);
  font-size: 10px;
  font-weight: 800;
}

.metric-card strong {
  display: block;
  margin-bottom: 3px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.04em;
}

.metric-card > span {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-head {
  min-height: 62px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 14px;
}

.card-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.card-body {
  padding: 18px;
}

.chart {
  height: 230px;
  padding: 12px 10px 0;
  display: flex;
  align-items: end;
  gap: clamp(10px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% 25%;
}

.chart-group {
  height: 100%;
  flex: 1;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
}

.chart-bar {
  position: relative;
  width: min(22px, 38%);
  min-height: 5px;
  border-radius: 6px 6px 2px 2px;
  background: #a8cfc3;
}

.chart-bar.approved {
  background: var(--brand);
}

.chart-bar:hover::after {
  position: absolute;
  z-index: 4;
  bottom: calc(100% + 7px);
  left: 50%;
  padding: 4px 7px;
  color: #fff;
  border-radius: 6px;
  content: attr(data-value);
  background: #17211e;
  font-size: 10px;
  transform: translateX(-50%);
}

.chart-labels {
  padding-top: 10px;
  display: flex;
  gap: clamp(10px, 3vw, 28px);
}

.chart-labels span {
  flex: 1;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  text-transform: capitalize;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #a8cfc3;
}

.legend-dot.approved {
  background: var(--brand);
}

.activity-list {
  display: grid;
}

.activity-item {
  padding: 13px 0;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 2px var(--warning-soft);
}

.activity-dot.green {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success-soft);
}

.activity-dot.red {
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger-soft);
}

.activity-info {
  min-width: 0;
  flex: 1;
}

.activity-info strong,
.activity-info span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-info strong {
  font-size: 11px;
}

.activity-info span {
  color: var(--muted);
  font-size: 9px;
}

.activity-value {
  font-size: 11px;
  font-weight: 750;
}

.quick-actions {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-action {
  padding: 15px 10px;
  display: grid;
  place-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 750;
}

.quick-action:hover {
  color: var(--brand);
  border-color: #bcd8cf;
  background: var(--brand-soft);
}

.table-card {
  overflow: hidden;
}

.table-toolbar {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.table-toolbar .input-with-icon {
  width: min(360px, 100%);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-chip {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--muted);
  background: var(--surface);
  font-size: 10px;
  font-weight: 750;
}

.filter-chip.active {
  color: var(--brand);
  border-color: #bcd8cf;
  background: var(--brand-soft);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  padding: 11px 16px;
  color: #87938f;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.data-table td {
  min-height: 62px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: var(--surface-2);
}

.entity-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-icon {
  width: 35px;
  height: 35px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--brand);
  border-radius: 10px;
  background: var(--brand-soft);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.entity-cell strong,
.entity-cell span {
  display: block;
}

.entity-cell strong {
  color: var(--ink);
  font-size: 11px;
}

.entity-cell span {
  max-width: 230px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  min-height: 24px;
  padding: 3px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: currentColor;
}

.status-approved,
.status-signed,
.status-active,
.status-paid {
  color: var(--success);
  background: var(--success-soft);
}

.status-sent,
.status-viewed,
.status-analysis {
  color: var(--info);
  background: var(--info-soft);
}

.status-draft,
.status-negotiation,
.status-trial,
.status-partial {
  color: var(--warning);
  background: var(--warning-soft);
}

.status-refused,
.status-canceled,
.status-inactive,
.status-suspended,
.status-defaulted {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-expired {
  color: #6f6479;
  background: #f3eff6;
}

.status-finalized {
  color: var(--muted);
  background: var(--surface-2);
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.table-actions .icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
}

.empty-state {
  padding: 56px 24px;
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  color: var(--brand);
  border-radius: 16px;
  background: var(--brand-soft);
}

.empty-state h3 {
  margin-bottom: 5px;
  font-size: 15px;
}

.empty-state p {
  max-width: 340px;
  margin-bottom: 17px;
  color: var(--muted);
  font-size: 11px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.catalog-toolbar {
  align-items: stretch;
  flex-wrap: wrap;
}

.catalog-filter-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-filter-row .select {
  width: auto;
  min-width: 140px;
}

.segmented-control {
  padding: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.segmented-control button {
  width: 32px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.segmented-control button.active {
  color: var(--brand);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.catalog-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

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

.catalog-list-item {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(360px, 1fr) 78px 36px;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.catalog-list-head {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.catalog-list-main h3 {
  margin-bottom: 4px;
  font-size: 13px;
}

.catalog-list-main p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-list-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.catalog-list-details div {
  min-height: 50px;
  padding: 9px;
  border-radius: 12px;
  background: var(--surface-2);
}

.catalog-list-details span,
.catalog-list-details strong {
  display: block;
}

.catalog-list-details span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.catalog-list-details strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-list-thumb {
  width: 78px;
  height: 62px;
  justify-self: end;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--brand-soft);
}

.catalog-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card-actions {
  margin-top: 13px;
  display: flex;
  justify-content: flex-end;
}

.catalog-list-actions {
  display: flex;
  justify-content: flex-end;
}

.catalog-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  object-fit: cover;
  background: var(--surface-2);
}

.catalog-media-empty {
  color: var(--brand);
  background: var(--brand-soft);
}

.catalog-card-top {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.catalog-card h3 {
  margin-bottom: 3px;
  font-size: 13px;
}

.catalog-card p {
  min-height: 34px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 10px;
}

.catalog-links {
  margin: -4px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-links a {
  min-height: 30px;
  padding: 6px 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 999px;
  background: var(--brand-soft);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.catalog-meta {
  padding-top: 13px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.plan-module-list {
  min-height: 64px;
  margin: 0 0 14px;
  display: flex;
  align-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
}

.catalog-price strong,
.catalog-price span {
  display: block;
}

.catalog-price strong {
  color: var(--brand);
  font-size: 17px;
}

.catalog-price span {
  color: var(--muted);
  font-size: 9px;
}

.tag {
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  font-weight: 750;
}

.tag + .tag {
  margin-left: 4px;
}

.finance-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.finance-card {
  padding: 20px;
}

.finance-card-label {
  margin-bottom: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.finance-card > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.progress {
  width: 100%;
  height: 7px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--line);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.settings-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.settings-menu {
  padding: 8px;
  align-self: start;
}

.settings-menu button {
  width: 100%;
  min-height: 39px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.settings-menu button.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.settings-content {
  padding: 22px;
}

.settings-content h2 {
  margin-bottom: 5px;
  font-size: 17px;
}

.settings-content > p {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 11px;
}

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

.settings-info-item {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--canvas);
}

.settings-info-item strong,
.settings-info-item span {
  display: block;
}

.settings-info-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input {
  width: 48px;
  height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

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

.toggle-row {
  min-height: 54px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.toggle-row strong,
.toggle-row span {
  display: block;
}

.toggle-row strong {
  font-size: 11px;
}

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

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  cursor: pointer;
  background: #cbd4d1;
  transition: background 0.15s ease;
}

.switch-track::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  content: "";
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch-track {
  background: var(--brand);
}

.switch input:checked + .switch-track::after {
  transform: translateX(16px);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  padding: 22px;
  display: grid;
  place-items: center;
  overflow-y: auto;
  background: rgba(9, 20, 16, 0.55);
  backdrop-filter: blur(4px);
  animation: fade-in 0.16s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.2s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal-wide {
  width: min(920px, 100%);
}

.modal-head {
  min-height: 70px;
  padding: 17px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-body {
  padding: 22px;
  overflow-y: auto;
}

.modal-foot {
  min-height: 70px;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.budget-item-builder {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.add-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-catalog-row {
  margin-top: 10px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 120px auto;
  gap: 8px;
  align-items: end;
  border-top: 1px solid var(--line);
}

.quick-catalog-row label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
}

.draft-items {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.draft-item {
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) 72px 110px 72px 32px;
  align-items: end;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.draft-item-name {
  align-self: center;
}

.draft-item-name strong,
.draft-item-name span {
  display: block;
}

.draft-item-name strong {
  font-size: 11px;
}

.draft-item-name span {
  color: var(--muted);
  font-size: 9px;
}

.draft-item label span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 750;
  text-transform: uppercase;
}

.draft-item .input {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 11px;
}

.draft-total {
  margin-top: 14px;
  padding-top: 13px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.draft-total span {
  color: var(--muted);
  font-size: 11px;
}

.draft-total strong {
  color: var(--brand);
  font-size: 20px;
}

.budget-detail-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 22px;
}

.detail-section {
  margin-bottom: 22px;
}

.detail-section h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-list {
  display: grid;
  gap: 9px;
}

.detail-list > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  font-size: 11px;
}

.detail-list span {
  color: var(--muted);
}

.detail-contact-row {
  display: grid !important;
  grid-template-columns: minmax(95px, auto) minmax(0, 1fr) auto;
  align-items: center !important;
}

.detail-contact-row strong {
  min-width: 0;
}

.detail-contact-row .btn {
  white-space: nowrap;
}

.budget-items-table {
  width: 100%;
  border-collapse: collapse;
}

.budget-items-table th,
.budget-items-table td {
  padding: 9px 7px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-align: left;
}

.budget-items-table th {
  color: var(--muted);
  font-size: 8px;
  text-transform: uppercase;
}

.detail-sidebar {
  padding: 16px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.detail-sidebar .btn {
  width: 100%;
  margin-top: 8px;
}

.share-link {
  margin-top: 13px;
  padding: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px dashed #b9c9c3;
  border-radius: 9px;
  background: var(--surface);
}

.share-link span {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-root {
  position: fixed;
  z-index: 200;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 9px;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  animation: toast-in 0.22s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

.toast-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--success);
  border-radius: 50%;
  background: var(--success-soft);
}

.toast.error .toast-icon {
  color: var(--danger);
  background: var(--danger-soft);
}

.toast strong,
.toast span {
  display: block;
}

.toast strong {
  font-size: 11px;
}

.toast span {
  color: var(--muted);
  font-size: 9px;
}

.public-page {
  min-height: 100vh;
  padding: 30px 18px 60px;
  background:
    radial-gradient(circle at top left, rgba(23, 107, 87, 0.09), transparent 30%),
    var(--canvas);
}

.public-wrap {
  width: min(920px, 100%);
  margin: 0 auto;
}

.public-topbar {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.public-document {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.document-accent {
  height: 7px;
  background: var(--document-brand, var(--brand));
}

.document-head {
  padding: clamp(24px, 5vw, 46px);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  border-bottom: 1px solid var(--line);
}

.document-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.document-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 13px;
  background: var(--document-brand, var(--brand));
  font-size: 18px;
  font-weight: 850;
}

.document-brand strong,
.document-brand span {
  display: block;
}

.document-brand strong {
  font-size: 16px;
}

.document-brand span {
  color: var(--muted);
  font-size: 10px;
}

.document-number {
  text-align: right;
}

.document-number span,
.document-number strong {
  display: block;
}

.document-number span {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.document-number strong {
  margin: 3px 0 7px;
  font-size: 20px;
  letter-spacing: -0.025em;
}

.document-body {
  padding: clamp(24px, 5vw, 46px);
}

.document-parties {
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 36px;
}

.document-label {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.document-party strong,
.document-party span {
  display: block;
}

.document-party strong {
  margin-bottom: 3px;
  font-size: 13px;
}

.document-party span {
  color: var(--muted);
  font-size: 10px;
}

.document-table {
  width: 100%;
  margin-bottom: 28px;
  border-collapse: collapse;
}

.document-table th {
  padding: 10px;
  color: var(--muted);
  border-bottom: 2px solid var(--document-brand, var(--brand));
  font-size: 8px;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.document-table td {
  padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  vertical-align: top;
}

.document-table td strong,
.document-table td span {
  display: block;
}

.document-table td span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.document-totals {
  width: min(340px, 100%);
  margin: 0 0 30px auto;
}

.document-totals > div {
  padding: 7px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}

.document-totals .grand-total {
  margin-top: 5px;
  padding-top: 13px;
  color: var(--ink);
  border-top: 1px solid var(--line);
  font-size: 16px;
  font-weight: 850;
}

.document-terms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.document-terms p {
  color: var(--muted);
  font-size: 10px;
  white-space: pre-wrap;
}

.document-actions {
  padding: 22px clamp(24px, 5vw, 46px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.validity strong,
.validity span {
  display: block;
}

.validity strong {
  font-size: 11px;
}

.validity span {
  color: var(--muted);
  font-size: 9px;
}

.document-cta {
  display: flex;
  gap: 9px;
}

.approval-confirmation {
  padding: 28px;
  display: grid;
  place-items: center;
  border-top: 1px solid var(--line);
  background: var(--success-soft);
  text-align: center;
}

.approval-confirmation .empty-icon {
  color: var(--success);
  background: var(--surface);
}

.approval-confirmation h3 {
  margin-bottom: 4px;
}

.approval-confirmation p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.error-page {
  min-height: 100vh;
  padding: 30px;
  display: grid;
  place-content: center;
  background: var(--canvas);
  text-align: center;
}

.error-page .brand-mark {
  margin: 0 auto 16px;
}

.error-page h1 {
  margin-bottom: 6px;
}

.error-page p {
  color: var(--muted);
}

.view-switch {
  padding: 3px;
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.view-switch button {
  width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.view-switch button.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.kanban-board {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(5, minmax(215px, 1fr));
  gap: 13px;
  overflow-x: auto;
  background: var(--canvas);
}

.kanban-column {
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 84%, var(--canvas));
}

.kanban-column-head {
  padding: 13px;
  border-bottom: 1px solid var(--line);
}

.kanban-column-head > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-column-head i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--column-color);
}

.kanban-column-head strong {
  font-size: 11px;
}

.kanban-column-head span {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 20px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 9px;
  text-align: center;
}

.kanban-column-head small {
  display: block;
  margin: 5px 0 0 15px;
  color: var(--muted);
  font-size: 9px;
}

.kanban-cards {
  padding: 10px;
  display: grid;
  gap: 9px;
}

.kanban-card {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}

.kanban-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--column-color) 55%, var(--line));
}

.kanban-card-top,
.kanban-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kanban-card-top strong,
.kanban-card-bottom strong {
  font-size: 10px;
}

.kanban-client {
  min-height: 34px;
  margin: 11px 0;
  display: block;
  font-size: 12px;
  font-weight: 700;
}

.kanban-card-bottom span,
.kanban-message,
.kanban-phone {
  color: var(--muted);
  font-size: 9px;
}

.kanban-phone {
  margin: -5px 0 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.kanban-message {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--brand);
}

.kanban-empty {
  padding: 28px 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.signature-field canvas {
  width: 100%;
  height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.signature-actions {
  margin: -5px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signature-preview {
  margin-top: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.signature-preview span {
  display: block;
  color: #5e6c68;
  font-size: 9px;
}

.signature-preview img,
.public-signature {
  width: 100%;
  max-height: 105px;
  object-fit: contain;
}

.public-signature {
  max-width: 300px;
  margin-top: 12px;
  padding: 7px;
  border-radius: 8px;
  background: #fff;
}

.negotiation-confirmation {
  background: #f5efff;
}

.negotiation-confirmation .empty-icon {
  color: #8353b5;
}

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

.timeline-list > div {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: start;
}

.timeline-list i {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline-list span {
  color: var(--muted);
  font-size: 10px;
}

.timeline-list span strong {
  margin-bottom: 2px;
  display: block;
  color: var(--ink);
}

.timeline-list small {
  color: var(--muted);
  font-size: 8px;
}

.upload-zone {
  min-height: 180px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  border: 2px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--brand);
  background: var(--brand-soft);
  cursor: pointer;
}

.upload-zone span {
  color: var(--muted);
  font-size: 10px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.permission-check {
  min-height: 44px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 10px;
  font-weight: 650;
}

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

.help-ticket {
  width: 100%;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 20px;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.help-ticket-icon,
.notification-type {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand);
  background: var(--brand-soft);
}

.help-ticket strong,
.help-ticket span {
  display: block;
}

.help-ticket span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.help-thread {
  max-height: 410px;
  margin-bottom: 18px;
  padding: 12px;
  display: grid;
  gap: 11px;
  overflow-y: auto;
  border-radius: 12px;
  background: var(--canvas);
}

.help-message {
  width: min(82%, 560px);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px 12px 12px 3px;
  background: var(--surface);
}

.help-message.admin {
  margin-left: auto;
  border-radius: 12px 12px 3px 12px;
  background: var(--brand-soft);
}

.help-message > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
}

.help-message > div span,
.help-message p {
  color: var(--muted);
}

.help-message p {
  margin: 7px 0 0;
  font-size: 10px;
  white-space: pre-wrap;
}

.help-message a {
  margin-top: 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
}

.attachment-button {
  width: fit-content;
  margin-top: 9px;
}

.attachment-actions {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.attachment-actions .attachment-button {
  margin-top: 0;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  width: 100%;
  padding: 11px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.notification-item.unread {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: var(--brand-soft);
}

.notification-item strong,
.notification-item span,
.notification-item small {
  display: block;
}

.notification-item span,
.notification-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.logo-editor {
  margin-bottom: 22px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--canvas);
}

.logo-preview {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--brand);
  background: #fff;
  font-size: 22px;
  font-weight: 800;
}

.logo-preview img,
.document-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.system-logo-editor {
  align-items: flex-start;
}

.system-logo-editor .btn + .btn {
  margin-left: 8px;
}

.logo-preview-loading {
  width: 92px;
  height: 92px;
}

.logo-preview-favicon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.catalog-image-preview {
  width: 92px;
  height: 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  color: var(--brand);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--brand-soft);
}

.catalog-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-editor strong,
.logo-editor span {
  display: block;
}

.logo-editor span {
  margin: 3px 0 9px;
  color: var(--muted);
  font-size: 9px;
}

.marketing-page {
  min-height: 100vh;
  padding: 0 6vw 70px;
  background: radial-gradient(circle at 80% 15%, var(--brand-soft), transparent 34%), var(--canvas);
}

.marketing-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.marketing-hero {
  min-height: 540px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 7vw;
}

.marketing-hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-size: clamp(36px, 5vw, 70px);
  line-height: .98;
  letter-spacing: -.05em;
}

.marketing-hero p {
  max-width: 620px;
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.marketing-hero img {
  width: min(100%, 500px);
  filter: drop-shadow(0 30px 40px rgba(21, 89, 72, .18));
}

.marketing-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.marketing-features article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.marketing-features h3 {
  margin: 14px 0 6px;
}

.marketing-features p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.report-filters {
  margin-bottom: 16px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.report-filters label span {
  margin-bottom: 5px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.report-filters > span {
  padding-bottom: 11px;
}

.login-business-link {
  color: var(--brand);
  font-weight: 700;
}

@media (max-width: 1100px) {
  .kanban-board {
    grid-template-columns: repeat(5, 250px);
  }

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

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

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

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

  .catalog-list-item {
    grid-template-columns: minmax(0, 1fr) 78px 36px;
  }

  .catalog-list-details {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .auth-shell {
    grid-template-columns: minmax(360px, 0.95fr) minmax(400px, 1.05fr);
  }

  .visual-proof {
    grid-template-columns: 1fr;
  }

  .visual-proof > div:nth-child(n + 3) {
    display: none;
  }
}

@media (max-width: 860px) {
  :root {
    --sidebar: 264px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    transform: translateX(-102%);
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    width: 100%;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .dashboard-grid,
  .budget-detail-grid,
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-menu {
    display: flex;
    overflow-x: auto;
  }

  .settings-menu button {
    width: auto;
    white-space: nowrap;
  }

  .auth-shell {
    display: block;
  }

  .marketing-hero {
    min-height: auto;
    padding: 70px 0;
    grid-template-columns: 1fr;
  }

  .marketing-hero img {
    width: min(72vw, 420px);
    margin: 0 auto;
  }

  .marketing-features {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    min-height: 100vh;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: 64px;
  }

  .topbar-title span,
  .topbar-actions .btn span {
    display: none;
  }

  .content {
    padding-top: 24px;
  }

  .page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions .btn {
    flex: 1;
  }

  .view-switch {
    align-self: stretch;
  }

  .permission-grid {
    grid-template-columns: 1fr;
  }

  .report-filters {
    grid-template-columns: 1fr;
  }

  .help-ticket {
    grid-template-columns: 36px minmax(0, 1fr) 18px;
  }

  .help-ticket .status {
    display: none;
  }

  .logo-editor {
    align-items: flex-start;
  }

  .marketing-page {
    padding-inline: 20px;
  }

  .marketing-header .brand + .btn {
    padding-inline: 12px;
  }

  .metrics-grid,
  .finance-grid,
  .catalog-grid,
  .form-grid,
  .form-grid-3,
  .modules-grid,
  .document-parties,
  .document-terms {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3 {
    grid-column: auto;
  }

  .metric-card {
    padding: 16px;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-filter-row {
    justify-content: flex-start;
  }

  .catalog-filter-row .select {
    width: 100%;
  }

  .filter-chips {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .catalog-grid {
    gap: 10px;
  }

  .catalog-list-item {
    grid-template-columns: minmax(0, 1fr) 68px 34px;
    gap: 10px;
  }

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

  .catalog-list-thumb {
    width: 68px;
    height: 58px;
  }

  .modal-backdrop {
    padding: 0;
    align-items: end;
  }

  .modal {
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .modal-head,
  .modal-body,
  .modal-foot {
    padding-inline: 17px;
  }

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

  .quick-catalog-row {
    grid-template-columns: 1fr;
  }

  .draft-item-name {
    grid-column: 1 / -1;
  }

  .draft-item .icon-btn {
    width: 100%;
  }

  .document-head {
    flex-direction: column;
  }

  .document-number {
    text-align: left;
  }

  .document-table th:nth-child(2),
  .document-table td:nth-child(2) {
    display: none;
  }

  .document-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .document-cta {
    flex-direction: column-reverse;
  }

  .public-topbar .muted {
    display: none;
  }
}

@media print {
  body,
  html,
  .public-page {
    background: #fff !important;
  }

  .sidebar,
  .topbar,
  .page-head .page-actions {
    display: none !important;
  }

  .app-shell,
  .main {
    width: 100% !important;
    display: block !important;
    margin: 0 !important;
  }

  .public-page {
    padding: 0;
  }

  .public-topbar,
  .document-actions,
  .approval-confirmation {
    display: none !important;
  }

  .public-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .document-head,
  .document-body {
    padding: 28px;
  }
}
