:root {
  color-scheme: light;
  --ink: #171522;
  --muted: #788196;
  --subtle: #a3aabc;
  --line: #e8ebf1;
  --canvas: #f4f5f9;
  --surface: #fff;
  --navy: #0c0b12;
  --navy-soft: #1b1729;
  --lime: #ffc629;
  --lime-dark: #e6a914;
  --blue: #1977f3;
  --violet: #7650d8;
  --green: #23885c;
  --red: #d75858;
  --amber: #c98122;
  --shadow: 0 12px 36px rgba(27, 38, 59, .08);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: flex;
  width: 252px;
  flex-direction: column;
  padding: 27px 15px 16px;
  background: var(--navy);
  color: #f7f8fb;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 7px 44px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: var(--lime);
  color: #172033;
  font-family: "Manrope", sans-serif;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -2px;
}

.brand-logo {
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 198, 41, .35);
  border-radius: 11px;
  background: #050505;
  object-fit: cover;
}

.brand-copy,
.sidebar-user > span:nth-child(2) {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  letter-spacing: -.4px;
}

.brand-copy small {
  color: #9da7b7;
  font-size: 10px;
  letter-spacing: .75px;
  text-transform: uppercase;
}

.workspace-label {
  padding: 0 12px;
  color: #778398;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.15px;
}

.main-nav {
  display: grid;
  gap: 5px;
  margin-top: 13px;
}

.nav-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #aeb7c6;
  text-align: left;
  transition: background .16s ease, color .16s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .055);
  color: #fff;
}

.nav-link.active {
  background: #273346;
  color: #fff;
  font-weight: 600;
}

.nav-link.active .nav-icon {
  color: var(--lime);
}

.nav-icon {
  display: inline-grid;
  width: 19px;
  place-items: center;
  color: #8d99ad;
  font-size: 17px;
}

.nav-count {
  min-width: 21px;
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 10px;
  background: #303b4e;
  color: #c4ccda;
  font-size: 10px;
  text-align: center;
}

.sidebar-bottom {
  display: grid;
  gap: 13px;
  margin-top: auto;
}

.environment-card {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 10px;
  border: 1px solid #293549;
  border-radius: 9px;
  background: #182233;
}

.environment-dot,
.demo-status i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 4px;
  border-radius: 50%;
  background: #e9b34e;
  box-shadow: 0 0 0 3px rgba(233, 179, 78, .12);
}

.environment-card div,
.sidebar-user > span:nth-child(2) {
  min-width: 0;
}

.environment-card strong,
.sidebar-user strong {
  display: block;
  color: #e5e9f0;
  font-size: 11px;
  font-weight: 600;
}

.environment-card small,
.sidebar-user small {
  display: block;
  margin-top: 4px;
  color: #8d99ab;
  font-size: 10px;
}

.reset-link {
  min-height: 35px;
  padding-left: 10px;
  font-size: 11px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 3px 0;
  border-top: 1px solid #293346;
}

.avatar {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
}

.avatar-lime {
  background: #30402a;
  color: var(--lime);
}

.demo-label {
  margin-left: auto;
  color: #8490a2;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .8px;
}

.main-area {
  min-height: 100vh;
  margin-left: 252px;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 36px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #98a0af;
  font-size: 12px;
}

.breadcrumb strong {
  color: #364054;
  font-weight: 600;
}

.breadcrumb-separator {
  color: #d2d7e0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.global-search {
  display: flex;
  width: 218px;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  border: 1px solid #eceef2;
  border-radius: 7px;
  color: #8b95a6;
  background: #fafbfc;
}

.global-search > span {
  font-size: 20px;
  line-height: 1;
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.global-search kbd {
  flex: 0 0 auto;
  padding: 2px 4px;
  border: 1px solid #e6e9ef;
  border-radius: 4px;
  background: white;
  color: #8992a2;
  font-size: 9px;
}

.demo-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8e6e30;
  font-size: 10px;
  white-space: nowrap;
}

.demo-status i {
  margin: 0;
}

.content {
  width: min(100%, 1500px);
  min-height: calc(100vh - 116px);
  margin: 0 auto;
  padding: 32px 36px 40px;
  outline: 0;
}

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 36px;
  border-top: 1px solid var(--line);
  color: #969eac;
  font-size: 10px;
}

.footer-divider {
  padding: 0 5px;
  color: #c5cad3;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 25px;
}

.page-heading h1 {
  margin: 4px 0 7px;
  color: #172033;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 700;
  letter-spacing: -1.1px;
}

