:root {
  --ink: #06111f;
  --ink-soft: #0a1a2c;
  --panel: rgba(12, 27, 45, 0.92);
  --panel-soft: rgba(17, 38, 61, 0.8);
  --line: rgba(170, 209, 232, 0.17);
  --text: #edf8ff;
  --muted: #9db5c8;
  --aqua: #63e7dd;
  --blue: #55a9ff;
  --lime: #b7ff51;
  --violet: #9f7cff;
  --orange: #ff9c47;
  --red: #ff6b7c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(61, 124, 255, 0.17), transparent 32%),
    radial-gradient(circle at 92% 18%, rgba(96, 255, 213, 0.11), transparent 28%),
    linear-gradient(145deg, #06101c 0%, #081524 52%, #06111f 100%);
  font-family:
    Inter, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

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

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

.ambient {
  position: fixed;
  z-index: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}

.ambient-one {
  left: -190px;
  top: 15%;
  background: rgba(74, 122, 255, 0.12);
}

.ambient-two {
  right: -200px;
  bottom: 5%;
  background: rgba(145, 255, 112, 0.08);
}

[hidden] {
  display: none !important;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 54px;
  align-items: center;
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 56px 0;
}

.auth-story {
  padding: 32px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: var(--text);
  text-decoration: none;
}

.brand-lockup img {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 14px 36px rgba(85, 169, 255, 0.22);
}

.brand-lockup strong,
.brand-lockup small {
  display: block;
}

.brand-lockup strong {
  font-size: 21px;
  letter-spacing: -0.03em;
}

.brand-lockup small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.2em;
}

.brand-lockup.compact {
  padding: 4px 4px 24px;
}

.brand-lockup.compact img {
  width: 38px;
  height: 38px;
}

.auth-story h1 {
  max-width: 850px;
  margin: 14px 0 22px;
  font-size: clamp(42px, 5.5vw, 72px);
  line-height: 0.99;
  letter-spacing: -0.055em;
}

.auth-copy {
  max-width: 720px;
  color: #b9cbd8;
  font-size: 17px;
  line-height: 1.75;
}

.eyebrow {
  margin: 0 0 9px;
  color: var(--aqua);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.eyebrow.lime {
  color: var(--lime);
}

.auth-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.auth-proof article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 35, 58, 0.78), rgba(7, 20, 35, 0.72));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.proof-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(183, 255, 81, 0.42);
  border-radius: 12px;
  color: var(--lime);
  background: rgba(183, 255, 81, 0.07);
  font-size: 11px;
  font-weight: 800;
}

.auth-proof strong,
.auth-proof small {
  display: block;
}

.auth-proof small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.auth-card {
  padding: 34px;
  border: 1px solid rgba(137, 195, 225, 0.25);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(18, 39, 63, 0.96), rgba(7, 19, 33, 0.96));
  box-shadow:
    var(--shadow),
    inset 0 1px rgba(255, 255, 255, 0.07);
}

.auth-card h2 {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.auth-card p {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 17px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 8px;
  color: #cfe1ec;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid rgba(163, 199, 220, 0.22);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: rgba(4, 14, 26, 0.68);
  padding: 10px 12px;
  transition: 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(99, 231, 221, 0.72);
  box-shadow: 0 0 0 3px rgba(99, 231, 221, 0.09);
}

select option {
  color: #071321;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: 160ms ease;
}

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

.button-primary {
  color: #04111c;
  background: linear-gradient(135deg, var(--aqua), var(--blue));
  box-shadow: 0 14px 34px rgba(85, 169, 255, 0.2);
  font-weight: 800;
}

.button-lime {
  color: #071306;
  border-color: #d9ff9d;
  background: linear-gradient(135deg, #d7ff88, #8dfd45);
  box-shadow:
    0 0 0 1px rgba(183, 255, 81, 0.38),
    0 14px 30px rgba(124, 255, 72, 0.16);
  font-weight: 800;
}

.button-ghost,
.icon-button {
  border-color: var(--line);
  background: rgba(12, 28, 46, 0.78);
}

.button-danger {
  border-color: rgba(255, 107, 124, 0.42);
  color: #ffc1c8;
  background: rgba(255, 107, 124, 0.08);
}

.button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  min-height: 20px;
  color: #ffb3bd !important;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(5, 15, 27, 0.98), rgba(7, 21, 36, 0.96));
}

.tenant-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  padding: 13px;
  border: 1px solid rgba(99, 231, 221, 0.19);
  border-radius: 16px;
  background: rgba(99, 231, 221, 0.055);
}

