/* ==========================================================================
   EngiDM — design system
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

  --navy: #081522;
  --navy-2: #0c1d2e;
  --navy-3: #11283e;
  --bg: #f3f6fa;
  --bg-soft: #f7f9fc;
  --surface: #ffffff;
  --surface-muted: #f8fafd;
  --ink: #142033;
  --ink-soft: #334158;
  --muted: #6a778c;
  --faint: #94a0b2;
  --line: #e7edf5;
  --line-strong: #dbe4ef;
  --primary: #1b64e8;
  --primary-deep: #1150c9;
  --primary-soft: #eaf1ff;
  --accent: #16c3ae;
  --accent-deep: #0a9c8c;
  --success: #15966a;
  --success-soft: #e8f8f1;
  --warning: #c77a16;
  --warning-soft: #fff6e7;
  --danger: #d7454d;
  --danger-soft: #fff0f1;
  --violet: #7251d6;
  --cyan: #118db9;

  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 2px rgba(20, 32, 51, 0.04);
  --shadow-panel: 0 1px 2px rgba(20, 32, 51, 0.03), 0 18px 44px -34px rgba(20, 32, 51, 0.24);
  --shadow-pop: 0 24px 60px -24px rgba(8, 21, 34, 0.32), 0 2px 8px rgba(8, 21, 34, 0.06);

  --sidebar-w: 254px;
  --topbar-h: 68px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(27, 100, 232, 0.18); }
:focus-visible { outline: 2px solid rgba(27, 100, 232, 0.65); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; }
[hidden] { display: none !important; }
.icon-xs { width: 14px; height: 14px; }
.muted { color: var(--muted); }
.text-success { color: var(--success) !important; }
.danger-text { color: var(--danger) !important; }
.meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--faint); display: inline-block; margin: 0 9px; vertical-align: middle; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccd7e4; border: 3px solid transparent; background-clip: content-box; border-radius: 20px; }
::-webkit-scrollbar-thumb:hover { background: #b1c0d2; border: 2px solid transparent; background-clip: content-box; }

/* ---------- Boot ---------- */
.boot-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #11283d 0, #081522 45%, #050e16 100%);
  color: #d9f7f1; transition: opacity 0.4s ease, visibility 0.4s ease;
}
.boot-screen.is-gone { opacity: 0; visibility: hidden; }
.boot-mark {
  width: 66px; height: 66px; border-radius: 20px; display: grid; place-items: center;
  background: linear-gradient(150deg, #17334a, #0b1b2b);
  border: 1px solid rgba(118, 235, 217, 0.16);
  box-shadow: 0 18px 60px -16px rgba(23, 195, 174, 0.4);
  animation: bootFloat 2.6s ease-in-out infinite;
}
.boot-mark .brand-glyph { width: 42px; height: 42px; background: none; border: none; color: #6ee8d8; }
.boot-name { margin-top: 18px; font-size: 16px; letter-spacing: 0.24em; font-weight: 600; color: #e8fffb; }
.boot-line { margin-top: 14px; width: 92px; height: 2px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; }
.boot-line span { display: block; height: 100%; width: 42%; background: linear-gradient(90deg, transparent, #37d8c3, transparent); animation: bootLine 1.15s ease-in-out infinite; }
@keyframes bootFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes bootLine { from { transform: translateX(-110%); } to { transform: translateX(330%); } }

.noscript { padding: 40px; text-align: center; }

/* ---------- Brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-glyph {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 11px; color: #69e7d7; position: relative;
  background: linear-gradient(150deg, #183449, #0b1a29);
  border: 1px solid rgba(93, 220, 202, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 6px 18px -10px rgba(0,0,0,0.8);
}
.brand-glyph svg { width: 27px; height: 27px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; }
.brand-copy strong { font-size: 16.5px; letter-spacing: 0.02em; color: #f2f8ff; font-weight: 650; }
.brand-copy small { margin-top: 4px; font-size: 8.5px; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(183, 212, 229, 0.44); font-weight: 500; }
.brand-light { color: #eaf8f5; }

/* ---------- Common UI ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font-size: 13px; font-weight: 600; white-space: nowrap; line-height: 1;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease), transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.btn .icon { width: 16px; height: 16px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary {
  color: #fff; background: linear-gradient(180deg, #2774f2, #1a5fdf);
  border-color: #1a5fdf;
  box-shadow: 0 1px 1px rgba(255,255,255,0.18) inset, 0 7px 18px -10px rgba(27, 100, 232, 0.75);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #2f7df7, #1656d0); box-shadow: 0 1px 1px rgba(255,255,255,0.2) inset, 0 10px 24px -12px rgba(27,100,232,.8); }
.btn-secondary { color: var(--ink-soft); background: #fff; border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover:not(:disabled) { background: #f8faff; border-color: #c8d5e5; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-muted); color: var(--ink); }
.btn-danger { background: linear-gradient(180deg, #e2555c, #ce3d45); color: #fff; border-color: #c9373f; box-shadow: 0 8px 18px -12px rgba(197, 50, 58, 0.8); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(180deg, #e96269, #c9363e); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 8.5px; font-size: 12.5px; }
.btn-xs { height: 29px; padding: 0 10px; border-radius: 7px; font-size: 12px; gap: 5px; }
.btn-xs .icon, .btn-sm .icon { width: 14px; height: 14px; }
.btn.is-loading { pointer-events: none; }

.icon-btn {
  width: 36px; height: 36px; border: 1px solid transparent; border-radius: 9px;
  background: transparent; display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted); transition: 0.16s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--surface-muted); }
.icon-btn.subtle { color: var(--faint); }
.icon-btn.subtle:hover { color: var(--ink); background: #f1f5fa; }
.icon-btn.danger-ghost:hover { color: var(--danger); background: var(--danger-soft); }
.text-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--primary); }
.text-link .icon { width: 14px; height: 14px; }
.text-link:hover { color: var(--primary-deep); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 1.8px solid currentColor; border-right-color: transparent;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-spinning .icon { animation: spin 0.8s linear infinite; }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #25d3b8; box-shadow: 0 0 0 3px rgba(37, 211, 184, 0.12); }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--primary); display: flex; align-items: center; gap: 8px; }
.eyebrow-light { color: rgba(127, 226, 213, 0.8); }

.badge {
  display: inline-flex; align-items: center; gap: 5px; min-height: 23px;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  line-height: 1.4; white-space: nowrap; border: 1px solid transparent;
}
.badge .icon { width: 12px; height: 12px; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-success { color: #0e7a56; background: #edf9f4; border-color: #d6f0e6; }
.badge-muted { color: #7e8a9c; background: #f3f5f8; border-color: #e8edf3; }
.badge-manage { color: #1f5fd0; background: #eff4ff; border-color: #dce7ff; }
.badge-read { color: #78629e; background: #f6f2fc; border-color: #ece4f7; }
.badge-danger { color: #bd3742; background: #fff1f2; border-color: #f9dfe1; }
.badge-admin { color: #2d3c54; background: #edf1f6; border-color: #e0e7f0; }
.badge-user { color: #1c6b7c; background: #eefafb; border-color: #d5f1f1; }
.badge-demo { color: #986018; background: #fff7e9; border-color: #f5e6c7; }
.badge-outline { color: var(--muted); background: #fff; border-color: var(--line-strong); }

.env-badge { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border-radius: 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.env-badge > span { width: 5px; height: 5px; border-radius: 50%; }
.env-local { color: #55718b; background: #f2f7fb; border: 1px solid #e3edf5; }
.env-local > span { background: #4fb69d; }
.env-demo { color: #9a6418; background: #fff8eb; border: 1px solid #f4e6c9; }
.env-demo > span { background: #e1a13b; }

.avatar {
  width: 34px; height: 34px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: linear-gradient(145deg, #e7effc, #d9e7fb);
  color: #305b98; font-size: 11.5px; font-weight: 700; letter-spacing: -0.02em;
  border: 1px solid rgba(57, 105, 170, 0.08);
}
.avatar-light { background: linear-gradient(145deg, #27445d, #19354c); color: #a8f1e4; border-color: rgba(120, 240, 220, 0.13); }
.avatar-xs { width: 25px; height: 25px; border-radius: 7px; font-size: 9px; }

.record-type {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 43px; height: 24px; padding: 0 7px; border-radius: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em;
  background: #eef3fa; color: #51627c; border: 1px solid rgba(67, 88, 118, 0.06);
}
.rt-a { background: #edf3ff; color: #2461ce; }
.rt-aaaa { background: #f1edff; color: #6746c9; }
.rt-cname { background: #e9faf7; color: #0a8c7c; }
.rt-txt { background: #fff7e8; color: #a97116; }
.rt-mx { background: #fff0f4; color: #b84967; }
.rt-ns { background: #f1f4f8; color: #607087; }
.rt-srv { background: #eaf8fe; color: #087fa9; }
.rt-caa { background: #ebf8f0; color: #218258; }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(440px, 0.94fr); background: #f7f9fc; }
.auth-story {
  position: relative; overflow: hidden; color: #edf9f7; padding: 42px 54px 30px;
  background:
    radial-gradient(ellipse at 75% 20%, rgba(20, 114, 128, 0.24), transparent 48%),
    radial-gradient(ellipse at 15% 78%, rgba(29, 92, 170, 0.24), transparent 50%),
    linear-gradient(145deg, #071523 0%, #091a2a 48%, #07131f 100%);
}
.auth-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(113, 190, 198, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(113, 190, 198, 0.04) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 45% 40%, #000 10%, transparent 75%);
  pointer-events: none;
}
.auth-orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-a { width: 340px; height: 340px; right: -110px; top: -100px; background: radial-gradient(circle, rgba(40, 185, 165, 0.14), transparent 68%); }
.orb-b { width: 500px; height: 500px; left: -230px; bottom: -260px; background: radial-gradient(circle, rgba(42, 102, 204, 0.18), transparent 66%); }
.auth-story-inner { position: relative; z-index: 2; min-height: calc(100vh - 72px); display: flex; flex-direction: column; }
.auth-copy { margin-top: clamp(64px, 12vh, 140px); max-width: 600px; }
.auth-copy h1 { margin-top: 21px; font-size: clamp(34px, 3.1vw, 48px); line-height: 1.22; letter-spacing: -0.035em; font-weight: 650; color: #f2fbfa; }
.auth-copy h1 span { color: #78e6d8; }
.auth-copy > p { margin-top: 23px; max-width: 480px; font-size: 14px; line-height: 1.9; color: rgba(203, 223, 229, 0.62); }
.auth-points { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; }
.auth-points > div { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: rgba(215, 237, 238, 0.72); }
.auth-points .icon { width: 15px; height: 15px; color: #4bd3c0; }
.auth-visual { position: relative; min-height: 172px; margin-top: auto; padding-top: 36px; }
.dns-float-card {
  position: relative; z-index: 3; width: min(430px, 86%);
  border: 1px solid rgba(138, 215, 211, 0.15); border-radius: 15px;
  background: linear-gradient(145deg, rgba(18, 47, 63, 0.84), rgba(9, 28, 42, 0.9));
  box-shadow: 0 30px 70px -32px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  transform: rotate(-1.2deg);
  padding: 15px 16px 13px;
}
.dns-float-head { display: flex; align-items: center; gap: 10px; }
.dns-mini-icon { width: 30px; height: 30px; border-radius: 8px; background: rgba(57, 205, 185, 0.12); color: #65e3d3; display: grid; place-items: center; border: 1px solid rgba(93, 220, 202, 0.12); }
.dns-mini-icon .icon { width: 15px; height: 15px; }
.dns-float-head > div { display: flex; flex-direction: column; gap: 1px; }
.dns-float-head strong { font-size: 12px; color: #e7f9f6; font-family: var(--font-mono); font-weight: 600; }
.dns-float-head small { font-size: 9px; color: rgba(181, 209, 214, 0.45); }
.pill-live { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 7px; border-radius: 5px; background: rgba(41, 190, 154, 0.1); color: #64d9b8; font-size: 9px; border: 1px solid rgba(53, 197, 163, 0.14); }
.pill-live i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.dns-float-row { display: flex; align-items: center; gap: 10px; margin-top: 13px; padding: 10px 11px; border-radius: 8px; background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.04); }
.dns-float-row .record-type { height: 20px; min-width: 32px; background: rgba(49, 111, 228, 0.2); color: #86b3ff; border: none; }
.dns-float-row code { font-family: var(--font-mono); font-size: 11px; color: #b6d5d7; }
.dns-float-row > span:last-child { margin-left: auto; font-size: 9px; color: rgba(179, 207, 214, 0.42); }
.dns-float-line { height: 1px; margin: 12px 0 9px; background: linear-gradient(90deg, rgba(87, 200, 185, 0.22), transparent); }
.dns-float-foot { display: flex; align-items: center; gap: 6px; color: rgba(180, 208, 214, 0.48); font-size: 9px; }
.dns-float-foot .icon { width: 12px; height: 12px; }
.orbit { position: absolute; border: 1px solid rgba(91, 201, 188, 0.08); border-radius: 50%; pointer-events: none; }
.orbit-1 { width: 380px; height: 380px; right: -60px; bottom: -210px; }
.orbit-2 { width: 540px; height: 540px; right: -140px; bottom: -290px; }
.node { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #4bd3c0; box-shadow: 0 0 0 4px rgba(75, 211, 192, 0.08); }
.node-1 { right: 72px; bottom: 96px; } .node-2 { right: 210px; bottom: 42px; opacity: .5; } .node-3 { right: 18px; bottom: 24px; opacity: .3; }
.auth-foot { margin-top: 22px; font-size: 9.5px; letter-spacing: 0.08em; color: rgba(157, 189, 199, 0.33); }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 44px clamp(28px, 5vw, 78px); background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fc 100%); position: relative; }
.auth-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 10%, rgba(255, 255, 255, 0.9), transparent 70%); pointer-events: none; }
.auth-panel-inner { position: relative; width: 100%; max-width: 390px; }
.auth-mobile-brand { display: none; align-items: center; gap: 11px; margin-bottom: 42px; }
.auth-mobile-brand > span:last-child { display: flex; flex-direction: column; }
.auth-mobile-brand strong { font-size: 17px; color: var(--ink); }
.auth-mobile-brand small { font-size: 9px; letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase; }
.auth-form-head .eyebrow { color: var(--primary); }
.auth-form-head h2 { margin-top: 14px; font-size: 30px; letter-spacing: -0.035em; font-weight: 650; }
.auth-form-head p { margin-top: 8px; font-size: 13px; color: var(--muted); }
.auth-notice { margin-top: 20px; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 9px; background: #fff8eb; border: 1px solid #f5e7ca; color: #8d5b16; font-size: 12px; }
.auth-notice .icon { width: 15px; height: 15px; }
.auth-form { margin-top: 27px; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); display: flex; align-items: center; gap: 4px; }
.field-label em { font-style: normal; color: var(--danger); font-weight: 700; }
.field-hint { font-size: 11px; color: var(--faint); line-height: 1.5; }
.field-error { color: var(--danger); font-size: 11px; }
.optional { color: var(--faint); font-weight: 400; font-size: 11px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 13px; width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.input-wrap input { width: 100%; padding-left: 39px; }
.input-wrap:has(.input-action) input { padding-right: 42px; }
.input-action { position: absolute; right: 5px; width: 32px; height: 32px; border: none; background: transparent; display: grid; place-items: center; color: var(--faint); border-radius: 6px; }
.input-action:hover { color: var(--ink-soft); background: #f4f7fb; }
.input-action .icon { width: 16px; height: 16px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff;
  padding: 10px 12px; font-size: 13px; color: var(--ink); outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}
input { height: 42px; }
textarea { resize: vertical; min-height: 84px; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #aeb9c8; }
input:hover, select:hover, textarea:hover { border-color: #c7d3e1; }
input:focus, select:focus, textarea:focus { border-color: #7ba5ec; box-shadow: 0 0 0 3px rgba(37, 103, 222, 0.1); }
input.is-invalid, select.is-invalid, textarea.is-invalid { border-color: #e28a8f; box-shadow: 0 0 0 3px rgba(215, 69, 77, 0.08); }
input:disabled, select:disabled, textarea:disabled { background: #f5f7fa; color: var(--faint); cursor: not-allowed; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238795a8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; height: 42px; }
.auth-submit { width: 100%; height: 45px; margin-top: 3px; justify-content: space-between; padding: 0 18px; border-radius: 10px; font-size: 13.5px; }
.auth-submit .icon { width: 17px; height: 17px; }
.demo-login-card { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding: 13px 14px; border-radius: 11px; background: linear-gradient(135deg, #fffaf0, #fff7e8); border: 1px solid #f2e4c8; }
.demo-login-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #fff; color: #b87c1f; border: 1px solid #f1e2c4; flex: none; }
.demo-login-icon .icon { width: 15px; height: 15px; }
.demo-login-card > div:nth-child(2) { min-width: 0; }
.demo-login-card strong { font-size: 11.5px; color: #78511c; display: block; }
.demo-login-card p { font-size: 10.5px; color: #a17e48; margin-top: 1px; }
.demo-login-card code { font-family: var(--font-mono); font-size: 10px; background: rgba(255,255,255,0.65); border: 1px solid #ecdec6; border-radius: 4px; padding: 1px 4px; color: #7c5a27; }
.demo-login-card .btn { margin-left: auto; flex: none; height: 29px; font-size: 11px; }
.auth-security { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 30px; font-size: 10.5px; color: #9aa7b8; text-align: center; }
.auth-security .icon { width: 13px; height: 13px; color: #9ab3c3; }
.auth-version { margin-top: 20px; text-align: center; font-size: 10px; color: #b5bfcc; }
.auth-version span { color: #c9d1db; }
.auth-form .form-alert { margin: 0; }
.form-alert { display: flex; align-items: flex-start; gap: 8px; margin: 13px 0; padding: 10px 12px; border-radius: 9px; font-size: 12px; line-height: 1.55; color: #a23a42; background: #fff3f4; border: 1px solid #f8dfe1; }
.form-alert[hidden] { display: none; }
.form-alert .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }

/* ---------- Shell / sidebar ---------- */
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; z-index: 60; inset: 0 auto 0 0; width: var(--sidebar-w);
  display: flex; flex-direction: column; color: #d9e6ef;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(30, 117, 121, 0.18), transparent 40%),
    radial-gradient(ellipse at 90% 100%, rgba(33, 82, 150, 0.13), transparent 48%),
    linear-gradient(180deg, #081522 0%, #091827 58%, #071320 100%);
  border-right: 1px solid rgba(166, 207, 220, 0.07);
}
.sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: radial-gradient(rgba(164, 219, 224, 0.09) 0.6px, transparent 0.6px);
  background-size: 15px 15px;
  mask-image: linear-gradient(180deg, #000, transparent 62%);
}
.sidebar-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 25px 21px 18px; }
.sidebar .brand-glyph { width: 37px; height: 37px; }
.sidebar .brand-copy strong { font-size: 16px; }
.mobile-close { display: none; border: none; background: transparent; color: rgba(255,255,255,0.6); width: 32px; height: 32px; border-radius: 8px; place-items: center; }
.control-context {
  position: relative; display: flex; align-items: center; gap: 9px; margin: 4px 15px 17px; padding: 10px 11px;
  border-radius: 11px; background: rgba(255,255,255,0.035); border: 1px solid rgba(158, 208, 215, 0.08);
}
.context-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: rgba(54, 199, 180, 0.09); color: #62d8c8; flex: none; }
.context-icon .icon { width: 15px; height: 15px; }
.control-context > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.control-context strong { font-size: 10.5px; font-weight: 600; color: rgba(232, 247, 248, 0.82); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.control-context small { font-size: 9px; color: rgba(183, 212, 220, 0.4); }
.control-context .live-dot { margin-left: auto; width: 5px; height: 5px; flex: none; }
.sidebar-nav { position: relative; flex: 1; overflow-y: auto; padding: 2px 12px 18px; scrollbar-width: none; }
.sidebar-nav::-webkit-scrollbar { display: none; }
.nav-group { margin-bottom: 22px; }
.nav-group-label { padding: 0 12px 7px; font-size: 9px; font-weight: 650; letter-spacing: 0.14em; color: rgba(180, 206, 218, 0.32); }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 10px; height: 40px; margin-bottom: 2px; padding: 0 11px;
  border-radius: 9px; font-size: 12.5px; font-weight: 500; color: rgba(198, 219, 228, 0.65);
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-link:hover { color: #f0fbfa; background: rgba(255,255,255,0.045); }
.nav-icon { width: 20px; display: grid; place-items: center; color: rgba(160, 199, 208, 0.55); }
.nav-icon .icon { width: 16.5px; height: 16.5px; }
.nav-link.is-active {
  color: #effffb;
  background: linear-gradient(90deg, rgba(32, 193, 173, 0.17), rgba(25, 91, 154, 0.09));
  box-shadow: inset 0 0 0 1px rgba(72, 215, 195, 0.11);
}
.nav-link.is-active::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 2px; border-radius: 0 2px 2px 0; background: #3cddc7; box-shadow: 0 0 12px rgba(60, 221, 199, 0.5); }
.nav-link.is-active .nav-icon { color: #55e3d1; }
.nav-badge { margin-left: auto; font-size: 8px; letter-spacing: 0.04em; color: rgba(148, 228, 218, 0.55); border: 1px solid rgba(117, 220, 207, 0.15); border-radius: 4px; padding: 1px 4px; }
.sidebar-foot { position: relative; padding: 11px 14px 16px; border-top: 1px solid rgba(175, 211, 223, 0.08); }
.sidebar-meta { display: flex; align-items: center; justify-content: space-between; padding: 1px 4px 11px; }
.sidebar .env-badge { height: 23px; font-size: 9.5px; background: rgba(255,255,255,0.035); border-color: rgba(158, 208, 215, 0.08); color: rgba(186, 215, 220, 0.56); }
.sidebar .env-demo { color: #dec083; border-color: rgba(225, 161, 59, 0.14); background: rgba(225, 161, 59, 0.06); }
.sidebar .env-local > span { background: #4fc8b2; }
.version { font-size: 9px; color: rgba(174, 203, 213, 0.28); letter-spacing: 0.05em; }
.sidebar-user { width: 100%; display: flex; align-items: center; gap: 9px; padding: 6px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #dbecef; text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,0.04); border-color: rgba(165, 211, 217, 0.07); }
.sidebar-user-copy { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; flex: 1; }
.sidebar-user-copy strong { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-copy small { font-size: 9px; color: rgba(178, 208, 216, 0.4); }
.sidebar-user-chevron { width: 14px; height: 14px; color: rgba(178, 208, 216, 0.36); }
.user-popover {
  position: absolute; z-index: 100; right: 0; top: calc(100% + 8px); width: 232px; padding: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-pop); color: var(--ink);
}
#user-popover { left: 14px; right: 14px; top: auto; bottom: 78px; width: auto; }
.user-popover[hidden] { display: none; }
.user-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; }
.user-popover-head > div { display: flex; flex-direction: column; min-width: 0; }
.user-popover-head strong { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-popover-head span:not(.badge) { font-size: 10px; color: var(--faint); }
.user-popover > button { display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: transparent; border-radius: 8px; padding: 9px 9px; font-size: 12px; color: var(--ink-soft); text-align: left; }
.user-popover > button:hover { background: var(--surface-muted); }
.user-popover > button .icon { width: 15px; height: 15px; color: var(--faint); }
.user-popover > button.danger-text .icon { color: currentColor; }
.sidebar-scrim { display: none; }
.main-shell { min-height: 100vh; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h); flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 30px;
  background: rgba(250, 252, 254, 0.83); border-bottom: 1px solid rgba(219, 229, 240, 0.8);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.mobile-menu { display: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; place-items: center; color: var(--muted); }
.breadcrumbs { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #8e9aab; white-space: nowrap; }
.breadcrumbs .icon { width: 11px; height: 11px; color: #b8c2cf; }
.breadcrumbs b { font-weight: 500; color: #7b889a; }
.breadcrumbs .crumb-sep { color: #c3ccd8; margin-left: 2px; }
.breadcrumbs strong { font-weight: 600; color: var(--ink); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; position: relative; flex: none; }
.topbar-refresh { border: 1px solid transparent; }
.topbar-divider { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
.topbar-user { display: flex; align-items: center; gap: 8px; border: none; background: transparent; padding: 3px 4px; border-radius: 9px; text-align: left; }
.topbar-user:hover { background: #f4f7fb; }
.topbar-user-copy { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.topbar-user-copy strong { font-size: 11.5px; font-weight: 600; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-copy small { font-size: 9px; color: var(--faint); }
.topbar-user > .icon { width: 13px; height: 13px; color: var(--faint); margin-left: 2px; }
.topbar .avatar { width: 31px; height: 31px; border-radius: 9px; font-size: 10px; }
.topbar-popover { right: 0; top: calc(100% + 9px); }

.page-content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 28px 30px 48px; flex: 1; }
.page-enter { animation: pageIn 0.36s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.page-heading h1 { margin-top: 7px; font-size: 27px; line-height: 1.25; font-weight: 650; letter-spacing: -0.035em; color: var(--ink); }
.page-heading p { margin-top: 7px; max-width: 710px; font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.heading-actions { display: flex; align-items: center; gap: 9px; flex: none; padding-bottom: 2px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 500; margin-bottom: 17px; transition: color 0.16s ease; }
.back-link:hover { color: var(--primary); }
.back-link .icon { width: 14px; height: 14px; }
.scope-indicator { display: inline-flex; align-items: center; gap: 7px; height: 33px; padding: 0 11px; border-radius: 8px; background: #f5f9fd; border: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.scope-indicator .icon { width: 14px; height: 14px; color: var(--success); }

/* ---------- Dashboard ---------- */
.dash-page { display: flex; flex-direction: column; gap: 19px; }
.dash-hero {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); color: #f2fbfa;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 30px; align-items: center;
  padding: 31px 34px; min-height: 218px;
  background:
    radial-gradient(ellipse at 88% 0%, rgba(33, 181, 162, 0.22), transparent 42%),
    radial-gradient(ellipse at 4% 110%, rgba(37, 91, 181, 0.28), transparent 43%),
    linear-gradient(125deg, #081725 0%, #0b2231 54%, #0a1b2a 100%);
  box-shadow: 0 30px 64px -44px rgba(7, 21, 34, 0.6);
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background-image: linear-gradient(rgba(131, 209, 204, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(131, 209, 204, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 47% 50%, #000 5%, transparent 72%);
}
.dash-hero::after {
  content: ""; position: absolute; width: 310px; height: 310px; right: -80px; top: -180px;
  border: 1px solid rgba(114, 224, 208, 0.08); border-radius: 50%; box-shadow: 0 0 0 55px rgba(114, 224, 208, 0.02), 0 0 0 108px rgba(114, 224, 208, 0.015);
}
.dash-hero-copy { position: relative; z-index: 2; min-width: 0; }
.dash-hero-copy h1 { margin-top: 13px; font-size: clamp(27px, 2.4vw, 34px); line-height: 1.25; font-weight: 650; letter-spacing: -0.035em; color: #f5fcfb; }
.dash-hero-copy h1 span { color: #7fe5d7; }
.dash-hero-copy > p { margin-top: 10px; max-width: 570px; font-size: 12.5px; line-height: 1.75; color: rgba(203, 224, 229, 0.58); }
.hero-actions { display: flex; align-items: center; gap: 9px; margin-top: 22px; }
.btn-hero-primary { height: 38px; padding: 0 15px; border-radius: 9px; background: #f0fbf9; border-color: #e4f7f4; color: #0b2f35; font-size: 12px; box-shadow: 0 10px 24px -15px rgba(0,0,0,.75); }
.btn-hero-primary:hover { background: #fff; box-shadow: 0 12px 28px -14px rgba(0,0,0,.8); transform: translateY(-1px); }
.btn-hero-ghost { height: 38px; padding: 0 14px; border-radius: 9px; background: rgba(255,255,255,0.045); border-color: rgba(178, 226, 224, 0.14); color: rgba(223, 245, 244, 0.74); font-size: 12px; }
.btn-hero-ghost:hover { background: rgba(255,255,255,0.075); color: #fff; }
.hero-status-card {
  position: relative; z-index: 2; padding: 17px; border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
  border: 1px solid rgba(170, 226, 222, 0.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
}
.hero-status-top { display: flex; align-items: center; gap: 12px; }
.radar { width: 43px; height: 43px; position: relative; display: grid; place-items: center; border-radius: 50%; color: #64dfd0; flex: none; }
.radar > i { position: absolute; border-radius: 50%; border: 1px solid rgba(91, 222, 205, 0.15); }
.radar > i:nth-child(1) { inset: 0; }
.radar > i:nth-child(2) { inset: -6px; opacity: 0.45; }
.radar > span { width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; background: rgba(52, 202, 182, 0.1); }
.radar .icon { width: 14px; height: 14px; }
.hero-status-top > div { display: flex; flex-direction: column; gap: 3px; }
.hero-status-top > div > span { font-size: 9.5px; color: rgba(183, 213, 219, 0.48); letter-spacing: 0.06em; }
.hero-status-top strong { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #eafaf7; font-weight: 600; }
.hero-status-top strong .live-dot { width: 5px; height: 5px; box-shadow: 0 0 0 3px rgba(37, 211, 184, 0.1); }
.hero-status-divider { height: 1px; background: linear-gradient(90deg, rgba(171, 226, 223, 0.1), transparent); margin: 14px 0 12px; }
.hero-status-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hero-status-meta > div { display: flex; flex-direction: column; gap: 3px; }
.hero-status-meta span { font-size: 9px; color: rgba(183, 213, 219, 0.4); }
.hero-status-meta strong { font-size: 15px; font-weight: 600; color: #dff8f3; letter-spacing: -0.02em; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stat-card {
  position: relative; padding: 18px 19px 16px; border-radius: 15px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm);
  animation: cardIn 0.42s var(--ease) both; animation-delay: calc(var(--stagger, 0) * 55ms);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.stat-top { display: flex; align-items: center; gap: 9px; }
.stat-icon { width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.stat-icon .icon { width: 16px; height: 16px; }
.tone-blue { background: #eef4ff; color: #2d68d2; }
.tone-teal { background: #e9f9f5; color: #159b7c; }
.tone-violet { background: #f3efff; color: #7350cf; }
.tone-amber { background: #fff7e8; color: #b77d1e; }
.tone-red { background: #fff1f1; color: #c9474e; }
.tone-cyan { background: #eaf8fc; color: #1287ac; }
.tone-slate { background: #f1f4f8; color: #63738a; }
.stat-label { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.stat-value { margin-top: 13px; font-size: 31px; line-height: 1; font-weight: 650; letter-spacing: -0.045em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-meta { margin-top: 9px; font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-columns { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(300px, 0.78fr); gap: 19px; align-items: start; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 19px; min-width: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-panel); overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 17px; }
.panel-head h2 { font-size: 14.5px; font-weight: 620; letter-spacing: -0.015em; }
.panel-head p { margin-top: 4px; font-size: 11px; color: var(--faint); line-height: 1.5; }
.panel-kicker { font-family: var(--font-mono); font-size: 9px; color: #a5b2c2; letter-spacing: 0.06em; margin-top: 2px; }
.panel-head.padded-head { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.compact-panel .panel-head { padding-bottom: 13px; }
.distribution { display: flex; align-items: center; gap: clamp(24px, 4vw, 50px); padding: 2px 28px 27px 25px; }
.donut-wrap { position: relative; flex: none; display: grid; place-items: center; padding: 6px; }
.donut { width: 154px; height: 154px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px dashed #e8eef6; }
.donut-hole { width: 106px; height: 106px; background: #fff; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 0 0 1px rgba(228, 237, 246, 0.7) inset; position: relative; z-index: 1; }
.donut-hole strong { font-size: 27px; font-weight: 650; letter-spacing: -0.04em; line-height: 1; }
.donut-hole span { margin-top: 5px; font-size: 9.5px; color: var(--faint); }
.legend { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.legend-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed #f0f4f9; }
.legend-row:last-child { border-bottom: none; }
.legend-label { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-soft); }
.legend-label > i { width: 7px; height: 7px; border-radius: 2px; flex: none; }
.legend-label .record-type { min-width: 41px; height: 21px; font-size: 9.5px; }
.legend-value { display: flex; align-items: baseline; gap: 7px; font-variant-numeric: tabular-nums; }
.legend-value strong { font-size: 12px; font-weight: 600; }
.legend-value small { font-size: 9.5px; color: var(--faint); min-width: 27px; text-align: right; }
.activity-list { padding: 0 22px 9px; }
.activity-item { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px dashed #eef3f8; }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.activity-icon .icon { width: 14px; height: 14px; }
.activity-copy { min-width: 0; flex: 1; }
.activity-headline { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 11.5px; color: var(--muted); }
.activity-headline strong { font-weight: 600; color: var(--ink-soft); }
.activity-headline > span { color: var(--ink-soft); }
.activity-copy p { margin-top: 3px; font-size: 10.5px; color: var(--faint); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.activity-item time { font-size: 9px; color: #aab5c3; flex: none; margin-top: 3px; white-space: nowrap; }
.mini-fail { font-size: 8.5px !important; color: #bf424b !important; background: #fff0f1; border-radius: 4px; padding: 1px 4px; }
.domain-mini-list { padding: 0 12px 12px; }
.domain-mini { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; transition: background 0.16s ease; }
.domain-mini + .domain-mini { margin-top: 2px; }
.domain-mini:hover { background: #f7faff; }
.domain-mini-icon { width: 31px; height: 31px; border-radius: 8px; background: #f1f5fb; display: grid; place-items: center; color: #6a7f9b; flex: none; }
.domain-mini-icon .icon { width: 15px; height: 15px; }
.domain-mini > div { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.domain-mini strong { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-mini small { font-size: 9.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-mini .badge { font-size: 9px; min-height: 20px; padding: 1px 6px; flex: none; }
.domain-mini-arrow { width: 13px; height: 13px; color: #bbc6d3; flex: none; }
.account-bars { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 13px; }
.account-bar-row { display: flex; flex-direction: column; gap: 6px; }
.account-bar-label { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); }
.account-dot { width: 6px; height: 6px; border-radius: 2px; background: #2d7be8; }
.account-bar-label span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-bar-label strong { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.account-bar-track { height: 5px; border-radius: 4px; background: #f0f4f9; overflow: hidden; }
.account-bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3c8df0, #1b64e8); }
.inline-empty { padding: 4px 22px 24px; font-size: 11px; color: var(--faint); }
.inline-empty a { color: var(--primary); font-weight: 500; }
.tip-card { display: flex; align-items: flex-start; gap: 11px; padding: 16px 17px; border-radius: var(--radius); background: linear-gradient(135deg, #f8fbff, #f4f8fd); border: 1px solid #e8eff8; }
.tip-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #eaf2fd; color: #4c78b4; flex: none; }
.tip-icon .icon { width: 14px; height: 14px; }
.tip-card strong { font-size: 10.5px; color: #43536a; font-weight: 600; }
.tip-card p { margin-top: 4px; font-size: 10px; line-height: 1.65; color: #8c9aab; }
.permission-panel .panel-head { align-items: center; }
.mini-shield { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #6880a0; background: #f2f6fb; }
.mini-shield .icon { width: 14px; height: 14px; }
.permission-grade { display: flex; gap: 10px; padding: 2px 22px 14px; }
.permission-grade-icon { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.permission-grade-icon.manage { background: #eef4ff; color: #2c65cf; }
.permission-grade-icon.read { background: #f4f1fc; color: #7a61ae; }
.permission-grade-icon .icon { width: 14px; height: 14px; }
.permission-grade strong { font-size: 11px; color: var(--ink-soft); font-weight: 600; }
.permission-grade p { margin-top: 2px; font-size: 10px; line-height: 1.6; color: var(--faint); }
.permission-note { border-top: 1px dashed #eef3f8; margin: 0 22px; padding: 11px 0 16px; font-size: 9.5px; color: #a0acbb; }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--line); overflow: hidden; margin-bottom: 19px; box-shadow: var(--shadow-sm); }
.summary-item { background: #fff; display: flex; align-items: center; gap: 12px; padding: 17px 19px; }
.summary-icon { width: 35px; height: 35px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.summary-icon .icon { width: 17px; height: 17px; }
.summary-item > div { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.summary-item > div > span { font-size: 10px; color: var(--faint); }
.summary-item strong { font-size: 19px; font-weight: 640; letter-spacing: -0.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.summary-item small { font-size: 9px; color: #a4afbd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Lists, tables, filters ---------- */
.list-panel { overflow: hidden; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fdfefe; }
.search-box { position: relative; display: flex; align-items: center; width: min(390px, 100%); }
.search-trigger { position: absolute; left: 5px; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center; border: none; background: transparent; color: #99a7b9; border-radius: 6px; }
.search-trigger:hover { color: var(--primary); background: #eef4fd; }
.search-trigger .icon { width: 15px; height: 15px; }
.search-decor { position: absolute; left: 12px; display: grid; place-items: center; color: #99a7b9; pointer-events: none; }
.search-decor .icon { width: 15px; height: 15px; }
.search-box input { height: 36px; padding-left: 36px; padding-right: 36px; border-radius: 8.5px; background: #f8fafd; border-color: #e5ecf4; font-size: 12px; }
.search-box input:focus { background: #fff; border-color: #9bbbf0; }
.search-clear { position: absolute; right: 7px; width: 24px; height: 24px; border-radius: 6px; border: none; background: transparent; color: var(--faint); display: grid; place-items: center; }
.search-clear .icon { width: 12px; height: 12px; }
.search-clear:hover { background: #eef3f9; color: var(--ink-soft); }
.toolbar-meta { display: flex; align-items: center; gap: 11px; flex: none; }
.count-pill { font-size: 10.5px; color: var(--muted); background: #f3f6fa; border: 1px solid #e9eff6; border-radius: 6px; padding: 3px 8px; font-variant-numeric: tabular-nums; }
.filter-hint { font-size: 10px; color: var(--primary); }
.filter-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.select-compact { width: auto; min-width: 113px; height: 34px; font-size: 11.5px; padding: 0 28px 0 10px; border-radius: 8px; background-color: #f8fafd; border-color: #e5ecf4; background-position: right 9px center; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
.data-table th {
  padding: 10px 18px; background: #fbfcfe; border-bottom: 1px solid var(--line);
  color: #93a0b2; font-size: 9.5px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap;
}
.data-table td { padding: 13px 18px; border-bottom: 1px solid #f0f4f9; color: var(--ink-soft); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.13s ease; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table .th-actions { text-align: right; }
.cell-actions { text-align: right; white-space: nowrap; }
.cell-actions .icon-btn { width: 30px; height: 30px; border-radius: 7px; margin-left: 1px; }
.cell-actions .icon-btn .icon { width: 15px; height: 15px; }
.domain-row { cursor: pointer; }
.domain-row:focus-visible { outline-offset: -2px; background: #f7faff; }
.domain-cell { display: flex; align-items: center; gap: 10px; min-width: 180px; }
.domain-icon { width: 33px; height: 33px; border-radius: 9px; background: #f0f5fc; color: #5f7ca1; border: 1px solid #e7eff8; display: grid; place-items: center; flex: none; }
.domain-icon .icon { width: 16px; height: 16px; }
.domain-cell > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.domain-cell strong { font-size: 12px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.domain-cell small { font-size: 9.5px; color: var(--faint); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.domain-cell.compact { gap: 9px; }
.domain-cell.compact .domain-icon { width: 30px; height: 30px; border-radius: 8px; }
.domain-cell a.table-link { color: var(--ink); }
.domain-cell a.table-link:hover { color: var(--primary); }
.table-link { color: var(--primary); font-weight: 500; }
.table-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.record-count { display: inline-flex; align-items: baseline; gap: 3px; }
.record-count strong { font-size: 13px; font-weight: 620; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.record-count small { font-size: 9px; color: var(--faint); }
.grant-count { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.grant-count .icon { width: 13px; height: 13px; color: #94a3b6; }
.sync-cell { display: flex; flex-direction: column; gap: 2px; }
.sync-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sync-ok { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: #9aaba7; }
.sync-ok i { width: 4px; height: 4px; border-radius: 50%; background: #8fc9b8; }
.sync-error { display: inline-flex; align-items: center; gap: 4px; color: #c5575d; font-size: 9px; max-width: 150px; }
.sync-error .icon { width: 11px; height: 11px; flex: none; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); background: #fdfefe; flex-wrap: wrap; }
.page-summary { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.page-controls { display: flex; align-items: center; gap: 3px; }
.page-btn { min-width: 27px; height: 27px; padding: 0 7px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; }
.page-btn:hover:not(:disabled) { background: #f1f5fa; color: var(--ink); }
.page-btn.is-active { background: #eef4ff; color: #1f63d5; border-color: #dce8fb; font-weight: 600; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.page-btn .icon { width: 12px; height: 12px; }
.page-gap { color: #bdc7d3; font-size: 10px; padding: 0 3px; }
.table-footnote { display: flex; align-items: center; gap: 6px; padding: 10px 18px; border-top: 1px solid var(--line); background: #fcfdff; font-size: 9.5px; color: #98a6b7; }
.table-footnote .icon { width: 12px; height: 12px; flex: none; }
.page-footnote { display: flex; align-items: flex-start; gap: 7px; margin-top: 17px; padding: 0 3px; font-size: 10px; color: #99a6b5; line-height: 1.6; }
.page-footnote .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; color: #aab7c5; }

/* ---------- Empty / loading / states ---------- */
.state-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 54px 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; }
.state-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #fff3f3; color: var(--danger); margin-bottom: 14px; }
.state-card h3 { font-size: 14px; font-weight: 600; }
.state-card p { max-width: 370px; margin: 6px 0 17px; font-size: 11.5px; color: var(--muted); }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 54px 24px 58px; }
.empty-visual { position: relative; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, #f2f7fd, #eaf1fa); color: #879ab1; margin-bottom: 17px; border: 1px solid #e6eef7; }
.empty-visual .icon { width: 24px; height: 24px; }
.empty-ring { position: absolute; inset: -7px; border: 1px dashed #edf2f8; border-radius: 21px; }
.empty-state h3 { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.empty-state p { max-width: 390px; margin: 6px 0 17px; font-size: 11.5px; color: var(--faint); line-height: 1.65; }
.empty-state .btn { margin-top: 1px; }
.page-loading { padding-top: 2px; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, #eef3f8 25%, #f6f9fc 37%, #eef3f8 63%); background-size: 400% 100%; animation: shimmer 1.35s ease infinite; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-title { width: 190px; height: 28px; }
.sk-sub { width: 330px; max-width: 70%; height: 12px; margin-top: 11px; }
.sk-line { height: 10px; width: 100%; }
.sk-line.short { width: 42%; }
.sk-number { height: 30px; width: 75px; margin: 14px 0 12px; }
.sk-block { height: 180px; margin-top: 17px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 27px; }
.skeleton-card { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.skeleton-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px; margin-top: 19px; }
.form-alert { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 9px; color: #aa3b43; background: #fff4f5; border: 1px solid #f8e1e3; font-size: 11.5px; line-height: 1.55; }
.form-alert .icon { width: 15px; height: 15px; margin-top: 1px; flex: none; }
.form-alert[hidden] { display: none; }
.inline-warning { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 17px; padding: 12px 15px; border-radius: 11px; color: #a2592a; background: #fff8ee; border: 1px solid #f4e6d2; font-size: 11px; }
.inline-warning > .icon { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.inline-warning > div { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inline-warning strong { font-size: 11.5px; }
.inline-warning span { color: #a97c53; overflow: hidden; text-overflow: ellipsis; }
.read-only-banner { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 17px; padding: 11px 14px; border-radius: 10px; background: #f8fafc; border: 1px solid var(--line); color: #77869a; font-size: 11px; line-height: 1.6; }
.read-only-banner .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: #8d9bad; }
.read-only-banner strong { color: var(--ink-soft); font-weight: 600; }

/* ---------- Domain detail ---------- */
.domain-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.domain-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.domain-hero-icon { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: #4f7298; background: linear-gradient(145deg, #f1f6fd, #e7eff9); border: 1px solid #e2ebf6; flex: none; }
.domain-hero-icon .icon { width: 23px; height: 23px; }
.domain-hero-copy { min-width: 0; }
.domain-title-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.domain-title-line h1 { font-size: 22px; font-weight: 650; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.domain-hero-copy > p { margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; font-size: 10.5px; color: var(--faint); }
.domain-hero-actions { display: flex; align-items: center; gap: 7px; flex: none; }
.domain-stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.domain-stat { display: flex; flex-direction: column; padding: 15px 20px; border-right: 1px solid var(--line); min-width: 0; }
.domain-stat:last-child { border-right: none; }
.domain-stat > span { font-size: 9.5px; color: var(--faint); }
.domain-stat strong { margin-top: 5px; font-size: 20px; font-weight: 640; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.domain-stat small { margin-top: 3px; font-size: 9px; color: #a1adbb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.domain-stat .domain-stat-time { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; margin-top: 8px; }
.detail-tabs { display: flex; align-items: center; gap: 2px; margin-top: 20px; border-bottom: 1px solid var(--line); }
.detail-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 14px; font-size: 12px; color: var(--faint); font-weight: 500; }
.detail-tab .icon { width: 15px; height: 15px; }
.detail-tab b { font-size: 9px; font-weight: 600; color: #9da9b8; background: #eef2f7; border-radius: 4px; padding: 1px 5px; }
.detail-tab:hover { color: var(--ink-soft); }
.detail-tab.is-active { color: var(--primary); }
.detail-tab.is-active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--primary); }
.detail-tab.is-active .icon { color: var(--primary); }
.detail-tab.is-active b { color: var(--primary); background: var(--primary-soft); }
.records-panel { margin-top: 16px; }
.records-toolbar { flex-wrap: wrap; }
.records-toolbar .search-box { width: min(330px, 100%); }
.record-table .rr-code { font-family: var(--font-mono); font-size: 11.5px; font-weight: 600; color: var(--ink); background: #f5f8fc; border: 1px solid #e9eff6; border-radius: 5px; padding: 2px 6px; }
.record-fqdn { display: block; margin-top: 3px; font-size: 9px; color: #a4b0be; font-family: var(--font-mono); max-width: 235px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-value-cell { display: flex; align-items: center; gap: 7px; min-width: 230px; max-width: 430px; }
.record-value { display: block; min-width: 0; flex: 1; font-family: var(--font-mono); font-size: 10.5px; color: #4b5c72; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.55; }
.copy-btn { flex: none; width: 24px; height: 24px; display: grid; place-items: center; border: none; background: transparent; color: #aeb9c7; border-radius: 5px; opacity: 0; transition: 0.14s ease; }
tr:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: var(--primary); background: #eef4fd; }
.copy-btn .icon { width: 12px; height: 12px; }
.priority-chip { flex: none; font-size: 8.5px; color: #ad5570; background: #fff3f6; border: 1px solid #f8e4ea; border-radius: 4px; padding: 1px 5px; }
.ttl-value { font-family: var(--font-mono); font-size: 10px; color: var(--muted); white-space: nowrap; }
.switch { position: relative; width: 34px; height: 20px; border-radius: 20px; border: none; background: #dfe6ef; padding: 0; transition: background 0.18s ease; flex: none; }
.switch > span { position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #fff; top: 3px; left: 3px; box-shadow: 0 1px 3px rgba(20, 32, 51, 0.18); transition: transform 0.18s var(--ease); }
.switch.is-on { background: #21b598; }
.switch.is-on > span { transform: translateX(14px); }
.switch:disabled { opacity: 0.5; cursor: wait; }
.access-layout { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(280px, .78fr); gap: 19px; margin-top: 16px; align-items: start; }
.access-side { display: flex; flex-direction: column; gap: 16px; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.user-cell > div { display: flex; flex-direction: column; gap: 2px; }
.user-cell strong { font-size: 11.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.user-cell small { font-size: 9.5px; color: var(--faint); }
.grant-table .select-compact { min-width: 95px; }
.self-tag { font-size: 8px; color: var(--primary); background: var(--primary-soft); border-radius: 4px; padding: 1px 4px; font-weight: 600; }
.scope-pill { display: inline-block; font-size: 10px; color: #4c5f78; background: #f3f6fa; border: 1px solid #e9eef5; border-radius: 5px; padding: 2px 6px; }
.scope-sub { display: block; font-size: 8.5px; color: #a1adbb; margin-top: 3px; }
.grant-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 330px; }
.grant-chip { display: inline-flex; align-items: center; gap: 5px; height: 23px; padding: 0 7px; border-radius: 5px; background: #f4f6fa; border: 1px solid #e9eef5; font-size: 10px; color: #596a80; white-space: nowrap; }
.grant-chip small { font-size: 8px; color: #98a5b5; border-left: 1px solid #dee6ef; padding-left: 5px; }
.grant-chip.is-manage { background: #eef4ff; border-color: #dfe9fb; color: #3264b5; }
.grant-chip.is-manage small { color: #6e92cc; border-left-color: #d7e5fa; }
.grant-more { font-size: 9px; color: var(--faint); background: #f5f7fa; border-radius: 4px; padding: 3px 5px; }
.page-footnote { display: flex; align-items: flex-start; gap: 6px; margin-top: 17px; font-size: 9.5px; color: #9aa7b6; line-height: 1.6; }
.page-footnote .icon { width: 12px; height: 12px; flex: none; margin-top: 1px; }

/* ---------- Forms and modals ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 14px; }
.field-full { grid-column: 1 / -1; }
.form-intro { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #f6f9fd; border: 1px solid #e9f0f8; color: #74859a; font-size: 10.5px; line-height: 1.6; }
.form-intro .icon { width: 14px; height: 14px; flex: none; margin-top: 1px; color: #8298b0; }
.form-intro-quiet { background: #fbfcfe; border-color: #eef3f8; color: #9aa7b7; }
.form-footnote { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 7px; color: #97a5b5; font-size: 9.5px; line-height: 1.6; padding-top: 2px; }
.form-footnote .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.password-generate-row { display: flex; gap: 8px; align-items: center; }
.password-generate-row .input-wrap { flex: 1; }
.password-generate-row .btn { flex: none; }
fieldset { border: none; padding: 0; margin: 0; }
.advanced-fields { border-top: 1px dashed #edf2f8; padding-top: 13px; }
.advanced-fields summary { font-size: 11px; color: var(--muted); cursor: pointer; user-select: none; }
.advanced-fields[open] summary { margin-bottom: 12px; }
.rr-input-wrap { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; overflow: hidden; transition: border-color 0.16s ease, box-shadow 0.16s ease; }
.rr-input-wrap:focus-within { border-color: #7ba5ec; box-shadow: 0 0 0 3px rgba(37, 103, 222, 0.1); }
.rr-input-wrap input { border: none; box-shadow: none; border-radius: 0; background: transparent; flex: 1; min-width: 0; }
.rr-input-wrap input:focus { box-shadow: none; }
.rr-suffix { padding: 0 12px; font-family: var(--font-mono); font-size: 9.5px; color: #9da9b8; white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis; }
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.type-option { display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px; border: 1px solid #e6edf5; background: #fbfcfe; border-radius: 8px; color: #7f8c9e; font-size: 10px; transition: 0.15s ease; }
.type-option .record-type { height: 20px; min-width: 35px; font-size: 9px; pointer-events: none; }
.type-option > span:not(.record-type) { display: none; }
.type-option:hover { border-color: #cbd9e9; background: #f7faff; }
.type-option.is-selected { border-color: #9dbcf0; background: #f2f7ff; box-shadow: 0 0 0 2px rgba(40, 106, 215, 0.07); }
.type-option.is-selected .record-type { box-shadow: 0 0 0 1px rgba(44, 98, 190, 0.12); }
.record-form { gap: 15px; }
.static-identity { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-bottom: 2px; }
.static-identity > div { display: flex; flex-direction: column; gap: 1px; }
.static-identity strong { font-size: 13px; }
.static-identity span:not(.avatar) { font-size: 10px; color: var(--faint); }
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(7, 18, 30, 0.54); backdrop-filter: blur(5px);
  opacity: 0; transition: opacity 0.18s ease; overflow-y: auto;
}
.modal-overlay.is-open { opacity: 1; }
.modal {
  position: relative; width: 100%; max-width: 600px; margin: auto; background: #fff; border-radius: 18px;
  box-shadow: 0 40px 100px -25px rgba(4, 15, 27, 0.5); border: 1px solid rgba(255,255,255,0.6);
  transform: translateY(8px) scale(0.985); opacity: 0; transition: transform 0.22s var(--ease), opacity 0.2s ease;
  display: flex; flex-direction: column; max-height: calc(100vh - 48px);
}
.modal-overlay.is-open .modal { transform: none; opacity: 1; }
.modal-sm { max-width: 455px; }
.modal-md { max-width: 610px; }
.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 21px 24px 16px; border-bottom: 1px solid var(--line); flex: none; }
.modal-head h2 { font-size: 17px; font-weight: 620; letter-spacing: -0.025em; }
.modal-head p { margin-top: 4px; font-size: 10.5px; color: var(--faint); }
.modal-close { width: 30px; height: 30px; border-radius: 7px; flex: none; margin-top: -2px; }
.modal-close .icon { width: 16px; height: 16px; }
.modal-body { padding: 19px 24px 22px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 24px; border-top: 1px solid var(--line); background: #fbfcfe; border-radius: 0 0 18px 18px; flex: none; flex-wrap: wrap; }
.modal-foot .modal-selection { margin-right: auto; font-size: 10.5px; color: var(--faint); }
.modal-foot .modal-selection strong { color: var(--ink-soft); font-weight: 600; }
.modal-foot-note { display: flex; align-items: center; gap: 5px; margin-right: auto; font-size: 9.5px; color: #9aa7b7; }
.modal-foot-note .icon { width: 13px; height: 13px; }
.modal-loading { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 44px 20px; color: var(--faint); font-size: 11px; }
.modal-loading.small { padding: 27px 20px; }
.modal-loading .spinner { width: 15px; height: 15px; color: #7e94b2; }
.inline-onboarding { display: flex; align-items: center; gap: 13px; padding: 16px; border-radius: 11px; border: 1px solid #e9f0f8; background: #f8fbff; }
.inline-onboarding-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #edf4fe; color: #4e7bb7; flex: none; }
.inline-onboarding > div { flex: 1; }
.inline-onboarding strong { font-size: 12px; }
.inline-onboarding p { margin-top: 2px; font-size: 10px; color: var(--faint); }
.inline-empty-block { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 28px 16px; font-size: 11px; color: #9ba8b7; text-align: center; }
.inline-empty-block .icon { width: 16px; height: 16px; color: #aab7c6; }
.inline-error { display: flex; align-items: flex-start; gap: 7px; padding: 16px; font-size: 11px; color: #ae4c53; background: #fff7f7; border-radius: 8px; }
.inline-error .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.inline-note { display: flex; align-items: center; gap: 7px; padding: 11px 12px; border-radius: 8px; background: #f7fafc; border: 1px solid var(--line); font-size: 10.5px; color: #8593a5; }
.inline-note .icon { width: 14px; height: 14px; color: #7eab9d; flex: none; }
.inline-note a { margin-left: auto; color: var(--primary); font-weight: 500; }
.confirm-content { display: flex; flex-direction: column; align-items: flex-start; }
.confirm-icon { width: 40px; height: 40px; border-radius: 11px; background: #f1f5fa; color: #6e829b; display: grid; place-items: center; margin-bottom: 13px; }
.confirm-icon.danger { background: #fff1f2; color: #ce4b52; }
.confirm-icon .icon { width: 19px; height: 19px; }
.confirm-message { font-size: 13px; color: var(--ink-soft); line-height: 1.65; }
.confirm-note { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #f7f9fc; border: 1px solid var(--line); font-size: 10.5px; color: #8390a1; line-height: 1.65; }
.confirm-note.warning-note { background: #fff9ef; border-color: #f2e6d4; color: #9a713d; }
.confirm-detail { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); min-width: 0; }
.confirm-detail code { font-family: var(--font-mono); font-size: 10.5px; color: #6f7d8f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.confirm-content .form-alert { width: 100%; }

/* ---------- Import ---------- */
.import-source { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 15px; }
.import-source .field { flex: 1; }
.source-tabs { display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 9px; background: #f3f6fa; border: 1px solid #e9eff6; flex: none; }
.source-tab { height: 29px; padding: 0 11px; border: none; border-radius: 6px; background: transparent; font-size: 10.5px; color: #8b99aa; }
.source-tab.is-active { background: #fff; color: var(--ink-soft); box-shadow: 0 1px 3px rgba(20,32,51,.08); font-weight: 500; }
.import-search { width: 100%; margin-bottom: 10px; }
.import-search input { background: #fff; }
.import-search .btn { position: absolute; right: 4px; height: 28px; padding: 0 10px; }
.import-search input { padding-right: 76px; }
.cloud-domain-list { max-height: 284px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; background: #fcfdff; }
.cloud-domain { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #f0f4f9; cursor: pointer; transition: background 0.13s ease; }
.cloud-domain:last-child { border-bottom: none; }
.cloud-domain:hover { background: #f8fbff; }
.cloud-domain.is-imported { cursor: default; opacity: 0.62; }
.cloud-domain input { position: absolute; opacity: 0; pointer-events: none; }
.check-box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #cdd8e5; display: grid; place-items: center; flex: none; color: transparent; background: #fff; transition: 0.14s ease; }
.check-box .icon { width: 11px; height: 11px; }
.cloud-domain input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.cloud-domain input:focus-visible + .check-box { outline: 2px solid rgba(27,100,232,.5); outline-offset: 2px; }
.cloud-domain-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cloud-domain-main strong { font-size: 11.5px; font-weight: 500; color: var(--ink-soft); font-family: var(--font-mono); }
.cloud-domain-main small { font-size: 9.5px; color: var(--faint); }
.cloud-domain .badge { font-size: 9px; min-height: 20px; }
.mini-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0 2px; font-size: 9.5px; color: var(--faint); }
.mini-pager .page-btn { width: 24px; min-width: 24px; height: 24px; }
.import-tip { display: flex; align-items: flex-start; gap: 7px; margin-top: 13px; font-size: 9.5px; line-height: 1.6; color: #95a2b2; }
.import-tip .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.grant-modal-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.grant-modal-summary > div { display: flex; flex-direction: column; gap: 2px; }
.grant-modal-summary span { font-size: 9.5px; color: var(--faint); }
.grant-modal-summary strong { font-size: 12px; font-weight: 600; }
.permission-pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; border-radius: 5px; padding: 0 7px; background: #f2f6fb; color: #7d8fa5; font-size: 9px !important; }
.permission-pill .icon { width: 12px; height: 12px; }
.grant-list { margin-top: 6px; max-height: 250px; overflow-y: auto; }
.grant-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px dashed #eef3f8; }
.grant-row:last-child { border-bottom: none; }
.grant-row .avatar { width: 30px; height: 30px; border-radius: 8px; font-size: 9.5px; }
.grant-row-main { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.grant-row-main strong { font-size: 11px; font-weight: 500; }
.grant-row-main small { font-size: 9px; color: var(--faint); }
.grant-row .select-compact { min-width: 88px; height: 29px; font-size: 10px; padding-left: 8px; }
.grant-row .icon-btn { width: 27px; height: 27px; }
.grant-row .icon-btn .icon { width: 13px; height: 13px; }
.grant-add-section { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.section-label { font-size: 9.5px; font-weight: 600; color: var(--faint); letter-spacing: 0.04em; margin-bottom: 8px; }
.grant-add-form { display: flex; gap: 6px; align-items: center; }
.grant-add-form select { flex: 1; height: 34px; font-size: 10.5px; padding: 0 28px 0 9px; min-width: 0; }
.grant-add-form select:nth-child(2) { flex: 0 0 85px; }
.grant-add-form .btn { flex: none; height: 34px; font-size: 10.5px; }
.type-picker + .field-hint { margin-top: 5px; }

/* ---------- Cloud accounts ---------- */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.account-card { position: relative; display: flex; flex-direction: column; padding: 20px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease; }
.account-card:hover { border-color: #d5e2f1; box-shadow: 0 16px 36px -30px rgba(20,32,51,.35); transform: translateY(-1px); }
.account-card.has-error { border-color: #f2dfe1; }
.account-card-head { display: flex; align-items: flex-start; gap: 10px; }
.account-logo { width: 37px; height: 37px; border-radius: 10px; background: #edf4ff; color: #356fd1; display: grid; place-items: center; flex: none; }
.account-logo .icon { width: 18px; height: 18px; }
.account-name { flex: 1; min-width: 0; }
.account-name > div { display: flex; align-items: center; gap: 7px; min-width: 0; }
.account-name strong { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-name small { display: block; margin-top: 2px; font-size: 9px; color: var(--faint); }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #30c5a5; box-shadow: 0 0 0 4px rgba(48,197,165,.1); margin-top: 7px; flex: none; }
.connection-dot.is-error { background: #dd6168; box-shadow: 0 0 0 4px rgba(221,97,104,.1); }
.account-desc { margin-top: 12px; font-size: 10.5px; line-height: 1.6; color: #8794a5; min-height: 17px; }
.credential-line { display: flex; align-items: center; gap: 7px; margin-top: 13px; padding: 7px 9px; border-radius: 7px; background: #f8fafc; border: 1px solid #eef3f8; font-size: 9px; color: #93a0b0; }
.credential-line .icon { width: 12px; height: 12px; color: #a5b1bf; }
.credential-line code { font-family: var(--font-mono); font-size: 9.5px; color: #64748b; margin-left: auto; }
.account-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 15px; padding: 12px 0; border-top: 1px solid #f0f4f9; border-bottom: 1px solid #f0f4f9; }
.account-metrics > div { display: flex; flex-direction: column; gap: 2px; padding-right: 8px; border-right: 1px dashed #edf2f8; min-width: 0; }
.account-metrics > div:last-child { border-right: none; padding-right: 0; }
.account-metrics strong { font-size: 18px; font-weight: 630; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-metrics span { font-size: 8.5px; color: var(--faint); }
.account-card > .account-metrics > div:nth-child(3) strong { font-size: 11px; font-weight: 500; margin-top: 5px; }
.account-error { display: flex; align-items: center; gap: 6px; margin-top: 11px; padding: 7px 9px; border-radius: 6px; background: #fff5f5; color: #b9555b; font-size: 9px; border: 1px solid #f8e6e7; }
.account-error .icon { width: 12px; height: 12px; flex: none; }
.account-error span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; }
.account-card-foot > div { display: flex; gap: 2px; }
.account-card-foot .btn { font-size: 10.5px; }
.info-banner { display: flex; align-items: flex-start; gap: 12px; margin-top: 19px; padding: 16px 18px; border: 1px solid #e7eef7; border-radius: var(--radius); background: linear-gradient(135deg, #fbfdff, #f6f9fd); }
.info-banner-icon { width: 31px; height: 31px; border-radius: 8px; background: #edf3fb; color: #6683a6; display: grid; place-items: center; flex: none; }
.info-banner-icon .icon { width: 15px; height: 15px; }
.info-banner strong { font-size: 11px; font-weight: 600; color: #4b5b71; }
.info-banner p { margin-top: 3px; font-size: 10px; line-height: 1.65; color: #8d9aab; }
.inline-details { margin-top: 7px; }
.inline-details summary { font-size: 9.5px; color: #6d86a3; cursor: pointer; width: fit-content; }
.inline-details[open] summary { margin-bottom: 7px; }
.policy-code { display: flex; flex-wrap: wrap; gap: 5px; }
.policy-code code { font-family: var(--font-mono); font-size: 8.5px; color: #6e8198; background: #fff; border: 1px solid #e5edf6; border-radius: 4px; padding: 2px 5px; }

/* ---------- Access / audit extras ---------- */
.audit-panel { overflow: hidden; }
.audit-toolbar { flex-wrap: wrap; }
.audit-meta-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 18px; border-bottom: 1px solid var(--line); font-size: 9.5px; color: var(--faint); background: #fcfdff; }
.audit-meta-row strong { color: var(--ink-soft); font-weight: 600; }
.audit-retention { display: inline-flex; align-items: center; gap: 4px; }
.audit-retention .icon { width: 11px; height: 11px; }
.audit-table td { font-size: 10.5px; padding-top: 11px; padding-bottom: 11px; }
.audit-table .failed-row { background: #fffbfb; }
.time-cell { display: flex; flex-direction: column; gap: 1px; white-space: nowrap; }
.time-cell strong { font-size: 10.5px; font-weight: 500; color: var(--ink-soft); }
.time-cell small { font-size: 8.5px; color: #a5b0be; }
.audit-user { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.audit-user .avatar-xs { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.action-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 5px; font-size: 9px; font-weight: 500; white-space: nowrap; }
.action-badge .icon { width: 11px; height: 11px; }
.action-auth { color: #6b7b91; background: #f2f5f9; }
.action-domain { color: #2d63b7; background: #eff5fe; }
.action-record { color: #0c8272; background: #ecfaf7; }
.action-grant { color: #7251b3; background: #f5f1fc; }
.action-account { color: #1b7b9c; background: #edf9fd; }
.action-user { color: #9a6c20; background: #fff8ec; }
.action-other { color: #6f7c8e; background: #f3f5f8; }
.audit-detail { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #738197; }
.ip-code { font-family: var(--font-mono); font-size: 9px; color: #8a98a9; background: #f7f9fc; border-radius: 4px; padding: 2px 5px; white-space: nowrap; }
.audit-panel .pagination { border-top: 1px solid var(--line); }

/* ---------- Misc state ---------- */
.fatal-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at 50% 30%, #fff, #f4f7fb); }
.fatal-card { width: min(470px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; padding: 38px; background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 32px 70px -50px rgba(20,32,51,.4); }
.fatal-icon { width: 54px; height: 54px; border-radius: 15px; background: #f2f6fb; color: #7a8da4; display: grid; place-items: center; margin-bottom: 17px; }
.fatal-icon .icon { width: 24px; height: 24px; }
.fatal-card h1 { margin-top: 11px; font-size: 20px; letter-spacing: -0.02em; }
.fatal-card p { margin: 8px 0 20px; font-size: 11.5px; color: var(--muted); }
.toast-root { position: fixed; z-index: 1100; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); box-shadow: 0 16px 38px -18px rgba(15, 34, 52, 0.32); animation: toastIn 0.25s var(--ease) both; pointer-events: auto; }
.toast.is-leaving { animation: toastOut 0.2s ease both; }
.toast-icon { width: 19px; height: 19px; flex: none; display: grid; place-items: center; border-radius: 50%; margin-top: 1px; }
.toast-icon .icon { width: 13px; height: 13px; }
.toast-success .toast-icon { color: #14926a; background: #e8f8f1; }
.toast-error .toast-icon { color: #c43e46; background: #fff0f1; }
.toast-warning .toast-icon { color: #b87716; background: #fff6e7; }
.toast-info .toast-icon { color: #2c6cc9; background: #edf4ff; }
.toast-copy { flex: 1; font-size: 11.5px; line-height: 1.55; color: var(--ink-soft); overflow-wrap: anywhere; }
.toast-close { flex: none; border: none; background: transparent; color: #aab5c3; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 4px; margin: -1px -2px 0 0; }
.toast-close:hover { background: #f3f6fa; color: var(--ink-soft); }
.toast-close .icon { width: 12px; height: 12px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(4px); } }
.sk-title, .sk-sub, .skeleton { pointer-events: none; }


/* ---------- Forced password change ---------- */
.force-page {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px; color: #eefaf8;
  background:
    radial-gradient(ellipse at 83% 8%, rgba(28, 178, 159, 0.22), transparent 42%),
    radial-gradient(ellipse at 8% 96%, rgba(31, 85, 173, 0.3), transparent 48%),
    linear-gradient(145deg, #07131f 0%, #0a1d2b 52%, #071522 100%);
}
.force-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.68;
  background-image: linear-gradient(rgba(117, 203, 199, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(117, 203, 199, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 4%, transparent 74%);
}
.force-orb { position: absolute; border-radius: 50%; pointer-events: none; }
.force-orb-a { width: 480px; height: 480px; right: -230px; top: -220px; border: 1px solid rgba(92, 222, 204, 0.08); box-shadow: 0 0 0 70px rgba(92, 222, 204, 0.018), 0 0 0 142px rgba(92, 222, 204, 0.012); }
.force-orb-b { width: 500px; height: 500px; left: -290px; bottom: -340px; background: radial-gradient(circle, rgba(38, 100, 197, 0.18), transparent 68%); }
.force-shell { position: relative; z-index: 2; width: min(500px, 100%); margin: auto; }
.force-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.force-logout { display: inline-flex; align-items: center; gap: 6px; height: 31px; padding: 0 10px; border-radius: 8px; border: 1px solid rgba(176, 223, 221, 0.13); background: rgba(255,255,255,0.035); color: rgba(220, 242, 241, 0.7); font-size: 10.5px; }
.force-logout:hover { background: rgba(255,255,255,0.075); color: #fff; }
.force-logout .icon { width: 13px; height: 13px; }
.force-card {
  position: relative; padding: 31px 32px 24px; color: var(--ink); border-radius: 22px;
  background: linear-gradient(180deg, #fff, #fcfdff);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.75);
}
.force-mark { position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 18px; color: #987026; background: linear-gradient(145deg, #fffaf0, #fff4df); border: 1px solid #f1e3c8; }
.force-mark .icon { width: 21px; height: 21px; }
.force-mark-ring { position: absolute; inset: -6px; border-radius: 18px; border: 1px dashed rgba(200, 153, 63, 0.22); }
.force-card .eyebrow { color: #b68124; font-size: 9px; }
.force-card h1 { margin-top: 10px; font-size: 26px; line-height: 1.28; letter-spacing: -0.035em; font-weight: 650; }
.force-lead { margin-top: 8px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.force-account { display: flex; align-items: center; gap: 10px; margin-top: 17px; padding: 10px 11px; border-radius: 11px; background: #f7f9fc; border: 1px solid #eaf0f6; }
.force-account > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.force-account strong { font-size: 11.5px; font-weight: 600; }
.force-account span:not(.avatar):not(.force-required) { font-size: 9.5px; color: var(--faint); }
.force-required { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 5px; color: #a66e16; background: #fff8ea; border: 1px solid #f2e2c7; font-size: 9px; font-weight: 600; white-space: nowrap; }
.force-required .icon { width: 11px; height: 11px; }
.force-form { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.force-form .form-alert { margin: 0; }
.force-form .field-label { font-size: 11.5px; }
.force-form input { height: 40px; font-size: 12.5px; background: #fcfdff; }
.force-form .field-hint { font-size: 9.5px; }
.force-submit { width: 100%; height: 43px; margin-top: 3px; justify-content: space-between; padding: 0 16px; border-radius: 10px; font-size: 12.5px; }
.force-submit .icon { width: 16px; height: 16px; }
.force-note { display: flex; align-items: flex-start; gap: 6px; margin-top: 15px; padding-top: 13px; border-top: 1px dashed #edf2f7; font-size: 9.5px; line-height: 1.6; color: #97a4b4; }
.force-note .icon { width: 12px; height: 12px; flex: none; margin-top: 1px; }
.force-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 18px; font-size: 9px; color: rgba(185, 215, 217, 0.4); letter-spacing: 0.02em; }
.force-foot .icon { width: 11px; height: 11px; }
.force-page .brand-copy small { color: rgba(183, 212, 229, 0.4); }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .page-content { padding-left: 26px; padding-right: 26px; }
  .topbar { padding-left: 26px; padding-right: 26px; }
  .dash-hero { grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; padding: 28px; }
  .auth-story { padding-left: 42px; padding-right: 42px; }
  .domain-cell small { max-width: 280px; }
  .audit-detail { max-width: 290px; }
}

@media (max-width: 1120px) {
  .dash-columns { grid-template-columns: 1fr; }
  .dash-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .dash-side .tip-card { grid-column: 1 / -1; }
  .account-grid { gap: 14px; }
  .access-layout { grid-template-columns: 1fr; }
  .access-side { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 28px; }
  .auth-page { grid-template-columns: minmax(0, 1fr) minmax(405px, 0.92fr); }
  .auth-copy h1 { font-size: 38px; }
  .auth-visual { min-height: 150px; }
  .dns-float-card { width: 94%; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-102%); transition: transform 0.26s var(--ease); width: 270px; box-shadow: 30px 0 80px -30px rgba(0,0,0,.4); }
  .sidebar.is-open { transform: translateX(0); }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: grid; }
  .mobile-close { display: grid; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(6,17,28,.45); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: 0.22s ease; }
  .sidebar-scrim.is-open { opacity: 1; visibility: visible; }
  .topbar { padding: 0 22px; }
  .page-content { padding: 24px 22px 44px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .auth-story { display: none; }
  .auth-page { display: block; min-height: 100vh; }
  .auth-panel { min-height: 100vh; padding: 38px 30px; }
  .auth-panel-inner { max-width: 410px; }
  .auth-mobile-brand { display: flex; }
  .auth-mobile-brand .brand-glyph { width: 36px; height: 36px; }
  .domain-hero { align-items: flex-start; }
  .domain-hero-actions { flex-wrap: wrap; justify-content: flex-end; }
  .dash-hero { grid-template-columns: minmax(0, 1fr) 290px; }
  .domain-cell small { max-width: 230px; }
}

@media (max-width: 840px) {
  .page-heading { flex-direction: column; align-items: flex-start; gap: 15px; }
  .heading-actions { width: 100%; flex-wrap: wrap; padding-bottom: 0; }
  .dash-hero { grid-template-columns: 1fr; gap: 22px; padding: 25px; }
  .hero-status-card { max-width: none; }
  .hero-status-top { gap: 11px; }
  .domain-hero { flex-direction: column; align-items: stretch; gap: 15px; }
  .domain-hero-actions { justify-content: flex-start; }
  .domain-stat-strip { grid-template-columns: 1fr 1fr; background: var(--line); gap: 1px; border: none; }
  .domain-stat { border-right: none; background: #fff; }
  .domain-stat:nth-child(1), .domain-stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .account-grid { grid-template-columns: 1fr; }
  .auth-form-head h2 { font-size: 27px; }
  .dash-side { grid-template-columns: 1fr; }
  .access-side { grid-template-columns: 1fr; }
  .topbar-user-copy { display: none; }
  .topbar-user > .icon { display: none; }
  .topbar .env-badge { display: none; }
  .domain-table { min-width: 760px; }
  .record-table { min-width: 720px; }
  .user-table { min-width: 700px; }
  .access-table { min-width: 790px; }
  .audit-table { min-width: 900px; }
  .audit-detail { max-width: 260px; }
}

@media (max-width: 640px) {
  :root { --topbar-h: 60px; }
  body { font-size: 13px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-actions { gap: 3px; }
  .topbar-divider, .topbar-refresh { display: none; }
  .breadcrumbs { gap: 5px; font-size: 10px; }
  .breadcrumbs b { display: none; }
  .breadcrumbs .crumb-sep { display: none; }
  .topbar .avatar { width: 29px; height: 29px; border-radius: 8px; }
  .page-content { padding: 19px 14px 38px; }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { font-size: 11.5px; line-height: 1.65; }
  .heading-actions .btn { flex: 1; min-width: 0; }
  .heading-actions .btn span { white-space: nowrap; }
  .dash-page { gap: 14px; }
  .dash-hero { border-radius: 18px; padding: 21px 19px; min-height: auto; }
  .dash-hero-copy h1 { font-size: 24px; }
  .dash-hero-copy > p { font-size: 11.5px; margin-top: 9px; line-height: 1.7; }
  .hero-actions { margin-top: 17px; flex-wrap: wrap; }
  .hero-actions .btn { flex: 1; font-size: 11px; }
  .hero-status-card { padding: 14px; }
  .hero-status-meta strong { font-size: 13px; }
  .radar { width: 36px; height: 36px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px 13px 12px; border-radius: 12px; }
  .stat-icon { width: 27px; height: 27px; border-radius: 7px; }
  .stat-icon .icon { width: 14px; height: 14px; }
  .stat-label { font-size: 10px; }
  .stat-value { font-size: 25px; margin-top: 11px; }
  .stat-meta { font-size: 9px; margin-top: 7px; }
  .dash-columns { gap: 14px; }
  .dash-main, .dash-side { gap: 14px; }
  .panel { border-radius: 15px; }
  .panel-head { padding: 16px 16px 13px; }
  .panel-head h2 { font-size: 13px; }
  .panel-head p { font-size: 10px; }
  .distribution { flex-direction: column; align-items: stretch; gap: 20px; padding: 2px 20px 22px; }
  .donut-wrap { align-self: center; }
  .donut { width: 140px; height: 140px; }
  .donut-hole { width: 96px; height: 96px; }
  .legend-row { padding: 6px 0; }
  .activity-list { padding: 0 16px 6px; }
  .activity-item { gap: 9px; }
  .activity-item time { font-size: 8px; }
  .activity-copy p { font-size: 9.5px; }
  .domain-mini-list { padding: 0 8px 9px; }
  .domain-mini { padding: 8px; }
  .domain-mini .badge { display: none; }
  .summary-strip { border-radius: 14px; margin-bottom: 14px; }
  .summary-item { padding: 13px 12px; gap: 9px; }
  .summary-icon { width: 30px; height: 30px; border-radius: 8px; }
  .summary-icon .icon { width: 15px; height: 15px; }
  .summary-item > div > span { font-size: 9px; }
  .summary-item strong { font-size: 17px; }
  .summary-item small { font-size: 8px; max-width: 125px; }
  .list-toolbar { padding: 11px 12px; flex-direction: column; align-items: stretch; gap: 9px; }
  .search-box { width: 100%; }
  .toolbar-meta { justify-content: space-between; }
  .filter-row { width: 100%; }
  .filter-row .select-compact { flex: 1; min-width: 0; }
  .filter-row .btn { flex: none; }
  .records-toolbar { flex-direction: column; align-items: stretch; }
  .records-toolbar .search-box { width: 100%; }
  .data-table th { padding: 9px 13px; font-size: 8.5px; }
  .data-table td { padding: 11px 13px; }
  .pagination { padding: 11px 12px; }
  .page-summary { width: 100%; }
  .empty-state { padding: 40px 20px 44px; }
  .empty-visual { width: 50px; height: 50px; border-radius: 14px; }
  .empty-state h3 { font-size: 13px; }
  .empty-state p { font-size: 10.5px; }
  .back-link { margin-bottom: 13px; }
  .domain-hero { padding: 15px; border-radius: 15px; }
  .domain-hero-icon { width: 40px; height: 40px; border-radius: 11px; }
  .domain-hero-icon .icon { width: 19px; height: 19px; }
  .domain-title-line h1 { font-size: 18px; }
  .domain-hero-copy > p { font-size: 9.5px; }
  .domain-hero-actions .btn { height: 33px; font-size: 10.5px; }
  .domain-stat { padding: 12px 14px; }
  .domain-stat strong { font-size: 17px; }
  .domain-stat .domain-stat-time { font-size: 12px; margin-top: 7px; }
  .detail-tabs { margin-top: 15px; }
  .detail-tab { padding: 0 11px; font-size: 11px; }
  .records-panel { margin-top: 12px; }
  .inline-warning { flex-wrap: wrap; padding: 11px 12px; }
  .inline-warning .btn { margin-left: 26px; }
  .read-only-banner { font-size: 10px; }
  .account-card { padding: 16px; border-radius: 15px; }
  .account-name strong { font-size: 12px; }
  .account-metrics { margin-top: 12px; }
  .credential-line { margin-top: 11px; }
  .info-banner { padding: 13px; gap: 9px; }
  .info-banner p { font-size: 9.5px; }
  .access-layout { gap: 14px; margin-top: 12px; }
  .grant-chips { max-width: 240px; }
  .page-footnote { font-size: 9px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field-full { grid-column: auto; }
  .form-intro, .form-footnote, .static-identity { grid-column: auto; }
  .type-picker { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .type-option { height: 33px; }
  .type-option .record-type { min-width: 32px; height: 19px; font-size: 8.5px; }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .modal { max-height: calc(100dvh - 20px); border-radius: 17px; }
  .modal-overlay.is-open .modal { transform: none; }
  .modal-head { padding: 17px 17px 13px; }
  .modal-head h2 { font-size: 15.5px; }
  .modal-body { padding: 16px 17px 18px; }
  .modal-foot { padding: 11px 17px; border-radius: 0 0 17px 17px; }
  .modal-foot .btn { flex: 1; }
  .modal-foot .modal-selection { width: 100%; margin: 0 0 4px; }
  .modal-foot-note { display: none; }
  .import-source { flex-direction: column; align-items: stretch; gap: 11px; }
  .source-tabs { width: 100%; }
  .source-tab { flex: 1; }
  .cloud-domain-list { max-height: 31vh; }
  .cloud-domain { padding: 9px; gap: 7px; }
  .cloud-domain-main strong { font-size: 10.5px; }
  .cloud-domain-main small { font-size: 8.5px; }
  .cloud-domain .badge { display: none; }
  .grant-add-form { flex-wrap: wrap; }
  .grant-add-form select { flex: 1 1 100%; }
  .grant-add-form select:nth-child(2) { flex: 0 0 100px; }
  .grant-add-form .btn { flex: 1; }
  .grant-list { max-height: 27vh; }
  .grant-row .select-compact { min-width: 78px; }
  .password-generate-row { flex-direction: column; align-items: stretch; }
  .password-generate-row .btn { align-self: flex-start; }
  .auth-page { min-height: 100dvh; }
  .auth-panel { min-height: 100dvh; padding: 26px 20px 30px; align-items: flex-start; padding-top: 36px; }
  .auth-panel-inner { max-width: 100%; }
  .auth-mobile-brand { margin-bottom: 32px; }
  .auth-form-head h2 { font-size: 26px; }
  .auth-form-head p { font-size: 12px; }
  .auth-form { margin-top: 23px; gap: 15px; }
  .auth-submit { height: 44px; }
  .demo-login-card { flex-wrap: wrap; }
  .demo-login-card .btn { margin-left: 42px; }
  .topbar-actions .env-badge { display: none; }
  .toast-root { right: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .toast { padding: 10px; }
  .page-loading .skeleton-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .skeleton-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .scope-indicator { height: 29px; font-size: 9.5px; }
  .audit-toolbar .filter-row .btn { width: 100%; }
  .audit-meta-row { padding: 8px 13px; }
  .audit-table { min-width: 860px; }
  .fatal-card { padding: 28px 22px; }
}

@media (max-width: 420px) {
  .stat-grid { gap: 8px; }
  .stat-card { padding: 12px 11px; }
  .stat-label { font-size: 9.5px; }
  .stat-value { font-size: 23px; }
  .hero-actions .btn { flex-basis: 100%; }
  .summary-item { padding: 12px 10px; gap: 7px; }
  .summary-icon { display: none; }
  .summary-item strong { font-size: 16px; }
  .type-picker { grid-template-columns: repeat(4, 1fr); }
  .type-option { padding: 0 2px; }
  .auth-panel { padding-left: 17px; padding-right: 17px; }
}

@media (max-width: 640px) {
  .force-page { padding: 20px 14px; align-items: flex-start; }
  .force-shell { margin-top: 4px; }
  .force-top { margin-bottom: 15px; }
  .force-logout span { display: none; }
  .force-logout { width: 34px; justify-content: center; padding: 0; height: 34px; }
  .force-card { padding: 24px 20px 20px; border-radius: 18px; }
  .force-card h1 { font-size: 22px; }
  .force-lead { font-size: 11px; }
  .force-mark { width: 43px; height: 43px; margin-bottom: 16px; }
  .force-account { margin-top: 15px; }
  .force-required { font-size: 8px; padding: 0 5px; }
  .force-form { margin-top: 16px; gap: 13px; }
  .force-submit { height: 42px; }
  .force-foot { text-align: center; line-height: 1.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Bulk domain actions ---------- */
.data-table th.check-col, .data-table td.check-col {
  width: 46px; min-width: 46px; padding-left: 18px; padding-right: 4px; text-align: left;
}
input[type="checkbox"].table-checkbox {
  appearance: auto; -webkit-appearance: checkbox; width: 15px; height: 15px; min-width: 15px;
  margin: 0; padding: 0; border: none; border-radius: 3px; background: transparent;
  box-shadow: none; accent-color: var(--primary); cursor: pointer; vertical-align: middle;
}
input[type="checkbox"].table-checkbox:focus { box-shadow: 0 0 0 3px rgba(37, 103, 222, 0.12); }
.data-table tbody tr.is-selected { background: #f5f9ff; }
.data-table tbody tr.is-selected:hover { background: #f0f6ff; }
.bulk-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 10px 18px; border-bottom: 1px solid #dfeaf8;
  background: linear-gradient(90deg, #f3f8ff, #f8fbff); color: #455f7f;
}
.bulk-count { display: flex; align-items: center; gap: 7px; font-size: 11px; white-space: nowrap; }
.bulk-count .icon { width: 15px; height: 15px; color: var(--primary); }
.bulk-count strong { color: var(--primary); font-size: 13px; font-weight: 650; margin: 0 1px; }
.bulk-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.bulk-actions .btn { height: 30px; padding: 0 10px; font-size: 10.5px; }
.bulk-actions .btn .icon { width: 13px; height: 13px; }
.bulk-actions .icon-btn { width: 30px; height: 30px; margin-left: 2px; }
.bulk-grant-domains { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 16px; }
.bulk-grant-domains span {
  font-family: var(--font-mono); font-size: 9.5px; color: #5b6e86; background: #f5f8fc;
  border: 1px solid #e6edf5; border-radius: 5px; padding: 3px 6px;
}
.bulk-result-summary { display: flex; align-items: center; gap: 18px; padding: 13px 15px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; }
.bulk-result-number { display: flex; flex-direction: column; gap: 1px; min-width: 64px; }
.bulk-result-number strong { font-size: 24px; line-height: 1.1; font-weight: 650; letter-spacing: -0.04em; color: var(--success); }
.bulk-result-number span { font-size: 9px; color: var(--faint); }
.bulk-result-number.is-failed strong { color: var(--danger); }
.bulk-result-total { margin-left: auto; font-size: 10px; color: var(--faint); white-space: nowrap; }
.bulk-result-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; max-height: 250px; overflow-y: auto; }
.bulk-result-row { display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border-radius: 7px; background: #fff8f8; border: 1px solid #f9e7e8; }
.bulk-result-status { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; flex: none; color: #c54b52; background: #fff0f1; }
.bulk-result-status .icon { width: 12px; height: 12px; }
.bulk-result-row > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.bulk-result-row strong { font-size: 10.5px; color: #6f4246; font-family: var(--font-mono); }
.bulk-result-row small { font-size: 9.5px; color: #a26d72; line-height: 1.5; overflow-wrap: anywhere; }

@media (max-width: 640px) {
  .data-table th.check-col, .data-table td.check-col { padding-left: 12px; width: 38px; min-width: 38px; }
  .bulk-bar { flex-direction: column; align-items: stretch; padding: 10px 12px; gap: 8px; }
  .bulk-actions { justify-content: flex-start; }
  .bulk-actions .btn { flex: 1; min-width: 0; height: 30px; font-size: 10px; }
  .bulk-actions .btn span { white-space: nowrap; }
  .bulk-actions .icon-btn { flex: none; }
  .bulk-result-summary { gap: 13px; padding: 11px; }
  .bulk-result-number strong { font-size: 21px; }
  .bulk-result-total { display: none; }
  .domain-table { min-width: 810px; }
}

/* ---------- TOTP / second factor ---------- */
.badge-warning { color: #9a6819; background: #fff8e9; border-color: #f3e4c6; }
.force-shell-narrow { width: min(470px, 100%); }
.force-shell-wide { width: min(760px, 100%); }
.totp-code-input {
  font-family: var(--font-mono); font-size: 19px; font-weight: 600; letter-spacing: 0.32em;
  text-align: center; height: 44px; padding-left: 20px; padding-right: 10px;
}
.force-form .totp-code-input { height: 44px; font-size: 19px; }
.totp-login-card .force-lead { max-width: 390px; }
.totp-enroll-host { margin-top: 18px; }
.totp-enroll { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 24px; align-items: start; }
.totp-qr-column { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.totp-qr-frame {
  padding: 10px; border: 1px solid #e6edf5; border-radius: 14px; background: #fff;
  box-shadow: 0 12px 30px -22px rgba(20, 32, 51, 0.35);
}
.totp-qr-frame img { width: 200px; height: 200px; display: block; border-radius: 5px; }
.totp-qr-caption { font-size: 9px; color: #9aa7b7; letter-spacing: 0.02em; text-align: center; }
.totp-enroll-main { min-width: 0; display: flex; flex-direction: column; gap: 9px; }
.totp-step { display: flex; align-items: flex-start; gap: 8px; font-size: 10.5px; line-height: 1.65; color: #79889a; }
.totp-step i {
  width: 18px; height: 18px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-style: normal; font-size: 8.5px; font-weight: 700; color: #3d6ca8; background: #eef5ff;
  border: 1px solid #e1ebfa; margin-top: 1px;
}
.totp-step strong { color: #4d637d; font-weight: 600; }
.totp-secret {
  display: flex; align-items: center; gap: 4px; padding: 7px 8px 7px 10px; margin: 1px 0 3px 26px;
  border-radius: 7px; border: 1px solid #e7edf5; background: #f8fafc;
}
.totp-secret code {
  flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 9.5px; color: #64758a;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: 0.02em;
}
.secret-copy {
  width: 24px; height: 24px; flex: none; border: none; border-radius: 5px; background: transparent;
  color: #98a6b6; display: grid; place-items: center;
}
.secret-copy:hover { color: var(--primary); background: #edf4fd; }
.secret-copy .icon { width: 13px; height: 13px; }
.totp-enable-form { margin-top: 2px; }
.totp-code-row { display: flex; align-items: center; gap: 7px; }
.totp-code-row .totp-code-input { flex: 1; min-width: 0; }
.totp-code-row .btn { height: 40px; flex: none; }
.totp-enable-form .field-hint { display: block; margin-top: 5px; font-size: 9px; }
.totp-enroll-tip { display: flex; align-items: flex-start; gap: 5px; margin-top: 2px; font-size: 9px; line-height: 1.6; color: #a0acbb; }
.totp-enroll-tip .icon { width: 11px; height: 11px; flex: none; margin-top: 1px; }
.totp-retry { text-align: center; margin-top: 11px; }
.totp-manager-host { margin-top: 15px; }
.totp-manager-host:empty { margin: 0; }
.mfa-status {
  display: flex; align-items: center; gap: 11px; padding: 13px; border-radius: 11px;
  border: 1px solid var(--line); background: #f9fbfd;
}
.mfa-status.is-enabled { border-color: #dcefe8; background: #f5fcf9; }
.mfa-status-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #15836e; background: #e9f8f3; flex: none; }
.mfa-status-icon.is-off { color: #8c9cb0; background: #f1f5f9; }
.mfa-status-icon .icon { width: 17px; height: 17px; }
.mfa-status > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mfa-status strong { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.mfa-status > div span { font-size: 9.5px; color: var(--faint); }
.mfa-description { margin-top: 12px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.mfa-enable-action { margin-top: 15px; }
.mfa-disable-form { margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); }
.mfa-disable-form .form-alert { grid-column: 1 / -1; margin: 0; }
.mfa-section-title { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.mfa-danger-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.mfa-danger-row > span { font-size: 9.5px; color: #a3afbd; }
.mfa-danger-row .btn { flex: none; }
.setting-check {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px;
  border: 1px solid #e6edf5; border-radius: 9px; background: #fbfcfe; cursor: pointer;
}
.setting-check:hover { border-color: #cfddeb; background: #f8fbff; }
.setting-check-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.setting-check-box {
  width: 17px; height: 17px; flex: none; border-radius: 5px; border: 1.5px solid #cdd8e5;
  background: #fff; display: grid; place-items: center; color: transparent; margin-top: 1px;
  transition: 0.15s ease;
}
.setting-check-box .icon { width: 11px; height: 11px; }
.setting-check-input:checked + .setting-check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.setting-check-input:focus-visible + .setting-check-box { outline: 2px solid rgba(27,100,232,.5); outline-offset: 2px; }
.setting-check-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setting-check-copy strong { font-size: 11px; font-weight: 600; color: var(--ink-soft); }
.setting-check-copy small { font-size: 9px; line-height: 1.55; color: #97a4b4; }
.user-table { min-width: 860px; }

@media (max-width: 840px) {
  .totp-enroll { grid-template-columns: 1fr; gap: 19px; }
  .totp-qr-column { align-items: flex-start; }
  .totp-qr-frame img { width: 180px; height: 180px; }
  .totp-enroll-main { gap: 10px; }
  .totp-secret { max-width: 100%; }
}

@media (max-width: 640px) {
  .force-shell-narrow, .force-shell-wide { width: 100%; }
  .totp-login-card .force-mark { margin-bottom: 15px; }
  .totp-code-input { font-size: 18px; height: 43px; }
  .force-form .totp-code-input { height: 43px; font-size: 18px; }
  .totp-enroll { gap: 16px; }
  .totp-qr-column { align-items: center; width: 100%; }
  .totp-qr-frame img { width: 172px; height: 172px; }
  .totp-secret { margin-left: 0; }
  .totp-code-row { flex-direction: column; align-items: stretch; }
  .totp-code-row .btn { width: 100%; }
  .mfa-status { align-items: flex-start; flex-wrap: wrap; }
  .mfa-status .badge { margin-left: 45px; }
  .mfa-danger-row { flex-direction: column; align-items: flex-start; }
  .mfa-danger-row .btn { width: 100%; }
  .setting-check { padding: 10px; }
  .user-table { min-width: 900px; }
}

/* ---------- Multi-provider positioning ---------- */
.auth-providers {
  margin-top: 22px; padding-top: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  border-top: 1px solid rgba(138, 215, 211, 0.12); font-size: 10.5px; color: rgba(203, 223, 229, 0.58);
}
.auth-providers-ready { display: inline-flex; align-items: center; gap: 6px; }
.auth-providers-ready i { width: 5px; height: 5px; border-radius: 50%; background: #4bd3c0; box-shadow: 0 0 0 3px rgba(75, 211, 192, 0.08); }
.auth-providers-ready strong { color: #9ceade; font-weight: 600; }
.auth-providers-upcoming { color: rgba(181, 209, 214, 0.4); font-size: 10px; letter-spacing: 0.01em; }

.provider-panel {
  margin-bottom: 19px; padding: 20px 21px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-panel);
}
.provider-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.provider-kicker { display: block; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.12em; color: var(--faint); text-transform: uppercase; }
.provider-panel-head h2 { margin-top: 5px; font-size: 16px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.provider-count {
  flex: none; display: inline-flex; align-items: center; height: 25px; padding: 0 9px; border-radius: 6px;
  background: var(--success-soft); color: var(--success); border: 1px solid rgba(21, 150, 106, 0.13);
  font-size: 10px; font-weight: 600; white-space: nowrap;
}
.provider-roadmap { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.provider-node {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted);
}
.provider-mark {
  width: 27px; height: 27px; flex: none; display: grid; place-items: center; border-radius: 8px;
  background: #edf2f8; border: 1px solid #e2e9f2; color: #8693a5;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 650; letter-spacing: 0.02em;
}
.provider-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.provider-copy strong { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.provider-copy small { margin-top: 2px; font-size: 9px; color: var(--faint); white-space: nowrap; }
.provider-node.is-ready { background: linear-gradient(135deg, #f4fcf9, #f8fbfa); border-color: rgba(22, 195, 174, 0.2); }
.provider-node.is-ready .provider-mark { color: var(--accent-deep); background: #e8f8f4; border-color: rgba(22, 195, 174, 0.16); }
.provider-node.is-ready .provider-copy strong { color: #176b5e; }
.provider-node.is-ready .provider-copy small { color: var(--accent-deep); font-weight: 600; }
.provider-note { margin-top: 13px; font-size: 10.5px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1120px) {
  .provider-roadmap { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .provider-panel { padding: 16px; }
  .provider-panel-head { gap: 12px; }
  .provider-panel-head h2 { font-size: 14px; }
  .provider-count { height: 23px; font-size: 9px; }
  .provider-roadmap { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .provider-node { padding: 8px; }
  .provider-mark { width: 25px; height: 25px; }
  .provider-copy strong { font-size: 10.5px; }
  .provider-note { font-size: 9.5px; }
  .auth-providers { gap: 7px 12px; }
  .auth-providers-upcoming { font-size: 9.5px; }
}

/* ---------- Domain groups & filters ---------- */
.list-filterbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fcfdff;
}
.list-filterbar .filter-row { flex: 1; min-width: 0; }
.list-filterbar .select-compact { background-color: #fff; }
.group-chip {
  display: inline-flex; align-items: center; gap: 5px; max-width: 150px; height: 25px;
  padding: 0 8px; border-radius: 7px; border: 1px solid #e5ecf4; background: #f7faff;
  color: #5b7089; font-size: 10.5px; font-weight: 500; line-height: 1;
}
button.group-chip { cursor: pointer; }
button.group-chip:hover { color: var(--primary); border-color: #cfe0f8; background: #f1f7ff; }
.group-chip .icon { width: 12px; height: 12px; flex: none; color: #8aa0b8; }
.group-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-chip.is-static { cursor: default; }
.group-unassigned { font-size: 10.5px; color: #a0acbb; white-space: nowrap; }
.group-manager { display: flex; flex-direction: column; gap: 17px; }
.group-manager-summary { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.group-manager-summary .icon { width: 15px; height: 15px; color: #7994ae; }
.group-manager-form { padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); }
.group-manager-form .form-grid { gap: 11px; }
.group-manager-form .form-alert { margin-bottom: 10px; }
.group-form-actions { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.group-manager-list-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 2px; }
.group-manager-list-title span { font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.group-manager-list-title small { font-size: 9.5px; color: var(--faint); }
.group-manager-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden auto; max-height: 290px; }
.group-manager-row { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-bottom: 1px solid #f0f4f9; background: #fff; }
.group-manager-row:last-child { border-bottom: none; }
.group-manager-mark { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; flex: none; color: #6e8bab; background: #f0f5fc; border: 1px solid #e7eff8; }
.group-manager-mark .icon { width: 14px; height: 14px; }
.group-manager-copy { display: flex; flex-direction: column; min-width: 0; flex: 1; gap: 2px; }
.group-manager-copy strong { font-size: 11.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-manager-copy small { font-size: 9.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-manager-count { flex: none; font-size: 9.5px; color: #93a2b5; white-space: nowrap; }
.group-manager-actions { display: flex; align-items: center; flex: none; }
.group-manager-empty { padding: 24px 16px; text-align: center; color: var(--faint); font-size: 11px; background: #fff; }
.group-manager-hint { display: flex; align-items: flex-start; gap: 6px; font-size: 9.5px; line-height: 1.6; color: #98a6b7; }
.group-manager-hint .icon { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.domain-title-line .group-chip { margin-left: 2px; }
@media (max-width: 840px) {
  .list-filterbar { flex-direction: column; align-items: stretch; gap: 8px; }
  .list-filterbar .filter-row { width: 100%; }
  .list-filterbar .filter-row .select-compact { flex: 1; min-width: 0; }
  .domain-table { min-width: 900px; }
}
@media (max-width: 640px) {
  .list-filterbar { padding: 9px 12px; }
  .group-manager-row { gap: 7px; padding: 9px 10px; }
  .group-manager-count { display: none; }
  .group-manager-list-title small { display: none; }
  .group-form-actions .btn { flex: 1; }
  .domain-table { min-width: 860px; }
}