.page-heading p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.eyebrow {
  margin: 0;
  color: #91a05e;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.heading-actions,
.toolbar,
.toolbar-start,
.toolbar-end,
.button-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  transition: transform .12s ease, background .15s ease, border .15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--navy);
  color: #fff;
}

.button-primary:hover {
  background: #273449;
}

.button-lime {
  background: var(--lime);
  color: #1c2a15;
}

.button-lime:hover {
  background: #b6e45a;
}

.button-secondary {
  border-color: #e2e6ed;
  background: white;
  color: #394459;
}

.button-secondary:hover,
.button-quiet:hover {
  border-color: #cdd4df;
  background: #fafbfc;
}

.button-quiet {
  border-color: #e8ebf0;
  background: #fff;
  color: #6d7789;
}

.button-danger {
  border-color: #f0d7d7;
  background: #fff8f8;
  color: var(--red);
}

.button-small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 10px;
}

.button-icon {
  width: 31px;
  min-height: 31px;
  padding: 0;
  border-color: #edf0f4;
  background: white;
  color: #677286;
  font-size: 15px;
}

.icon-button {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #eceff3;
  border-radius: 7px;
  background: #fff;
  color: #657084;
  font-size: 17px;
}

.mobile-menu {
  display: none;
}

.demo-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 22px;
  padding: 13px 15px;
  border: 1px solid #f0e2c4;
  border-radius: 8px;
  background: #fffaf0;
  color: #795b27;
  font-size: 11px;
  line-height: 1.6;
}

.demo-banner strong {
  color: #634a20;
}

.demo-banner-icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #f3e5c7;
  font-weight: 700;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 20px;
}

.metric-card,
.panel,
.table-panel,
.integration-card,
.rule-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 2px 9px rgba(33, 45, 68, .025);
}

.metric-card {
  min-height: 112px;
  padding: 16px;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-label {
  color: #758095;
  font-size: 10px;
}

.metric-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: #f1f5e9;
  color: #6a9c31;
  font-size: 14px;
}

.metric-value {
  display: block;
  margin-top: 10px;
  color: #1e293c;
  font-family: "Manrope", sans-serif;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -.8px;
}

.metric-note {
  color: #a0a8b5;
  font-size: 9px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, .9fr);
  gap: 15px;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-header,
.table-toolbar {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 17px;
  border-bottom: 1px solid #edf0f4;
}

.panel-header h2,
.table-toolbar h2 {
  margin: 0;
  color: #273247;
  font-size: 12px;
  font-weight: 700;
}

.panel-header p {
  margin: 4px 0 0;
  color: #9aa2b0;
  font-size: 9px;
}

.text-link {
  border: 0;
  background: none;
  color: #668d31;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
}

.activity-list {
  display: grid;
  padding: 5px 17px;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid #f0f2f5;
}

.activity-item:last-child {
  border-bottom: 0;
}

.activity-marker {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: #f2f5f9;
  color: #76839a;
  font-size: 12px;
}

.activity-copy {
  min-width: 0;
  flex: 1;
}

.activity-copy p {
  margin: 0;
  color: #455066;
  font-size: 10px;
  line-height: 1.5;
}

.activity-copy strong {
  color: #232e43;
  font-weight: 600;
}

.activity-copy small {
  display: block;
  margin-top: 4px;
  color: #a0a8b5;
  font-size: 9px;
}

.integration-summary {
  display: grid;
  gap: 0;
  padding: 3px 16px 9px;
}

.integration-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f2f5;
}

.integration-summary-row:last-child {
  border: 0;
}

.integration-logo {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  background: #fff;
  color: #35435c;
  font-size: 9px;
  font-weight: 700;
}

.integration-summary-copy {
  min-width: 0;
  flex: 1;
}

.integration-summary-copy strong {
  display: block;
  overflow: hidden;
  color: #3a4559;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-summary-copy small {
  color: #9ba3b0;
  font-size: 9px;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e4ad43;
}

.status-dot.ok {
  background: #48ad7b;
}

.status-dot.off {
  background: #b0b7c3;
}

.section-spacer {
  height: 17px;
}

.table-panel {
  overflow: hidden;
}

.table-toolbar {
  min-height: 66px;
  flex-wrap: wrap;
}

.toolbar {
  min-height: 39px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}

.toolbar-start,
.toolbar-end {
  flex-wrap: wrap;
}

.toolbar select,
.toolbar input,
.compact-select {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid #e6eaf0;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #596478;
  font-size: 10px;
}

.toolbar input {
  width: 190px;
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  padding: 11px 15px;
  background: #fbfcfd;
  color: #8c95a4;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .28px;
  white-space: nowrap;
}

