:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --ink: #14213d;
  --muted: #65758b;
  --line: #d8e0eb;
  --accent: #0e8f78;
  --accent-strong: #087160;
  --accent-soft: #dff7f1;
  --warning: #ba6b00;
  --warning-soft: #fff1d6;
  --danger: #b42318;
  --danger-soft: #ffe4e1;
  --info: #1d66c2;
  --info-soft: #e4efff;
  --shadow: 0 18px 45px rgba(31, 46, 72, 0.12);
  --radius: 8px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  line-height: 1.45;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.app-root {
  min-height: 100vh;
}

.login-view {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 480px) 1fr;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
  padding: 48px;
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-weight: 800;
}

.brand-mark img,
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.logo-mark,
.logo-avatar {
  overflow: hidden;
  background: white;
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.brand-lockup h1 {
  margin: 0;
  font-size: 34px;
}

.login-form {
  display: grid;
  gap: 16px;
}

.compact-form {
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 143, 120, 0.14);
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.icon-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-action {
  background: var(--accent);
  color: white;
}

.primary-action:hover {
  background: var(--accent-strong);
}

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

.secondary-action:hover,
.icon-action:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.ghost-action {
  background: transparent;
  color: var(--muted);
}

.ghost-action:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.danger-action {
  background: var(--danger);
  color: white;
}

.icon-action {
  width: 40px;
  padding: 0;
  background: var(--surface);
  border-color: var(--line);
}

.demo-credentials {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.login-art {
  position: relative;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 64px;
  background:
    linear-gradient(135deg, rgba(20, 33, 61, 0.96), rgba(14, 143, 120, 0.84)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 22px);
}

.metric-strip {
  display: flex;
  width: min(520px, 100%);
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  padding: 24px;
  backdrop-filter: blur(10px);
}

.metric-strip span {
  font-weight: 700;
  opacity: 0.78;
}

.metric-strip strong {
  font-size: 36px;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  overflow-y: auto;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid var(--line);
  background: #101827;
  color: white;
  padding: 22px 16px;
}

.sidebar .brand-lockup h1 {
  color: white;
  font-size: 22px;
}

.sidebar .brand-mark {
  background: var(--accent);
}

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

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  padding: 12px 11px;
  text-decoration: none;
  font-weight: 750;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-icon {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.main-shell {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

#main {
  flex: 1 0 auto;
}

.app-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted);
  padding: 16px 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.marketing-footer {
  border-top-color: rgba(221, 229, 239, 0.86);
  background: #101827;
  color: rgba(255, 255, 255, 0.76);
}

.login-with-footer {
  min-height: calc(100vh - 54px);
}

.login-footer {
  min-height: 54px;
  background: white;
}

.main-shell {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(245, 247, 251, 0.92);
  padding: 14px 28px;
  backdrop-filter: blur(12px);
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
}

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

.topbar-language {
  display: grid;
  min-width: 144px;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.topbar-language select {
  min-height: 38px;
  padding: 8px 28px 8px 10px;
  font-size: 12px;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 8px 10px;
}

.avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 900;
}

.user-meta {
  display: grid;
  gap: 1px;
  font-size: 12px;
}

.user-meta strong {
  font-size: 13px;
}

.page {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.page-title {
  display: grid;
  gap: 6px;
}

.page-title h2 {
  margin: 0;
  font-size: 28px;
}

.page-title p {
  margin: 0;
  color: var(--muted);
}

.section {
  display: grid;
  gap: 14px;
}

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

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

.card,
.stat-card,
.table-wrap,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(31, 46, 72, 0.04);
}

.panel {
  padding: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.workspace-groups {
  display: grid;
  gap: 12px;
}

.workspace-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(31, 46, 72, 0.04);
}

.workspace-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 13px 16px;
  cursor: pointer;
  list-style: none;
}

.workspace-group > summary::-webkit-details-marker {
  display: none;
}

.workspace-group > summary::after {
  display: inline-grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  content: "+";
  font-size: 18px;
  font-weight: 800;
}

.workspace-group[open] > summary {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.workspace-group[open] > summary::after {
  content: "-";
}

.workspace-group > summary span {
  color: var(--ink);
  font-weight: 900;
}

.workspace-group > summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.workspace-group-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.workspace-grid {
  display: grid;
  gap: 14px;
  align-items: start;
}

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

.workspace-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-grid > .panel {
  min-width: 0;
  box-shadow: none;
}

.leave-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 16px;
  align-items: start;
}

.leave-requests-panel {
  min-width: 0;
}

.leave-side-panel {
  min-width: 0;
}

.leave-side-panel .panel {
  height: 100%;
}

.compact-actions {
  align-items: center;
  gap: 6px;
}

.stat-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
  border-top: 3px solid var(--accent);
  padding: 18px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.stat-card strong {
  font-size: 30px;
}

.stat-card small {
  color: var(--muted);
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 850;
}

.badge.success,
.badge.Active,
.badge.Approved,
.badge.Paid,
.badge.converted {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge.warning,
.badge.Pending,
.badge.Draft,
.badge.Onboarding,
.badge.new {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.danger,
.badge.Rejected,
.badge.Inactive,
.badge.closed {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.info,
.badge.contacted {
  background: var(--info-soft);
  color: var(--info);
}

.table-wrap {
  overflow: auto;
}

.smart-table {
  display: grid;
  gap: 12px;
}

.table-tools,
.table-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-search,
.table-page-size {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.table-search input {
  width: min(320px, 62vw);
}

.table-page-size select {
  width: 84px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 14px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.table-sort {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  text-transform: inherit;
}

td {
  font-size: 14px;
}

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

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.table-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filters input,
.filters select {
  min-width: 210px;
}

.company-selector-panel {
  gap: 16px;
}

.company-selector-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.2fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
}

.company-selector-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(120px, 0.5fr));
  gap: 10px;
}

.company-selector-summary span {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfdff;
  padding: 12px;
}

.company-selector-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.company-selector-summary small {
  color: var(--muted);
  font-size: 12px;
}

.field-help {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.editable-row {
  align-items: flex-start;
}

.designation-edit-form,
.management-edit-form {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.management-edit-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  align-items: end;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.component-edit-form {
  display: grid;
  grid-template-columns: minmax(120px, 160px) auto;
  gap: 8px;
  align-items: end;
}

.component-edit-form label {
  min-width: 120px;
}

.inline-update-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(100%, 360px);
  max-width: 100%;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(140px, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-width: min(100%, 420px);
  max-width: 100%;
}

.designation-edit-form label {
  flex: 1;
  min-width: 150px;
}

.management-edit-form label {
  min-width: 0;
}

.management-edit-form .wide {
  grid-column: 1 / -1;
}

.management-edit-form input,
.management-edit-form select,
.designation-edit-form input,
.admin-reset-form input {
  min-width: 0;
  flex: 1;
}

.management-edit-form button[type="submit"] {
  justify-self: start;
}

.salary-component-form {
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  align-items: end;
  gap: 10px;
}

.salary-component-form > label,
.salary-component-edit-form > label {
  min-width: 0;
}

.salary-component-form input,
.salary-component-form select,
.salary-component-edit-form input,
.salary-component-edit-form select {
  width: 100%;
  min-width: 0;
}

.salary-advanced {
  grid-column: 1 / -1;
  border: 1px solid #dfe7f2;
  border-radius: 8px;
  background: #fbfdff;
  padding: 0;
}

.salary-advanced > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  cursor: pointer;
  color: var(--ink);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
  list-style: none;
}

.salary-advanced > summary::-webkit-details-marker {
  display: none;
}

.salary-advanced > summary::after {
  content: "+";
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 950;
}

.salary-advanced[open] > summary {
  border-bottom: 1px solid #dfe7f2;
}

.salary-advanced[open] > summary::after {
  content: "-";
}

.salary-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  padding: 12px;
}

.salary-advanced-grid .wide {
  grid-column: 1 / -1;
}

.component-row.salary-component-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  overflow: visible;
}

.component-row.salary-component-row > div {
  min-width: 0;
}

.component-row.salary-component-row > div span {
  display: block;
}

.salary-component-edit-form {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  width: 100%;
  min-width: 0;
}

.salary-component-edit-form .salary-advanced {
  grid-column: 1 / -1;
}

.salary-component-edit-form button[type="submit"] {
  justify-self: start;
}

.admin-reset-form {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, white, #f8fafc);
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.policy-meta,
.calendar-list,
.mini-timeline {
  display: grid;
  gap: 8px;
}

.policy-meta {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  color: var(--muted);
  font-size: 12px;
}

.calendar-event {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) minmax(160px, auto);
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 11px 12px;
}

.calendar-event span,
.calendar-event em,
.mini-timeline span {
  color: var(--muted);
  font-size: 12px;
}

.mini-timeline span {
  display: grid;
}

.mini-timeline strong {
  color: var(--ink);
  font-size: 12px;
}

.loading-state,
.error-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.loading-state strong,
.error-state strong {
  color: var(--ink);
}

.loader {
  width: 34px;
  height: 34px;
  border: 3px solid var(--surface-alt);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 39, 0.52);
  padding: 18px;
}

.modal {
  width: min(720px, 100%);
  max-height: min(720px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.confirm-message {
  margin: 0;
  color: var(--muted);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-body {
  padding: 18px;
}

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

.form-grid .wide {
  grid-column: 1 / -1;
}

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

.settings-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-topics {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.settings-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  padding: 11px 12px;
  text-align: left;
}

.settings-topic:hover,
.settings-topic.active {
  border-color: var(--line);
  background: var(--surface-alt);
}

.settings-topic.active {
  border-left: 3px solid var(--accent);
}

.settings-topic span {
  display: grid;
  gap: 3px;
}

.settings-topic small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.settings-topic em {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.settings-topic-content {
  min-width: 0;
}

.settings-topic-content .panel {
  min-width: 0;
}

.settings-topic-content .component-list {
  min-width: 0;
}

.settings-topic-content .component-row.editable-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr) auto;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.settings-topic-content .component-row.editable-row > div {
  min-width: 0;
}

.settings-topic-content .component-row.editable-row > div span,
.settings-topic-content .component-row.editable-row > div strong {
  overflow-wrap: anywhere;
}

.settings-topic-content .leave-type-edit-form,
.settings-topic-content .department-edit-form,
.leave-rule-form {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  min-width: 0;
}

.settings-topic-content .leave-type-edit-form .wide,
.leave-rule-form .wide {
  grid-column: 1 / -1;
}

.settings-topic-content .component-row.editable-row > .danger-action {
  justify-self: start;
  white-space: nowrap;
}

.settings-topic-content .designation-edit-form {
  grid-column: 1 / 3;
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  .settings-topic-content .component-row.editable-row {
    grid-template-columns: 1fr;
  }

  .settings-topic-content .designation-edit-form {
    grid-column: auto;
  }
}

.switch-field {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  padding: 12px;
}

.switch-field input {
  width: auto;
  margin-top: 4px;
}

.switch-field span {
  display: grid;
  gap: 3px;
}

.switch-field small,
.module-switch-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.module-switch-grid {
  display: grid;
  gap: 8px;
}

.module-switch-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 11px 12px;
}

.module-switch-row input {
  width: auto;
}

.module-switch-row span {
  display: grid;
  gap: 3px;
}

.module-switch-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}

.email-settings-panel {
  border-top: 3px solid var(--accent);
}

.email-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: grid;
  gap: 10px;
}

.toast {
  width: min(360px, calc(100vw - 36px));
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  padding: 13px 14px;
}

.toast strong {
  display: block;
  margin-bottom: 3px;
}

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

.mobile-menu {
  display: none;
}

.marketing-site {
  min-height: 100vh;
  background: #f7f9fc;
  color: var(--ink);
}

.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(216, 224, 235, 0.88);
  background: rgba(247, 249, 252, 0.94);
  padding: 18px clamp(20px, 5vw, 72px);
  backdrop-filter: blur(14px);
}

