:root {
  color-scheme: light;
  --bg: #f4f7f7;
  --surface: #ffffff;
  --surface-soft: #f8fbfb;
  --text: #141d1f;
  --muted: #697579;
  --line: #dce6e8;
  --primary: #0f766e;
  --primary-strong: #075e56;
  --accent: #e1783d;
  --blue: #2f73d8;
  --cyan: #00a7c7;
  --violet: #6557d8;
  --pink: #d84f88;
  --gold: #d59a22;
  --lime: #6fbf73;
  --warning: #b36b14;
  --good: #23754e;
  --danger: #b7432e;
  --shadow: 0 18px 48px rgba(20, 29, 31, 0.12);
  --soft-shadow: 0 10px 28px rgba(20, 29, 31, 0.07);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(248, 251, 251, 0.96) 0, rgba(240, 245, 245, 0.94) 420px, #edf3f3 100%),
    linear-gradient(115deg, rgba(0, 167, 199, 0.08) 0 16%, transparent 16% 100%),
    repeating-linear-gradient(90deg, rgba(47, 115, 216, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(225, 120, 61, 0.045) 0 1px, transparent 1px 72px);
  color: var(--text);
  line-height: 1.5;
}

.hidden {
  display: none !important;
}

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

button {
  cursor: pointer;
}

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

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(125deg, rgba(8, 40, 44, 0.96), rgba(19, 28, 31, 0.96)),
    repeating-linear-gradient(90deg, rgba(0, 167, 199, 0.16) 0 1px, transparent 1px 84px),
    repeating-linear-gradient(0deg, rgba(225, 120, 61, 0.08) 0 1px, transparent 1px 84px);
}

.login-panel {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 28px;
  align-items: stretch;
}

.login-copy {
  color: #ffffff;
  display: grid;
  align-content: center;
  padding: 48px;
}

.login-copy h1 {
  font-size: 64px;
  margin-bottom: 16px;
  line-height: 1;
}

.login-copy p {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.8;
  font-size: 18px;
}

.login-value-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.login-value-list span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(117, 218, 231, 0.34);
  border-radius: 999px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(0, 167, 199, 0.12);
  font-weight: 700;
}

.login-copy .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.login-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.login-card h2 {
  margin-bottom: 4px;
}

.login-option {
  text-align: left;
  border: 1px solid var(--line);
  background: #fbfcfb;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 6px;
  color: var(--text);
}

.login-option:hover {
  border-color: var(--primary);
  background: #f0f7f4;
}

.login-option span {
  color: var(--muted);
}

.sidebar {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  display: flex;
  flex-direction: column;
  padding: 24px 18px;
  gap: 24px;
  border-right: 1px solid rgba(223, 229, 223, 0.9);
  backdrop-filter: blur(12px);
}

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

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #0b564f, #0a3338 58%, #1e6fd1);
  color: #ffffff;
  font-weight: 800;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
.sidebar-note p,
.panel p,
.metric small,
.eyebrow {
  color: var(--muted);
}

.sidebar .brand span,
.sidebar-note p {
  color: var(--muted);
}

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

.nav-item,
.ghost-btn,
.primary-btn,
.tool-btn,
.segment {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
}

.nav-item span:last-child,
.ghost-btn span:last-child,
.primary-btn span:last-child {
  white-space: nowrap;
}

.nav-item {
  justify-content: flex-start;
  padding: 11px 12px;
  background: transparent;
  color: #4f5d57;
}

.nav-item.active,
.nav-item:hover {
  background: #edf7f8;
  color: var(--primary);
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-note {
  margin-top: auto;
  display: flex;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
}

.sidebar-note strong,
.sidebar-note p {
  margin: 0;
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.15);
}

.main {
  padding: 24px;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(223, 229, 223, 0.88);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 0 rgba(31, 45, 61, 0.04);
  backdrop-filter: blur(12px);
}

.topbar::before {
  content: "";
  width: 6px;
  align-self: stretch;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--accent));
  flex: 0 0 auto;
}

