:root {
  --accent: #868bdf;
  --accent-soft: #e0e2ff;
  --accent-dark: #6c71d2;
  --text-main: #0f172a;
  --text-main-alt: #172033;
  --text-muted: #667085;
  --text-nav: #c7d1e2;
  --text-black: #111827;
  --border-soft: #dde4f1;
  --border-strong: #cfd8ea;
  --border-faint: rgba(221, 228, 241, 0.9);
  --panel: rgba(255, 255, 255, 0.96);
  --panel-strong: #ffffff;
  --panel-soft: #f8faff;
  --panel-muted: #f3f6fb;
  --bg-main: #f4f7fb;
  --bg-soft: #eef2f9;
  --bg-soft-alt: #f8faff;
  --bg-service: #f6f8fc;
  --bg-tag: #f2f5fb;
  --bg-footer-mid: #edf1f9;
  --bg-footer-bot: #e7ecf6;
  --btn-outline-text: #4c5684;
  --danger: #dc6f57;
  --warning: #d89d24;
  --success: #2f9b73;
  --shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.05);
  --shadow-card: 0 18px 38px rgba(15, 23, 42, 0.06);
  --shadow-floating: 0 18px 46px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --font-body: "Poppins", "Segoe UI", sans-serif;
  --font-display: "SUSE", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main-alt);
  line-height: 1.7;
  background:
    radial-gradient(circle at top left, rgba(134, 139, 223, 0.08), transparent 22%),
    linear-gradient(180deg, #f7f9fc 0%, var(--bg-main) 30%, #eef2f8 100%);
}

body::selection {
  background: rgba(134, 139, 223, 0.24);
}

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

h1,
h2,
h3,
h4,
h5,
h6,
.brand-block h1,
.topbar h2,
.hero-panel h1,
.request-intro h1,
.auth-card h2 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

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

button {
  border: none;
  background: none;
  cursor: pointer;
}

img {
  max-width: 100%;
}

strong,
.money {
  font-variant-numeric: tabular-nums;
}

small {
  font-size: 0.82rem;
}

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(134, 139, 223, 0.45) transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(134, 139, 223, 0.38);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 10px;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--text-muted);
}

.muted-copy,
.muted-label {
  color: var(--text-muted);
}

.muted-copy {
  margin: 0;
}

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

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

.shell-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 10%, rgba(134, 139, 223, 0.08), transparent 14%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 32%);
  opacity: 0.75;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 100vh;
  padding: 24px 18px 20px;
  background: linear-gradient(180deg, #0f172a 0%, #111b31 100%);
  border-right: 1px solid rgba(15, 23, 42, 0.16);
  z-index: 10;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 6px 8px;
}

.brand-block h1,
.topbar h2,
.public-shell h1,
.auth-card h2 {
  margin: 0;
  font-weight: 600;
  color: var(--text-main);
}

.sidebar .brand-block h1,
.sidebar .eyebrow {
  color: #f8fbff;
}

.sidebar .eyebrow {
  opacity: 0.72;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 12px 28px rgba(134, 139, 223, 0.28);
}

.sidebar-nav {
  display: grid;
  gap: 18px;
}

.nav-section {
  display: grid;
  gap: 8px;
}

.nav-section-label {
  padding: 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(224, 231, 255, 0.55);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  color: var(--text-nav);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-nav a i {
  width: 18px;
  text-align: center;
  color: rgba(208, 216, 233, 0.92);
}

.sidebar-nav a.active,
.sidebar-nav a:hover {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(134, 139, 223, 0.24), rgba(134, 139, 223, 0.12));
  border-color: rgba(134, 139, 223, 0.28);
  box-shadow: none;
  transform: translateY(-1px);
}

.sidebar-nav a.active i,
.sidebar-nav a:hover i {
  color: #ffffff;
}