.marketing-brand,
.marketing-links,
.marketing-actions,
.hero-actions {
  display: flex;
  align-items: center;
}

.marketing-brand {
  gap: 12px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  text-decoration: none;
}

.marketing-brand .brand-mark {
  width: 42px;
  height: 42px;
}

.marketing-links {
  gap: 22px;
}

.marketing-links a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.marketing-links a:hover {
  color: var(--accent-strong);
}

.marketing-actions,
.hero-actions {
  gap: 10px;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 72px) 64px;
}

.hero-copy {
  display: grid;
  gap: 24px;
  max-width: 690px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 720px;
  color: #101b34;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 640px;
  color: #52647d;
  font-size: 19px;
}

.hero-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 10px 0 0;
}

.hero-proof div {
  border-left: 3px solid var(--accent);
  background: white;
  padding: 14px 16px;
}

.hero-proof dt {
  color: var(--ink);
  font-size: 28px;
  font-weight: 900;
}

.hero-proof dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.product-preview {
  display: grid;
  gap: 18px;
  border: 1px solid #ccdae9;
  border-radius: 8px;
  background: white;
  box-shadow: 0 28px 70px rgba(20, 33, 61, 0.16);
  padding: 20px;
}

.preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 8px;
  background: #111b2e;
  color: white;
  padding: 15px 16px;
}