.eyebrow {
  margin: 0 0 4px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

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

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 6px;
  font-size: 18px;
}

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

.tenant-switch {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  min-width: 180px;
}

.tenant-switch select {
  min-height: 40px;
  padding: 8px 10px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  color: #ffffff;
  padding: 0 16px;
  box-shadow: 0 8px 18px rgba(0, 167, 199, 0.16);
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--primary-strong), #008fb0);
}

.ghost-btn,
.segment,
.tool-btn {
  background: #f2f5f2;
  color: var(--text);
  padding: 0 12px;
}

.tool-btn {
  width: 40px;
  padding: 0;
}

.ghost-btn:hover,
.segment:hover,
.tool-btn:hover {
  background: #e7eee9;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.command-center {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  min-height: 248px;
  margin-bottom: 16px;
  padding: 28px;
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(7, 53, 64, 0.97), rgba(18, 25, 34, 0.97)),
    linear-gradient(118deg, rgba(0, 167, 199, 0.24) 0 18%, transparent 18% 100%),
    linear-gradient(145deg, transparent 0 62%, rgba(101, 87, 216, 0.2) 62% 78%, transparent 78% 100%),
    repeating-linear-gradient(90deg, rgba(0, 167, 199, 0.22) 0 1px, transparent 1px 86px),
    repeating-linear-gradient(0deg, rgba(225, 120, 61, 0.11) 0 1px, transparent 1px 86px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.command-center::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(0, 167, 199, 0.18), transparent),
    linear-gradient(135deg, transparent 0 58%, rgba(225, 120, 61, 0.2) 58% 59%, transparent 59%),
    linear-gradient(55deg, transparent 0 34%, rgba(47, 115, 216, 0.18) 34% 35%, transparent 35%);
  opacity: 0.72;
}

.command-center::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 24px;
  width: 210px;
  height: 118px;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(117, 218, 231, 0.26), rgba(117, 218, 231, 0.02)) 0 16px / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(225, 120, 61, 0.3), rgba(225, 120, 61, 0.02)) 0 58px / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(101, 87, 216, 0.28), rgba(101, 87, 216, 0.02)) 0 96px / 100% 1px no-repeat;
  border-left: 1px solid rgba(117, 218, 231, 0.24);
  border-bottom: 1px solid rgba(225, 120, 61, 0.18);
  opacity: 0.9;
}

.command-copy {
  display: grid;
  align-content: center;
  position: relative;
  z-index: 1;
}

.command-copy .eyebrow {
  color: rgba(255, 255, 255, 0.66);
}

.command-copy h2 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 36px;
  line-height: 1.18;
}

.command-copy p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.command-actions .primary-btn {
  background: linear-gradient(135deg, #ffffff, #e9fbff);
  color: #0a3338;
  box-shadow: none;
}

.command-actions .ghost-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.command-panel {
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(117, 218, 231, 0.26);
  border-radius: 8px;
  background: rgba(8, 38, 43, 0.58);
  position: relative;
  z-index: 1;
}

.focus-card,
.next-step {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 14px;
  border: 1px solid rgba(117, 218, 231, 0.16);
}

.focus-card span,
.focus-grid span,
.next-step small {
  color: rgba(255, 255, 255, 0.68);
}

.focus-card strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

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

.focus-grid div {
  min-height: 82px;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a3338;
  border-top: 3px solid var(--cyan);
}

.focus-grid div:nth-child(2) {
  border-top-color: var(--accent);
}

.focus-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 30px;
}

.next-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

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

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(27, 36, 32, 0.03);
}

.metric {
  padding: 16px;
  min-height: 112px;
  position: relative;
  overflow: hidden;
}

.metric::before {
  content: "";
  position: absolute;
  inset: 16px 16px auto auto;
  width: 34px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  opacity: 0.48;
}

