:root {
  --forest: #0c3b2c;
  --forest-deep: #092d22;
  --emerald: #087a58;
  --emerald-2: #0a8963;
  --mint: #e8f5ef;
  --mint-strong: #d9eee5;
  --surface: #ffffff;
  --background: #f4f8f6;
  --text: #102a21;
  --muted: #667a72;
  --border: #dce7e1;
  --amber: #b67b18;
  --amber-bg: #fff6e5;
  --rose: #b74d42;
  --rose-bg: #fdefed;
  --lime: #7f9529;
  --lime-bg: #f3f8de;
  --blue: #257f79;
  --blue-bg: #e7f4f3;
  --shadow: 0 8px 0 rgba(31, 83, 65, 0.07), 0 1px 2px rgba(16, 42, 33, 0.04);
  --radius: 14px;
  --sidebar: 220px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--background); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--background); font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4, strong { letter-spacing: -0.02em; }
svg { display: block; }
.icon { flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* Authentication */
.auth-page { min-height: 100vh; overflow: hidden; position: relative; background: radial-gradient(circle at 78% 8%, rgba(204, 239, 225, .85), transparent 36%), radial-gradient(circle at 14% 86%, rgba(244, 241, 214, .75), transparent 34%), #f8fbfa; }
.auth-page::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.76), transparent 56%); }
.auth-top { height: 108px; display: flex; align-items: center; justify-content: space-between; padding: 0 6%; position: relative; z-index: 1; }
.auth-links { display: flex; gap: 32px; color: var(--muted); font-size: 13px; }
.auth-main { min-height: calc(100vh - 108px); padding: 12px 5.7% 6%; display: grid; grid-template-columns: minmax(480px, 1.18fr) minmax(500px, .82fr); align-items: center; gap: 7%; position: relative; z-index: 1; }
.auth-hero { max-width: 680px; align-self: stretch; display: flex; flex-direction: column; justify-content: center; padding-bottom: 30px; }
.auth-kicker { display: inline-flex; align-items: center; gap: 8px; width: fit-content; padding: 7px 13px; border-radius: 99px; background: rgba(255,255,255,.76); color: var(--emerald); font-size: 12px; font-weight: 700; margin-bottom: 28px; }
.auth-hero h1 { font-size: clamp(42px, 4.1vw, 64px); line-height: 1.08; letter-spacing: -0.045em; max-width: 650px; }
.auth-hero h1 span { color: var(--emerald); }
.auth-hero > p { max-width: 640px; margin-top: 24px; color: var(--muted); font-size: 17px; line-height: 1.48; }
.command-card { width: 630px; max-width: 100%; margin-top: auto; padding: 24px; background: rgba(255,255,255,.9); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.command-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.command-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.command-metrics div { min-height: 72px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: #fbfdfc; }
.command-metrics small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; margin-bottom: 13px; }
.command-metrics strong { font-size: 19px; }
.health-line { height: 8px; background: var(--mint); border-radius: 99px; margin-top: 28px; overflow: hidden; }
.health-line i { display: block; width: 78%; height: 100%; border-radius: inherit; background: var(--emerald); }
.health-caption { margin-top: 10px; color: var(--muted); font-size: 11px; }
.auth-card { width: min(100%, 600px); min-height: 726px; justify-self: end; display: flex; flex-direction: column; padding: 54px 45px 28px; background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: 20px; box-shadow: 0 10px 0 rgba(31, 83, 65, .08); }
.auth-card.compact { min-height: 610px; }
.auth-card h2 { font-size: 32px; margin-bottom: 6px; }
.auth-card > p { color: var(--muted); font-size: 15px; }
.auth-form { display: grid; gap: 20px; margin-top: 64px; }
.auth-card.compact .auth-form { margin-top: 40px; }
.auth-options { display: flex; justify-content: space-between; align-items: center; }
.auth-options a { color: var(--emerald); font-weight: 700; }
.auth-notice { display: flex; align-items: center; gap: 16px; padding: 18px; margin-top: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--mint); }
.auth-notice span { display: flex; flex-direction: column; gap: 3px; }
.auth-notice small { color: var(--muted); }
.auth-footer { margin-top: auto; padding-top: 28px; text-align: center; color: #8b9993; font-size: 11px; }
.password-rules { display: grid; gap: 8px; color: var(--muted); font-size: 13px; }
.password-rules span { display: flex; gap: 8px; align-items: center; }
.password-rules .valid { color: var(--emerald); }
.strength { height: 4px; border-radius: 4px; background: #edf1ef; overflow: hidden; }
.strength i { display: block; height: 100%; width: 20%; transition: width .2s, background .2s; background: var(--rose); }
.strength[data-score="2"] i { width: 50%; background: var(--amber); }
.strength[data-score="3"] i { width: 75%; background: var(--blue); }
.strength[data-score="4"] i { width: 100%; background: var(--emerald); }

/* Brand and shell */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--emerald); }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 17px; }
.brand-copy small { margin-top: 3px; font-size: 9px; color: var(--muted); letter-spacing: .01em; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; z-index: 50; display: flex; flex-direction: column; padding: 18px 12px 14px; background: rgba(250,252,251,.96); border-right: 1px solid var(--border); }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 16px; }
.sidebar-close { display: none !important; }
.sidebar nav { overflow: auto; scrollbar-width: thin; }
.nav-label { margin: 16px 10px 6px; color: #76847e; font-size: 9px; font-weight: 800; }
.nav-item { height: 42px; display: flex; align-items: center; gap: 14px; padding: 0 12px; margin: 2px 0; border-radius: 9px; color: #203b31; font-weight: 620; transition: background .15s, color .15s, transform .15s; }
.nav-item .icon { color: #748780; }
.nav-item:hover { background: #edf4f0; }
.nav-item:active { transform: translateY(1px); }
.nav-item.active { color: white; background: var(--emerald); }
.nav-item.active .icon { color: white; }
.workspace-card { position: relative; width: 100%; margin-top: auto; min-height: 102px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 16px 36px 15px 14px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 13px; box-shadow: var(--shadow); cursor: pointer; }
.workspace-card .workspace-label { color: var(--muted); font-size: 9px; font-weight: 700; margin-bottom: 14px; }
.workspace-card strong { font-size: 14px; line-height: 1.2; }
.workspace-card small { color: var(--muted); font-size: 10px; line-height: 1.25; margin-top: 2px; }
.workspace-card .icon { position: absolute; right: 13px; top: 51%; color: var(--emerald); }
.app-column { min-width: 0; }
.topbar { height: 65px; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px 0 38px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.mobile-menu { display: none !important; }
.global-search { position: relative; width: 430px; height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.global-search > .icon { color: var(--muted); }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.global-search input::placeholder { color: #96a29e; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); max-height: 410px; overflow: auto; padding: 8px; background: white; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 18px 45px rgba(16,42,33,.14); }
.search-result { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 7px; }
.search-result:hover, .search-result.active { background: var(--mint); }
.search-result span { display: flex; flex-direction: column; gap: 2px; }
.search-result small { color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.health-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; color: var(--emerald); background: var(--mint); font-size: 11px; font-weight: 700; }
.icon-button { min-width: 40px; height: 40px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: white; cursor: pointer; }
.notification-button { position: relative; }
.notification-count { position: absolute; right: -4px; top: -7px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; border-radius: 99px; color: white; background: var(--rose); border: 2px solid white; font-size: 10px; }
.profile-button { min-width: 220px; height: 44px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 4px 12px; text-align: left; border: 1px solid var(--border); border-radius: 9px; background: white; cursor: pointer; }
.profile-button > span:not(.avatar) { display: flex; flex-direction: column; }
.profile-button strong { font-size: 13px; }
.profile-button small { color: var(--muted); font-size: 10px; }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--emerald); background: var(--mint); font-size: 12px; font-weight: 800; }
.avatar-rose { color: var(--rose); background: var(--rose-bg); }
.avatar-amber { color: var(--amber); background: var(--amber-bg); }
.avatar-sm { width: 28px; height: 28px; font-size: 10px; }
.avatar-lg { width: 52px; height: 52px; font-size: 15px; }
.sidebar-scrim { display: none; }
.main-content { min-height: calc(100vh - 65px); padding: 20px 34px 28px 38px; overflow: hidden; background: radial-gradient(circle at 92% 2%, rgba(219,241,231,.95), transparent 35%), radial-gradient(circle at 8% 96%, rgba(241,242,216,.48), transparent 26%), var(--background); }
.page { width: 100%; max-width: 1480px; margin: 0 auto; }

/* Shared page elements */
.page-header { min-height: 101px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 0 0 18px; }
.page-header h1 { margin-top: 10px; font-size: 30px; line-height: 1.08; letter-spacing: -0.035em; }
.page-header p { margin-top: 5px; color: var(--muted); font-size: 14px; }
.eyebrow { min-height: 12px; color: var(--emerald); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.breadcrumbs { min-height: 17px; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.breadcrumbs span:last-child { color: var(--text); }
.breadcrumbs a:hover { color: var(--emerald); }
.page-action { padding-top: 24px; flex: 0 0 auto; }
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 18px; border-radius: 9px; border: 1px solid transparent; cursor: pointer; font-weight: 700; white-space: nowrap; transition: background .15s, border .15s, transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(16,42,33,.1); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn-primary { color: white; background: var(--emerald); }
.btn-primary:hover { background: #066b4d; }
.btn-secondary { color: var(--text); background: white; border-color: var(--border); }
.btn-secondary:hover { border-color: #afc7bc; }
.btn-danger { color: var(--rose); background: var(--rose-bg); border-color: #f2d1cc; }
.btn-ghost { color: var(--emerald); background: transparent; }
.btn-block { width: 100%; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12px; }
.card { background: rgba(255,255,255,.96); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 20px 20px 0; }
.card-header h2 { font-size: 18px; }
.card-header p { margin-top: 3px; color: var(--muted); font-size: 13px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-card { min-height: 124px; display: flex; flex-direction: column; justify-content: flex-end; padding: 17px; background: white; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: auto; }
.icon-tile { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 10px; color: var(--emerald); background: var(--mint); }
.icon-tile.small { width: 36px; height: 36px; border-radius: 8px; }
.icon-tile.large { width: 56px; height: 56px; border-radius: 13px; }
.tile-rose { color: var(--rose); background: var(--rose-bg); }
.tile-amber { color: var(--amber); background: var(--amber-bg); }
.tile-lime { color: var(--lime); background: var(--lime-bg); }
.tile-blue { color: var(--blue); background: var(--blue-bg); }
.trend { padding: 5px 9px; border-radius: 99px; color: var(--emerald); background: var(--mint); font-size: 11px; font-weight: 800; }
.trend-down { color: var(--rose); background: var(--rose-bg); }
.kpi-card > strong { font-size: 30px; line-height: 1; margin-top: 17px; }
.kpi-card > span:last-child { margin-top: 6px; color: var(--muted); font-size: 14px; }
.dashboard-main { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .95fr); gap: 18px; margin-bottom: 20px; }
.chart-card { min-height: 305px; overflow: hidden; }
.chart-card .chart-wrap { padding: 16px 18px 10px; }
.chart-wrap { width: 100%; }
.line-chart { width: 100%; height: 190px; overflow: visible; }
.chart-grid { fill: none; stroke: #e5ece8; stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-labels { display: grid; grid-template-columns: repeat(12, 1fr); margin-top: -1px; color: #8a9892; font-size: 10px; }
.chart-labels span { text-align: center; }
.attention-card { min-height: 305px; padding-bottom: 12px; }
.attention-list { display: grid; gap: 5px; padding: 12px 16px 4px; }
.attention-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 8px 0; border-radius: 8px; }
.attention-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.attention-item strong { font-size: 14px; }
.attention-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card { overflow: hidden; }
.module-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 10px; margin-top: 20px; }
.module-links a { min-height: 50px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: rgba(255,255,255,.88); font-weight: 650; }
.module-links a:hover { border-color: #a9cbbd; background: white; }
.module-links a > .icon:first-child { color: var(--emerald); }
.badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.badge-green { color: #137354; background: var(--mint); }
.badge-neutral { color: #65766f; background: #eff3f1; }
.badge-amber { color: #966717; background: var(--amber-bg); }
.badge-rose { color: #a3463c; background: var(--rose-bg); }
.badge-lime { color: #74871e; background: var(--lime-bg); }
.badge-blue { color: #27756f; background: var(--blue-bg); }

/* Tables */
.table-card { min-height: 500px; display: flex; flex-direction: column; overflow: hidden; }
.table-toolbar { min-height: 77px; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.table-search { height: 43px; flex: 0 1 430px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.table-search .icon { color: var(--muted); }
.table-search input { width: 100%; border: 0; outline: 0; background: transparent; }
.table-filters { display: flex; align-items: center; gap: 8px; }
.select-filter { height: 42px; position: relative; display: flex; align-items: center; gap: 7px; padding: 0 8px 0 12px; border: 1px solid var(--border); border-radius: 9px; background: white; font-weight: 650; }
.select-filter select { max-width: 165px; height: 100%; padding: 0 18px 0 0; border: 0; outline: 0; background: transparent; appearance: none; font-weight: inherit; }
.select-filter > .icon:last-child { position: absolute; right: 8px; pointer-events: none; }
.view-switch { height: 42px; display: flex; align-items: center; margin-left: auto; padding: 3px; border: 1px solid var(--border); border-radius: 9px; background: #f9fbfa; }
.view-switch button { width: 38px; height: 34px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.view-switch button.active { color: var(--emerald); background: white; border: 1px solid var(--border); }
.table-scroll { min-height: 0; flex: 1; overflow: auto; padding: 0 16px; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: auto; }
.data-table thead { position: sticky; top: 0; z-index: 1; background: #f8faf9; }
.data-table th { height: 44px; padding: 0 14px; color: var(--muted); font-size: 10px; font-weight: 750; text-align: left; text-transform: uppercase; letter-spacing: .015em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { height: 56px; padding: 8px 14px; color: var(--muted); border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.data-table td:first-child { color: var(--text); }
.data-table tr[data-route] { cursor: pointer; }
.data-table tbody tr:hover { background: #f7fbf9; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table.table-compact td { height: 45px; padding-top: 5px; padding-bottom: 5px; }
.entity-cell { min-width: 230px; display: flex; align-items: center; gap: 10px; }
.entity-cell > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.entity-cell strong { color: var(--text); font-size: 13px; }
.entity-cell small { color: var(--muted); font-size: 11px; }
.cell-stack { display: flex; flex-direction: column; gap: 4px; }
.cell-stack small { font-size: 10px; }
.row-menu { width: 28px; height: 28px; display: grid; place-items: center; margin-left: auto; border-radius: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.row-menu:hover { color: var(--text); background: #eef4f1; }
.table-footer { min-height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 8px 22px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--border); }
.table-footer > div { display: flex; gap: 8px; }
.table-footer button { width: 54px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; background: white; cursor: pointer; }
.table-empty { padding: 50px; text-align: center; color: var(--muted); }
.progress { width: 190px; max-width: 100%; height: 6px; display: block; overflow: hidden; border-radius: 99px; background: #eaf0ed; }
.progress i { display: block; height: 100%; background: var(--emerald); border-radius: inherit; }
.progress .progress-amber { background: var(--amber); }
.progress .progress-rose { background: var(--rose); }

/* Forms and details */
.form-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(315px, 1fr); gap: 18px; }
.form-card { min-height: 650px; padding: 22px; }
.form-card h2, .review-card h2 { font-size: 18px; }
.form-card > p, .review-card > p { margin-top: 3px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; margin-top: 20px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span:first-child { color: var(--muted); font-size: 13px; font-weight: 650; }
.field-control { min-height: 45px; position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.field-control:focus-within { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(8,122,88,.1); }
.field-control > .icon { color: var(--muted); }
.field input, .field select, .field textarea { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; }
.field select { appearance: none; }
.field textarea { min-height: 140px; padding: 12px 0; resize: vertical; line-height: 1.45; }
.field-full { grid-column: 1 / -1; }
.field-help { color: var(--muted); font-size: 11px; }
.type-section { margin-top: 20px; }
.type-section > label, .option-section > label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 13px; font-weight: 650; }
.type-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.type-card { min-height: 84px; position: relative; display: flex; flex-direction: column; justify-content: center; gap: 11px; padding: 14px 15px 12px 49px; text-align: left; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 7px 0 rgba(31,83,65,.08); cursor: pointer; }
.type-card .icon { position: absolute; left: 15px; top: 17px; color: var(--emerald); }
.type-card small { color: var(--muted); font-size: 10px; }
.type-card.selected { border: 2px solid var(--emerald); background: var(--mint); box-shadow: none; }
.option-section { margin-top: 22px; }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.check-label { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.check-label input, .permission-check { width: 20px; height: 20px; accent-color: var(--emerald); }
.review-card { min-height: 650px; display: flex; flex-direction: column; padding: 23px 20px 18px; }
.review-list { margin: 18px 0; }
.review-list > div { padding: 13px 2px; border-bottom: 1px solid var(--border); }
.review-list dt { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.review-list dd { margin: 0; font-weight: 700; }
.info-box { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 10px; background: var(--mint); line-height: 1.35; }
.info-box .icon { color: var(--emerald); }
.review-actions { display: grid; gap: 10px; margin-top: auto; }
.entity-hero { min-height: 143px; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 22px; }
.hero-identity { display: flex; align-items: center; gap: 19px; min-width: 0; }
.hero-icon { width: 70px; height: 70px; display: grid; place-items: center; border-radius: 14px; color: var(--emerald); background: var(--mint); }
.hero-copy { min-width: 0; }
.hero-copy h2 { font-size: 24px; }
.hero-copy > div { display: flex; flex-wrap: wrap; gap: 7px; margin: 9px 0 10px; }
.hero-copy p { color: var(--muted); font-size: 12px; }
.hero-metrics { display: flex; align-items: center; gap: clamp(28px, 4vw, 70px); }
.hero-metrics div { display: flex; flex-direction: column; gap: 3px; }
.hero-metrics strong { font-size: 18px; }
.hero-metrics small { color: var(--muted); font-size: 10px; }
.hero-actions { display: flex; gap: 10px; margin-bottom: 18px; justify-content: flex-end; }
.tabs { height: 58px; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: end; margin: 0 8px 18px; border-bottom: 1px solid var(--border); }
.tabs a { height: 58px; display: grid; place-items: center; color: var(--muted); border-bottom: 3px solid transparent; font-weight: 620; }
.tabs a:hover { color: var(--text); }
.tabs a.active { color: var(--emerald); border-color: var(--emerald); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(310px, .9fr); gap: 18px; }
.detail-main { min-height: 540px; padding: 22px; }
.detail-main h2, .side-card h2 { font-size: 18px; }
.detail-main > p, .side-card > p { margin-top: 4px; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 60px; margin: 28px 0; }
.detail-grid div { min-width: 0; }
.detail-grid dt { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.detail-grid dd { margin: 9px 0 0; font-size: 15px; overflow-wrap: anywhere; }
.section-divider { height: 1px; margin: 28px 0 20px; background: var(--border); }
.activity-list { display: grid; gap: 13px; margin-top: 16px; }
.activity-list > div { display: flex; align-items: center; gap: 12px; }
.activity-list > div > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.activity-list small { color: var(--muted); font-size: 11px; }
.detail-side { display: grid; grid-auto-rows: min-content; gap: 16px; }
.side-card { padding: 20px; }
.contact-block { display: flex; gap: 12px; align-items: center; margin: 16px 0; }
.contact-block > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.contact-block small { color: var(--muted); }
.side-list { display: grid; gap: 12px; margin-top: 16px; }
.side-list > div { display: flex; align-items: center; gap: 10px; }
.side-list span:not(.icon-tile) { display: flex; flex-direction: column; gap: 2px; }
.side-list small { color: var(--muted); font-size: 10px; }

/* Notifications */
.notifications-layout { display: grid; grid-template-columns: 295px minmax(0, 1fr); gap: 18px; min-height: 750px; }
.notification-nav { padding: 20px 14px; }
.notification-nav h2, .notification-feed h2 { font-size: 18px; margin: 0 5px 18px; }
.notification-filter { width: 100%; height: 46px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 0 12px; margin: 3px 0; text-align: left; border-radius: 9px; color: var(--text); background: transparent; cursor: pointer; }
.notification-filter:hover, .notification-filter.active { background: var(--mint); }
.notification-filter small { color: var(--muted); }
.delivery-settings { display: grid; gap: 2px; padding: 18px 5px 0; margin-top: 14px; border-top: 1px solid var(--border); }
.delivery-settings > strong { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.notification-feed { position: relative; padding: 20px 10px; }
.notification-feed > .btn { position: absolute; right: 16px; top: 13px; }
.notification-items { display: grid; gap: 7px; margin-top: 8px; }
.notification-item { min-height: 74px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 11px 16px; border-radius: 10px; }
.notification-item.unread { background: var(--mint); }
.notification-item.tone-amber { background: var(--amber-bg); }
.notification-item > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }
.notification-item small { color: var(--muted); }
.notification-time { align-self: start; text-align: right; font-size: 10px; }

/* Switches and settings */
.switch-row { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 18px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-row i { width: 44px; height: 24px; position: relative; flex: 0 0 auto; border-radius: 99px; background: #cbd6e2; transition: background .2s; }
.switch-row i::after { content: ""; width: 18px; height: 18px; position: absolute; left: 3px; top: 3px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch-row input:checked + i { background: var(--emerald); }
.switch-row input:checked + i::after { transform: translateX(20px); }
.settings-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; min-height: 740px; }
.settings-nav { padding: 14px 10px; }
.settings-nav button { width: 100%; height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 14px; border-radius: 9px; color: var(--muted); background: transparent; cursor: pointer; }
.settings-nav button.active, .settings-nav button:hover { color: var(--text); background: #edf2ef; }
.settings-panel { display: flex; flex-direction: column; padding: 20px 22px 17px; }
.settings-panel > h2 { font-size: 18px; }
.settings-panel > p { color: var(--muted); }
.settings-tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin: 10px 0 15px; border-bottom: 1px solid var(--border); }
.settings-tabs button { height: 45px; color: var(--muted); background: transparent; border-bottom: 3px solid transparent; cursor: pointer; }
.settings-tabs button.active { color: var(--forest); border-color: var(--emerald); }
.setting-section { padding: 0 0 8px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.setting-section h3 { margin-bottom: 9px; font-size: 14px; }
.setting-section .field { margin: 7px 0; }
.settings-actions { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

/* Wizards and editors */
.stepper { min-height: 82px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; padding: 10px 25px 5px; margin-bottom: 18px; }
.step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.step:not(:last-child)::after { content: ""; position: absolute; left: 55%; right: -45%; top: 17px; height: 3px; background: var(--border); }
.step.complete:not(:last-child)::after { background: var(--emerald); }
.step span { width: 36px; height: 36px; z-index: 1; display: grid; place-items: center; border: 1px solid #cbd8d2; border-radius: 50%; background: white; }
.step.active, .step.complete { color: var(--text); font-weight: 650; }
.step.active span, .step.complete span { color: white; border-color: var(--emerald); background: var(--emerald); }
.selection-card { min-height: 650px; display: flex; flex-direction: column; padding: 24px 26px 17px; }
.selection-card h2 { font-size: 20px; }
.selection-card > p { margin-top: 4px; color: var(--muted); }
.build-types { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 35px; }
.build-type { min-height: 305px; position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; padding: 20px; text-align: left; border: 1px solid var(--border); border-radius: 14px; background: white; box-shadow: var(--shadow); cursor: pointer; }
.build-type.selected { border: 2px solid var(--emerald); background: #e5f3ef; box-shadow: none; }
.build-type .select-check { position: absolute; right: 17px; top: 17px; width: 30px; height: 30px; display: none; place-items: center; border-radius: 50%; color: white; background: var(--blue); }
.build-type.selected .select-check { display: grid; }
.build-type h3 { margin-top: 8px; font-size: 18px; }
.build-type > p { min-height: 62px; color: var(--muted); line-height: 1.4; }
.build-type > strong { margin-top: auto; color: var(--emerald); }
.canonical-note { display: flex; gap: 14px; padding: 17px; margin-top: 24px; background: var(--lime-bg); border-radius: 10px; }
.selection-actions { display: flex; justify-content: flex-end; margin-top: auto; }
.editor-layout { display: grid; grid-template-columns: 240px minmax(0, 1.75fr) 305px; gap: 16px; min-height: 745px; }
.editor-nav, .editor-main, .editor-settings { padding: 20px 16px; }
.editor-nav h2, .editor-main h2, .editor-settings h2 { font-size: 18px; }
.editor-nav > .btn { margin: 14px 0 12px; }
.editor-list { display: grid; gap: 3px; }
.editor-list button { min-height: 52px; display: flex; align-items: flex-start; gap: 11px; padding: 10px; text-align: left; border-radius: 8px; background: transparent; cursor: pointer; }
.editor-list button.active, .editor-list button:hover { background: var(--mint); }
.editor-list button > span { display: flex; flex-direction: column; gap: 4px; }
.editor-list small { color: var(--muted); }
.editor-main-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.editor-actions { display: flex; gap: 8px; }
.editor-body { display: grid; gap: 18px; margin-top: 20px; }
.editor-body .field textarea { min-height: 220px; }
.attachment { min-height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9px; }
.attachment small { margin-left: auto; color: var(--muted); }
.editor-settings .settings-tabs { grid-template-columns: repeat(2, 1fr); }
.editor-settings .field { margin: 14px 0; }
.editor-settings .switch-row:first-of-type { margin-top: 15px; padding-top: 12px; border-top: 1px solid var(--border); }
.message-canvas { min-height: 300px; padding: 18px; border: 1px solid var(--border); border-radius: 9px; line-height: 1.55; }
.message-toolbar { height: 48px; display: flex; align-items: center; gap: 24px; padding: 0 12px; border: 1px solid var(--border); border-radius: 9px; }
.message-toolbar button { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: transparent; cursor: pointer; }
.message-cta { min-width: 200px; height: 45px; display: inline-flex; align-items: center; justify-content: center; margin-top: 28px; border-radius: 8px; color: white; background: var(--emerald); font-weight: 700; }
.campaign-flow { display: grid; gap: 15px; margin-top: 28px; }
.flow-node { min-height: 82px; position: relative; display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.flow-node:not(:last-child)::after { content: "↓"; position: absolute; left: 34px; bottom: -20px; color: var(--emerald); z-index: 2; }
.flow-node > span:nth-child(2) { display: flex; flex-direction: column; gap: 5px; }
.flow-node small { color: var(--emerald); font-weight: 700; }
.flow-node .row-menu { margin-left: auto; }

/* Preview and calendar */
.preview-toolbar { min-height: 59px; display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; margin-bottom: 18px; }
.preview-modes { display: flex; gap: 4px; }
.preview-modes button { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 13px; border-radius: 8px; color: var(--muted); background: transparent; cursor: pointer; }
.preview-modes button.active { color: var(--emerald); background: var(--mint); }
.preview-layout { display: grid; grid-template-columns: minmax(0, 2fr) 425px; gap: 18px; }
.browser-stage { min-height: 688px; display: grid; place-items: center; padding: 36px 40px; border-radius: var(--radius); background: #eaf0f7; }
.browser-frame { width: 100%; height: 100%; overflow: hidden; border-radius: 12px; background: white; box-shadow: var(--shadow); }
.browser-stage.mobile-preview .browser-frame { width: min(390px, 100%); }
.browser-bar { height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: #f9fbfa; }
.browser-dot { width: 12px; height: 12px; border-radius: 50%; background: #fe665f; }
.browser-dot:nth-child(2) { background: #f6be39; }
.browser-dot:nth-child(3) { background: #42c99a; }
.browser-address { flex: 1; height: 23px; display: flex; align-items: center; padding: 0 12px; margin-left: 30px; border: 1px solid var(--border); border-radius: 7px; color: #8b9893; font-size: 10px; }
.employee-header { height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; color: white; background: #06432f; }
.employee-brand { display: flex; align-items: center; gap: 12px; font-size: 16px; font-weight: 700; }
.employee-logo { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 8px; color: var(--emerald); background: white; font-size: 10px; }
.employee-body { padding: 30px 38px; }
.employee-body h2 { font-size: 27px; }
.employee-body > p { color: var(--muted); }
.question-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0 24px; }
.question-chips button { height: 36px; padding: 0 15px; border-radius: 99px; color: var(--emerald); background: var(--mint); cursor: pointer; }
.chat-box { min-height: 330px; display: flex; flex-direction: column; gap: 16px; padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: #fafcfd; }
.chat-message { max-width: 78%; display: flex; gap: 9px; align-items: flex-start; }
.chat-message p { padding: 12px 15px; border: 1px solid var(--border); border-radius: 12px; background: white; line-height: 1.35; }
.chat-message.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-message.user p { color: white; border-color: var(--emerald); background: var(--emerald); }
.chat-message small { display: block; margin-top: 8px; color: var(--muted); font-size: 9px; }
.chat-input { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 4px 5px 4px 14px; margin-top: auto; border: 1px solid var(--border); border-radius: 99px; background: white; }
.chat-input input { flex: 1; border: 0; outline: 0; background: transparent; }
.chat-input button { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--emerald); cursor: pointer; }
.preview-checks { min-height: 688px; display: flex; flex-direction: column; padding: 20px 17px; }
.check-stat { min-height: 82px; display: grid; grid-template-columns: 85px 1fr auto; align-items: center; gap: 12px; padding: 11px 13px; margin: 7px 0; border-radius: 9px; background: #f9fbfa; }
.check-stat > span:first-child { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 11px; }
.check-stat strong { color: var(--text); font-size: 20px; }
.status-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--emerald); }
.status-dot.amber { background: var(--amber); }
.preview-actions { display: grid; gap: 10px; margin-top: auto; }
.calendar-layout { display: grid; grid-template-columns: minmax(0, 2.5fr) 345px; gap: 18px; }
.calendar-card { overflow: hidden; }
.calendar-head { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.calendar-head h2 { font-size: 22px; }
.calendar-controls { display: flex; gap: 9px; }
.calendar-controls button { min-width: 54px; height: 38px; display: grid; place-items: center; padding: 0 18px; border: 1px solid var(--border); border-radius: 8px; background: white; cursor: pointer; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 16px; }
.calendar-weekdays span { padding: 0 10px 10px; color: var(--muted); font-size: 10px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: repeat(5, minmax(110px, 1fr)); min-height: 640px; border-left: 1px solid var(--border); border-top: 1px solid var(--border); }
.calendar-day { min-width: 0; padding: 10px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.calendar-day > span { color: var(--muted); font-size: 11px; }
.calendar-day.today > span { width: 27px; height: 27px; display: grid; place-items: center; margin: -5px; border-radius: 50%; color: white; background: var(--emerald); }
.calendar-event { display: block; min-width: 0; margin-top: 12px; padding: 6px 6px 6px 9px; overflow: hidden; border-left: 4px solid var(--emerald); border-radius: 5px; background: var(--mint); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; }
.calendar-event.tone-amber { border-color: var(--amber); background: var(--amber-bg); }
.calendar-event.tone-rose { border-color: var(--rose); background: var(--rose-bg); }
.schedule-card { min-height: 800px; display: flex; flex-direction: column; padding: 20px 17px; }
.schedule-list { display: grid; gap: 14px; margin-top: 22px; }
.schedule-item { display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 14px; }
.date-tile { width: 54px; height: 58px; display: grid; place-items: center; border-radius: 10px; color: var(--emerald); background: var(--mint); }
.date-tile strong { font-size: 17px; }
.date-tile small { margin-top: -9px; font-size: 9px; }
.schedule-item > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.schedule-item small { color: var(--muted); }
.schedule-sync { margin-top: auto; }

/* Analytics */
.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) 425px; gap: 18px; margin-bottom: 20px; }
.analytics-chart { min-height: 320px; }
.analytics-chart .chart-wrap { padding: 13px 20px; }
.donut-card { min-height: 320px; padding: 20px; }
.donut-card h2 { font-size: 18px; }
.donut-layout { height: 250px; display: flex; align-items: center; justify-content: space-around; gap: 24px; }
.donut { width: 150px; height: 150px; position: relative; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--donut)); }
.donut::after { content: ""; position: absolute; inset: 28px; border-radius: 50%; background: white; }
.donut > span { z-index: 1; display: flex; flex-direction: column; align-items: center; }
.donut strong { font-size: 24px; }
.donut small { color: var(--muted); }
.donut-legend { min-width: 150px; display: grid; gap: 15px; }
.donut-legend div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; color: var(--muted); font-size: 11px; }
.donut-legend i { width: 12px; height: 12px; border-radius: 50%; }
.donut-legend strong { color: var(--text); }

/* Network and pipeline */
.network-card { min-height: 755px; position: relative; overflow: hidden; }
.network-toolbar { position: absolute; left: 14px; right: 20px; top: 15px; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.network-toolbar > div { display: flex; gap: 9px; }
.network-toolbar > span { color: var(--muted); font-size: 11px; }
.network-canvas { min-height: 690px; position: relative; margin-top: 62px; }
.network-node { width: 225px; min-height: 83px; position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1.5px solid var(--emerald); border-radius: 14px; background: white; box-shadow: 0 5px 12px rgba(16,42,33,.04); }
.network-node.central { left: calc(50% - 130px); top: 250px; width: 260px; background: var(--mint); border-width: 2px; }
.network-node.broker { left: 15%; top: 105px; }
.network-node.carrier { right: 16%; top: 85px; }
.network-node.partner { left: 15%; top: 445px; border-color: var(--amber); }
.network-node.payer { right: 16%; top: 435px; border-color: var(--lime); }
.network-node > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.network-node small { color: var(--muted); }
.network-lines { position: absolute; inset: 0; width: 100%; height: 610px; overflow: visible; }
.network-lines line { stroke: var(--emerald); stroke-width: 2; }
.network-lines line.amber { stroke: var(--amber); }
.network-lines line.lime { stroke: var(--lime); }
.network-legend { position: absolute; left: 20px; bottom: 18px; display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.network-legend span { display: flex; align-items: center; gap: 6px; }
.network-legend i { width: 11px; height: 11px; border-radius: 50%; background: var(--emerald); }
.pipeline-summary { display: grid; grid-template-columns: repeat(4, 1fr) auto; align-items: end; gap: 30px; margin: -2px 0 18px; }
.pipeline-summary > div { display: flex; flex-direction: column; gap: 4px; }
.pipeline-summary strong { font-size: 24px; }
.pipeline-summary small { color: var(--muted); }
.pipeline-actions { display: flex !important; flex-direction: row !important; gap: 8px !important; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(215px, 1fr)); gap: 12px; min-height: 700px; overflow-x: auto; }
.kanban-column { min-width: 215px; padding: 12px 10px; border-radius: 13px; background: #eef1f9; }
.kanban-head { height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.kanban-head span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.kanban-head i { width: 11px; height: 11px; border-radius: 50%; background: var(--emerald); }
.kanban-head strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: white; font-size: 11px; }
.kanban-cards { min-height: 100px; display: grid; align-content: start; gap: 12px; }
.opportunity-card { min-height: 128px; display: flex; flex-direction: column; padding: 14px; border: 1px solid var(--border); border-radius: 11px; background: white; box-shadow: var(--shadow); cursor: grab; }
.opportunity-card:active { cursor: grabbing; }
.opportunity-card.dragging { opacity: .5; }
.opportunity-card h3 { font-size: 14px; }
.opportunity-card > strong { margin: 9px 0 6px; font-size: 19px; }
.opportunity-card > small { color: var(--muted); }
.opportunity-card > div { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.kanban-add { width: 100%; height: 40px; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 11px; color: var(--emerald); border: 1px solid rgba(255,255,255,.7); border-radius: 9px; background: rgba(255,255,255,.35); cursor: pointer; }

/* Permission, import, integrations */
.role-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 16px; }
.role-card { min-height: 100px; display: flex; align-items: flex-start; gap: 13px; padding: 18px; text-align: left; border: 1px solid transparent; border-radius: 10px; background: #eef4f1; cursor: pointer; }
.role-card.active { border: 2px solid var(--emerald); background: var(--mint); }
.role-card > span { display: flex; flex-direction: column; gap: 7px; }
.role-card small { color: var(--muted); }
.permission-card { overflow: hidden; }
.permission-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 0; }
.permission-table th:not(:first-child), .permission-table td:not(:first-child) { text-align: center; }
.permission-table td { height: 55px; }
.permission-actions { display: flex; justify-content: flex-end; padding: 14px 16px; }
.import-drop { min-height: 215px; padding: 20px; margin-bottom: 18px; }
.import-zone { min-height: 128px; display: grid; place-items: center; align-content: center; gap: 8px; margin-top: 12px; border: 2px dashed #356a58; border-radius: 12px; background: #fbfdfc; cursor: pointer; }
.import-zone:hover, .import-zone.dragover { background: var(--mint); }
.import-zone input { display: none; }
.import-zone small { color: var(--muted); }
.import-progress { width: 75%; max-width: 600px; display: grid; gap: 8px; }
.import-progress .progress { width: 100%; }
.import-grid { display: grid; grid-template-columns: 365px minmax(0, 1fr); gap: 18px; min-height: 520px; }
.template-card { padding: 20px; }
.template-list { display: grid; gap: 8px; margin-top: 15px; }
.template-item { min-height: 55px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.template-item > span { display: flex; flex-direction: column; gap: 4px; }
.template-item small { color: var(--muted); }
.integration-health { min-height: 90px; display: flex; align-items: center; gap: 28px; padding: 18px 20px; margin-bottom: 20px; }
.integration-health > span { display: flex; flex-direction: column; gap: 8px; }
.integration-health strong { font-size: 24px; }
.integration-health > small { margin-left: auto; color: var(--muted); }
.integration-section { margin: 20px 0 28px; }
.integration-section > h2 { margin-bottom: 12px; font-size: 17px; }
.integration-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.integration-card { min-height: 145px; position: relative; padding: 18px; }
.integration-title { display: flex; align-items: flex-start; gap: 13px; }
.integration-title > span:last-child { display: flex; flex-direction: column; gap: 7px; }
.integration-card > p { margin-top: 17px; color: var(--muted); font-size: 12px; }
.integration-card .row-menu { position: absolute; right: 15px; bottom: 13px; width: 55px; border: 1px solid var(--border); }

/* Popovers, dialogs, toasts */
.popover { min-width: 210px; position: fixed; z-index: 100; padding: 7px; border: 1px solid var(--border); border-radius: 10px; background: white; box-shadow: 0 18px 45px rgba(16,42,33,.16); }
.popover button, .popover a { width: 100%; min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 0 11px; text-align: left; border-radius: 7px; background: transparent; cursor: pointer; }
.popover button:hover, .popover a:hover { background: var(--mint); }
.popover .danger { color: var(--rose); }
.modal-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(5,35,26,.48); backdrop-filter: blur(3px); }
.modal { width: min(100%, 560px); max-height: min(850px, calc(100vh - 40px)); display: flex; flex-direction: column; overflow: hidden; background: white; border-radius: 16px; box-shadow: 0 30px 80px rgba(5,35,26,.32); }
.modal-header { min-height: 75px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--border); }
.modal-header h2 { font-size: 20px; }
.modal-body { overflow: auto; padding: 22px; }
.modal-body .form-grid { margin-top: 0; }
.modal-footer { min-height: 72px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--border); }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 300; display: grid; gap: 9px; }
.toast { min-width: 300px; max-width: 410px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 14px; color: white; border-radius: 10px; background: var(--forest); box-shadow: 0 16px 40px rgba(5,35,26,.26); animation: toast-in .2s ease both; }
.toast button { color: white; background: transparent; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
.empty-card { min-height: 320px; display: grid; place-items: center; align-content: center; gap: 12px; padding: 30px; text-align: center; }
.empty-card p { max-width: 460px; color: var(--muted); }

/* Responsive */
@media (max-width: 1250px) {
  :root { --sidebar: 205px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
  .main-content { padding-left: 24px; padding-right: 24px; }
  .profile-button { min-width: 175px; }
  .type-cards, .build-types { grid-template-columns: repeat(2, 1fr); }
  .editor-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .editor-settings { grid-column: 1 / -1; min-height: 300px; }
  .preview-layout { grid-template-columns: minmax(0, 1fr) 350px; }
  .integration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { padding-bottom: 10px; }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { width: 270px; position: fixed; left: 0; top: 0; transform: translateX(-105%); box-shadow: 18px 0 45px rgba(5,35,26,.15); transition: transform .2s ease; }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-grid !important; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(5,35,26,.35); }
  body.sidebar-open .sidebar-scrim { display: block; }
  .mobile-menu { display: inline-grid !important; }
  .topbar { padding: 0 18px; }
  .global-search { flex: 1; width: auto; max-width: 430px; }
  .health-pill { display: none; }
  .profile-button { min-width: 44px; width: 44px; padding: 4px; }
  .profile-button > span:not(.avatar), .profile-button > .icon { display: none; }
  .main-content { padding: 18px; }
  .dashboard-main, .analytics-grid { grid-template-columns: 1fr; }
  .attention-card { min-height: auto; }
  .form-layout, .detail-layout, .calendar-layout, .preview-layout, .notifications-layout, .settings-layout, .import-grid { grid-template-columns: 1fr; }
  .review-card, .form-card { min-height: auto; }
  .review-actions { margin-top: 30px; }
  .preview-checks, .schedule-card { min-height: 450px; }
  .network-node.broker, .network-node.partner { left: 5%; }
  .network-node.carrier, .network-node.payer { right: 5%; }
  .role-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  body { font-size: 13px; }
  .auth-top { height: 80px; padding: 0 20px; }
  .auth-links { display: none; }
  .auth-main { display: block; padding: 18px 18px 40px; }
  .auth-hero { padding: 25px 4px 38px; }
  .auth-hero h1 { font-size: 39px; }
  .auth-hero > p { font-size: 15px; }
  .command-card { margin-top: 42px; }
  .auth-card { min-height: 600px; padding: 35px 22px 24px; }
  .auth-card h2 { font-size: 28px; }
  .auth-form { margin-top: 42px; }
  .topbar { height: 58px; gap: 8px; }
  .topbar-actions { gap: 7px; }
  .notification-button { display: none; }
  .main-content { min-height: calc(100vh - 58px); padding: 17px 12px 26px; }
  .page-header { min-height: auto; padding-bottom: 18px; }
  .page-header h1 { font-size: 26px; }
  .page-header p { font-size: 12px; line-height: 1.4; }
  .page-action { position: fixed; right: 15px; bottom: 15px; z-index: 35; padding: 0; }
  .page-action .btn { box-shadow: 0 10px 28px rgba(5,35,26,.24); }
  .kpi-grid, .kpi-grid-three { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-card { min-height: 108px; padding: 13px; }
  .kpi-card > strong { font-size: 24px; }
  .icon-tile { width: 36px; height: 36px; }
  .table-toolbar { flex-wrap: wrap; }
  .table-search { flex-basis: 100%; }
  .table-filters { max-width: calc(100% - 80px); overflow-x: auto; }
  .select-filter select { max-width: 120px; }
  .table-scroll { padding: 0 8px; }
  .data-table th, .data-table td { padding-left: 10px; padding-right: 10px; }
  .table-card { min-height: 520px; }
  .form-grid, .detail-grid, .check-grid { grid-template-columns: 1fr; }
  .field-full { grid-column: auto; }
  .type-cards, .build-types { grid-template-columns: 1fr; }
  .entity-hero { align-items: flex-start; flex-direction: column; }
  .hero-metrics { width: 100%; justify-content: space-between; gap: 14px; }
  .hero-actions { flex-wrap: wrap; justify-content: flex-start; margin-bottom: 0; }
  .tabs { overflow-x: auto; grid-auto-columns: minmax(120px, 1fr); }
  .editor-layout { grid-template-columns: 1fr; }
  .editor-nav, .editor-settings { min-height: auto; }
  .build-type { min-height: 240px; }
  .stepper { padding-left: 5px; padding-right: 5px; }
  .step { font-size: 9px; }
  .browser-stage { min-height: 570px; padding: 12px; }
  .employee-body { padding: 20px 14px; }
  .chat-message { max-width: 90%; }
  .calendar-grid { min-width: 700px; }
  .calendar-card { overflow-x: auto; }
  .calendar-head, .calendar-weekdays { min-width: 700px; }
  .network-canvas { min-width: 720px; }
  .network-card { overflow-x: auto; }
  .network-toolbar { min-width: 680px; }
  .pipeline-summary { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .pipeline-actions { grid-column: 1 / -1; }
  .role-cards { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .donut-layout { flex-direction: column; height: auto; padding: 25px 0; }
  .permission-table { min-width: 820px; }
  .permission-card { overflow-x: auto; }
  .toast-root { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; width: 100%; }
  .modal-backdrop { padding: 10px; }
}

@media (max-width: 430px) {
  .brand-copy strong { font-size: 15px; }
  .global-search { height: 40px; }
  .global-search input::placeholder { color: transparent; }
  .kpi-grid, .kpi-grid-three { grid-template-columns: 1fr 1fr; }
  .kpi-card > span:last-child { font-size: 12px; }
  .auth-options { align-items: flex-start; gap: 15px; flex-direction: column; }
  .command-metrics { gap: 6px; }
  .command-metrics div { padding: 10px; }
  .command-metrics strong { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