.tenant-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #061620;
  background: linear-gradient(135deg, var(--aqua), var(--lime));
  font-weight: 900;
}

.tenant-pill strong,
.tenant-pill small {
  display: block;
}

.tenant-pill small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.main-nav {
  display: grid;
  gap: 4px;
  overflow-y: auto;
  padding-right: 3px;
}

.main-nav button {
  display: grid;
  gap: 2px;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: #c6d6e1;
  background: transparent;
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
}

.main-nav button:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.main-nav button.active {
  border-color: rgba(183, 255, 81, 0.34);
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(183, 255, 81, 0.13), rgba(99, 231, 221, 0.045));
  box-shadow: inset 3px 0 var(--lime);
}

.main-nav button small {
  color: #7893a7;
  font-size: 9px;
}

.sidebar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 13px;
  border-top: 1px solid var(--line);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 14px rgba(183, 255, 81, 0.7);
}

.sidebar-status strong,
.sidebar-status small {
  display: block;
}

.sidebar-status small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.workspace {
  min-width: 0;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 30px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(22px);
  background: rgba(6, 17, 31, 0.78);
}

.topbar h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -0.04em;
}

.topbar-actions,
.button-row,
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-menu {
  margin-left: 7px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}

.user-menu > span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: #07131f;
  background: linear-gradient(135deg, var(--lime), var(--aqua));
  font-weight: 900;
}

.user-menu strong,
.user-menu small {
  display: block;
}

.user-menu small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.icon-button {
  min-height: 34px;
  border-radius: 10px;
  color: #bfd0db;
  padding: 7px 10px;
  cursor: pointer;
}

.view {
  display: none;
  padding: 26px 30px 54px;
}

.view.active {
  display: block;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 13px;
  margin-bottom: 18px;
}

.metric-card {
  position: relative;
  min-height: 128px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(16, 39, 63, 0.94), rgba(8, 22, 38, 0.9));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.04);
}

.metric-card::after {
  content: "";
  position: absolute;
  right: -35px;
  bottom: -45px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: var(--metric-color, rgba(99, 231, 221, 0.12));
  filter: blur(4px);
}

.metric-card span,
.metric-card strong,
.metric-card small {
  position: relative;
  z-index: 1;
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.metric-card strong {
  margin-top: 14px;
  font-size: 28px;
  letter-spacing: -0.045em;
}

.metric-card small {
  margin-top: 8px;
  color: #7894a8;
  font-size: 10px;
}

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

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

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

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

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

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

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(155deg, rgba(14, 31, 51, 0.95), rgba(7, 20, 35, 0.91));
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.17),
    inset 0 1px rgba(255, 255, 255, 0.04);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px 12px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.legend {
  color: var(--muted);
  font-size: 10px;
}

.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--aqua);
}

.bar-chart {
  display: flex;
  min-height: 245px;
  align-items: flex-end;
  gap: 8px;
  padding: 24px 22px 20px;
}

.bar-column {
  display: grid;
  flex: 1;
  min-width: 12px;
  gap: 6px;
  justify-items: center;
}

.bar {
  position: relative;
  width: min(26px, 75%);
  min-height: 3px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--aqua), var(--blue));
  box-shadow: 0 0 18px rgba(85, 169, 255, 0.16);
}

.bar-column small {
  color: #69879c;
  font-size: 8px;
}