.preview-topbar span {
  color: #a8dcd3;
  font-size: 13px;
  font-weight: 800;
}

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

.preview-grid article,
.preview-panel,
.preview-table,
.role-grid article,
.module-grid article,
.premium-card,
.pricing-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.preview-grid article {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.preview-grid span,
.preview-panel span,
.preview-table span,
.pricing-card span,
.role-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.preview-grid strong {
  color: var(--ink);
  font-size: 26px;
}

.preview-grid em,
.preview-table em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.preview-panel {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: end;
  padding: 18px;
}

.preview-panel strong {
  display: block;
  margin-top: 6px;
}

.trend-bars {
  display: flex;
  height: 118px;
  align-items: end;
  gap: 14px;
}

.trend-bars span {
  flex: 1;
  min-width: 22px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #0e8f78, #9edfd3);
}

.preview-table {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0;
  overflow: hidden;
}

.preview-table span,
.preview-table strong,
.preview-table em {
  border-bottom: 1px solid var(--line);
  padding: 12px;
}

.preview-table span {
  background: var(--surface-alt);
}

.marketing-section {
  padding: 68px clamp(20px, 5vw, 72px);
}

.section-heading {
  display: grid;
  gap: 10px;
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2,
.security-section h2,
.final-cta h2 {
  margin: 0;
  color: #101b34;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.role-section {
  background: white;
}

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

.role-grid article {
  display: grid;
  gap: 10px;
  min-height: 210px;
  padding: 22px;
}

.role-grid h3 {
  margin: 0;
  font-size: 21px;
}

.role-grid p,
.module-grid span,
.security-section p,
.pricing-card p,
.final-cta p {
  color: var(--muted);
}

.feature-section {
  background: #f7f9fc;
}

.premium-section {
  background: #ffffff;
}

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

.premium-card {
  display: grid;
  align-content: start;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.premium-card.featured {
  border-color: rgba(13, 139, 120, 0.28);
  background:
    linear-gradient(180deg, rgba(236, 247, 245, 0.92), rgba(255, 255, 255, 0.98));
  box-shadow: 0 22px 54px rgba(13, 139, 120, 0.1);
}

.premium-card span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.premium-card h3 {
  margin: 0;
  color: #111827;
  font-size: 24px;
  line-height: 1.18;
}

.premium-card p {
  margin: 0;
  color: var(--muted);
}

.premium-card ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: #334155;
  font-size: 14px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.module-grid article {
  display: grid;
  gap: 12px;
  min-height: 178px;
  padding: 20px;
}

.module-grid strong {
  font-size: 18px;
}

.module-grid span {
  font-size: 14px;
}

.security-section {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  background: #111b2e;
  color: white;
}

.security-section h2,
.security-section .eyebrow {
  color: white;
}

.security-section p {
  max-width: 660px;
  color: #c9d6e6;
}

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

.security-list span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-weight: 800;
  padding: 16px;
}

.pricing-section {
  background: white;
}

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

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

.screenshot-card,
.case-study,
.report-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 18px;
}

.screenshot-frame {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  padding: 16px;
}

.pricing-card {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.pricing-card strong {
  display: block;
  margin: 8px 0;
  color: var(--ink);
  font-size: 26px;
}

.pricing-card.featured {
  border-color: color-mix(in srgb, var(--accent) 45%, white);
  box-shadow: 0 14px 40px rgba(14, 143, 120, 0.14);
}

.pricing-card p {
  max-width: 680px;
  margin-bottom: 0;
}

.premium-card p {
  max-width: none;
}

.final-cta {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 76px 20px 90px;
  background: #e4f5f1;
  text-align: center;
}

.final-cta p {
  max-width: 680px;
}

.demo-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 260px));
  gap: 12px;
  width: min(680px, 100%);
}

