:root {
  color-scheme: light;
  --ink: #10213a;
  --muted: #68758a;
  --line: #dfe5ed;
  --soft-line: #edf1f5;
  --canvas: #f4f7fa;
  --panel: #ffffff;
  --nav: #101d31;
  --nav-muted: #8fa0b8;
  --blue: #1769e0;
  --blue-dark: #0f56c2;
  --cyan: #2dc9c5;
  --green: #15976c;
  --amber: #b66d0a;
  --shadow: 0 14px 38px rgba(21, 43, 73, 0.08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100vh; padding: 1.5rem 1rem; color: #f8fbff;
  background: var(--nav); display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: .75rem; padding: .25rem .6rem 1.8rem; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .72rem;
  background: linear-gradient(145deg, #2687f5, #245ed6); font-size: 1.05rem; font-weight: 800;
  box-shadow: 0 8px 18px rgba(19, 101, 226, .3);
}
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: .05em; }
.brand small { margin-top: .12rem; color: var(--nav-muted); font-size: .75rem; }
.side-nav { display: grid; gap: .32rem; }
.side-nav a {
  display: flex; min-height: 2.75rem; align-items: center; justify-content: space-between;
  padding: 0 .8rem; border-radius: .68rem; color: #b7c3d4; text-decoration: none;
  font-size: .9rem; transition: background .18s ease, color .18s ease;
}
.side-nav .nav-symbol { width: 1.35rem; color: #7188a6; font-size: .88rem; text-align: center; }
.side-nav a > span:nth-child(2) { flex: 1; margin-left: .55rem; }
.side-nav a:hover, .side-nav a:focus-visible { color: #fff; background: rgba(255, 255, 255, .06); outline: none; }
.side-nav a.active { color: #fff; background: rgba(52, 126, 229, .2); box-shadow: inset 2px 0 #4e9cff; }
.side-nav kbd, .nav-count { border: 0; border-radius: 999px; padding: .12rem .42rem; color: #9fb0c6; background: rgba(255,255,255,.07); font-size: .72rem; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: .72rem; padding: .85rem .7rem; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-foot strong, .sidebar-foot small { display: block; }
.sidebar-foot strong { font-size: .82rem; }
.sidebar-foot small { margin-top: .2rem; color: var(--nav-muted); font-size: .72rem; }
.status-dot { width: .65rem; height: .65rem; border-radius: 50%; background: #42d39b; box-shadow: 0 0 0 .25rem rgba(66, 211, 155, .12); }

.main-content { width: min(100%, 90rem); padding: 1.2rem clamp(1.5rem, 3.6vw, 4rem) 4rem; }
.environment-bar {
  display: flex; min-height: 2.3rem; align-items: center; gap: .8rem; margin-bottom: 2rem;
  padding: .45rem .7rem; border: 1px solid #dbe5f0; border-radius: .65rem;
  color: #66758a; background: rgba(255, 255, 255, .68); font-size: .72rem;
}
.environment-bar span:first-child { color: #33516f; font-weight: 750; }
.environment-bar i { display: inline-block; width: .42rem; height: .42rem; margin-right: .42rem; border-radius: 50%; background: #27ad79; }
.environment-bar a { margin-left: auto; color: var(--blue); font-weight: 750; text-decoration: none; }
.environment-bar a:hover { text-decoration: underline; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; }
.eyebrow { margin: 0 0 .35rem; color: #7b8799; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.65rem, 2.4vw, 2.15rem); line-height: 1.2; letter-spacing: -.03em; }
h2 { margin-bottom: 0; font-size: 1.3rem; letter-spacing: -.02em; }
h3 { margin-bottom: .42rem; font-size: 1rem; }
.heading-note { max-width: 40rem; margin: .5rem 0 0; color: var(--muted); font-size: .83rem; }
.top-actions { display: flex; gap: .65rem; }
.button { min-height: 2.7rem; border: 1px solid transparent; border-radius: .7rem; padding: 0 1rem; cursor: pointer; font-weight: 700; font-size: .88rem; }
.button.primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(23, 105, 224, .2); }
.button.primary:hover { background: var(--blue-dark); }
.button.ghost { border-color: var(--line); background: rgba(255,255,255,.72); }
.button.secondary { color: #124f9c; border-color: #c9dcf3; background: #edf5ff; }
.button[disabled] { cursor: not-allowed; opacity: .55; box-shadow: none; }
.icon-button {
  display: grid; width: 2.7rem; height: 2.7rem; place-items: center; border: 1px solid var(--line);
  border-radius: .7rem; color: #65758b; background: #fff; cursor: pointer;
}
.button:focus-visible, .text-button:focus-visible, .app-card button:focus-visible, .new-app-card:focus-visible { outline: 3px solid rgba(23,105,224,.22); outline-offset: 2px; }

.access-gate {
  width: min(100%, 35rem); margin: clamp(3rem, 9vh, 8rem) auto; padding: 2.5rem;
  border: 1px solid #dbe3ec; border-radius: 1.25rem; background: #fff;
  box-shadow: 0 24px 70px rgba(20, 39, 65, .11); text-align: center;
}
.access-gate .gate-mark {
  display: grid; width: 3.4rem; height: 3.4rem; place-items: center; margin: 0 auto 1.2rem;
  border-radius: 1rem; color: #fff; background: #1769e0; box-shadow: 0 12px 28px rgba(23, 105, 224, .25);
  font-size: 1.25rem; font-weight: 850;
}
.access-gate h1 { font-size: 1.75rem; }
.access-gate > p:not(.eyebrow):not(.form-error) { max-width: 29rem; margin: .8rem auto 0; color: var(--muted); line-height: 1.7; }
.gate-actions { display: flex; justify-content: center; gap: .65rem; margin-top: 1.6rem; }
.key-form { margin-top: 1.2rem; padding-top: 1.2rem; border-top: 1px solid var(--soft-line); text-align: left; }
.key-form label { display: block; margin-bottom: .45rem; color: #526178; font-size: .78rem; font-weight: 700; }
.key-form > div { display: flex; gap: .5rem; }
.key-form input { min-width: 0; flex: 1; border: 1px solid #cfd9e5; border-radius: .65rem; padding: .7rem .8rem; outline: none; }
.key-form input:focus { border-color: #6ba2e6; box-shadow: 0 0 0 3px rgba(23,105,224,.12); }
.key-form small { display: block; margin-top: .55rem; color: #8792a2; font-size: .7rem; line-height: 1.5; }
.phone-login-preview { margin-top: 1.25rem; padding-top: 1.15rem; border-top: 1px solid var(--soft-line); text-align: left; }
.phone-login-preview label { display: block; margin-bottom: .45rem; color: #526178; font-size: .78rem; font-weight: 700; }
.phone-login-preview > div { display: flex; gap: .5rem; }
.phone-login-preview input { min-width: 0; flex: 1; border: 1px solid #cfd9e5; border-radius: .65rem; padding: .7rem .8rem; outline: none; }
.phone-login-preview input:focus { border-color: #6ba2e6; box-shadow: 0 0 0 3px rgba(23,105,224,.12); }
.form-error { min-height: 1.15rem; margin: .7rem 0 0; color: #b83232; font-size: .75rem; }

.readiness-card {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 1rem;
  padding: 1.2rem 1.3rem; border: 1px solid #cfe2dc; border-radius: 1rem; background: #f2faf7;
}
.readiness-card > div { display: flex; align-items: center; gap: 1rem; }
.readiness-icon {
  display: grid; width: 2.75rem; height: 2.75rem; flex: 0 0 auto; place-items: center;
  border-radius: .85rem; color: #fff; background: var(--green); font-size: 1rem; font-weight: 800;
}
.readiness-card h2 { font-size: 1.05rem; }
.readiness-card p:last-child { margin: .32rem 0 0; color: #587169; font-size: .78rem; }
.readiness-card[data-tone="warning"] { border-color: #f0d9ac; background: #fff9ed; }
.readiness-card[data-tone="warning"] .readiness-icon { background: #c97b14; }
.readiness-card[data-tone="error"] { border-color: #efc7c7; background: #fff5f5; }
.readiness-card[data-tone="error"] .readiness-icon { background: #c74242; }

.signal-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 6rem;
  padding: 1.15rem 1.35rem; border: 1px solid #cfe0f6; border-radius: 1rem;
  background: linear-gradient(110deg, #eef6ff 0%, #f9fcff 55%, #eefbfa 100%); overflow: hidden;
}
.signal-copy { display: flex; align-items: center; gap: .9rem; }
.signal-copy strong, .signal-copy small { display: block; }
.signal-copy strong { font-size: .95rem; }
.signal-copy small { margin-top: .3rem; color: #657690; font-size: .8rem; }
.signal-icon { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; flex: 0 0 auto; border-radius: .85rem; color: #fff; background: var(--blue); }
.flow-rail { display: flex; align-items: center; flex: 0 0 auto; }
.flow-step { padding: .38rem .62rem; border-radius: 999px; color: #5e6f86; background: rgba(255,255,255,.78); font-size: .72rem; font-weight: 700; }
.flow-step.done { color: #17684f; }
.flow-step.current { color: #0c55b9; box-shadow: inset 0 0 0 1px #bdd7f8; }
.flow-rail i { width: 1.5rem; height: 1px; background: #bad1e8; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0 2rem; }
.metric-card { min-height: 7.1rem; padding: 1rem 1.05rem; border: 1px solid var(--soft-line); border-radius: .9rem; background: var(--panel); box-shadow: 0 4px 16px rgba(32,49,73,.035); }
.metric-card span, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: .78rem; }
.metric-card strong { display: block; margin: .65rem 0 .25rem; font-size: 1.55rem; line-height: 1; letter-spacing: -.03em; }
.metric-card small { color: #8994a5; font-size: .72rem; }
.metric-card.accent { color: #fff; border-color: transparent; background: linear-gradient(145deg, #1566dc, #164da8); }
.metric-card.accent span, .metric-card.accent small { color: #d6e6fb; }

.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: .9rem; }
.text-button { border: 0; padding: .4rem 0; color: var(--blue); background: transparent; cursor: pointer; font-size: .82rem; font-weight: 700; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.app-card, .new-app-card { min-height: 12.2rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.app-card { display: flex; flex-direction: column; justify-content: space-between; padding: 1rem; box-shadow: var(--shadow); }
.app-card.featured { border-color: #c8ddf7; }
.app-card-top, .app-card footer { display: flex; align-items: center; justify-content: space-between; }
.app-avatar { display: grid; width: 2.55rem; height: 2.55rem; place-items: center; border-radius: .78rem; color: #fff; font-size: .8rem; font-weight: 800; }
.app-avatar.coral { background: linear-gradient(145deg, #f07e66, #d95650); }
.app-avatar.blue { background: linear-gradient(145deg, #2b82ed, #2158bd); }
.pill { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .55rem; border-radius: 999px; font-size: .69rem; font-weight: 750; }
.pill.warning { color: #8a570c; background: #fff3d9; }
.pill.success { color: #0e7655; background: #e6f7f0; }
.pill.success i { width: .4rem; height: .4rem; border-radius: 50%; background: #22aa78; }
.app-card p { margin-bottom: 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.app-card footer { padding-top: .85rem; border-top: 1px solid var(--soft-line); color: #7c889a; font-size: .72rem; }
.app-card footer button { display: grid; width: 1.9rem; height: 1.9rem; place-items: center; border: 1px solid var(--line); border-radius: .55rem; background: #fff; cursor: pointer; }
.app-card .app-copy { margin: 1.35rem 0 1rem; }
.app-card .app-copy h3 { font-size: 1.02rem; }
.app-card .address-line { display: flex; align-items: center; gap: .4rem; margin: 0; }
.app-card .address-line a { min-width: 0; color: #4e6078; overflow: hidden; text-overflow: ellipsis; text-decoration: none; white-space: nowrap; }
.app-card .address-line a:hover { color: var(--blue); text-decoration: underline; }
.app-card .app-details { display: flex; flex-wrap: wrap; gap: .45rem .85rem; margin-top: .65rem; color: #7e8a9b; font-size: .7rem; }
.card-actions { display: flex; align-items: center; gap: .45rem; }
.card-actions .card-button {
  width: auto; min-height: 1.95rem; padding: 0 .58rem; color: #38516f; font-size: .7rem; font-weight: 700;
}
.card-actions .card-button.primary-mini { color: #fff; border-color: var(--blue); background: var(--blue); }
.pill.info { color: #225e9d; background: #e9f3ff; }
.pill.neutral { color: #617087; background: #eef1f5; }
.pill.danger { color: #a53c3c; background: #fdeaea; }
.new-app-card { display: grid; place-content: center; justify-items: center; gap: .5rem; padding: 1.1rem; border-style: dashed; color: #53647b; cursor: pointer; }
.new-app-card > span { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: .75rem; color: var(--blue); background: #edf5ff; font-size: 1.35rem; }
.new-app-card strong { font-size: .9rem; }
.new-app-card small { max-width: 13rem; color: #8792a2; font-size: .72rem; line-height: 1.5; text-align: center; }
.new-app-card:hover { border-color: #98bde9; background: #f9fcff; }

.loading-card { min-height: 12.2rem; padding: 1.1rem; border: 1px solid var(--soft-line); border-radius: 1rem; background: #fff; }
.loading-card span { display: block; height: .75rem; margin-bottom: .8rem; border-radius: 999px; background: linear-gradient(90deg, #edf1f5, #f7f9fb, #edf1f5); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.loading-card span:first-child { width: 2.7rem; height: 2.7rem; border-radius: .8rem; margin-bottom: 2rem; }
.loading-card span:nth-child(2) { width: 58%; }
.loading-card span:nth-child(3) { width: 82%; }
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { padding: 3.5rem 1.5rem; border: 1px dashed #cbd8e7; border-radius: 1rem; background: rgba(255,255,255,.58); text-align: center; }
.empty-state .empty-mark { display: grid; width: 3rem; height: 3rem; place-items: center; margin: 0 auto 1rem; border-radius: .9rem; color: var(--blue); background: #eaf3ff; font-size: 1.35rem; }
.empty-state p { margin: .5rem auto 1.3rem; color: var(--muted); font-size: .82rem; }

.explain-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: .9rem; margin-top: 2rem; scroll-margin-top: 1rem; }
.explain-card { padding: 1.2rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.section-heading.compact { margin-bottom: 1rem; }
.numbered-flow { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .6rem; padding: 0; margin: 0; list-style: none; }
.numbered-flow li { display: flex; gap: .65rem; min-width: 0; padding: .85rem; border-radius: .75rem; background: #f6f8fb; }
.numbered-flow li > span { display: grid; width: 1.5rem; height: 1.5rem; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: #2f6fbd; font-size: .68rem; font-weight: 800; }
.numbered-flow strong, .numbered-flow small { display: block; }
.numbered-flow strong { font-size: .75rem; }
.numbered-flow small { margin-top: .3rem; color: var(--muted); font-size: .67rem; line-height: 1.45; }
.identity-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.identity-symbol { display: grid; width: 2.6rem; height: 2.6rem; place-items: center; border-radius: .8rem; color: #12654b; background: #e5f7ef; font-size: .68rem; letter-spacing: .08em; }
.explain-card > p { color: var(--muted); font-size: .79rem; line-height: 1.7; }
.boundary-note { padding: .8rem; border-left: 3px solid #36a983; border-radius: 0 .6rem .6rem 0; background: #f1faf6; }
.boundary-note strong, .boundary-note span { display: block; }
.boundary-note strong { color: #25664f; font-size: .72rem; }
.boundary-note span { margin-top: .28rem; color: #5e756d; font-size: .69rem; line-height: 1.5; }

.address-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .8rem 2rem; margin-top: .9rem; padding: 1.2rem; border: 1px solid #d5e1ee; border-radius: 1rem; background: #eef5fb; scroll-margin-top: 1rem; }
.address-panel > p { display: flex; align-items: center; gap: .65rem; margin: 0; }
.address-panel code { padding: .45rem .6rem; border: 1px solid #d8e2ec; border-radius: .5rem; color: #314c6e; background: #fff; font-size: .72rem; }
.address-panel > small { grid-column: 1 / -1; color: #708096; font-size: .69rem; }

.modal { width: min(calc(100% - 2rem), 34rem); max-height: calc(100vh - 2rem); padding: 0; border: 0; border-radius: 1.1rem; color: var(--ink); background: transparent; box-shadow: 0 28px 80px rgba(9, 24, 45, .25); }
.modal.wide-modal { width: min(calc(100% - 2rem), 42rem); }
.modal::backdrop { background: rgba(10, 24, 43, .55); backdrop-filter: blur(3px); }
.modal-shell { padding: 1.35rem; border: 1px solid rgba(255,255,255,.65); border-radius: 1.1rem; background: #fff; }
.modal-shell.wide { width: 100%; }
.modal-shell > header, .modal-shell > footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-shell > header { margin-bottom: 1rem; }
.modal-shell > footer { justify-content: flex-end; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--soft-line); }
.close-button { display: grid; width: 2.2rem; height: 2.2rem; place-items: center; border: 0; border-radius: .65rem; color: #68778b; background: #f1f4f7; cursor: pointer; font-size: 1.25rem; }
.modal-intro, .fine-print { color: var(--muted); font-size: .78rem; line-height: 1.65; }
.field { display: grid; gap: .45rem; margin-top: 1rem; color: #46566c; font-size: .77rem; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #ccd7e4; border-radius: .68rem; padding: .72rem .8rem; color: var(--ink); background: #fff; outline: none; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6aa1e7; box-shadow: 0 0 0 3px rgba(23,105,224,.11); }
.field em { color: #8692a2; font-size: .66rem; font-style: normal; font-weight: 500; line-height: 1.45; }
.domain-input { display: flex; align-items: center; border: 1px solid #ccd7e4; border-radius: .68rem; background: #f4f7fa; overflow: hidden; }
.domain-input:focus-within { border-color: #6aa1e7; box-shadow: 0 0 0 3px rgba(23,105,224,.11); }
.domain-input input { border: 0; border-radius: 0; box-shadow: none !important; }
.domain-input small { padding: 0 .7rem; color: #68758a; font-size: .72rem; white-space: nowrap; }
.file-drop { display: grid; min-height: 10rem; place-content: center; justify-items: center; gap: .45rem; margin-top: 1rem; padding: 1rem; border: 1px dashed #aabdd2; border-radius: .85rem; color: #52667f; background: #f8fbfe; cursor: pointer; text-align: center; }
.file-drop > span { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: .75rem; color: var(--blue); background: #e8f2ff; font-size: 1.1rem; }
.file-drop small { color: #8290a1; font-size: .68rem; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.assistant-callout { display: flex; gap: .8rem; padding: .9rem; border-radius: .8rem; color: #34516f; background: #eef6ff; }
.assistant-callout > span { color: var(--blue); font-size: 1.1rem; }
.assistant-callout p { margin: 0; font-size: .76rem; line-height: 1.6; }
.history-list { display: grid; gap: .55rem; max-height: 25rem; overflow: auto; }
.history-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .8rem; border: 1px solid var(--soft-line); border-radius: .75rem; }
.history-item > span:first-child { display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .6rem; color: #38638f; background: #edf5fc; font-size: .72rem; }
.history-item strong, .history-item small { display: block; }
.history-item strong { font-size: .76rem; }
.history-item small { margin-top: .22rem; color: var(--muted); font-size: .66rem; }
.history-item code { color: #758399; font-size: .65rem; }
.toast { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 100; max-width: min(26rem, calc(100% - 2.4rem)); padding: .8rem 1rem; border-radius: .72rem; color: #fff; background: #163454; box-shadow: 0 12px 32px rgba(8,23,41,.25); font-size: .76rem; opacity: 0; transform: translateY(.6rem); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: #a63d3d; }

/* Admin surface */
.admin-theme { --blue: #425cc7; --blue-dark: #334aa9; --nav: #172035; background: #f3f4f7; }
.admin-content { width: min(100%, 100rem); }
.admin-sidebar { background: #172035; }
.admin-mark { background: #e8edf8; color: #24355d; box-shadow: none; }
.admin-environment { border-color: #dcdfe7; }
.admin-gate-mark { background: #273861 !important; box-shadow: 0 12px 28px rgba(31,48,87,.22) !important; }
.admin-topbar { align-items: flex-end; }
.admin-search-wrap { align-items: center; }
.search-field { display: flex; min-width: 16rem; min-height: 2.7rem; align-items: center; gap: .45rem; padding: 0 .75rem; border: 1px solid #d3d7e0; border-radius: .7rem; background: #fff; }
.search-field span { color: #778397; }
.search-field input { min-width: 0; width: 100%; border: 0; outline: 0; font-size: .78rem; }
.attention-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: .8rem; margin-bottom: .9rem; }
.attention-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem; min-height: 6rem; padding: .9rem; border: 1px solid #e0e3ea; border-radius: .9rem; background: #fff; }
.attention-symbol { display: grid; width: 2.3rem; height: 2.3rem; place-items: center; border-radius: .7rem; font-size: .78rem; font-weight: 850; }
.attention-card small, .attention-card strong { display: block; }
.attention-card small { color: #6e7889; font-size: .69rem; }
.attention-card strong { margin-top: .28rem; font-size: 1.3rem; }
.attention-card a, .attention-card > span:last-child { align-self: end; color: #56677e; font-size: .67rem; font-weight: 700; text-decoration: none; }
.attention-card.warning .attention-symbol { color: #9a5c0a; background: #fff1d9; }
.attention-card.danger .attention-symbol { color: #a43a3a; background: #fdeaea; }
.attention-card.neutral .attention-symbol { color: #425b91; background: #ebeff8; }
.attention-card.quiet .attention-symbol { color: #41715f; background: #e9f4ef; }
.service-strip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; padding: 1rem 1.15rem; border: 1px solid #dcdfe6; border-radius: .9rem; background: #fff; }
.service-strip ul { display: flex; justify-content: center; gap: clamp(1rem, 4vw, 3rem); padding: 0; margin: 0; list-style: none; }
.service-strip li { color: #687487; font-size: .71rem; }
.service-strip li i { display: inline-block; width: .42rem; height: .42rem; margin-right: .35rem; border-radius: 50%; background: #28a978; }
.service-strip li strong { margin-left: .25rem; color: #344256; }
.admin-metrics { margin-top: .9rem; }
.metric-card.dark-accent { color: #fff; border-color: #2c3c5f; background: #202f4e; }
.metric-card.dark-accent span, .metric-card.dark-accent small { color: #bdc8dc; }
.data-panel { margin-top: .9rem; padding: 1.15rem; border: 1px solid #dcdfe6; border-radius: 1rem; background: #fff; scroll-margin-top: 1rem; }
.data-note { color: #7d8797; font-size: .68rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: .68rem .7rem; border-bottom: 1px solid #dfe3e9; color: #798394; font-size: .66rem; font-weight: 750; letter-spacing: .03em; }
td { padding: .78rem .7rem; border-bottom: 1px solid #eef0f3; color: #526074; font-size: .72rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-filtered="true"] { display: none; }
.table-primary strong, .table-primary small { display: block; }
.table-primary strong { color: #28384e; font-size: .76rem; }
.table-primary small { margin-top: .2rem; color: #8792a1; font-size: .64rem; }
.table-loading, .table-empty { padding: 1.8rem; color: #8792a1; text-align: center; }
.row-actions { display: flex; justify-content: flex-end; gap: .35rem; }
.mini-button { min-height: 1.9rem; padding: 0 .55rem; border: 1px solid #d5dae3; border-radius: .52rem; color: #4d5f76; background: #fff; cursor: pointer; font-size: .66rem; font-weight: 700; }
.mini-button:hover { border-color: #9eabc0; }
.mini-button.danger-link { color: #a43e3e; }
.status-label { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .5rem; border-radius: 999px; font-size: .65rem; font-weight: 750; }
.status-label::before { content: ""; width: .36rem; height: .36rem; border-radius: 50%; background: currentColor; }
.status-label.active, .status-label.accepted, .status-label.verified { color: #167554; background: #e7f6ef; }
.status-label.pending, .status-label.requested { color: #9a650f; background: #fff3de; }
.status-label.suspended, .status-label.failed, .status-label.rejected { color: #a43d3d; background: #fdecec; }
.status-label.unpublished { color: #6f7785; background: #eef0f3; }
.sms-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .65rem; padding: .75rem .8rem; border-radius: .7rem; background: #f5f7fa; }
.sms-summary p { margin: 0; color: #667386; font-size: .69rem; }
.sms-summary strong { margin-right: .4rem; color: #33445a; }
.danger-button { min-height: 2.7rem; border: 1px solid #ad3838; border-radius: .7rem; padding: 0 1rem; color: #fff; background: #b64040; cursor: pointer; font-weight: 750; font-size: .82rem; }
.confirm-warning { display: flex; gap: .75rem; padding: .85rem; border: 1px solid #efd0d0; border-radius: .75rem; color: #7d3939; background: #fff4f4; }
.confirm-warning > span { display: grid; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; place-items: center; border-radius: .5rem; color: #fff; background: #b74040; font-weight: 850; }
.confirm-warning p { margin: 0; font-size: .75rem; line-height: 1.6; }
.review-summary { display: flex; align-items: center; gap: .8rem; margin: -.35rem 0 .85rem; padding: .7rem .8rem; border-radius: .7rem; background: #f6f7f9; }
.review-summary p { margin: 0; color: #707b8c; font-size: .68rem; line-height: 1.5; }
.detail-summary, .identity-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .55rem; margin: .8rem 0; }
.detail-item { min-width: 0; padding: .7rem .75rem; border: 1px solid var(--soft-line); border-radius: .68rem; background: #f8fafc; }
.detail-item small, .detail-item strong { display: block; }
.detail-item small { color: #7c8898; font-size: .64rem; }
.detail-item strong { margin-top: .28rem; color: #314157; font-size: .72rem; overflow-wrap: anywhere; }
.admin-app-history { display: grid; gap: .7rem; max-height: 27rem; overflow: auto; }
.admin-app-block { border: 1px solid #dde2e9; border-radius: .75rem; overflow: hidden; }
.admin-app-block > header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem .85rem; background: #f7f8fa; }
.admin-app-block > header > strong { color: #677489; font-size: .68rem; }
.admin-version-row { display: grid; grid-template-columns: auto 1fr 1fr; gap: .65rem; padding: .65rem .85rem; border-top: 1px solid #edf0f3; color: #738095; font-size: .65rem; }
.admin-version-row strong { color: #33455d; }
.admin-version-row.failed-attempt { background: #fff8f6; }
.admin-version-row.failed-attempt strong { color: #b54735; }
.identity-image-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .8rem; }
.identity-image-grid figure { margin: 0; padding: .65rem; border: 1px solid #dfe3e9; border-radius: .72rem; background: #f7f8fa; }
.identity-image-grid figcaption { margin-bottom: .5rem; color: #68768a; font-size: .67rem; font-weight: 750; }
.identity-image-grid img { display: block; width: 100%; min-height: 9rem; max-height: 15rem; object-fit: contain; border-radius: .45rem; background: #e7eaf0; }
.review-actions { flex-wrap: wrap; }

/* Creator account, identity, AI connection, and key management */
.login-form { display: grid; width: min(100%, 25rem); gap: .85rem; margin: 1.15rem auto 0; text-align: left; }
.login-form .field { margin-top: 0; }
.full-button { width: 100%; justify-content: center; }
.consent-check { display: flex; align-items: flex-start; gap: .55rem; color: #647286; font-size: .7rem; line-height: 1.55; text-align: left; }
.consent-check input { width: 1rem; height: 1rem; flex: 0 0 auto; margin-top: .1rem; accent-color: var(--blue); }
.verification-sent { margin: 0; padding: .7rem .8rem; border-radius: .65rem; color: #25654f; background: #eef9f4; font-size: .72rem; text-align: center; }
.local-entry { display: flex; width: min(100%, 25rem); align-items: center; justify-content: space-between; gap: .8rem; margin: 1.1rem auto 0; padding-top: 1rem; border-top: 1px solid var(--soft-line); color: #8490a1; font-size: .68rem; }
.gate-footnote { display: block; max-width: 27rem; margin: .75rem auto 0; color: #8995a4; font-size: .65rem; line-height: 1.5; }
.readiness-card.verified { border-color: #b9dfd0; background: linear-gradient(110deg, #ecfaf4, #f8fcfa); }
.readiness-card.verified .readiness-icon { color: #fff; background: #26946d; }
.copy-icon { min-height: 1.7rem; padding: 0 .48rem; border: 1px solid var(--line); border-radius: .45rem; color: #52667f; background: #fff; cursor: pointer; font-size: .62rem; }
.copy-icon:disabled { opacity: .45; cursor: default; }
.feature-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: .9rem; margin-top: 1rem; scroll-margin-top: 1rem; }
.feature-card { display: flex; align-items: flex-start; gap: 1rem; min-height: 12rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: 1rem; background: #fff; }
.feature-card.feature-primary { border-color: #c5d9f2; background: linear-gradient(145deg, #f4f9ff, #fff); }
.feature-card h2 { margin-top: .15rem; }
.feature-card p:not(.eyebrow) { color: var(--muted); font-size: .77rem; line-height: 1.7; }
.feature-icon { display: grid; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; place-items: center; border-radius: .85rem; color: #fff; background: linear-gradient(145deg, #3286ef, #175bb6); font-size: 1.05rem; }
.feature-icon.secure { color: #176e52; background: #e1f5ed; }
.inline-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.inline-actions a.button { text-decoration: none; }
.console-panel { scroll-margin-top: 1rem; }
.credential-note { margin: -.45rem 0 .85rem; }
.credential-list { display: grid; gap: .5rem; }
.credential-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .9rem; border: 1px solid var(--soft-line); border-radius: .75rem; background: #fbfcfd; }
.credential-row strong, .credential-row small { display: block; }
.credential-row strong { color: #2d3d52; font-size: .75rem; }
.credential-row small { margin-top: .25rem; color: #7b8798; font-size: .65rem; }
.credential-meta { display: flex; align-items: center; justify-content: flex-end; gap: .55rem; }
.credential-meta > small { white-space: nowrap; }
.membership-panel { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.2rem; margin-top: .9rem; padding: 1.25rem; border: 1px solid #d7dce5; border-radius: 1rem; background: #fff; scroll-margin-top: 1rem; }
.membership-panel p:not(.eyebrow) { max-width: 47rem; color: var(--muted); font-size: .76rem; line-height: 1.65; }
.quota-box { min-width: 10rem; padding: .9rem 1rem; border-radius: .8rem; color: #fff; background: #243958; }
.quota-box small, .quota-box strong, .quota-box span { display: block; }
.quota-box small { color: #b8c5d6; font-size: .66rem; }
.quota-box strong { margin: .25rem 0; font-size: 1.45rem; }
.quota-box span { color: #d7e0ec; font-size: .62rem; }
.sensitive-note { display: grid; gap: .25rem; padding: .8rem; border: 1px solid #efd9b7; border-radius: .75rem; color: #79571f; background: #fff8ea; }
.sensitive-note strong { font-size: .74rem; }
.sensitive-note span { font-size: .68rem; line-height: 1.55; }
.identity-upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1rem; }
.mini-file { display: grid; min-height: 6rem; place-content: center; gap: .45rem; padding: .75rem; border: 1px dashed #aabdd2; border-radius: .75rem; color: #53667d; background: #f8fbfe; font-size: .72rem; font-weight: 750; text-align: center; cursor: pointer; }
.mini-file input { max-width: 10rem; color: #7a8798; font-size: .62rem; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 5rem minmax(0,1fr); }
  .brand { justify-content: center; padding-inline: 0; }
  .brand > span:last-child, .side-nav a span, .side-nav kbd, .side-nav .nav-count, .sidebar-foot div { display: none; }
  .side-nav a { justify-content: center; }
  .side-nav a::before { content: "\2022"; font-size: 1.3rem; }
  .sidebar-foot { justify-content: center; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .app-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .flow-rail { display: none; }
  .explain-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .attention-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .service-strip { grid-template-columns: 1fr auto; }
  .service-strip ul { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  .admin-topbar { align-items: flex-start; flex-direction: column; }
  .admin-search-wrap { width: 100%; }
  .search-field { flex: 1; }
}

@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: .75rem 1rem; flex-direction: row; align-items: center; }
  .brand { padding: 0; }
  .brand > span:last-child { display: block; }
  .side-nav { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .main-content { padding: 1.25rem 1rem 3rem; }
  .environment-bar span:nth-child(2) { display: none; }
  .topbar { align-items: flex-start; }
  .button { min-height: 2.55rem; padding-inline: .78rem; }
  .signal-strip { align-items: flex-start; }
  .signal-copy small { line-height: 1.5; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .metric-card { min-height: 6.6rem; }
  .app-grid { grid-template-columns: 1fr; }
  .access-gate { margin: 2rem auto; padding: 1.5rem 1rem; }
  .gate-actions { flex-direction: column; }
  .readiness-card { align-items: flex-start; }
  .readiness-card > .button { display: none; }
  .numbered-flow { grid-template-columns: 1fr; }
  .address-panel { grid-template-columns: 1fr; }
  .address-panel > p { align-items: flex-start; flex-direction: column; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .top-actions .button { font-size: .75rem; }
  .attention-grid { grid-template-columns: 1fr; }
  .service-strip { grid-template-columns: 1fr auto; }
  .service-strip ul { display: grid; gap: .5rem; }
  .admin-search-wrap { align-items: stretch; flex-direction: column; }
  .search-field { min-width: 0; }
  .data-note { display: none; }
  .sms-summary { align-items: flex-start; flex-direction: column; }
  .review-summary { align-items: flex-start; flex-direction: column; }
  .detail-summary, .identity-detail-grid, .identity-image-grid { grid-template-columns: 1fr; }
  .admin-version-row { grid-template-columns: 1fr; }
  .local-entry, .credential-row, .credential-meta { align-items: stretch; flex-direction: column; }
  .membership-panel { grid-template-columns: 1fr; }
  .identity-upload-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