.donut-wrap {
  display: grid;
  min-height: 245px;
  place-items: center;
  padding: 18px;
}

.donut {
  position: relative;
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 50%;
}

.donut::after {
  content: "";
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #0a1b2e;
}

.donut-label {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  text-align: center;
}

.donut-label strong {
  font-size: 24px;
}

.donut-label small {
  color: var(--muted);
  font-size: 9px;
}

.donut-legend {
  display: grid;
  width: 100%;
  gap: 7px;
  margin-top: 14px;
}

.donut-legend div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.donut-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 3px;
}

.timeline {
  display: grid;
  gap: 1px;
  padding: 5px 20px 20px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}

.timeline-date {
  display: grid;
  min-height: 47px;
  place-items: center;
  border: 1px solid rgba(99, 231, 221, 0.2);
  border-radius: 12px;
  color: var(--aqua);
  background: rgba(99, 231, 221, 0.055);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}

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

.timeline-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(99, 231, 221, 0.25);
  border-radius: 999px;
  color: #9bf5ec;
  background: rgba(99, 231, 221, 0.07);
  padding: 5px 8px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.badge.lime {
  border-color: rgba(183, 255, 81, 0.31);
  color: var(--lime);
  background: rgba(183, 255, 81, 0.07);
}

.badge.orange {
  border-color: rgba(255, 156, 71, 0.31);
  color: #ffc18c;
  background: rgba(255, 156, 71, 0.07);
}

.badge.red {
  border-color: rgba(255, 107, 124, 0.31);
  color: #ffb6bf;
  background: rgba(255, 107, 124, 0.07);
}

.health-list {
  display: grid;
  gap: 10px;
  padding: 12px 22px 22px;
}

.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(6, 17, 30, 0.42);
}

.health-row strong,
.health-row small {
  display: block;
}

.health-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.action-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(99, 231, 221, 0.15);
  border-radius: 20px;
  background:
    linear-gradient(100deg, rgba(18, 42, 68, 0.92), rgba(9, 25, 42, 0.88));
}

.action-strip h2 {
  margin: 0;
  font-size: 21px;
}

.action-strip p {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.file-button input {
  display: none;
}

.notice,
.policy-band {
  margin-bottom: 16px;
  border: 1px solid rgba(183, 255, 81, 0.27);
  border-radius: 14px;
  color: #dfffc0;
  background: rgba(183, 255, 81, 0.07);
  padding: 13px 16px;
}

.table-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 210px auto;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.record-count {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.table-scroll {
  overflow-x: auto;
}

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

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

th {
  color: #8aa7bb;
  background: rgba(99, 231, 221, 0.04);
  font-size: 9px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

td {
  color: #d5e5ef;
  font-size: 11px;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: #7692a6;
  font-size: 9px;
}

tbody tr:hover {
  background: rgba(99, 231, 221, 0.025);
}

.link-button,
.text-button {
  border: 0;
  color: var(--aqua);
  background: transparent;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
}

.link-button.disabled {
  color: #657c8d;
  cursor: default;
}

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

.template-card {
  min-height: 178px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(17, 39, 64, 0.92), rgba(7, 21, 36, 0.9));
}

.template-card.ready {
  border-color: rgba(99, 231, 221, 0.22);
}

.template-card h3 {
  margin: 14px 0 8px;
  font-size: 16px;
}

.template-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.campaign-list {
  display: grid;
  gap: 10px;
  padding: 8px 20px 22px;
}

.campaign-row {
  display: grid;
  grid-template-columns: minmax(200px, 1.5fr) 130px 110px minmax(180px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 17, 30, 0.42);
}

.campaign-row strong,
.campaign-row small {
  display: block;
}

.campaign-row small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding: 18px;
}

.kanban-column {
  min-width: 190px;
  min-height: 320px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(4, 15, 27, 0.42);
}

.kanban-column h3 {
  margin: 3px 3px 12px;
  color: #acc3d2;
  font-size: 11px;
  text-transform: uppercase;
}

.follow-card {
  margin-bottom: 9px;
  padding: 12px;
  border: 1px solid rgba(99, 231, 221, 0.16);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(18, 42, 67, 0.9), rgba(8, 24, 40, 0.92));
}