.demo-form textarea {
  grid-column: 1 / -1;
  min-height: 96px;
}

.demo-form button {
  justify-self: start;
}

.case-study {
  max-width: 860px;
  margin: 0 auto;
}

.case-study strong {
  color: var(--ink);
  font-size: 24px;
}

.report-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
}

.org-grid {
  display: grid;
  gap: 12px;
}

.org-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  background: #ffffff;
  padding: 13px 14px;
  box-shadow: var(--shadow-tight);
}

.org-card strong {
  color: #172033;
  font-weight: 850;
}

.org-card span,
.org-card small {
  color: var(--muted);
}

@media (max-width: 1040px) {
  .grid.four,
  .grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .leave-workbench {
    grid-template-columns: 1fr;
  }

  .marketing-links {
    display: none;
  }

  .hero-section,
  .security-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

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

  .sidebar {
    position: fixed;
    z-index: 10;
    width: min(310px, 86vw);
    transform: translateX(-105%);
    transition: transform 180ms ease;
  }

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

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

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 16px;
  }

  .topbar h2 {
    font-size: 20px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .topbar-language {
    flex: 1 1 160px;
  }

  .page {
    padding: 18px 16px;
  }

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

  .grid.two,
  .grid.three,
  .grid.four,
  .workspace-grid.two,
  .workspace-grid.three {
    grid-template-columns: 1fr;
  }

  .workspace-group > summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-group > summary::after {
    position: absolute;
    right: 14px;
    top: 14px;
  }

  .workspace-group > summary {
    position: relative;
    padding-right: 52px;
  }

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

  .table-search,
  .table-search input,
  .table-page-size,
  .table-page-size select {
    width: 100%;
  }

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

  .table-pager {
    justify-content: space-between;
  }

  .policy-meta,
  .calendar-event {
    grid-template-columns: 1fr;
  }

  .inline-update-form,
  .inline-form {
    grid-template-columns: 1fr;
    min-width: 240px;
  }

  .company-selector-grid,
  .company-selector-summary {
    grid-template-columns: 1fr;
  }

  .component-edit-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

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

  .settings-topics {
    position: static;
  }

  .management-edit-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .marketing-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .marketing-actions {
    width: 100%;
  }

  .marketing-actions a,
  .hero-actions a {
    flex: 1;
  }

  .hero-section {
    padding-top: 38px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-proof,
  .preview-grid,
  .role-grid,
  .preview-panel,
  .security-list {
    grid-template-columns: 1fr;
  }

  .product-preview {
    padding: 14px;
  }

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

  .preview-table span:nth-child(2),
  .preview-table span:nth-child(3),
  .preview-table em {
    display: none;
  }

  .pricing-card {
    align-items: stretch;
    flex-direction: column;
  }

  .pricing-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .demo-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .login-panel {
    padding: 28px 20px;
  }

  .topbar-actions .secondary-action {
    display: none;
  }

  .user-meta {
    display: none;
  }

  .filters input,
  .filters select {
    min-width: 100%;
  }

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

  .hero-copy h1 {
    font-size: 34px;
  }

  .preview-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}

/* Premium UI refresh */
:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #f3f6fa;
  --surface-raised: #fbfdff;
  --ink: #172033;
  --muted: #667387;
  --line: #dde5ef;
  --accent: #0d8b78;
  --accent-strong: #09695d;
  --accent-soft: #e2f6f1;
  --warning: #9a6512;
  --warning-soft: #fff2d8;
  --danger: #b42318;
  --danger-soft: #ffe7e3;
  --info: #315eaa;
  --info-soft: #e9f0ff;
  --shadow: 0 24px 60px rgba(21, 31, 48, 0.15);
  --shadow-soft: 0 14px 34px rgba(24, 35, 54, 0.08);
  --shadow-tight: 0 8px 18px rgba(24, 35, 54, 0.07);
  --radius: 8px;
}

html {
  background: var(--bg);
}

body {
  background:
    linear-gradient(180deg, #f8fafc 0%, #f4f7fb 42%, #eef5f4 100%);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(13, 139, 120, 0.18);
}

.app-root {
  background: transparent;
}

.eyebrow {
  color: var(--accent-strong);
  letter-spacing: 0.12em;
}

.brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #172033 0%, #0d8b78 100%);
  box-shadow: var(--shadow-tight);
}