.metric:nth-child(1) {
  background: linear-gradient(180deg, #ffffff, #f3fbfc);
}

.metric:nth-child(2) {
  background: linear-gradient(180deg, #ffffff, #f4f7ff);
}

.metric:nth-child(3) {
  background: linear-gradient(180deg, #ffffff, #f4fbf4);
}

.metric:nth-child(4) {
  background: linear-gradient(180deg, #ffffff, #fff7ef);
}

.metric:nth-child(1)::before {
  background: var(--cyan);
}

.metric:nth-child(2)::before {
  background: var(--blue);
}

.metric:nth-child(3)::before {
  background: var(--lime);
}

.metric:nth-child(4)::before {
  background: var(--accent);
}

.metric span {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 32px;
  line-height: 1;
}

.quick-start {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quick-card {
  min-height: 108px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  padding: 14px;
  text-align: left;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: center;
  column-gap: 12px;
  row-gap: 4px;
  box-shadow: 0 1px 0 rgba(27, 36, 32, 0.03);
  position: relative;
  overflow: hidden;
}

.quick-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: var(--cyan);
}

.quick-card:nth-child(2)::before {
  background: var(--blue);
}

.quick-card:nth-child(3)::before {
  background: var(--accent);
}

.quick-card:nth-child(4)::before {
  background: var(--lime);
}

.quick-card:hover {
  border-color: rgba(0, 167, 199, 0.5);
  transform: translateY(-1px);
}

.quick-index {
  grid-row: span 2;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e8f8fa;
  color: var(--primary);
  font-weight: 800;
}

.quick-card:nth-child(2) .quick-index {
  background: #edf2ff;
  color: var(--blue);
}

.quick-card:nth-child(3) .quick-index {
  background: #fff1e8;
  color: var(--accent);
}

.quick-card:nth-child(4) .quick-index {
  background: #eef8ef;
  color: var(--good);
}

.quick-card strong {
  font-size: 17px;
}

.quick-card small {
  color: var(--muted);
  line-height: 1.5;
}

.work-grid,
.split-layout,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.8fr);
  gap: 14px;
}

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

.panel {
  padding: 18px;
  min-width: 0;
  position: relative;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, rgba(0, 167, 199, 0.5), rgba(225, 120, 61, 0.42), transparent 62%);
  opacity: 0.65;
}

.work-grid .panel:nth-child(2)::before,
.split-layout .panel:nth-child(2)::before {
  background: linear-gradient(90deg, rgba(47, 115, 216, 0.48), rgba(101, 87, 216, 0.34), transparent 62%);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head p {
  margin-bottom: 0;
}

.segmented {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #f1f4f1;
  border-radius: 8px;
  flex-wrap: wrap;
}

.segment {
  min-height: 32px;
  font-size: 13px;
  background: transparent;
}

.segment.active {
  background: #ffffff;
  color: var(--cyan);
  box-shadow: 0 1px 4px rgba(27, 36, 32, 0.08);
}

.queue-list,
.content-table,
.approval-board,
.audience-grid,
.template-list {
  display: grid;
  gap: 10px;
}

.queue-card,
.content-row,
.approval-card,
.audience-card,
.template-card,
.strategy-item,
.member-card,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
}

.queue-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: #ffffff;
}

.queue-card:hover,
.content-row:hover,
.template-card:hover,
.audience-card:hover,
.approval-card:hover,
.member-card:hover,
.automation-row:hover {
  border-color: #cbd7cf;
  box-shadow: var(--soft-shadow);
}