.nav-link-label {
  min-width: 0;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 500;
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.side-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.side-card strong {
  color: #f8fbff;
}

.side-card span {
  color: rgba(208, 216, 233, 0.72);
  line-height: 1.55;
  font-size: 0.9rem;
}

.app-main {
  padding: 24px 24px 34px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--border-soft);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.global-search {
  position: relative;
}

.global-search input {
  width: min(340px, 42vw);
  min-height: 44px;
  padding-right: 44px;
}

.content-root,
.page-grid {
  display: grid;
  gap: 20px;
}

.card,
.panel,
.hero-card,
.auth-card,
.request-card,
.metric-card,
.table-card,
.module-hero {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.card,
.panel,
.table-card,
.module-hero,
.hero-card {
  padding: 22px;
  border-radius: var(--radius-lg);
}

.module-hero,
.hero-card {
  display: grid;
  gap: 14px;
  background: #ffffff;
}

.module-hero::before,
.hero-card::before,
.auth-card::before,
.request-card::before {
  display: none;
}

.hero-card h3,
.module-hero h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  line-height: 1.12;
  color: var(--text-main);
}

.hero-layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
}

.hero-main {
  display: grid;
  gap: 8px;
}

.hero-main .muted-copy {
  max-width: 720px;
}

.hero-support {
  display: grid;
  gap: 12px;
  align-content: start;
  justify-items: end;
}

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

.hero-chip-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hero-chip {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.hero-chip span {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero-chip strong {
  color: var(--text-main);
  font-size: 1.1rem;
  line-height: 1.2;
}

.card-header,
.section-header,
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.card-header {
  margin-bottom: 18px;
}

.section-header {
  margin-bottom: 0;
}

.card-header h3,
.section-header h3 {
  margin: 0;
  color: var(--text-main);
}

.table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.table-toolbar > * {
  min-width: 0;
}

.table-meta {
  display: grid;
  gap: 4px;
}

.table-meta h3 {
  margin: 0;
  color: var(--text-main);
}

.table-count {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.section-block-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.section-block-head h4 {
  margin: 0;
  color: var(--text-main);
  font-size: 0.98rem;
}

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

.metric-card {
  padding: 20px;
  border-radius: var(--radius-md);
}

.metric-card span {
  display: block;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.05;
  color: var(--text-main);
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 20px;
}

.stack-form,
.stack-grid,
.timeline,
.activity-feed,
.stat-list {
  display: grid;
  gap: 16px;
}

.button-row,
.action-row,
.filters-row,
.inline-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button-row > *,
.inline-actions > *,
.quick-actions > * {
  min-width: 0;
}

.quick-actions {
  justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.mini-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease,
    border-color 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(145deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 10px 24px rgba(134, 139, 223, 0.2);
}

.primary-button:hover:not(:disabled),
.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.danger-button:hover:not(:disabled),
.mini-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.secondary-button {
  background: var(--panel-strong);
  border-color: var(--border-soft);
  color: var(--btn-outline-text);
}

.secondary-button:hover:not(:disabled) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-dark);
}

.ghost-button,
.mini-button,
.icon-button {
  background: #ffffff;
  border-color: var(--border-soft);
  color: #5b637c;
}

.ghost-button:hover:not(:disabled),
.mini-button:hover:not(:disabled),
.icon-button:hover:not(:disabled) {
  background: var(--panel-strong);
  border-color: var(--accent);
  color: var(--accent-dark);
  box-shadow: var(--shadow-soft);
}

.danger-button {
  background: rgba(220, 111, 87, 0.09);
  border-color: rgba(220, 111, 87, 0.18);
  color: #c85c43;
}

.danger-button:hover:not(:disabled) {
  background: rgba(220, 111, 87, 0.14);
}

.mini-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.mini-button.icon-only,
.icon-button {
  padding: 0;
}

.mini-button.icon-only {
  width: 36px;
  min-width: 36px;
}

.icon-button {
  width: 44px;
  min-width: 44px;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.danger-button:disabled,
.mini-button:disabled,
.icon-button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: var(--text-main);
  font-size: 0.94rem;
}

label > span {
  font-weight: 500;
}

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

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

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: #fbfcfe;
  color: var(--text-main-alt);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease,
    transform 0.18s ease;
}

textarea {
  min-height: 128px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a3b6;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(134, 139, 223, 0.12);
  background: #fff;
}

input[type="file"] {
  padding: 12px 14px;
}

.toolbar input,
.toolbar select {
  width: min(240px, 100%);
}

.table-controls {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(180px, 220px);
  gap: 12px;
  align-items: center;
  justify-content: end;
}

.table-controls input,
.table-controls select {
  width: 100%;
}

.table-wrap {
  overflow: auto;
  margin: 0 -2px;
  padding: 0 2px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  table-layout: auto;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(212, 215, 245, 0.9);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

thead th {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  background: #fafbff;
}

tbody tr {
  transition: background 0.14s ease;
}

tbody tr:hover {
  background: rgba(134, 139, 223, 0.06);
}

td strong {
  color: var(--text-main);
}

td small {
  color: var(--text-muted);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: normal;
  line-height: 1.3;
}

.status-badge[data-tone="success"] {
  background: rgba(47, 155, 115, 0.12);
  color: var(--success);
}

.status-badge[data-tone="warning"] {
  background: rgba(216, 157, 36, 0.14);
  color: #a17415;
}

.status-badge[data-tone="danger"] {
  background: rgba(220, 111, 87, 0.12);
  color: #c65e48;
}

.status-badge[data-tone="neutral"] {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-muted);
}

.status-badge[data-tone="info"] {
  background: rgba(134, 139, 223, 0.12);
  color: var(--accent-dark);
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 30px;
  border-radius: 24px;
  border: 1px dashed var(--border-strong);
  background:
    linear-gradient(180deg, rgba(224, 226, 255, 0.6), rgba(255, 255, 255, 0.82));
}

.empty-state h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.empty-inline {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(247, 248, 255, 0.96);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
}

.note-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(224, 226, 255, 0.86), rgba(247, 247, 255, 0.96));
  border: 1px solid var(--border-soft);
}