.login-view {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96) 0 36%, transparent 36%),
    linear-gradient(135deg, #edf4f7 0%, #f7fafc 58%, #fff8ec 100%);
}

.login-panel {
  position: relative;
  z-index: 1;
  border-right: 1px solid rgba(221, 229, 239, 0.9);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 18px 0 50px rgba(21, 31, 48, 0.08);
  backdrop-filter: blur(16px);
}

.login-panel .brand-lockup h1 {
  color: #111827;
}

.login-form,
.compact-form {
  border-radius: var(--radius);
}

label {
  color: #243047;
  font-weight: 760;
}

input,
select,
textarea {
  border-color: #d6e0ec;
  background: var(--surface-raised);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c7d5e5;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 139, 120, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.primary-action,
.secondary-action,
.ghost-action,
.danger-action,
.icon-action {
  box-shadow: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.primary-action {
  background: linear-gradient(135deg, var(--accent) 0%, #147996 100%);
  box-shadow: 0 10px 22px rgba(13, 139, 120, 0.22);
}

.primary-action:hover {
  background: linear-gradient(135deg, var(--accent-strong) 0%, #116c86 100%);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(13, 139, 120, 0.26);
}

.secondary-action {
  border-color: #d6e0ec;
  background: #ffffff;
  color: #243047;
}

.secondary-action:hover,
.icon-action:hover {
  border-color: rgba(13, 139, 120, 0.42);
  background: #f7fbfa;
  color: var(--accent-strong);
  transform: translateY(-1px);
}

.ghost-action:hover {
  background: #edf3f7;
}

.danger-action {
  background: linear-gradient(135deg, #c5362b 0%, #9e1f18 100%);
}

.icon-action {
  background: #ffffff;
  color: #42526a;
}

.mobile-menu {
  font-size: 0;
}

.mobile-menu::before {
  display: block;
  width: 16px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  box-shadow: inset 0 4px 0 transparent, 0 -4px 0 transparent;
  content: "";
}

.login-art {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 29, 49, 0.96), rgba(13, 86, 91, 0.9)),
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 24px);
}

.metric-strip {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 60px rgba(4, 13, 25, 0.18);
}

.shell {
  grid-template-columns: 258px minmax(0, 1fr);
  background: linear-gradient(180deg, #f7f9fc 0%, #eef4f5 100%);
}

.sidebar {
  border-right: 0;
  background:
    linear-gradient(180deg, #0d1424 0%, #111827 52%, #0b2f35 100%);
  box-shadow: 18px 0 48px rgba(17, 24, 39, 0.12);
  padding-right: 12px;
  padding-left: 12px;
}

.sidebar .brand-lockup {
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  padding-bottom: 16px;
}

.sidebar .brand-mark {
  background: linear-gradient(135deg, #0d8b78 0%, #d39a2a 100%);
}

.nav-list {
  gap: 5px;
}

.nav-link {
  position: relative;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.72);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
  padding: 10px 10px;
}

.nav-link:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

.nav-link.active {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 3px 0 0 #d39a2a;
}

.nav-icon {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.92);
}

.nav-link.active .nav-icon {
  background: #ffffff;
  color: #0d5c55;
}

.sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  padding: 12px;
}

.sidebar-footer p {
  margin-bottom: 0;
}

.main-shell {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0)),
    var(--bg);
}

.topbar {
  min-height: 76px;
  border-bottom-color: rgba(221, 229, 239, 0.85);
  background: rgba(248, 250, 252, 0.86);
  box-shadow: 0 8px 22px rgba(21, 31, 48, 0.04);
}

.topbar h2 {
  color: #111827;
  font-size: 23px;
  font-weight: 850;
}

.user-pill {
  border-color: rgba(214, 224, 236, 0.92);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-tight);
}

.avatar {
  background: linear-gradient(135deg, var(--accent-soft), #fff4dc);
  color: var(--accent-strong);
}

.page {
  gap: 22px;
  padding: 30px;
}

.page-title h2 {
  color: #111827;
  font-size: 30px;
  font-weight: 880;
}

.page-title p {
  max-width: 760px;
}

.card,
.stat-card,
.table-wrap,
.panel,
.screenshot-card,
.case-study,
.report-card,
.pricing-card,
.preview-grid article,
.preview-panel,
.preview-table,
.role-grid article,
.module-grid article {
  border-color: #dfe7f2;
  box-shadow: var(--shadow-soft);
}

.panel {
  background: rgba(255, 255, 255, 0.96);
}

.section-title h3 {
  color: #172033;
  font-weight: 850;
}

.stat-card {
  position: relative;
  overflow: hidden;
  border-top: 0;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.stat-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), #d39a2a);
  content: "";
}

.stat-card span {
  color: #5d6b7f;
  letter-spacing: 0.02em;
}

.stat-card strong {
  color: #111827;
  font-weight: 900;
}

.badge {
  border: 1px solid transparent;
}

.badge.success,
.badge.Active,
.badge.Approved,
.badge.Paid,
.badge.converted {
  border-color: rgba(13, 139, 120, 0.18);
}

.badge.warning,
.badge.Pending,
.badge.Draft,
.badge.Onboarding,
.badge.new {
  border-color: rgba(154, 101, 18, 0.2);
}

