:root {
  --ink: #0c1c2d; --text: #1c2b3b; --ink-soft: #607585; --muted: #82939f;
  --mint: #62e0bf; --primary: #26b995; --primary-deep: #16856f;
  --line: #e2e9ef; --canvas: #f4f7fa; --surface: #fff;
  --shadow: 0 10px 30px rgba(18,42,64,.06); --radius: 14px;
  font: 14px/1.5 'Noto Sans SC', 'DM Sans', system-ui, sans-serif;
  color: var(--text); background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); font-weight: 400; }
.text-right { text-align: right !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Shared shell, using the spacing and palette of the DNS console. */
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: 236px; flex: 0 0 236px; height: 100vh; height: 100dvh; display: flex; flex-direction: column; color: #d1dce5; background: var(--ink); z-index: 30; transition: width .24s ease, flex-basis .24s ease; }
.sidebar-head { height: 91px; flex-shrink: 0; display: flex; align-items: center; padding: 0 22px; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; background: linear-gradient(135deg,#62e0bf,#4ec5c3); color: #092032; font: 800 18px 'DM Sans',sans-serif; box-shadow: 0 5px 13px rgba(98,224,191,.2); }
.brand strong { display: block; font-size: 17px; letter-spacing: .3px; color: #eaf4f8; }
.brand small { display: block; margin-top: 1px; font-size: 9px; letter-spacing: 1.5px; color: #8397a5; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 12px; scrollbar-width: thin; }
.nav { margin-bottom: 26px; }
.nav-label { padding: 0 12px 10px; font-size: 10px; font-weight: 700; color: #688093; letter-spacing: 1.5px; white-space: nowrap; }
.nav-link { height: 43px; display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 0 12px; border-radius: 9px; position: relative; color: #9db0be; font-size: 13px; white-space: nowrap; transition: color .18s, background .18s; }
.nav-link .icon { width: 18px; height: 18px; color: #83a0ad; transition: color .18s; }
.nav-link:hover { color: #e9f3f5; background: rgba(255,255,255,.06); }
.nav-link.active { color: #dffff7; background: rgba(98,224,191,.13); }
.nav-link.active .icon { color: var(--mint); }
.nav-link.active::before { content: ''; position: absolute; left: -12px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0; background: var(--mint); }
.sidebar-bottom { padding: 15px 22px 22px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-toggle, .logout { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; color: #9db0be; background: none; font-size: 12px; white-space: nowrap; }
.sidebar-toggle { width: 100%; height: 33px; margin: -3px 0 18px; }
.sidebar-toggle:hover, .logout:hover { color: #eaf4f8; }
.sidebar-toggle .icon { transition: transform .24s; }
.logout .icon { width: 16px; height: 16px; }
.side-status { display: flex; gap: 8px; align-items: center; margin-bottom: 13px; color: #76909c; font-size: 11px; white-space: nowrap; }
.side-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #56d4a6; box-shadow: 0 0 0 3px rgba(86,212,166,.12); }
.sidebar.is-collapsed { width: 76px; flex-basis: 76px; }
.sidebar.is-collapsed .sidebar-head { padding: 0 23px; }
.sidebar.is-collapsed .brand-copy, .sidebar.is-collapsed .nav-label, .sidebar.is-collapsed .nav-link span, .sidebar.is-collapsed .sidebar-bottom span { display: none; }
.sidebar.is-collapsed .nav { margin-bottom: 21px; }
.sidebar.is-collapsed .nav-link { justify-content: center; padding: 0; }
.sidebar.is-collapsed .sidebar-bottom { padding: 15px 0 22px; }
.sidebar.is-collapsed .sidebar-toggle, .sidebar.is-collapsed .side-status, .sidebar.is-collapsed .logout { justify-content: center; }
.sidebar.is-collapsed .sidebar-toggle .icon { transform: rotate(180deg); }
.main-wrap { min-width: 0; flex: 1; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; height: 73px; padding: 0 34px; background: #fff; border-bottom: 1px solid var(--line); }
.topbar-left, .top-actions { display: flex; align-items: center; gap: 12px; }
.breadcrumb { display: flex; align-items: center; gap: 11px; font-size: 12px; color: #91a0aa; }
.breadcrumb b { font-weight: 400; color: #c8d1d7; }
.breadcrumb strong { font-size: 13px; color: var(--ink); font-weight: 600; }
.icon-btn { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0; border: 0; border-radius: 8px; color: #607684; background: #f2f6f7; transition: background .16s, color .16s; }
.icon-btn:hover { background: #e8f0f1; color: var(--ink); }
.user-menu { display: flex; align-items: center; gap: 9px; border-radius: 9px; padding: 3px; }
.user-menu > .icon { color: #92a3ae; width: 14px; margin-left: 3px; }
.avatar { width: 33px; height: 33px; flex: 0 0 33px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #d4f5ed; color: #167a68; font: 700 13px 'DM Sans',sans-serif; }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta b { font-size: 12px; color: var(--ink); max-width: 130px; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: 10px; color: #8b9aa6; margin-top: 4px; }
.page { max-width: 1480px; padding: 34px; margin: 0 auto; animation: page-in .22s ease; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.page-heading h1 { margin: 0; font-size: 25px; letter-spacing: -.6px; color: var(--ink); font-weight: 700; }
.page-heading p { margin: 6px 0 0; font-size: 13px; color: #82919d; }
.heading-note { align-self: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.mobile-menu, .mobile-close, .sidebar-backdrop { display: none; }

/* Forms and panels. */
.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 1px solid transparent; border-radius: 9px; background: var(--mint); color: #062c2c; box-shadow: 0 4px 12px rgba(38,185,149,.16); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .16s, box-shadow .16s, transform .16s; }
.btn:not(:disabled):hover { background: #7ae8cb; transform: translateY(-1px); }
.btn-secondary { color: #294255; background: #eff4f6; box-shadow: none; }
.btn-secondary:not(:disabled):hover { background: #e4edf0; }
.btn-danger { color: #c74956; background: #fff0f1; box-shadow: none; }
.btn-danger:not(:disabled):hover { background: #ffe2e5; }
.btn-success { color: #178067; background: #e6f7f0; box-shadow: none; }
.btn-small { min-height: 33px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn .icon { width: 16px; height: 16px; }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 21px 16px; }
.card-title { margin: 0; color: var(--ink); font-size: 14px; font-weight: 700; }
.card-caption { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.card-body { padding: 0 21px 22px; }
.form-field + .form-field { margin-top: 18px; }
.field-label { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 600; color: #576b7e; }
.input, .select { display: block; width: 100%; min-width: 0; height: 41px; padding: 0 12px; outline: 0; border: 1px solid #d9e3ea; border-radius: 9px; color: var(--text); background: #fbfcfd; font-size: 12px; transition: border-color .18s, box-shadow .18s, background .18s; }
.input::placeholder { color: #9aa8b1; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(38,185,149,.12); background: #fff; }
.input.textarea { height: 80px; padding-top: 11px; resize: vertical; }
.form-actions { margin-top: 22px; display: flex; align-items: center; gap: 10px; }
.hint { font-size: 11px; line-height: 1.7; color: #8b9ca7; margin: 8px 0 0; }
.check { display: inline-flex; gap: 8px; align-items: center; color: #607585; font-size: 12px; }
input[type=checkbox] { width: 15px; height: 15px; flex: 0 0 15px; accent-color: var(--primary); }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid #d3efe7; border-radius: 9px; margin-bottom: 21px; background: #eef9f6; color: #397c6e; font-size: 12px; }
.notice .icon { width: 17px; height: 17px; margin-top: 1px; }
.notice p { margin: 0; line-height: 1.7; }
.flash { padding: 13px 16px; margin: 0 0 21px; border: 1px solid #d3efe7; border-radius: 9px; color: #267d68; background: #eef9f6; font-size: 13px; overflow-wrap: anywhere; }
.flash.error { background: #fff3f3; color: #b34650; border-color: #f3d7da; }
.text-button { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 0; background: none; border: 0; color: var(--primary-deep); font-size: 12px; font-weight: 600; white-space: nowrap; }
.text-button:hover { text-decoration: underline; }
.badge, .deployment-state, .cloud-badge { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 4px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; white-space: nowrap; background: #fff6e6; color: #a6782e; }
.badge::before, .deployment-state::before, .cloud-badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-active, .deployment-state.succeeded, .cloud-badge.connected { background: #e8f8f2; color: #279a78; }
.badge-disabled { background: #f1f4f5; color: #82929d; }
.deployment-state.failed { color: #c35c65; background: #fff0ef; }
.empty-state { padding: 48px 20px; text-align: center; color: #92a3ad; }
.empty-state > .icon { display: block; width: 43px; height: 43px; padding: 11px; border-radius: 12px; color: #6eb9ab; background: #eef5f5; margin: 0 auto 13px; }
.empty-state b { display: block; color: #7f939f; font-size: 13px; font-weight: 500; }
.empty-state p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; }
.empty-state .btn { margin-top: 17px; }

/* Statistics and data tables. */
.stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; margin-bottom: 24px; }
.stat { position: relative; overflow: hidden; padding: 19px 20px 17px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat::after { content: ''; position: absolute; width: 90px; height: 90px; border-radius: 50%; right: -35px; top: -36px; background: rgba(98,224,191,.11); }
.stat-label { font-size: 12px; color: #80919d; }
.stat-value { margin-top: 7px; color: var(--ink); font: 700 28px/1.5 'DM Sans',sans-serif; letter-spacing: -.5px; }
.stat-foot { margin-top: 6px; font-size: 11px; color: #8c9fa9; }
.stat-foot.positive { color: #36a886; }
.kpi-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.admin-kpi { background: #f8fbfc; border: 1px solid var(--line); border-radius: 9px; padding: 15px 17px; }
.admin-kpi b { display: block; font: 700 24px/1.4 'DM Sans',sans-serif; color: var(--ink); }
.admin-kpi span { display: block; font-size: 11px; color: #82919d; margin-top: 4px; }
.users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; }
.users-toolbar-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.user-search { position: relative; width: 255px; max-width: 100%; }
.user-search > .icon { position: absolute; width: 16px; height: 16px; left: 12px; top: 12px; color: #98a8b1; pointer-events: none; }
.user-search .input { padding-left: 35px; background: #fff; }
.user-filter { width: 124px; background: #fff; }
.users-toolbar-count { color: #8c9da7; font-size: 11px; white-space: nowrap; }
.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th { padding: 12px 16px; text-align: left; background: #fafcfd; border-top: 1px solid #edf1f3; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 500; color: #8c9ca7; white-space: nowrap; }
.data-table td { padding: 16px; border-bottom: 1px solid #edf1f3; vertical-align: middle; font-size: 12px; color: #455c6e; }
.data-table th:first-child, .data-table td:first-child { padding-left: 21px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 21px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafcfd; }
.user-cell { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.user-cell strong { display: block; font-weight: 600; font-size: 12px; color: var(--ink); overflow-wrap: anywhere; }
.user-cell small { display: block; margin-top: 4px; color: #93a2ac; font-size: 10px; }
.user-cell .avatar { width: 31px; height: 31px; flex-basis: 31px; font-size: 12px; border-radius: 9px; }
.role-badge { display: inline-flex; color: #7a8c98; background: #f0f4f6; border-radius: 5px; padding: 3px 7px; font-size: 11px; white-space: nowrap; }
.role-badge.admin { background: #eaf7f3; color: #298775; }
.user-note-cell { max-width: 170px; min-width: 55px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.date-cell { white-space: nowrap; color: #8c9da7 !important; font-family: 'DM Sans',sans-serif; font-size: 11px !important; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 6px; white-space: nowrap; }
.row-actions form { display: flex; margin: 0; }
.invite-code { display: inline-block; font: 600 12px 'DM Sans',monospace; padding: 5px 8px; background: #eff5f6; border-radius: 5px; color: #3b6570; max-width: 330px; overflow-wrap: anywhere; }

/* Account and cloud settings. */
.settings-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(270px,1fr); align-items: start; gap: 18px; }
.settings-side { display: grid; gap: 18px; }
.cloud-provider { padding: 22px; }
.cloud-provider-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.cloud-provider-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; color: #ca862a; background: #fff5e8; }
.cloud-provider-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.cloud-provider-heading h3 { margin: 0; font-size: 15px; color: var(--ink); }
.cloud-provider-heading p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.cloud-provider-heading .cloud-badge { margin-left: auto; }
.cloud-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 18px; }
.cloud-fields .form-field { margin: 0; }
.cloud-config-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 24px; }
.cloud-connection-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 23px; padding-top: 15px; border-top: 1px solid var(--line); }
.cloud-connection-footer p { color: var(--muted); font-size: 11px; margin: 0; }
.cloud-connection-footer > div { display: flex; gap: 16px; align-items: center; }
.cloud-other-providers { display: grid; gap: 16px; }
.cloud-other-providers > div { display: flex; justify-content: space-between; align-items: center; }
.cloud-other-providers strong { font-size: 12px; font-weight: 500; color: #506779; }
.cloud-other-providers span { font-size: 11px; color: #94a1ab; }
.detail-list { margin: 0; }
.detail-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid #edf1f3; font-size: 12px; }
.detail-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list dt { color: #82939f; }
.detail-list dd { margin: 0; color: #4e6778; text-align: right; font-size: 11px; }
.side-description { color: #82939f; font-size: 12px; line-height: 1.9; margin: 0; }
.profile-identity { display: flex; align-items: center; gap: 13px; padding: 5px 0 20px; border-bottom: 1px solid #edf1f3; }
.profile-identity .avatar { width: 45px; height: 45px; flex-basis: 45px; border-radius: 12px; font-size: 18px; }
.profile-identity strong { display: block; font-size: 14px; color: var(--ink); }
.profile-identity small { display: block; margin-top: 5px; font-size: 11px; color: var(--muted); }

/* Website publishing. */
.deployment-workspace { display: grid; grid-template-columns: minmax(320px,.85fr) minmax(0,1.35fr); align-items: start; gap: 18px; }
.type-switch { display: flex; padding: 4px; border: 1px solid #e7eef0; border-radius: 9px; background: #f3f7f8; }
.type-switch label { flex: 1; position: relative; text-align: center; cursor: pointer; }
.type-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.type-switch span { display: block; padding: 7px 10px; border-radius: 6px; color: #81949f; font-size: 12px; transition: background .18s, color .18s, box-shadow .18s; }
.type-switch input:checked + span { background: #fff; box-shadow: 0 2px 5px rgba(18,42,64,.06); color: #285e55; font-weight: 600; }
.type-switch input:focus-visible + span { outline: 2px solid var(--primary); }
.upload-zone { position: relative; margin-top: 19px; border: 1px dashed #c9ddd9; border-radius: 10px; background: #f9fcfb; transition: background .18s, border-color .18s; }
.upload-zone:hover, .upload-zone.is-dragging { background: #effaf6; border-color: var(--primary); }
.upload-zone:focus-within { outline: 2px solid var(--primary); outline-offset: 3px; }
.upload-picker { min-height: 150px; padding: 22px 14px; display: flex; flex-direction: column; align-items: center; text-align: center; cursor: pointer; }
.upload-picker > .icon { width: 35px; height: 35px; padding: 8px; margin-bottom: 11px; color: #409b86; background: #e7f5ef; border-radius: 10px; }
.upload-picker strong { color: #4d7168; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; max-width: 100%; }
.upload-picker small { margin-top: 7px; color: #92a59e; font-size: 11px; }
.upload-help { margin-top: 9px; font-size: 10px; color: #94a1ab; }
#source-url { margin-top: 19px; }
.publish-note { margin: 20px 0 0; font-size: 11px; line-height: 1.7; color: #8c9da7; }
#publish-button { width: 100%; }
.link-settings-fields { margin-top: 22px; padding-top: 22px; border-top: 1px solid #edf1f3; }
.field-optional { margin-left: 6px; color: #91a0aa; font-size: 10px; font-weight: 400; }
.deployment-details { margin: 14px 0 0; display: grid; gap: 9px; font-size: 12px; line-height: 1.7; }
.deployment-details:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.deployment-details > div { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 10px; }
.deployment-details dt { color: #8c9da7; font-size: 11px; }
.deployment-details dd { margin: 0; color: #57717e; white-space: pre-wrap; overflow-wrap: anywhere; }
.deployment-actions { display: flex; align-items: center; gap: 20px; }
.deployment-actions .text-button { font-size: 11px; }
.title-update-status { margin: 12px 0 0; font-size: 12px; line-height: 1.7; color: #398b77; overflow-wrap: anywhere; }
.title-update-status.has-error { color: #ba5761; }
.link-settings-dialog .dialog-head p { overflow-wrap: anywhere; }
.link-settings-dialog .textarea { min-height: 108px; }
.edit-content-summary { margin-bottom: 22px; padding: 13px; background: #f5f8fa; border-radius: 8px; }
.edit-content-summary a { display: block; font-size: 12px; overflow-wrap: anywhere; }
.edit-content-summary .hint { margin-bottom: 0; }
.content-file-input { height: auto; padding: 10px; font-size: 12px; }
.deployment-list { max-height: 720px; overflow-y: auto; border-radius: 0 0 var(--radius) var(--radius); }
.deployment-record { padding: 21px; border-top: 1px solid #edf1f3; }
.deployment-record-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.deployment-record-heading > div { min-width: 0; }
.deployment-record h3 { margin: 0; color: var(--ink); font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.deployment-record-heading p { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0 0; font-size: 10px; color: #8c9da7; }
.deployment-url { display: flex; align-items: center; gap: 13px; padding: 10px 12px; margin-top: 17px; border: 1px solid #e4eeec; border-radius: 8px; background: #f8fbfa; }
.deployment-url a { min-width: 0; flex: 1; overflow-wrap: anywhere; color: #387e70; font: 12px/1.7 'DM Sans',monospace; }
.deployment-url a:hover { text-decoration: underline; }
.deployment-url > span { color: #8c9da7; font-size: 12px; }
.deployment-url button { font-size: 11px; }
.deployment-record-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 11px; color: #94a1ab; }
.delete-button { font-size: 11px; color: #b57d83; font-weight: 400; }
.delete-button:hover { color: #c74956; }
.deployment-error { color: #ba5761; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }

/* Dialogs and feedback. */
.user-dialog { width: min(500px,calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 0; border-radius: 15px; color: var(--text); background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.26); }
.user-dialog[open] { animation: dialog-in .2s ease; }
.user-dialog::backdrop { background: rgba(8,24,38,.56); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; padding: 21px 23px 17px; border-bottom: 1px solid #edf1f3; }
.dialog-head h2 { margin: 0; color: var(--ink); font-size: 17px; font-weight: 600; }
.dialog-head p { margin: 5px 0 0; font-size: 12px; color: #92a0aa; }
.dialog-close { width: 28px; height: 28px; background: none; color: #8fa0ac; }
.dialog-body { padding: 22px 23px; }
.dialog-body > p { color: #637888; line-height: 1.8; font-size: 13px; margin: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 23px 20px; border-top: 1px solid #edf1f3; }
.permission-fieldset { border: 0; padding: 0; margin: 23px 0 0; min-width: 0; }
.permission-options { display: grid; gap: 9px; }
.permission-option { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid #e3ecec; border-radius: 8px; background: #fcfdfd; cursor: pointer; }
.permission-option:has(input:checked) { border-color: #a9decd; background: #f4fbf8; }
.permission-option strong { display: block; color: #506b79; font-size: 12px; font-weight: 500; }
.permission-option small { display: block; margin-top: 4px; color: #93a4ad; font-size: 11px; }
.toast-root { position: fixed; top: 18px; right: 18px; max-width: calc(100vw - 36px); z-index: 100; pointer-events: none; }
.toast { background: #152f42; color: #e8f6f5; border-left: 3px solid var(--mint); border-radius: 9px; padding: 12px 16px; margin-bottom: 9px; min-width: 210px; box-shadow: 0 10px 26px rgba(7,29,45,.2); font-size: 12px; animation: page-in .2s ease; }

/* Login mirrors the reference site's centered card. */
.auth-screen { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: #0b1a2a; padding: 50px 16px 75px; }
.auth-screen::before, .auth-screen::after { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle,#1e5567,rgba(20,66,80,.2) 52%,transparent 72%); }
.auth-screen::before { top: -190px; right: -170px; }
.auth-screen::after { bottom: -260px; left: -200px; opacity: .6; }
.auth-card { position: relative; z-index: 1; width: 430px; max-width: 100%; background: #fff; border-radius: 22px; padding: 38px 40px 30px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.brand-auth { margin-bottom: 36px; }
.brand-auth strong { color: var(--ink); }
.brand-auth small { color: var(--muted); letter-spacing: .7px; }
.auth-copy h1 { color: var(--ink); font-size: 26px; margin: 0 0 8px; letter-spacing: -.6px; }
.auth-copy p { color: var(--muted); font-size: 13px; margin: 0 0 26px; }
.auth-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 23px; }
.auth-tabs a { position: relative; padding-bottom: 11px; color: var(--muted); font-size: 13px; font-weight: 500; }
.auth-tabs .active { color: var(--ink); }
.auth-tabs .active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; }
.auth-form .input { height: 45px; }
.auth-form .btn { margin-top: 24px; min-height: 46px; }
.auth-hint { margin: 22px 0 0; text-align: center; font-size: 10px; color: #a3afb9; }
.auth-foot { position: absolute; bottom: 24px; font-size: 11px; color: #6d8491; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@media(max-width:1180px) {
  .page { padding: 28px 22px; }
  .topbar { padding: 0 22px; }
  .deployment-workspace { grid-template-columns: minmax(290px,1fr) minmax(0,1.2fr); }
  .settings-grid { grid-template-columns: minmax(0,1fr) 285px; }
  .cloud-fields { grid-template-columns: 1fr; }
  .row-actions .btn { padding: 0 9px; }
}
@media(max-width:1020px) {
  .settings-grid, .deployment-workspace { grid-template-columns: minmax(0,1fr); }
  .cloud-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-side { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .user-table { min-width: 800px; }
}
@media(max-width:760px) {
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 236px; transform: translateX(-100%); visibility: hidden; transition: transform .24s ease, visibility .24s; box-shadow: 10px 0 30px rgba(0,0,0,.15); }
  .sidebar.is-open { transform: translateX(0); visibility: visible; }
  .sidebar-head { padding-right: 45px; }
  .sidebar-toggle { display: none; }
  .mobile-close { display: inline-flex; position: absolute; right: 11px; top: 27px; background: transparent; color: #b2c2cb; }
  .mobile-menu { display: inline-flex; }
  .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 25; border: 0; background: rgba(8,24,38,.45); }
  body.menu-open { overflow: hidden; }
  .topbar { height: 64px; padding: 0 15px; }
  .topbar-left, .top-actions { gap: 9px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb strong { font-size: 12px; }
  .user-meta, .user-menu > .icon { display: none; }
  .page { padding: 24px 15px; }
  .page-heading { margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
  .page-heading h1 { font-size: 23px; }
  .page-heading p { font-size: 12px; line-height: 1.8; }
  .page-heading .btn { min-height: 38px; font-size: 12px; padding: 0 13px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
  .stat { padding: 15px; }
  .stat-value { font-size: 25px; }
  .stat-foot { font-size: 10px; }
  .stat-label { font-size: 11px; }
  .kpi-row { gap: 9px; }
  .admin-kpi { padding: 12px; }
  .admin-kpi b { font-size: 22px; }
  .admin-kpi span { font-size: 10px; }
  .settings-side, .cloud-fields { grid-template-columns: 1fr; }
  .card-header { padding: 18px 17px 15px; }
  .card-body { padding: 0 17px 20px; }
  .cloud-provider { padding: 19px 17px; }
  .cloud-provider-heading { gap: 9px; flex-wrap: wrap; }
  .cloud-provider-heading > div { flex: 1; min-width: 145px; }
  .cloud-provider-heading h3 { font-size: 14px; }
  .cloud-provider-heading p { font-size: 10px; }
  .cloud-connection-footer { align-items: flex-start; flex-direction: column; }
  .users-toolbar { flex-wrap: wrap; padding: 14px 16px; gap: 10px; }
  .users-toolbar-left { width: 100%; }
  .user-search { flex: 1; width: auto; }
  .user-filter { width: 105px; }
  .users-toolbar-count { margin-left: auto; }
  .deployment-record { padding: 19px 17px; }
  .deployment-record-heading { flex-wrap: wrap; }
  .deployment-record-heading > div { flex: 1; min-width: 150px; }
  .deployment-state { font-size: 10px; }
  .deployment-url { gap: 10px; padding: 10px; }
  .deployment-url a { font-size: 11px; }
  .deployment-list { max-height: none; }
  .dialog-head { padding: 19px 19px 15px; }
  .dialog-body { padding: 20px 19px; }
  .dialog-actions { padding: 15px 19px 18px; }
  .auth-card { padding: 30px 25px; }
}
@media(prefers-reduced-motion:reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