.note-card strong {
  color: var(--text-main);
}

.note-card p {
  margin: 0;
  color: var(--text-nav);
}

.search-results {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(440px, calc(100vw - 48px));
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.search-group {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.search-group:last-child {
  margin-bottom: 0;
}

.search-group h4 {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.search-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  transition: background 0.14s ease, transform 0.14s ease;
}

.search-item:hover {
  background: rgba(134, 139, 223, 0.08);
  transform: translateY(-1px);
}

.search-item small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
}

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

.modal-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 24px;
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 248, 255, 0.98));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-floating);
}

.modal-card.slim {
  width: min(540px, 100%);
}

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

.modal-header h3 {
  margin: 0 0 6px;
  color: var(--text-main);
}

.toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 12px;
  z-index: 70;
}

.toast {
  min-width: 260px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 20px;
  color: #fff;
  box-shadow: var(--shadow-floating);
  animation: toast-in 0.22s ease;
}

.toast[data-type="success"] {
  background: linear-gradient(145deg, #49ae85, #2f9b73);
}

.toast[data-type="error"] {
  background: linear-gradient(145deg, #dc6f57, #b85743);
}

.toast[data-type="info"] {
  background: linear-gradient(145deg, var(--accent), var(--accent-dark));
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.activity-item,
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(212, 215, 245, 0.9);
}

.activity-item:last-child,
.stat-row:last-child {
  border-bottom: none;
}

.activity-item strong,
.stat-row strong {
  color: var(--text-main);
}

.dual-list {
  display: grid;
  gap: 20px;
}

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

.detail-card {
  display: grid;
  gap: 16px;
}

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

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

.detail-list strong {
  color: var(--text-main);
}

.detail-list p {
  margin: 0;
  color: var(--text-nav);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-block {
  display: grid;
  gap: 18px;
}

.form-block-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.form-block-title h4 {
  margin: 0 0 4px;
  color: var(--text-main);
  font-size: 1rem;
}

.form-block-title p {
  margin: 0;
  color: var(--text-muted);
}

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

.preview-panel-head {
  padding-bottom: 16px;
}

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

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-dark);
  font-weight: 500;
}

.card-link:hover {
  color: var(--accent);
}

.chart {
  min-height: 300px;
}

.bar-chart {
  display: grid;
  align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
  gap: 14px;
  height: 260px;
}

.bar-column {
  display: grid;
  align-items: end;
  gap: 10px;
}

.bar-column span {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.bar {
  min-height: 12px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: inset 0 -10px 18px rgba(255, 255, 255, 0.15);
}

.soft-divider {
  height: 1px;
  margin: 6px 0;
  background: rgba(212, 215, 245, 0.9);
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(230px, 1fr));
  gap: 16px;
  overflow: auto;
  padding-bottom: 4px;
}

.kanban-column {
  min-height: 320px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(247, 248, 255, 0.94), rgba(255, 255, 255, 0.94));
  border: 1px solid var(--border-soft);
}