.badge.info,
.badge.contacted {
  border-color: rgba(49, 94, 170, 0.18);
}

.badge.danger,
.badge.closed {
  border-color: rgba(183, 54, 54, 0.2);
}

.table-wrap {
  border-radius: var(--radius);
  background: #ffffff;
}

.smart-table {
  gap: 14px;
}

.table-tools {
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  padding: 12px;
  box-shadow: var(--shadow-tight);
}

th {
  background: #f4f7fb;
  color: #516176;
  letter-spacing: 0.04em;
}

td {
  color: #29364c;
}

tbody tr {
  transition: background 140ms ease;
}

tbody tr:hover {
  background: #f8fbff;
}

.table-sort {
  min-height: 26px;
  border-radius: 6px;
}

.table-sort:hover {
  color: var(--accent-strong);
}

.sort-glyph {
  position: relative;
  display: inline-block;
  width: 10px;
  height: 14px;
  flex: 0 0 auto;
  opacity: 0.7;
}

.sort-glyph::before,
.sort-glyph::after {
  position: absolute;
  left: 1px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  content: "";
}

.sort-glyph::before {
  top: 1px;
  border-bottom: 5px solid currentColor;
}

.sort-glyph::after {
  bottom: 1px;
  border-top: 5px solid currentColor;
}

.table-footer {
  color: var(--muted);
  font-size: 13px;
}

.filters {
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.empty-state {
  border-color: #cad8e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 251, 253, 0.94)),
    repeating-linear-gradient(135deg, rgba(13, 139, 120, 0.05) 0 1px, transparent 1px 12px);
  color: #5d6b7f;
  box-shadow: var(--shadow-tight);
}

.component-row,
.calendar-event,
.activity-item,
.approval-item,
.policy-item,
.notification-item {
  background: #ffffff;
  box-shadow: 0 6px 16px rgba(24, 35, 54, 0.04);
}

.loading-state,
.error-state {
  border-color: #dfe7f2;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-soft);
}

.modal-backdrop {
  background: rgba(13, 20, 36, 0.58);
  backdrop-filter: blur(7px);
}

.modal {
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 30px 90px rgba(10, 18, 32, 0.32);
}

.modal-header,
.modal-footer {
  background: #fbfdff;
}

.toast {
  border-color: #dfe7f2;
  background: rgba(255, 255, 255, 0.97);
}

.marketing-site {
  background: #f7f9fc;
}

.marketing-nav {
  border-bottom-color: rgba(221, 229, 239, 0.72);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 26px rgba(21, 31, 48, 0.06);
}

.marketing-brand {
  color: #111827;
}

.marketing-links a {
  color: #59687c;
}

.hero-section {
  position: relative;
  min-height: calc(100vh - 78px);
  grid-template-columns: 1fr;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(12, 20, 36, 0.94) 0%, rgba(12, 20, 36, 0.86) 48%, rgba(12, 20, 36, 0.52) 100%),
    linear-gradient(135deg, #0d1424 0%, #0d5b59 58%, #d39a2a 150%);
}

.hero-section::before {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 96px);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 520px;
  color: #ffffff;
}

.hero-copy .eyebrow,
.hero-copy h1 {
  color: #ffffff;
}

.hero-copy h1 {
  font-size: 54px;
  line-height: 1.03;
}

.hero-lede {
  max-width: 520px;
  color: rgba(255, 255, 255, 0.82);
}