td {
  padding: 13px 15px;
  border-top: 1px solid #eff1f5;
  color: #5b6578;
  font-size: 10px;
  vertical-align: middle;
}

tbody tr:hover {
  background: #fcfdfd;
}

.primary-cell {
  display: flex;
  min-width: 145px;
  align-items: center;
  gap: 9px;
}

.product-thumb {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #edf0f4;
  border-radius: 7px;
  background: #f7f8fb;
  color: #8994a6;
  font-size: 12px;
}

.primary-cell strong {
  display: block;
  max-width: 230px;
  overflow: hidden;
  color: #303b50;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-cell small {
  display: block;
  margin-top: 4px;
  color: #9ba3b0;
  font-size: 9px;
}

.category-chip,
.status-pill,
.role-pill,
.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #f2f4f7;
  color: #737e90;
  font-size: 9px;
  line-height: 1.2;
  white-space: nowrap;
}

.category-chip {
  margin: 2px 2px 2px 0;
  background: #f5f7f9;
}

.status-pill::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-approved,
.status-sent,
.status-active {
  background: #edf8f1;
  color: #37885e;
}

.status-scheduled,
.status-pending {
  background: #fff6e8;
  color: #ae792b;
}

.status-error,
.status-cancelled,
.status-inactive {
  background: #fff0ef;
  color: #c35656;
}

.status-demo {
  background: #f0f3ff;
  color: #657ac4;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.table-actions .button {
  min-height: 27px;
  padding: 0 8px;
  font-size: 9px;
}

.table-actions .button-icon {
  min-height: 29px;
}

.muted {
  color: #9ba3b0;
}

.price-current {
  color: #273449;
  font-weight: 700;
}

.price-old {
  display: block;
  margin-top: 3px;
  color: #a7afbb;
  font-size: 9px;
  text-decoration: line-through;
}

.discount {
  color: #37885e;
  font-weight: 700;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 31px;
  height: 18px;
  align-items: center;
  border: 0;
  border-radius: 20px;
  background: #d8dde5;
  transition: background .15s ease;
}

.switch::after {
  position: absolute;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .15s ease;
}

.switch[aria-checked="true"] {
  background: #93c94b;
}

.switch[aria-checked="true"]::after {
  transform: translateX(13px);
}

.empty-state {
  display: grid;
  min-height: 175px;
  justify-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: #9ba3b0;
  text-align: center;
}

.empty-state span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #f3f5f8;
  color: #8792a3;
  font-size: 18px;
}

.empty-state strong {
  color: #5d687c;
  font-size: 11px;
}

.empty-state p {
  max-width: 320px;
  margin: 0;
  font-size: 10px;
  line-height: 1.5;
}

.group-grid,
.integration-grid,
.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.group-card,
.integration-card,
.rule-card {
  min-width: 0;
  padding: 16px;
}

.group-card-top,
.integration-card-top,
.rule-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.group-card-title,
.integration-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.group-avatar {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #edf3e6;
  color: #638c35;
  font-size: 16px;
}

.group-card h3,
.integration-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #273247;
  font-size: 12px;
}

.group-card p,
.integration-card p {
  margin: 4px 0 0;
  color: #929aaa;
  font-size: 9px;
}

.group-card-meta {
  display: grid;
  gap: 8px;
  margin: 15px 0 14px;
  padding: 12px 0;
  border-top: 1px solid #eff1f5;
  border-bottom: 1px solid #eff1f5;
}

.group-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8a94a5;
  font-size: 9px;
}