.kanban-column h4 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--text-main);
  text-transform: capitalize;
}

.kanban-column-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.kanban-column-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(134, 139, 223, 0.12);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 600;
}

.kanban-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 16px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-soft);
}

.kanban-card.dragging {
  opacity: 0.58;
}

.kanban-card-head {
  display: grid;
  gap: 8px;
}

.kanban-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  color: var(--text-nav);
}

.timeline-item {
  position: relative;
  padding: 16px 16px 16px 22px;
  border-radius: 0 18px 18px 0;
  border-left: 2px solid var(--accent);
  background: rgba(247, 248, 255, 0.96);
}

.timeline-item small {
  color: var(--text-muted);
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 20px;
  align-items: start;
}

.sticky-panel {
  position: sticky;
  top: 108px;
  align-self: start;
}

.line-items {
  display: grid;
  gap: 14px;
}

.line-item-row {
  display: grid;
  grid-template-columns:
    minmax(0, 1.35fr)
    minmax(0, 1.55fr)
    minmax(0, 0.68fr)
    minmax(0, 0.78fr)
    minmax(0, 0.6fr)
    minmax(0, 0.7fr)
    auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border-radius: 24px;
  background: rgba(247, 248, 255, 0.96);
  border: 1px solid var(--border-soft);
}

.line-item-row > * {
  min-width: 0;
}

.line-item-total {
  display: grid;
  gap: 10px;
  justify-items: end;
  text-align: right;
}

.line-item-total strong {
  color: var(--text-main);
}

.preview-sheet {
  min-height: 720px;
  padding: 26px;
  border-radius: 30px;
  background: #fff;
  color: var(--text-main-alt);
  border: 1px solid var(--border-soft);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.preview-sheet.dark-safe {
  color: var(--text-main-alt);
}

.preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(212, 215, 245, 0.9);
}

.preview-head h2 {
  margin: 4px 0 0;
  font-size: 1.85rem;
  color: var(--text-main);
}

.preview-meta-grid,
.preview-notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.preview-meta-grid {
  margin-bottom: 4px;
}

.preview-notes-grid {
  margin-top: 22px;
}

.preview-meta-card,
.preview-note {
  padding: 16px;
  border-radius: 20px;
  background: var(--bg-soft-alt);
  border: 1px solid var(--border-soft);
}

.preview-meta-card strong,
.preview-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text-main);
}

.preview-meta-card p,
.preview-note p {
  margin: 0;
  color: var(--text-nav);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-meta-card p .status-badge {
  margin-top: 2px;
}

.preview-table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  table-layout: fixed;
}

.preview-table th,
.preview-table td {
  padding: 12px 0;
  border-bottom: 1px solid rgba(212, 215, 245, 0.9);
}

.preview-table th:nth-child(1),
.preview-table td:nth-child(1) {
  width: 46%;
  padding-right: 14px;
}

.preview-table th:nth-child(n + 2),
.preview-table td:nth-child(n + 2) {
  width: 13.5%;
  text-align: right;
}