.channel-pill,
.status-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.channel-pill,
.status-pill {
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.channel-pill.moments {
  background: #e7f8fb;
  color: #087081;
}

.channel-pill.official {
  background: #edf2ff;
  color: #285eb1;
}

.channel-pill.group {
  background: #fff0e6;
  color: #934f21;
}

.status-pill.pending {
  background: #fff7df;
  color: #93630a;
}

.status-pill.approved {
  background: #e6f7ec;
  color: #1c6b47;
}

.status-pill.executed {
  background: #eaf0ff;
  color: #355fa8;
}

.status-pill.blocked {
  background: #ffe9f1;
  color: #a73261;
}

.queue-copy h3,
.content-copy h3,
.approval-card h3,
.audience-card h3,
.member-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.queue-copy p,
.content-copy p,
.approval-card p,
.audience-card p,
.member-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

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

.script-box {
  display: grid;
  gap: 12px;
}

.script-copy {
  background: linear-gradient(180deg, #ffffff, #f7faf8);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  line-height: 1.7;
}

.script-copy strong {
  display: block;
  margin-bottom: 8px;
}

.content-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 116px;
  gap: 12px;
  align-items: center;
  background: #ffffff;
}

.date-box {
  color: var(--muted);
  font-size: 13px;
}

.date-box strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.compact {
  align-self: start;
}

.template-card,
.member-card {
  display: grid;
  gap: 8px;
}

.template-card button {
  justify-self: start;
}

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

.template-top,
.member-stats,
.template-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.template-filter-list {
  display: grid;
}

.filter-chip {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 12px;
}

.filter-chip.active,
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #edf6f2;
}

.member-stats span {
  background: #f0f4f1;
  color: var(--muted);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

.empty-state {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 6px;
  color: var(--muted);
}

.empty-state strong {
  color: var(--text);
}

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

.audience-card {
  display: grid;
  gap: 10px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  background: #f0f5f6;
  color: #4b5968;
}

.strategy-list,
.rule-list,
.settings-form {
  display: grid;
  gap: 12px;
}

.strategy-item {
  display: grid;
  gap: 5px;
}

.strategy-item span {
  color: var(--muted);
}

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

.automation-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.automation-step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f7faf8);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.automation-step span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf6f2;
  color: var(--primary);
  font-weight: 800;
}

.automation-step small {
  color: var(--muted);
  line-height: 1.5;
}

.automation-table {
  display: grid;
  gap: 10px;
}

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

.automation-row h3 {
  margin: 8px 0 4px;
  font-size: 16px;
}

.automation-row p,
.automation-row span {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.automation-row strong {
  display: block;
}

.muted-row {
  background: #f8fbfc;
}

.approval-card {
  display: grid;
  gap: 12px;
}

.check-list {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-line.ok::before,
.check-line.warn::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.check-line.ok::before {
  background: var(--good);
}

.check-line.warn::before {
  background: var(--warning);
}

.settings-form label,
.form-grid label,
.rule-row {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.rule-row {
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
}

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

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 107, 93, 0.12);
}

.modal {
  border: 0;
  border-radius: 8px;
  padding: 0;
  width: min(720px, calc(100vw - 28px));
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(15, 24, 32, 0.45);
}

.modal-card {
  padding: 18px;
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

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

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 220px;
  max-width: min(380px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #17201d;
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  position: fixed;
  left: 50%;
  bottom: 10px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(220, 230, 232, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #697579;
  font-size: 12px;
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.site-footer a {
  color: #2f73d8;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .brand div:not(.brand-mark),
  .nav-item span:last-child,
  .sidebar-note div {
    display: none;
  }

  .sidebar {
    align-items: center;
    padding: 18px 12px;
  }

  .sidebar-note {
    padding: 10px;
  }

  .work-grid,
  .split-layout,
  .settings-grid,
  .approval-board,
  .automation-flow,
  .quick-start,
  .command-center,
  .login-panel,
  .template-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .command-copy h2 {
    font-size: 30px;
  }

  .login-copy {
    padding: 20px 6px;
  }

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

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 5;
    flex-direction: row;
    overflow-x: auto;
  }

  .brand,
  .sidebar-note {
    display: none;
  }

  .nav {
    display: flex;
    width: max-content;
  }

  .nav-item {
    flex: 0 0 auto;
    min-width: 104px;
  }

  .nav-item span:last-child {
    display: inline;
  }

  .main {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .command-center {
    padding: 20px;
  }

  .command-copy h2 {
    font-size: 26px;
  }

  .command-actions,
  .command-actions button {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
  }

  .topbar-actions button,
  .tenant-switch {
    min-width: 0;
  }

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

  .queue-card,
  .content-row,
  .automation-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

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