.group-meta-row strong {
  max-width: 68%;
  overflow: hidden;
  color: #4a566b;
  font-size: 9px;
  font-weight: 600;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.group-rules {
  color: #8e98a8;
  font-size: 9px;
}

.group-rules strong {
  color: #4c586c;
}

.integration-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.integration-card {
  position: relative;
  min-height: 190px;
}

.integration-card .integration-logo {
  width: 37px;
  height: 37px;
  font-size: 11px;
}

.integration-card-description {
  min-height: 29px;
  margin: 13px 0 !important;
  line-height: 1.5;
}

.integration-details {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.integration-detail {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #919aaa;
  font-size: 9px;
}

.integration-detail strong {
  overflow: hidden;
  color: #596478;
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.integration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 11px;
  border-top: 1px solid #eff1f5;
}

.rules-intro {
  margin-bottom: 15px;
  padding: 14px 16px;
  border: 1px solid #e7eddc;
  border-radius: 8px;
  background: #f8fbf2;
  color: #687851;
  font-size: 10px;
  line-height: 1.6;
}

.rule-card {
  padding: 18px;
}

.rule-card-header {
  align-items: center;
  margin-bottom: 17px;
}

.rule-card-header h2 {
  margin: 0;
  color: #303b50;
  font-size: 12px;
}

.rule-card-header p {
  margin: 4px 0 0;
  color: #9ba3b0;
  font-size: 9px;
}

.rule-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  background: #f1f5e9;
  color: #699534;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.form-grid.three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > span,
.field-label {
  color: #687387;
  font-size: 10px;
  font-weight: 600;
}

.field small,
.field-help {
  color: #9ba3b0;
  font-size: 9px;
  font-weight: 400;
  line-height: 1.5;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #e5e9ef;
  border-radius: 6px;
  outline: 0;
  background: #fff;
  color: #384459;
  font-size: 10px;
}

.field textarea {
  min-height: 72px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: #b5d77f;
  box-shadow: 0 0 0 3px rgba(183, 219, 126, .16);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.check-option {
  display: flex;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #e9ecf1;
  border-radius: 6px;
  color: #596478;
  font-size: 9px;
  cursor: pointer;
}

.check-option:has(input:checked) {
  border-color: #d7e8bb;
  background: #f8fbf2;
  color: #48632a;
}

.check-option input {
  width: 13px;
  min-height: 13px;
  margin: 0;
  accent-color: #8ebd48;
}

.inline-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #596478;
  font-size: 10px;
}

.inline-toggle input {
  width: 14px;
  height: 14px;
  min-height: 0;
  accent-color: #8ebd48;
}

.settings-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

.section-label {
  margin: 22px 0 10px;
  color: #7f899a;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.modal {
  width: min(680px, calc(100vw - 28px));
  max-width: none;
  max-height: min(88vh, 850px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e8ebf0;
  border-radius: 12px;
  background: white;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .24);
}

.modal::backdrop {
  background: rgba(17, 24, 39, .48);
  backdrop-filter: blur(2px);
}

.modal-shell {
  display: flex;
  max-height: min(88vh, 850px);
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 17px 20px;
  border-bottom: 1px solid #edf0f4;
}

.modal-header h2 {
  margin: 4px 0 0;
  color: #263248;
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  letter-spacing: -.4px;
}

.modal-close {
  border: 0;
  background: transparent;
  font-size: 23px;
}

#entity-form {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.modal-body {
  display: grid;
  gap: 15px;
  overflow-y: auto;
  padding: 18px 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid #edf0f4;
  background: #fcfcfd;
}

.modal-note {
  padding: 10px 12px;
  border: 1px solid #eee3cb;
  border-radius: 6px;
  background: #fffaf1;
  color: #866c3c;
  font-size: 9px;
  line-height: 1.5;
}

.toast-region {
  position: fixed;
  z-index: 50;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: min(360px, calc(100vw - 32px));
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border: 1px solid #dfe8d3;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
  color: #47543d;
  font-size: 10px;
  line-height: 1.5;
  animation: toast-in .18s ease-out;
}

.toast.error {
  border-color: #efd6d6;
  color: #a34848;
}

.toast-icon {
  font-weight: 700;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1180px) {
  .sidebar {
    width: 220px;
  }

  .main-area {
    margin-left: 220px;
  }

  .topbar,
  .content {
    padding-right: 23px;
    padding-left: 23px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sidebar {
    width: 252px;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 10px 0 30px rgba(17, 24, 39, .12);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-area {
    margin-left: 0;
  }

  .mobile-menu {
    display: inline-grid;
    flex: 0 0 auto;
  }

  .topbar {
    min-height: 62px;
    gap: 9px;
    padding: 0 16px;
  }

  .breadcrumb {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
    gap: 10px;
  }

  .global-search {
    width: min(220px, 42vw);
    margin-right: auto;
  }

  .demo-status {
    font-size: 0;
  }

  .demo-status i {
    width: 8px;
    height: 8px;
  }

  .content {
    min-height: calc(100vh - 108px);
    padding: 24px 16px 30px;
  }

  .app-footer {
    flex-direction: column;
    padding: 13px 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .group-grid,
  .rule-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0 11px;
  }

  .topbar-actions {
    gap: 7px;
  }

  .global-search {
    width: auto;
    flex: 1;
  }

  .global-search kbd {
    display: none;
  }

  .topbar .button-primary {
    width: 35px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .topbar .button-primary span {
    font-size: 19px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-heading .heading-actions {
    width: 100%;
  }

  .page-heading .heading-actions .button {
    flex: 1;
  }

  .metrics-grid {
    gap: 8px;
  }

  .metric-card {
    min-height: 103px;
    padding: 12px;
  }

  .metric-value {
    font-size: 22px;
  }

  .integration-grid,
  .form-grid,
  .form-grid.three-col {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .table-toolbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 14px;
  }

  .toolbar {
    padding: 0 14px 12px;
  }

  .toolbar-start,
  .toolbar-end {
    width: 100%;
  }

  .toolbar select,
  .toolbar input {
    flex: 1;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-header,
  .modal-footer {
    padding-right: 15px;
    padding-left: 15px;
  }
}

.auth-page {
  min-width: 320px;
  min-height: 100vh;
  background: #f3f4f8;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-panel {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 26px 72px;
  background: linear-gradient(145deg, #fff 0%, #f7f8fb 100%);
}

.auth-form-wrap {
  width: min(100%, 370px);
}

.auth-logo {
  display: block;
  width: 76px;
  height: 76px;
  margin: 0 0 27px;
  border: 1px solid #22202c;
  border-radius: 20px;
  background: #050505;
  object-fit: cover;
  box-shadow: 0 9px 24px rgba(13, 14, 24, .12);
}

.auth-form-wrap .eyebrow {
  color: #8062cc;
}

.auth-form-wrap h1 {
  margin: 7px 0 8px;
  color: #151421;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -1.2px;
}

.auth-subtitle {
  margin: 0;
  color: #7f8290;
  font-size: 12px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 14px;
  margin-top: 27px;
}

.auth-form .field > span {
  color: #474859;
  font-size: 11px;
}

.auth-form .field input {
  min-height: 43px;
  border-color: #dfe2e9;
  background: rgba(255, 255, 255, .9);
  font-size: 12px;
}

.auth-form .field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(25, 119, 243, .11);
}

.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 7px;
  bottom: 6px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #777b89;
}

.password-field input {
  padding-right: 43px !important;
}

.auth-submit {
  min-height: 43px;
  margin-top: 2px;
  background: var(--blue);
  font-size: 12px;
}

.auth-submit:hover {
  background: #0e63d0;
}

.auth-submit span {
  margin-left: auto;
  color: var(--lime);
  font-size: 16px;
}

.auth-help {
  margin: 0;
  color: #a0a3ae;
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-error {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #f0caca;
  border-radius: 6px;
  background: #fff3f2;
  color: #b64747;
  font-size: 11px;
  line-height: 1.5;
}

.auth-footer {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  color: #a4a6b0;
  font-size: 10px;
  text-align: center;
}

.auth-hero {
  position: relative;
  display: flex;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: clamp(40px, 8vw, 110px);
  background:
    radial-gradient(ellipse at 87% 14%, rgba(35, 122, 245, .45), transparent 42%),
    radial-gradient(ellipse at 8% 93%, rgba(118, 80, 216, .38), transparent 45%),
    linear-gradient(137deg, #090a10 0%, #151129 48%, #111d39 100%);
  color: #fff;
}

.auth-hero::before {
  position: absolute;
  inset: auto -110px -230px auto;
  width: 540px;
  height: 540px;
  border: 1px solid rgba(255, 198, 41, .18);
  border-radius: 50%;
  content: "";
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-one {
  top: -230px;
  right: -200px;
  width: 640px;
  height: 640px;
}

.hero-orbit-two {
  top: -165px;
  right: -135px;
  width: 510px;
  height: 510px;
  border-color: rgba(25, 119, 243, .28);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(100%, 510px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #c8c8d3;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.3px;
}

.hero-kicker i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(255, 198, 41, .75);
}

.hero-content h2 {
  margin: 25px 0 16px;
  color: #fff;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -2.8px;
  line-height: 1.05;
}

.hero-content h2 span {
  color: var(--lime);
}

.hero-content > p {
  max-width: 420px;
  margin: 0;
  color: #c1c2cf;
  font-size: 13px;
  line-height: 1.8;
}

.hero-features {
  display: grid;
  gap: 12px;
  margin-top: 30px;
  color: #e4e4eb;
  font-size: 11px;
}

.hero-features span {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-features b {
  color: #8d78e4;
  font-size: 9px;
  letter-spacing: .5px;
}

.hero-brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 43px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.hero-brand-lockup img {
  width: 51px;
  height: 51px;
  border: 1px solid rgba(255, 198, 41, .35);
  border-radius: 12px;
  background: #050505;
  object-fit: cover;
}

.hero-brand-lockup strong {
  color: var(--lime);
}

@media (max-width: 820px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: 100vh;
    padding-top: 40px;
    padding-bottom: 65px;
  }

  .auth-hero {
    display: none;
  }
}