.follow-card strong,
.follow-card small {
  display: block;
}

.follow-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.8fr);
  gap: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(80px, 1fr));
  padding: 12px;
}

.calendar-weekday,
.calendar-day {
  min-height: 98px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px;
}

.calendar-weekday {
  min-height: auto;
  color: #8099ab;
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day.muted {
  opacity: 0.35;
}

.calendar-day.today {
  background: rgba(99, 231, 221, 0.045);
}

.calendar-day-number {
  display: inline-grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 8px;
  color: #d7e8f1;
  font-size: 10px;
}

.today .calendar-day-number {
  color: #06151c;
  background: var(--aqua);
  font-weight: 900;
}

.calendar-event {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  border-left: 3px solid var(--aqua);
  border-radius: 5px;
  color: #cce8ed;
  background: rgba(99, 231, 221, 0.09);
  padding: 5px 6px;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event.follow_up {
  border-left-color: var(--orange);
  background: rgba(255, 156, 71, 0.09);
}

.compact-grid {
  grid-template-columns: repeat(5, minmax(150px, 1fr));
}

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

.user-card,
.integration-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 38, 61, 0.92), rgba(7, 21, 36, 0.9));
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #06131d;
  background: linear-gradient(135deg, var(--lime), var(--aqua));
  font-weight: 900;
}

.user-card h3 {
  margin: 0;
}

.user-card p {
  color: var(--muted);
  font-size: 10px;
}

.permission-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 14px 0;
}

.permission-list span {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #93adbf;
  padding: 4px 7px;
  font-size: 8px;
}

.code-list,
.key-list {
  display: grid;
  gap: 9px;
  padding: 8px 20px 22px;
}

.code-list code,
.key-row {
  display: block;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #bceee7;
  background: rgba(3, 13, 24, 0.68);
  padding: 10px 12px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 10px;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
}

.toast-region {
  position: fixed;
  z-index: 80;
  top: 100px;
  right: 26px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 9px;
}

.toast {
  border: 1px solid rgba(99, 231, 221, 0.3);
  border-radius: 13px;
  color: #def8f5;
  background: rgba(8, 25, 41, 0.98);
  box-shadow: var(--shadow);
  padding: 13px 15px;
}

.toast.error {
  border-color: rgba(255, 107, 124, 0.4);
  color: #ffd0d5;
}

dialog {
  width: min(620px, calc(100% - 28px));
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: transparent;
  padding: 0;
}

dialog::backdrop {
  backdrop-filter: blur(6px);
  background: rgba(0, 7, 15, 0.76);
}

.modal-card {
  position: relative;
  border: 1px solid rgba(151, 202, 228, 0.26);
  border-radius: 22px;
  background: linear-gradient(155deg, #102b45, #071827);
  box-shadow: var(--shadow);
  padding: 26px;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
}

.modal-card h2 {
  margin: 0 0 10px;
}

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

.modal-grid .full {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

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

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

  .sidebar {
    position: static;
    height: auto;
  }

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

  .sidebar-status {
    display: none;
  }

  .span-4,
  .span-5,
  .span-6,
  .span-7,
  .span-8 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    width: min(100% - 24px, 1240px);
    gap: 12px;
    padding: 18px 0;
  }

  .auth-story,
  .auth-card {
    padding: 22px;
  }

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

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

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

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .user-menu {
    border: 0;
    margin: 0;
    padding: 0;
  }

  #refreshButton,
  .user-menu > div {
    display: none;
  }

  .view {
    padding: 18px 14px 40px;
  }

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

  .action-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .button-row {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .record-count {
    text-align: left;
  }

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

  .calendar-grid {
    overflow-x: auto;
    min-width: 720px;
  }

  .calendar-panel {
    overflow-x: auto;
  }

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