.preview-table td small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.summary-grid {
  width: min(320px, 100%);
  margin: 22px 0 0 auto;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, var(--bg-soft-alt));
  border: 1px solid var(--border-soft);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
}

.summary-row + .summary-row {
  border-top: 1px solid rgba(212, 215, 245, 0.8);
}

.summary-row span {
  color: var(--text-muted);
}

.summary-row strong {
  color: var(--text-main);
}

.public-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at top left, rgba(134, 139, 223, 0.2), transparent 20%),
    linear-gradient(180deg, var(--bg-main) 0%, #f8f9ff 40%, #eef0ff 100%);
}

.public-grid,
.request-layout {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 24px;
}

.hero-panel,
.request-intro {
  padding: 46px;
  border-radius: 36px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88) 0%, rgba(235, 237, 255, 0.98) 100%);
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.hero-panel .eyebrow,
.request-intro .eyebrow {
  color: var(--text-muted);
}

.hero-copy {
  max-width: 560px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-nav);
}

.hero-pill-grid,
.contact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-pill-grid span,
.contact-strip span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-soft);
  color: var(--btn-outline-text);
  box-shadow: 0 4px 12px rgba(134, 139, 223, 0.06);
}

.auth-card,
.request-card {
  padding: 34px;
  border-radius: 32px;
}

.request-card form,
.auth-card form {
  position: relative;
}

.overview-grid .card {
  padding: 18px;
  border-radius: 22px;
}

@media (max-width: 1360px) {
  .hero-chip-grid,
  .hero-chip-grid--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .editor-layout,
  .split-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

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

  .sidebar {
    position: relative;
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .nav-section-label {
    grid-column: 1 / -1;
  }

  .topbar {
    position: relative;
    top: 0;
  }

  .public-grid,
  .request-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-main,
  .public-shell {
    padding: 16px;
  }

  .hero-layout-grid {
    grid-template-columns: 1fr;
  }

  .hero-support {
    justify-items: stretch;
  }

  .topbar {
    padding: 16px 18px;
  }

  .topbar,
  .topbar-actions,
  .toolbar,
  .table-toolbar {
    align-items: stretch;
  }

  .topbar,
  .toolbar,
  .table-toolbar {
    flex-direction: column;
  }

  .table-toolbar {
    grid-template-columns: 1fr;
  }

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

  .global-search,
  .global-search input,
  .toolbar input,
  .toolbar select,
  .table-controls {
    width: 100%;
    max-width: none;
  }

  .table-controls {
    grid-template-columns: 1fr;
  }

  .search-results {
    width: 100%;
  }

  .metric-grid,
  .two-columns,
  .form-grid-2,
  .overview-grid,
  .three-columns,
  .mini-stat-grid,
  .preview-meta-grid,
  .preview-notes-grid,
  .line-item-row {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-template-columns: repeat(6, minmax(260px, 1fr));
  }

  .hero-panel,
  .request-intro,
  .auth-card,
  .request-card {
    padding: 28px;
  }

  .preview-table {
    display: block;
    overflow: auto;
  }

  .preview-table th,
  .preview-table td,
  .preview-table tr,
  .preview-table tbody,
  .preview-table thead {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .sidebar {
    padding: 20px 16px;
  }

  .sidebar-nav {
    grid-template-columns: 1fr;
  }

  .app-main {
    padding: 16px;
  }

  .card,
  .panel,
  .table-card,
  .module-hero,
  .hero-card,
  .modal-card,
  .preview-sheet {
    padding: 18px;
    border-radius: 22px;
  }

  .topbar,
  .hero-panel,
  .request-intro,
  .auth-card,
  .request-card {
    border-radius: 24px;
  }

  .button-row,
  .inline-actions,
  .quick-actions {
    width: 100%;
  }

  .button-row > *,
  .inline-actions > *,
  .quick-actions > * {
    flex: 1 1 auto;
  }

  .inline-actions .mini-button.icon-only,
  .inline-actions .icon-button,
  .button-row .icon-button {
    flex: 0 0 auto;
  }

  .toast-stack {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}