.hero-actions .secondary-action {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-proof div {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-left: 3px solid #d39a2a;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.hero-proof dt {
  color: #ffffff;
}

.hero-proof dd {
  color: rgba(255, 255, 255, 0.72);
}

.product-preview {
  position: absolute;
  right: 56px;
  bottom: 44px;
  width: min(600px, 46vw);
  transform: perspective(1100px) rotateY(-8deg) rotateX(3deg);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 100px rgba(2, 8, 20, 0.38);
}

.preview-topbar {
  background: linear-gradient(135deg, #111827 0%, #174b55 100%);
}

.preview-grid article,
.preview-panel,
.preview-table,
.role-grid article,
.module-grid article,
.premium-card,
.pricing-card,
.screenshot-card,
.case-study,
.report-card {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.trend-bars span {
  background: linear-gradient(180deg, #147996, var(--accent));
}

.marketing-section {
  padding-top: 76px;
  padding-bottom: 76px;
}

.section-heading h2,
.security-section h2,
.final-cta h2 {
  color: #111827;
  font-size: 40px;
  line-height: 1.12;
}

.role-grid article,
.module-grid article,
.premium-card,
.pricing-card,
.screenshot-card,
.case-study,
.report-card {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.role-grid article:hover,
.module-grid article:hover,
.premium-card:hover,
.pricing-card:hover,
.screenshot-card:hover,
.report-card:hover {
  border-color: rgba(13, 139, 120, 0.24);
  box-shadow: 0 22px 50px rgba(24, 35, 54, 0.12);
  transform: translateY(-2px);
}

.security-section {
  background:
    linear-gradient(135deg, #0d1424 0%, #102a36 58%, #0b3b39 100%);
}

.security-list span {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.09);
}

.pricing-card.featured {
  border-color: rgba(13, 139, 120, 0.38);
  box-shadow: 0 24px 60px rgba(13, 139, 120, 0.14);
}

.final-cta {
  background:
    linear-gradient(180deg, #ecf7f5 0%, #fff8ec 100%);
}

.demo-form {
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

@media (max-width: 1120px) {
  .hero-copy h1 {
    font-size: 52px;
  }

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

  .product-preview {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    transform: none;
  }

  .hero-section {
    align-content: start;
  }
}

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

  .sidebar {
    box-shadow: 18px 0 56px rgba(17, 24, 39, 0.32);
  }

  .topbar {
    min-height: auto;
  }

  .page {
    padding: 18px 16px;
  }

  .page-title h2 {
    font-size: 26px;
  }

  .hero-section {
    min-height: auto;
    padding: 44px 20px 34px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .section-heading h2,
  .security-section h2,
  .final-cta h2 {
    font-size: 32px;
  }
}

@media (max-width: 520px) {
  .login-view {
    background: #f7f9fc;
  }

  .login-panel {
    padding: 28px 20px;
    box-shadow: none;
  }

  .hero-copy h1 {
    font-size: 34px;
  }

  .hero-lede {
    font-size: 16px;
  }

  .hero-proof {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-proof div {
    padding: 10px 8px;
  }

  .hero-proof dt {
    font-size: 22px;
  }

  .hero-proof dd {
    font-size: 11px;
  }

  .product-preview {
    display: grid;
    margin-top: 6px;
  }

  .product-preview .preview-panel,
  .product-preview .preview-table {
    display: none;
  }

  .table-tools,
  .filters,
  .demo-form {
    padding: 10px;
  }
}

/* Enterprise density pass for logged-in workspaces */
.shell .topbar {
  min-height: 56px;
  padding: 7px 18px;
}

.shell .page {
  gap: 11px;
  padding: 14px 20px 18px;
}

.shell .page-header {
  align-items: center;
  gap: 10px;
}

.shell .page-title {
  gap: 4px;
}

.shell .page-title h2 {
  font-size: 24px;
}

.shell .page-title p {
  max-width: 720px;
  font-size: 12px;
  line-height: 1.45;
}

.shell .app-footer {
  padding: 8px 18px;
  font-size: 11px;
}

.shell .section {
  gap: 9px;
}

.shell .section-title {
  gap: 10px;
}

.shell .section-title h3 {
  font-size: 16px;
}

.shell .panel {
  padding: 13px;
}

.shell .grid {
  gap: 11px;
}

.shell .stat-card {
  gap: 6px;
  min-height: 100px;
  padding: 13px 15px;
}

.shell .stat-card span {
  font-size: 12px;
}

.shell .stat-card strong {
  font-size: 26px;
}

.shell label {
  gap: 5px;
}

.shell input,
.shell select,
.shell textarea {
  padding: 9px 10px;
}

.shell textarea {
  min-height: 84px;
}

.shell .primary-action,
.shell .secondary-action,
.shell .ghost-action,
.shell .danger-action,
.shell .icon-action {
  min-height: 36px;
  padding: 0 12px;
}

.shell .icon-action {
  width: 36px;
}

.shell .badge {
  padding: 4px 8px;
  font-size: 11px;
}

.shell .form-grid {
  gap: 9px 11px;
}

.shell .smart-table {
  gap: 10px;
}

.shell .table-tools {
  padding: 9px 10px;
}

.shell th,
.shell td {
  padding: 10px 12px;
}

.shell .empty-state {
  padding: 20px;
}

.shell .component-list,
.shell .calendar-list,
.shell .mini-timeline {
  gap: 8px;
}

.shell .component-row,
.shell .calendar-event {
  padding: 9px 10px;
}

.shell .company-selector-panel {
  gap: 12px;
}

.shell .company-selector-grid {
  gap: 9px;
}

.shell .company-selector-summary {
  gap: 8px;
}

.shell .company-selector-summary span {
  padding: 8px 10px;
}

.shell .settings-layout {
  gap: 12px;
}

.shell .settings-topics {
  gap: 6px;
  padding: 10px;
}

.shell .settings-topic,
.shell .module-switch-row,
.shell .switch-field {
  padding: 9px 10px;
}

@media (max-width: 820px) {
  .shell .topbar {
    min-height: 54px;
    padding: 8px 12px;
  }

  .shell .page {
    gap: 11px;
    padding: 12px 14px 16px;
  }

  .shell .app-footer {
    padding: 8px 12px;
  }
}

/* Enterprise UI upgrade pass */
.topbar-title-stack {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.breadcrumbs {
  display: flex;
  max-width: min(42vw, 520px);
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumbs span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.breadcrumbs span + span::before {
  color: #9aa7b8;
  content: "/";
  margin-right: 6px;
}

.tenant-chip {
  display: flex;
  min-width: 164px;
  max-width: 240px;
  align-items: center;
  gap: 9px;
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  padding: 6px 9px;
  box-shadow: var(--shadow-tight);
}

.tenant-chip > span:last-child {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.tenant-chip strong,
.tenant-chip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-chip strong {
  color: #111827;
  font-size: 12px;
}

.tenant-chip small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.tenant-mark {
  display: inline-grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), #d39a2a);
  color: white;
  font-size: 11px;
  font-weight: 900;
}

.tenant-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.density-toggle {
  gap: 7px;
}

.density-dot {
  display: inline-grid;
  width: 18px;
  height: 18px;
  grid-template-rows: repeat(3, 1fr);
  gap: 3px;
}

.density-dot::before,
.density-dot::after,
.density-dot {
  border-radius: 3px;
}

.density-dot::before,
.density-dot::after {
  display: block;
  background: currentColor;
  content: "";
  opacity: 0.68;
}

.density-dot {
  background:
    linear-gradient(currentColor, currentColor) center / 100% 4px no-repeat;
}

.shell.density-comfortable .topbar {
  min-height: 66px;
  padding: 10px 24px;
}

.shell.density-comfortable .page {
  gap: 18px;
  padding: 22px 26px 24px;
}

.shell.density-comfortable .page-title h2 {
  font-size: 28px;
}

.shell.density-comfortable .page-title p {
  font-size: 14px;
}

.shell.density-comfortable .panel {
  padding: 18px;
}

.shell.density-comfortable .grid {
  gap: 16px;
}

.shell.density-comfortable .section {
  gap: 14px;
}

.shell.density-comfortable .stat-card {
  min-height: 124px;
  padding: 18px;
}

.shell.density-comfortable .stat-card strong {
  font-size: 30px;
}

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

.quick-action {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  padding: 11px 12px;
  text-decoration: none;
  box-shadow: var(--shadow-tight);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.quick-action:hover {
  border-color: rgba(13, 139, 120, 0.28);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.quick-action.primary {
  border-color: rgba(13, 139, 120, 0.24);
  background: linear-gradient(135deg, rgba(13, 139, 120, 0.11), rgba(211, 154, 42, 0.11));
}

.quick-action-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #eff5f8;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.quick-action strong,
.quick-action small {
  display: block;
  min-width: 0;
}

.quick-action strong {
  color: #111827;
  font-size: 13px;
}

.quick-action small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-visual-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.visual-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  padding: 13px;
  box-shadow: var(--shadow-tight);
}

.visual-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.visual-card h3 {
  margin: 0;
  color: #172033;
  font-size: 14px;
  font-weight: 850;
}

.visual-card header span {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.mini-bars {
  display: grid;
  gap: 8px;
}

.mini-bar-row {
  display: grid;
  gap: 5px;
}

.mini-bar-row > div:first-child,
.split-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mini-bar-row strong,
.split-legend strong {
  color: #253047;
  font-size: 12px;
}

.mini-bar-row span,
.split-legend span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.mini-bar-track,
.split-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef6;
}

.mini-bar-track span,
.split-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #147996);
}

.split-card {
  align-content: space-between;
}

.split-meter span {
  background: linear-gradient(90deg, var(--accent), #d39a2a);
}

.table-tool-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.column-menu {
  position: relative;
}

.column-menu > summary,
.row-action-summary {
  list-style: none;
  cursor: pointer;
}

.column-menu > summary::-webkit-details-marker,
.row-action-summary::-webkit-details-marker {
  display: none;
}

.column-menu-panel {
  position: absolute;
  right: 0;
  z-index: 8;
  display: grid;
  width: min(260px, 82vw);
  max-height: 320px;
  gap: 7px;
  overflow: auto;
  border: 1px solid #dfe7f2;
  border-radius: var(--radius);
  background: white;
  padding: 10px;
  box-shadow: var(--shadow);
}

.column-menu-panel label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  color: #253047;
  font-size: 12px;
  font-weight: 800;
}

.column-menu-panel input {
  width: auto;
  margin: 0;
}

.table-wrap {
  max-height: min(62vh, 620px);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.row-action-menu {
  display: inline-grid;
  justify-items: start;
}

.row-action-panel {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
}

.row-action-menu[open] .row-action-panel {
  display: flex;
}

.row-action-panel .primary-action,
.row-action-panel .secondary-action,
.row-action-panel .danger-action,
.row-action-panel .ghost-action {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.empty-state-illustrated {
  display: grid;
  place-items: center;
  gap: 6px;
}

.empty-state-illustrated::before {
  display: block;
  width: 40px;
  height: 30px;
  border: 2px solid #c8d5e4;
  border-radius: 7px;
  background:
    linear-gradient(#c8d5e4, #c8d5e4) 8px 9px / 22px 2px no-repeat,
    linear-gradient(#c8d5e4, #c8d5e4) 8px 17px / 16px 2px no-repeat;
  content: "";
}

.empty-state-illustrated strong {
  color: #253047;
  font-size: 14px;
}

.empty-state-illustrated span {
  color: var(--muted);
  font-size: 12px;
}

.confirm-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.confirm-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: var(--info-soft);
  color: var(--info);
  font-weight: 900;
}

.confirm-panel.danger .confirm-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  min-width: min(420px, calc(100vw - 28px));
}

.toast-icon {
  display: inline-grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

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

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

.toast-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  line-height: 1;
  padding: 2px 4px;
}

.toast-close:hover {
  color: var(--ink);
}

@media (max-width: 1120px) {
  .quick-actions,
  .dashboard-visual-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tenant-chip {
    display: none;
  }
}

@media (max-width: 820px) {
  .breadcrumbs,
  .density-toggle span:last-child,
  .topbar-language span,
  .user-meta span {
    display: none;
  }

  .quick-actions,
  .dashboard-visual-row {
    grid-template-columns: 1fr;
  }

  .table-tool-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .quick-action,
  .visual-card {
    padding: 10px;
  }

  .toast {
    min-width: calc(100vw - 20px);
  }
}
