
:root {
  font-family: "Leelawadee UI", "Noto Sans Thai", Tahoma, Arial, sans-serif;
  font-size: 18px; line-height: 1.65; font-synthesis: none; color: #193247; background: #f3f6f8;
  --navy: #152e40; --teal: #087579; --muted: #526678; --border: #d4dfe7; --surface: #fff;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, a, input, summary { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled { opacity: .6; cursor: not-allowed; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.5; overflow-wrap: anywhere; }
h1 { font-size: 34px; font-weight: 750; }
h2 { font-size: 28px; font-weight: 700; }
h3 { font-size: 24px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #087e82; outline-offset: 4px; }
.muted, .field-help, .form-footnote { color: var(--muted); }
p.muted { margin-top: 10px; }
label { display: block; font-size: 18px; font-weight: 650; margin: 22px 0 8px; }
input:not([type=checkbox]) { width: 100%; min-width: 0; min-height: 54px; border: 1px solid #9eb2c1; border-radius: 9px; background: #fff; padding: 11px 14px; color: #193247; font-size: 18px; }
input::placeholder { color: #64788a; opacity: 1; }
input:not([type=checkbox]):focus { border-color: var(--teal); box-shadow: 0 0 0 3px #08757920; outline: none; }
input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--teal); flex: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 11px 18px; border: 1px solid transparent; border-radius: 9px; font-size: 18px; font-weight: 650; line-height: 1.6; text-decoration: none; text-align: center; white-space: normal; }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: #075f63; }
.button.secondary { background: #fff; border-color: #a9bcc9; color: #2b4b61; }
.button.secondary:hover { background: #edf4f7; border-color: #7896a9; }
.button.danger { background: #a82f33; color: #fff; }
.button.danger:hover { background: #8d2428; }
.button.danger-outline { border-color: #d6b0b0; background: #fff; color: #a12f35; }
.button.danger-outline:hover { background: #fff0ef; border-color: #b5676b; }
.button.small { min-height: 48px; padding: 8px 14px; }
.button.full { width: 100%; }
.text-button { min-height: 48px; padding: 10px 12px; background: none; border: 0; border-radius: 8px; color: #076b70; font-size: 18px; font-weight: 650; }
.text-button:hover { background: #eaf4f4; }
.text-button.full { width: 100%; margin-top: 14px; }
.button-row, .details-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.field-help, .form-footnote { font-size: 16px; line-height: 1.75; margin-top: 10px; overflow-wrap: anywhere; }
.eyebrow { display: block; font-size: 16px; font-weight: 650; line-height: 1.6; color: var(--teal); margin-bottom: 8px; }
.notice { padding: 16px 18px; border-radius: 9px; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.notice-error { background: #fff1ef; color: #922b30; border: 1px solid #e7b8b2; }
.notice-neutral { background: #edf4f7; color: #3c596e; border: 1px solid #ccdce5; }
.notice-success { background: #eaf7f0; color: #1c664b; border: 1px solid #bfdfce; }
.notice[role=alert] { margin-bottom: 22px; scroll-margin-top: 24px; }
.skip-link { position: fixed; left: 16px; top: -150px; z-index: 100; padding: 12px 18px; background: #fff; border: 2px solid var(--teal); border-radius: 8px; }
.skip-link:focus { top: 12px; }
.loading-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; font-size: 28px; font-weight: 750; line-height: 1; letter-spacing: 1px; }
.brand-mark { display: inline-flex; justify-content: center; align-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; background: #0b8a8c; color: #fff; font-size: 30px; font-weight: 800; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; letter-spacing: 2.8px; color: #bed0dc; margin-top: 8px; }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(350px, .9fr) minmax(500px, 1.1fr); }
.auth-story { background: #152e40; color: #fff; padding: 46px 12%; display: flex; flex-direction: column; }
.auth-story-copy { margin: auto 0; padding: 65px 0; max-width: 440px; }
.auth-story-copy > .eyebrow { color: #7adad4; margin-bottom: 20px; }
.auth-story h1 { font-size: 34px; line-height: 1.6; }
.auth-story-copy > p { color: #d0dce4; margin-top: 22px; line-height: 1.8; }
.story-grid { display: none; }
.auth-footnote { color: #bed0dc; font-size: 16px; }
.auth-panel { padding: 44px 46px 26px; display: flex; flex-direction: column; justify-content: center; background: #fbfcfd; }
.auth-card { width: 100%; max-width: 540px; margin: auto; padding: 32px; border: 1px solid #d6e3eb; border-radius: 20px; background: #fff; box-shadow: 0 16px 48px #24485f0a; }
.auth-card h2 { font-size: 30px; margin-bottom: 8px; }
.auth-card form > .button { margin-top: 26px; min-height: 54px; }
.auth-panel-footer { font-size: 16px; color: var(--muted); text-align: center; margin-top: 40px; }
.auth-mobile-brand { display: none; }
.form-footnote { text-align: center; margin-top: 22px; }
.qr-wrap { display: flex; justify-content: center; width: 232px; max-width: 100%; padding: 15px; margin: 24px auto 20px; background: #fff; border: 1px solid var(--border); border-radius: 12px; }
.qr-wrap img { max-width: 100%; height: auto; }
.manual-key { font-size: 16px; color: var(--muted); }
summary { cursor: pointer; }
.manual-key summary { padding: 10px 0; min-height: 48px; }
.manual-key .copy-row { margin-top: 10px; background: #eef3f7; padding: 14px; border-radius: 8px; }
.copy-row { display: flex; align-items: center; gap: 14px; min-width: 0; }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; font-size: 16px; line-height: 1.8; }
.recovery-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; background: #edf3f7; border-radius: 10px; margin: 24px 0 18px; font-size: 18px; text-align: center; }
.recovery-codes code { overflow-wrap: anywhere; }
.check-label { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 400; min-height: 48px; margin-top: 22px; }
.otp-widget { min-width: 0; margin: 2px 0 0; }
.otp-digits { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(5px, 1vw, 10px); max-width: 100%; }
.otp-digits input.otp-digit { min-width: 0; width: 100%; min-height: 64px; height: 64px; padding: 0; border: 2px solid #b5c9d7; border-radius: 12px; background: #f8fbfd; color: #183b50; font-family: inherit; font-size: 28px; font-weight: 750; line-height: 1; text-align: center; caret-color: #087579; }
.otp-digits input.otp-digit:focus { border-color: #087579; outline: 3px solid #b7e4df; outline-offset: 2px; box-shadow: none; background: #fff; }
.otp-digits input.otp-digit:not(:placeholder-shown) { background: #edf8f5; border-color: #4d9893; }
.otp-widget.has-error .otp-digit { border-color: #b54a4a; background: #fff7f5; }
.otp-hint { font-size: 16px; line-height: 1.75; color: #526678; margin-top: 12px; }
.otp-widget.has-error .otp-hint { color: #982f34; }
.otp-mode-toggle { width: 100%; margin-top: 14px; border: 1px solid #b8d4d6; background: #edf6f6; border-radius: 10px; }
.otp-recovery-panel input { font-family: ui-monospace, Consolas, monospace; }
.otp-recovery-note { margin: 10px 0 0; color: #526678; font-size: 16px; line-height: 1.75; }
.app-layout { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: 34px 18px 24px; background: var(--navy); color: #cad9e3; }
.sidebar .brand { margin: 0 10px 40px; }
.nav-label { font-size: 16px; color: #afc4d2; padding: 0 14px; margin-bottom: 12px; }
.sidebar nav { display: flex; flex-direction: column; gap: 9px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 13px 14px; border: 1px solid transparent; border-left: 4px solid transparent; border-radius: 8px; background: transparent; color: #d0dfe9; font-size: 18px; line-height: 1.65; text-align: left; text-decoration: none; width: 100%; }
.nav-link:hover { background: #23465b; color: #fff; }
.nav-link.active { background: #26525e; border-left-color: #6bdcd4; color: #fff; font-weight: 700; }
.nav-symbol { width: 24px; flex: none; font-size: 25px; line-height: 1; }
.sidebar-bottom { margin-top: auto; padding-top: 40px; }
.account-chip { display: flex; align-items: center; gap: 12px; border-top: 1px solid #496275; padding: 24px 6px 20px; }
.avatar { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; flex: none; border-radius: 50%; background: #365365; color: #fff; font-size: 18px; }
.account-chip div { min-width: 0; }
.account-chip strong { display: block; color: #fff; font-size: 18px; overflow-wrap: anywhere; }
.account-chip div > span { color: #bfd0dc; font-size: 16px; }
.sidebar-logout { width: 100%; justify-content: space-between; border-color: #597284; background: #203f53; color: #fff; }
.sidebar-logout:hover { background: #2c536b; }
.workspace { min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; min-height: 78px; padding: 20px 34px; border-bottom: 1px solid var(--border); background: #fff; color: var(--muted); font-size: 16px; }
.topbar strong { color: #29495e; font-weight: 600; }
.breadcrumb-divider { margin: 0 10px; color: #8198a9; }
.security-label { display: flex; align-items: center; gap: 9px; font-size: 16px; }
.security-label i, .status-dot { display: inline-block; width: 8px; height: 8px; flex: none; border-radius: 50%; background: #187f66; }
.main-content { padding: 34px; max-width: 1540px; margin: auto; }
.admin-page { min-width: 0; }
.admin-page > .section-card:first-child { margin-top: 0; }
.admin-page > .section-card:last-child { margin-bottom: 0; }
.administrators-list { display: grid; gap: 14px; }
.administrator-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--border); border-radius: 12px; }
.administrator-info { display: grid; min-width: 0; flex: 1 1 230px; overflow-wrap: anywhere; }
.administrator-info strong { font-size: 21px; }
.initial-account-badge { justify-self: start; margin-top: 8px; padding: 4px 12px; color: #375b70; background: #eaf2f7; border-radius: 6px; font-size: 16px; font-weight: 700; }
.administrator-info .field-help { margin: 4px 0 0; }
.private-invitation { margin-top: 24px; padding: 20px; border: 1px solid #8cc9b8; border-radius: 12px; background: #f0faf6; }
.private-invitation h3 { margin-top: 0; }
.private-invitation input { min-width: 0; flex: 1; }
.private-invitation .copy-row .button { flex-shrink: 0; }
.quick-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.quick-link { display: flex; align-items: flex-start; gap: 16px; min-width: 0; padding: 22px; border: 1px solid #c8dce3; border-radius: 12px; background: #f8fbfc; color: #254c62; text-decoration: none; }
.quick-link:hover { border-color: #4b9895; background: #edf7f5; }
.quick-link > div { flex: 1; min-width: 0; }
.quick-link h3 { font-size: 24px; }
.quick-link p { font-size: 16px; color: #536d7f; line-height: 1.75; margin-top: 8px; }
.quick-link > span:last-child { color: #087579; font-size: 24px; }
.quick-icon, .security-shield { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: #e0efef; color: #257576; font-size: 30px; }
.security-overview { display: flex; align-items: flex-start; gap: 18px; padding: 26px; margin-bottom: 24px; border: 1px solid #b7d8cf; border-radius: 14px; background: #eaf6ef; color: #225b48; }
.security-overview h2 { font-size: 26px; }
.security-overview p { margin-top: 8px; font-size: 18px; line-height: 1.75; }
.security-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.security-card { display: flex; flex-direction: column; gap: 16px; margin-bottom: 0; }
.security-card .muted { margin-top: 0; }
.security-card > .button { margin-top: auto; width: 100%; }
.security-recovery-note { margin-top: 24px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 22px; margin-bottom: 30px; }
.page-heading > div { flex: 1; min-width: 250px; }
.page-heading h1 { font-size: 34px; }
.page-heading .muted { font-size: 18px; }
.stats-grid { display: grid; grid-template-columns: .85fr 1fr 1.15fr; gap: 18px; margin-bottom: 28px; }
.stat-card { min-width: 0; padding: 22px; background: #fff; border: 1px solid var(--border); border-radius: 12px; display: flex; flex-direction: column; gap: 9px; }
.stat-label, .stat-note, .stat-suffix { font-size: 16px; color: var(--muted); }
.stat-card div > strong { font-size: 34px; line-height: 1.6; }
.stat-suffix { margin-left: 10px; }
.stat-note { display: flex; align-items: flex-start; gap: 9px; }
.stat-note .status-dot { margin-top: 9px; }
.upstream-stat { background: #eaf6f3; border-color: #bad9d3; }
.stat-origin { font-size: 20px; line-height: 1.65; color: #11685f; overflow-wrap: anywhere; margin: 4px 0; }
.section-card { min-width: 0; padding: 28px; margin-bottom: 28px; border: 1px solid var(--border); border-radius: 15px; background: #fff; scroll-margin-top: 22px; box-shadow: 0 5px 22px #23495e04; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { font-size: 28px; }
.section-heading .muted { font-size: 18px; }
.section-symbol { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; flex: none; border-radius: 10px; color: #366876; background: #edf4f6; font-size: 30px; }
.count-badge { display: inline-block; padding: 2px 10px; margin-left: 6px; border-radius: 7px; background: #e7eff4; color: #37596e; font-size: 18px; vertical-align: middle; }
.domain-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; list-style: none; padding: 18px; margin: 0 0 26px; background: #f0f6f7; border-radius: 10px; }
.domain-steps li { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; color: #345366; }
.domain-steps li > span, .step-number { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none; border-radius: 50%; background: #d9eceb; color: #1b666b; font-size: 18px; font-weight: 700; }
.domain-steps strong { display: block; font-size: 18px; color: #234c5e; }
.inline-form { display: flex; align-items: flex-end; gap: 14px; }
.inline-form label { margin-top: 0; }
.inline-form > .button { min-width: 160px; min-height: 54px; }
.field-grow { flex: 1; min-width: 0; }
#domain-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.domain-routing { grid-column: 1 / -1; margin-bottom: 8px; min-width: 0; }
select { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 54px; padding: 11px 12px; border: 1px solid #9eb2c1; border-radius: 9px; background: #fff; color: #193247; font-size: 18px; }
select:disabled { opacity: .75; }
.routing-label { display: block; color: #3a6379; font-size: 16px; margin-top: 6px; }
.cloudflare-note { margin: 18px 0; }
.rate-limit-card { margin-top: 28px; }
.current-rate { padding: 18px 0 4px; color: #155f63; font-weight: 650; }
.rate-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
#rate-limit-form > .button { margin-top: 22px; }
.swal2-container { z-index: 500; padding: 16px; }
.swal2-popup.admin-swal { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 30px; border: 1px solid #c4d3dd; border-radius: 18px; background: #fff; color: #193247; font-family: inherit; font-size: 18px; box-shadow: 0 24px 90px #10273840; }
.admin-swal .admin-swal-title { padding: 0; margin: 8px 0 0; font-size: 30px; font-weight: 750; line-height: 1.55; color: #193247; overflow-wrap: anywhere; }
.admin-swal .admin-swal-text { margin: 18px 0 0; padding: 0; color: #38576d; font-size: 20px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; text-align: center; }
.admin-swal .swal2-icon { margin: 0 auto 18px; }
.admin-swal .admin-swal-actions { width: 100%; gap: 14px; margin: 26px 0 0; }
.admin-swal-actions .button { flex: 1 1 190px; min-height: 56px; margin: 0; padding: 12px 20px; font-size: 20px; }
.admin-swal-actions .button:focus-visible { outline: 3px solid #087e82; outline-offset: 4px; }
.domain-list { margin-top: 28px; }
.domain-card { border: 1px solid #c7d7e2; border-radius: 11px; margin-top: 20px; overflow: hidden; }
.domain-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 22px; }
.domain-icon { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; color: #426a80; background: #eaf2f7; font-size: 28px; }
.domain-main { min-width: 0; }
.domain-name { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.domain-subtitle { color: var(--muted); font-size: 16px; margin-top: 5px; }
.domain-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; grid-column: 2 / -1; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 20px; font-size: 16px; font-weight: 600; line-height: 1.6; }
.status-badge.verified { color: #1c684f; background: #e5f4eb; }
.status-badge.pending { color: #845715; background: #fff0d8; }
.domain-details { border-top: 1px solid #dbe5ec; background: #fafcfd; }
.domain-details > summary { min-height: 54px; padding: 14px 22px; color: #2c5871; font-size: 18px; font-weight: 600; }
.domain-details-content { padding: 0 22px 24px; }
.dns-step-heading { margin-top: 24px; margin-bottom: 10px; font-size: 24px; }
.dns-table { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 20px; }
.dns-record { min-width: 0; border: 1px solid #cad9e4; border-radius: 8px; background: #fff; padding: 16px; }
.dns-record-label { display: block; margin-bottom: 8px; color: #49677c; font-size: 16px; font-weight: 600; }
.dns-record .button { flex: none; }
.domain-expiry { font-size: 16px; color: var(--muted); margin: 14px 0; }
.domain-empty { padding: 34px 22px; border: 1px dashed #9db5c7; border-radius: 10px; text-align: center; background: #f9fcfd; }
.empty-symbol { display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 12px; background: #e8f2f5; color: #3d7584; font-size: 34px; }
.domain-empty h3 { font-size: 24px; margin-bottom: 10px; }
.domain-empty p { font-size: 16px; color: var(--muted); }
.section-note { display: flex; align-items: flex-start; gap: 12px; padding: 18px; margin-top: 24px; background: #f0f5f8; border-radius: 9px; color: #3d596d; font-size: 16px; }
.info-icon { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex: none; border: 1px solid #608297; border-radius: 50%; font-size: 16px; margin-top: 2px; }
.lower-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
.lower-grid > .section-card { margin-bottom: 0; }
.current-origin { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: #edf5f5; border: 1px solid #c4dedd; border-radius: 10px; }
.current-origin span { font-size: 16px; color: #3b6469; }
.current-origin strong { font-size: 20px; color: #145f61; overflow-wrap: anywhere; }
.lower-grid form > .button { margin-top: 20px; }
.upstream-steps { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-direction: column; gap: 14px; }
.upstream-steps li { display: flex; align-items: flex-start; gap: 12px; font-size: 18px; }
.upstream-steps strong { font-weight: 650; }
.candidate-panel { margin-top: 28px; padding-top: 26px; border-top: 2px solid #c1d8dc; }
.candidate-panel h3 { font-size: 24px; }
.candidate-origin { font-size: 18px; color: #345c73; overflow-wrap: anywhere; margin-top: 10px; }
.candidate-panel .notice { margin-top: 18px; }
.setup-guide { display: flex; flex-direction: column; gap: 28px; padding: 0; margin: 26px 0; list-style: none; }
.setup-guide li { display: flex; align-items: flex-start; gap: 14px; }
.setup-guide li > div { min-width: 0; flex: 1; }
.setup-guide h3 { font-size: 24px; }
.setup-guide p { font-size: 16px; color: var(--muted); margin-top: 8px; }
.server-record { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 15px; min-width: 0; }
.record-type { font-size: 16px; font-weight: 700; color: #345f75; background: #eaf3f7; border: 1px solid #c2d7e1; border-radius: 6px; padding: 4px 6px; text-align: center; }
.server-record code { overflow-wrap: anywhere; font-size: 16px; }
.workspace-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 28px; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.workspace-footer > span:first-child { font-size: 12px; letter-spacing: 1px; align-self: center; }
.audit-card { margin-top: 28px; margin-bottom: 0; }
.audit-list { list-style: none; padding: 0; margin: 0; max-height: 380px; overflow: auto; }
.audit-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-top: 1px solid #dce5ec; padding: 16px 0; font-size: 18px; }
.audit-row span { overflow-wrap: anywhere; }
.audit-row time { font-size: 16px; color: var(--muted); white-space: nowrap; }
.audit-empty { font-size: 16px; color: var(--muted); padding: 8px 0; }
dialog { width: min(560px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 0; border: 1px solid #c4d3dd; border-radius: 14px; color: #193247; box-shadow: 0 25px 90px #10273840; }
dialog::backdrop { background: #0d26396b; backdrop-filter: blur(2px); }
.dialog-content { padding: 30px; min-width: 0; }
.dialog-content h2 { font-size: 28px; }
.dialog-content > p.muted { font-size: 18px; margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.dialog-actions .button { flex: 1; }
.danger-text { color: #a12e34; }
.noscript { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; background: #fff; z-index: 300; }
@media (min-width: 1600px) {
  .lower-grid { grid-template-columns: 1.05fr 1fr; }
}
@media (max-width: 1250px) {
  .app-layout { grid-template-columns: 244px minmax(0, 1fr); }
  .sidebar { padding: 28px 14px 22px; }
  .main-content { padding: 28px; }
  .topbar { padding: 18px 28px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .upstream-stat { grid-column: 1 / -1; }
  .domain-top { grid-template-columns: 44px minmax(0, 1fr); }
  .status-badge { grid-column: 2; justify-self: start; }
  .domain-actions { grid-column: 1 / -1; }
  .domain-steps { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .app-layout { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; padding: 22px 28px; }
  .sidebar .brand { margin: 0; }
  .nav-label, .account-chip { display: none; }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; display: flex; flex-direction: row; flex-wrap: wrap; }
  .nav-link { width: auto; flex: 1 1 180px; justify-content: center; }
  .sidebar-bottom { margin: 0; padding: 0; grid-column: 2; grid-row: 1; }
  .sidebar-logout { width: auto; }
  .topbar { min-height: 68px; }
  .domain-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-layout { display: block; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 36px 28px 26px; }
  .auth-mobile-brand { display: flex; align-items: center; gap: 12px; color: #234253; font-size: 18px; margin-bottom: 34px; }
}
@media (max-width: 680px) {
  h1, .page-heading h1 { font-size: 30px; }
  h2, .section-heading h2, .auth-card h2, .dialog-content h2 { font-size: 26px; }
  h3, .domain-name, .setup-guide h3, .dns-step-heading { font-size: 24px; }
  .sidebar { padding: 18px; gap: 18px 12px; }
  .sidebar .brand { font-size: 24px; gap: 9px; }
  .brand-mark { width: 42px; height: 42px; font-size: 28px; }
  .brand-sub { font-size: 10px; }
  .sidebar-logout { padding: 10px 12px; }
  .sidebar-logout > span { display: none; }
  .sidebar nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .nav-link { min-width: 0; padding: 11px 8px; gap: 8px; font-size: 18px; }
  .nav-link:last-child { grid-column: auto; }
  .topbar { padding: 16px 20px; }
  .topbar > span:first-child { display: none; }
  .main-content { padding: 26px 16px 20px; }
  .page-heading { margin-bottom: 24px; }
  .page-heading > div { min-width: 0; flex-basis: 100%; }
  .page-heading > .button { width: 100%; }
  .stats-grid { gap: 12px; margin-bottom: 24px; }
  .stat-card { padding: 16px; gap: 8px; }
  .stat-card div > strong { font-size: 32px; }
  .stat-suffix { margin-left: 6px; }
  .stat-note { display: block; }
  .stat-note .status-dot { margin-right: 7px; }
  .section-card { padding: 22px 18px; margin-bottom: 24px; }
  .section-heading { gap: 14px; margin-bottom: 22px; }
  .section-symbol { display: none; }
  .domain-steps { grid-template-columns: 1fr; padding: 16px; gap: 18px; }
  .inline-form { flex-direction: column; align-items: stretch; gap: 14px; }
  .quick-links, .security-cards { grid-template-columns: 1fr; }
  .quick-link { padding: 18px 16px; gap: 12px; }
  .quick-icon { width: 36px; height: 36px; font-size: 25px; }
  .quick-link > span:last-child { display: none; }
  .security-overview { padding: 20px; gap: 12px; }
  .security-shield { display: none; }
  #domain-form { grid-template-columns: 1fr; }
  .rate-fields { grid-template-columns: 1fr; gap: 0; }
  .inline-form > .button { width: 100%; }
  .domain-top { padding: 18px 16px; gap: 12px; grid-template-columns: 36px minmax(0, 1fr); }
  .domain-icon { width: 36px; height: 36px; font-size: 24px; }
  .domain-name { font-size: 24px; }
  .status-badge { grid-column: 1 / -1; }
  .domain-actions { justify-content: stretch; }
  .domain-actions > .button:first-child { margin-left: auto; }
  .domain-details > summary { padding: 14px 16px; }
  .domain-details-content { padding: 0 16px 20px; }
  .dns-record { padding: 14px; }
  .copy-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .copy-row .button { width: 100%; }
  .details-actions { flex-direction: column; }
  .details-actions > .button { width: 100%; }
  .section-note { padding: 16px; gap: 10px; }
  .lower-grid { gap: 24px; }
  .current-origin { padding: 16px; }
  .setup-guide li { gap: 10px; }
  .server-record { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; }
  .server-record > .button { grid-column: 1 / -1; width: 100%; }
  .audit-card { margin-top: 24px; }
  .audit-row { flex-direction: column; gap: 5px; }
  .audit-row time { white-space: normal; }
  .workspace-footer { flex-direction: column; }
  .workspace-footer > span:first-child { align-self: flex-start; }
  .auth-panel { padding: 28px 20px 24px; }
  .auth-card { padding: 26px 20px; border-radius: 16px; }
  .otp-digits input.otp-digit { min-height: 58px; height: 58px; font-size: 26px; border-radius: 10px; }
  .auth-panel-footer { margin-top: 30px; }
  .button-row > .button { flex: 1 1 180px; }
  .recovery-codes { grid-template-columns: 1fr; }
  dialog { width: calc(100vw - 24px); max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); }
  .dialog-content { padding: 24px 20px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions > .button { width: 100%; }
  .swal2-container { padding: 12px; }
  .swal2-popup.admin-swal { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 26px 20px; }
  .admin-swal .admin-swal-title { font-size: 26px; }
  .admin-swal .admin-swal-text { font-size: 20px; }
  .admin-swal-actions .button { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .main-content { padding: 22px 12px 18px; }
  .sidebar { padding: 16px 12px; }
  .sidebar .brand { font-size: 22px; }
  .sidebar-logout { padding: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .section-card { padding: 20px 14px; }
  .stats-grid { grid-template-columns: 1fr; }
  .domain-name { font-size: 24px; }
  .domain-top { grid-template-columns: 1fr; }
  .domain-icon { display: none; }
  .domain-main, .domain-actions, .status-badge { grid-column: 1; }
  .auth-panel { padding: 20px 12px; }
  .auth-card { padding: 24px 16px; }
  .otp-digits input.otp-digit { min-height: 56px; height: 56px; font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
