body { line-height: 1.55; }
html:where(:has(> body > #dashboard:not(.hidden))) { height: auto; }
body:where(:has(> #dashboard:not(.hidden))) { height: auto; min-height: 100vh; position: relative; display: flex; align-items: center; justify-content: center; overflow-x: hidden; overflow-y: auto; font-family: "IBM Plex Sans Thai", "Noto Sans Thai", Sarabun, system-ui, sans-serif; -webkit-font-smoothing: auto; }
body:where(:has(> #dashboard:not(.hidden))) > #dashboard { width: 100%; flex: 1 1 auto; align-self: stretch; min-width: auto; }
#dashboard { --shadow: 0 3px 14px -10px rgb(15 43 28 / 20%); --font: "IBM Plex Sans Thai", "Noto Sans Thai", Sarabun, system-ui, sans-serif; display: block; min-height: 100vh; padding: 0 32px 40px calc(var(--rail-w) + 32px); font-family: var(--font); -webkit-font-smoothing: auto; }
#dashboard .main { display: block; width: 100%; }
#dashboard .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#dashboard .rail { position: fixed; inset: 0 auto 0 0; width: var(--rail-w); height: 100vh; padding: 30px 14px 24px; border: 0; background: var(--shell); color: var(--shell-ink); overflow-y: auto; scrollbar-width: thin; scrollbar-color: #53755c transparent; }
#dashboard .rail-head { padding: 0 10px 24px; margin-bottom: 8px; gap: 12px; }
#dashboard .rail-mark { display: grid; place-items: center; flex: none; width: 39px; height: 39px; border: 1px solid #54735d; border-radius: 12px; color: #d8e9c5; font-size: 18px; }
#dashboard .rail-identity { display: flex; flex-direction: column; min-width: 0; }
#dashboard .brand { font-size: 18px; font-weight: 600; line-height: 1.25; letter-spacing: -.5px; }
#dashboard .rail-sub { margin-top: 7px; font-size: 8px; letter-spacing: 1.7px; color: #b3c9b9; font-weight: 400; line-height: 1.35; }
#dashboard .rail-nav { padding: 0; overflow: visible; gap: 4px; }
#dashboard .rail-label { padding: 19px 12px 8px; color: #b3c9b9; font-size: 10px; font-weight: 400; letter-spacing: .3px; text-transform: none; }
#dashboard .rail { transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard .rail:hover { box-shadow: var(--shadow); }
#dashboard .rail-item { justify-content: flex-start; text-align: left; gap: 8px; min-height: 43px; padding: 11px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.5; color: var(--shell-ink); font-weight: 500; }
#dashboard .rail-item i { width: 19px; font-size: 14px; opacity: .85; }
#dashboard .rail-item:hover { background: rgb(255 255 255 / 5%); color: var(--text); border-color: var(--faint); }
#dashboard .rail .rail-item { transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard .rail .rail-item:is([data-tab="users"], [data-tab="profile"]) { transition: background .12s ease; }
:root[data-theme="light"] #dashboard .rail-item:not([data-tab="users"]):not([data-tab="profile"]):hover { background: rgb(0 0 0 / 4%); }
#dashboard .rail-item.active { color: #183c30; background: #d4dfb8; font-weight: 600; box-shadow: none; }
#dashboard .rail-item.active:not([data-tab="users"]):not([data-tab="profile"]) { border-color: transparent; }
#dashboard .rail-item.active i { opacity: 1; }
#dashboard .rail-badge:not(:empty) { padding: 2px 6px; min-width: 22px; color: #b3c9b9; background: rgb(255 255 255 / 5%); font-size: 10px; font-weight: 600; border-radius: 20px; font-variant-numeric: tabular-nums; }
#dashboard .rail-item.active .rail-badge { color: #183c30; background: rgb(0 0 0 / 10%); }
#dashboard .menu-close { display: none; transition: none; }
#dashboard .topbar { position: static; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding: 26px 0 24px; margin-bottom: 24px; background: transparent; backdrop-filter: none; border-bottom: 1px solid var(--border); }
#dashboard .header-brand { display: flex; align-items: center; flex: 1 1 320px; gap: 14px; min-width: 0; }
#dashboard .workspace-eyebrow { display: block; margin-bottom: 6px; color: var(--accent); font-size: 9px; font-weight: 500; letter-spacing: 2px; }
#dashboard .topbar h1 { margin: 0; font-size: 25px; font-weight: 600; line-height: 1.45; letter-spacing: -.6px; }
#dashboard #page-title:focus { outline: none; }
#dashboard #page-description { max-width: 660px; margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
#dashboard .header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
#dashboard button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 15px; font-size: 12.5px; font-weight: 500; line-height: 1.5; border-radius: 9px; box-shadow: none; }
#dashboard button.primary { color: var(--accent-ink); background: var(--primary); border: 0; font-weight: 500; }
#dashboard button.primary:hover { background: var(--primary2); filter: none; }
#dashboard button.ghost { background: var(--panel); border: 1px solid var(--border); color: var(--muted); }
#dashboard :is(button.primary:not(.account-approve), button.ghost, .icon-btn, .header-logout):not(:is(.pagination, .report-pagination) button) { transition: filter .12s, border-color .12s, background .12s; }
#dashboard :is(button.ghost, .icon-btn, .header-logout):not(:is(.pagination, .report-pagination) button):hover { border-color: var(--faint); color: var(--text); }
#dashboard .topbar { transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard .topbar:hover { box-shadow: var(--shadow); }
#dashboard .header-actions > button { flex: none; }
#dashboard .only-mobile { display: none; }
#dashboard .icon-btn { width: 40px; height: 40px; min-width: 40px; padding: 0; background: var(--panel); color: var(--muted); white-space: nowrap; }
#dashboard #contact-dev-btn { display: inline-flex; align-items: center; justify-content: center; flex: none; border: 1px solid var(--border); border-radius: 9px; font-size: 12.5px; line-height: 1.5; }
#dashboard #contact-dev-btn[hidden] { display: none; }
#dashboard #contact-dev-btn:hover { color: var(--text); border-color: var(--faint); text-decoration: none; }
#dashboard .user-chip { gap: 8px; max-width: 250px; padding: 9px 12px; margin: 2px 2px 0 0; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); min-height: 40px; font-size: 13px; font-weight: 400; line-height: 1.55; }
#dashboard #current-user-display { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
#dashboard .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); flex: none; }
#dashboard .role-pill { padding: 2px 7px; border-radius: 20px; color: var(--ok); background: var(--success-soft); font-size: 10px; font-weight: 600; }
#dashboard .header-logout { background: var(--panel); color: var(--muted); white-space: nowrap; }
#dashboard .workspace-main { width: 100%; max-width: none; padding: 0; margin: 0 0 22px; }
#dashboard .quickstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: none; padding: 22px; margin: 0 0 16px; background: var(--panel); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard .quickstats.admin-stats { padding-bottom: 36px; }
:root[data-theme="light"] #dashboard .quickstats { background: rgba(255,255,255,.6); }
#dashboard .stats-title { grid-column: 1 / -1; margin-bottom: 4px; color: var(--text); font-size: 13px; font-weight: 500; }
#dashboard .qs { padding: 19px; border-radius: 12px; background: var(--field); border: 1px solid var(--border); box-shadow: none; overflow: visible; transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard .qs:hover { box-shadow: 0 8px 20px -5px rgba(0, 0, 0, .3); }
:root[data-theme="light"] #dashboard .qs { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02); }
#dashboard .qs-label { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 1.6; }
#dashboard .qs-num { margin-top: 10px; color: var(--text); font-size: 28px; font-weight: 500; line-height: 1.2; letter-spacing: -.02em; }
#dashboard .qs-unit { margin-left: 3px; color: var(--faint); font-size: 12px; font-weight: 400; }
#dashboard .qs-num.ok { color: var(--ok); }
:root[data-theme="light"] #dashboard .qs-num:not(.ok) { color: var(--muted); }
#dashboard .workspace-panel, #dashboard .card { padding: 24px; margin: 0 0 22px; border: 1px solid var(--border); border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); min-width: 0; }
#dashboard h2, #dashboard h3 { font-weight: 500; }
#dashboard .section-title { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; margin: 0 0 20px; border-bottom: 1px solid var(--line-soft); font-size: 15px; line-height: 1.65; font-weight: 600; }
#dashboard .section-title > i { color: var(--primary); font-size: 15px; }
#dashboard .form-help { margin: 7px 0 0; font-size: 11.5px; line-height: 1.8; color: var(--muted); }
#dashboard :is(h2, h3) { letter-spacing: normal; }
#dashboard label { font-size: 12.5px; color: var(--text); font-weight: 500; }
#dashboard label i { margin-right: 5px; font-size: .85rem; color: var(--accent); }
#dashboard :is(input, select, textarea) { background: var(--field); border-color: var(--border); line-height: 1.5; font-size: 13px; font-weight: 400; }
#dashboard :is(input[type="text"], input:not([type]), input[type="password"], input[type="email"], input[type="url"], select, textarea) { transition: all .3s cubic-bezier(.4, 0, .2, 1); }
#dashboard select { appearance: none; }
#dashboard :is(.toolbar-field, .pagination select, .report-pagination select) { cursor: pointer; }
#dashboard :is(input, select, textarea):focus { background: var(--panel) !important; border-color: var(--primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent) !important; }
#dashboard :is(input:not([type="checkbox"]):not([type="range"]), select) { min-height: 44px; padding: 10px 13px; }
#dashboard textarea { margin-top: 6px; padding: 12px 14px; line-height: 1.75; }
#dashboard :is(button, a, input[type="checkbox"]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#dashboard .rail-item:focus-visible { outline-color: #d8e9c5; outline-offset: -3px; }
#dashboard #announcements:empty { display: none; }
#dashboard #announcements:not(:empty) { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }
#dashboard .announcement-banner { display: flex; align-items: flex-start; gap: 15px; margin: 0; padding: 16px 18px; border: 1px solid transparent; border-radius: 10px; border-left-width: 5px; backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); animation: slideDownAnnouncement .4s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes slideDownAnnouncement {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}
#dashboard .announcement-banner.info { background: var(--info-soft); color: var(--info); }
#dashboard .announcement-banner.success { background: var(--success-soft); color: var(--ok); }
#dashboard .announcement-banner.warning { background: var(--warning-soft); color: var(--warn); }
#dashboard .announcement-banner.danger { background: var(--danger-soft); color: var(--danger); }
#dashboard .announcement-icon { flex: none; margin-top: 2px; font-size: 20px; }
#dashboard .announcement-banner.info .announcement-icon { color: var(--accent); }
#dashboard .announcement-body { flex: 1; color: var(--text); font-size: 14.72px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
#dashboard .announcement-meta { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
#dashboard .announcement-dismiss { display: block; flex: none; min-height: auto; width: auto; margin-top: 2px; padding: 0 4px; border-radius: 0; background: transparent; border: 0; color: var(--muted); opacity: .7; font-family: Arial, sans-serif; font-size: 17.6px; font-weight: 400; line-height: 1; gap: normal; }
:root[data-theme="light"] #dashboard thead th { background: rgba(0,0,0,.04); }
#dashboard .domain-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 10px; }
#dashboard .domain-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel); color: var(--text); min-height: 66px; font-size: 12px; }
#dashboard .domain-tab-name { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; }
#dashboard .domain-tab-sub { font-size: 11.5px; font-weight: 400; color: var(--faint); }
#dashboard .domain-tab.active { border-color: var(--primary); color: var(--accent-ink); background: var(--primary); }
#dashboard .domain-tab.active .domain-tab-sub { color: var(--accent-ink); opacity: .8; }
#dashboard .domain-tab-add { background: transparent; border-style: dashed; color: var(--muted); }
#dashboard .domain-note { color: var(--muted); font-size: 11.5px; margin: 0 0 20px; }
#dashboard .links-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
#dashboard .links-toolbar .toolbar-field { width: auto; min-height: 40px; padding: 9px 28px 9px 12px; font-size: 12px; max-width: 100%; }
#dashboard .toolbar-search { position: relative; flex: 1 1 180px; max-width: 290px; min-width: 180px; }
#dashboard .toolbar-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); font-size: 12px; pointer-events: none; }
#dashboard .toolbar-search input { min-height: 40px; padding: 9px 12px 9px 35px; font-size: 12px; }
#dashboard .toolbar-owner { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
#dashboard .toolbar-owner input { width: 130px; }
#dashboard .toolbar-cta { margin-left: auto; }
#dashboard .quota-line { margin: 0 0 14px; color: var(--muted); font-size: 11.5px; }
#dashboard .quota-line:empty, #dashboard .table-status:empty { display: none; }
#dashboard .table-status { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
#dashboard .table-wrap { border-radius: 12px; box-shadow: none; scrollbar-color: var(--border) transparent; min-width: 0; }
#dashboard tbody tr { border-bottom: 1px solid rgb(255 255 255 / 3%); }
#dashboard :is(.table-scroll-hint, .report-table-hint, .management-scroll-hint, .account-table-hint)[hidden] { display: none; }
:root[data-theme="light"] #dashboard .table-wrap { background: rgb(255 255 255 / 95%); border-color: rgb(0 0 0 / 8%); box-shadow: 0 1px 2px rgb(35 30 22 / 5%), 0 1px 1px rgb(35 30 22 / 3%); }
:root[data-theme="light"] #dashboard thead th { border-bottom-color: rgb(0 0 0 / 8%); }
:root[data-theme="light"] #dashboard tbody tr { border-bottom: 1px solid rgb(0 0 0 / 5%) !important; }
:root[data-theme="light"] #dashboard tbody td { color: #1e293b; }
#dashboard .links-table { min-width: 980px; }
#dashboard table { font-size: 12.5px; }
#dashboard thead th { position: sticky; top: 0; z-index: 10; padding: 13px 15px; font-size: 11.5px; font-weight: 500; letter-spacing: 0; line-height: 1.6; text-transform: none; white-space: nowrap; background: var(--panel2); }
#dashboard tbody td { padding: 15px; font-size: 12.5px; line-height: 1.65; border-bottom-color: var(--line-soft); }
#dashboard tbody tr { transition: all .3s cubic-bezier(.4, 0, .2, 1); }
:root[data-theme="light"] #dashboard tbody tr:hover { background: rgb(0 0 0 / 1.5%); }
#dashboard tbody .muted { color: var(--faint); }
:root[data-theme="light"] #dashboard tbody .muted { color: #475569; }
#dashboard tbody > tr:only-child > td[colspan] { padding: 40px 20px; font-size: 13px; }
#dashboard .num-col { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#dashboard .link-slug { color: var(--text); font-size: 13px; font-weight: 500; white-space: nowrap; }
#dashboard .slug-host { color: var(--faint); font-weight: 400; }
#dashboard .stamp, #dashboard .owner-tag { color: var(--faint); font-size: 11.5px; }
#dashboard .creation-details { margin-top: 4px; font-size: 11px; color: var(--muted); }
#dashboard .creation-details summary { cursor: pointer; }
#dashboard .category-tag { display: inline-block; padding: 2px 8px; border-radius: 5px; background: var(--panel2); color: var(--muted); font-size: 11.5px; white-space: nowrap; }
#dashboard .link-type-list { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
#dashboard .link-type-chip { display: inline-flex; align-items: center; gap: 5px; min-width: 62px; padding: 2px 7px; border-radius: 5px; color: var(--ok); background: var(--success-soft); font-family: ui-monospace, monospace; font-size: 10.5px; font-weight: 600; line-height: 1.35; white-space: nowrap; }
#dashboard .link-type-chip.html { color: var(--info); background: var(--info-soft); }
#dashboard .link-type-chip b { width: 10px; font-size: 9.5px; opacity: .7; }
#dashboard .geo-list { display: flex; flex-wrap: wrap; gap: 5px; max-width: 145px; }
#dashboard .geo-chip { font-size: 11px; padding: 2px 6px; color: var(--muted); background: var(--panel2); border: 1px solid var(--border); border-radius: 5px; }
#dashboard .pill { border-radius: 5px; font-size: 11.5px; font-weight: 500; }
#dashboard .pill.on, #dashboard .pill.approved { color: var(--ok); background: var(--success-soft); }
#dashboard .pill.off, #dashboard .pill.suspended { color: var(--danger); background: var(--danger-soft); }
#dashboard .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
#dashboard .row-actions .mini { display: grid; place-items: center; flex: none; width: 30px; height: 30px; min-height: 30px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--faint); font-size: 12px; }
#dashboard .row-actions .mini { transition: background .1s, color .1s; }
#dashboard .row-actions .mini:hover { background: var(--panel2); color: var(--accent); border-color: var(--accent); }
#dashboard .row-actions .mini.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
#dashboard .table-footer { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 14px; margin-top: 18px; color: var(--muted); font-size: 12px; }
#dashboard .pagination { display: flex; gap: 8px; }
#dashboard :is(.table-scroll-hint, .report-table-hint, .management-scroll-hint, .account-table-hint) { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin: 9px 1px 0; font-size: 10.5px; color: var(--faint); }
#dashboard .form-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
#dashboard .form-group { margin-bottom: 20px; min-width: 0; }
#dashboard .switches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin: 3px 0 24px; }
#dashboard .switch-group { display: flex; justify-content: space-between; align-items: center; min-width: 0; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
#dashboard .switch-label { min-width: 0; }
#dashboard .switch-label .title { display: block; font-size: 12.5px; font-weight: 500; }
#dashboard .switch-label .title i { color: var(--accent); margin-right: 4px; }
#dashboard .switch-label .desc { display: block; margin-top: 5px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
#dashboard .switch { position: relative; display: block; width: 38px; height: 22px; flex: none; margin: 0; }
#dashboard .switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 1; cursor: pointer; }
#dashboard .slider { position: absolute; inset: 0; border-radius: 22px; background: var(--border); transition: background .15s; }
#dashboard .slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
#dashboard .switch input:checked + .slider { background: var(--primary); }
#dashboard .switch input:checked + .slider::before { transform: translateX(16px); background: var(--accent-ink); }
#dashboard .switch input:focus-visible + .slider { outline: 2px solid var(--accent); outline-offset: 3px; }
#dashboard .field-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
#dashboard .mode-toggle { display: flex; gap: 3px; padding: 3px; border-radius: 9px; border: 1px solid var(--border); background: var(--panel2); }
#dashboard .mode-btn { min-height: 34px; padding: 7px 12px; background: transparent; border: 0; color: var(--muted); font-size: 12px; }
#dashboard .mode-btn.active { background: var(--primary); color: var(--accent-ink); }
#dashboard .destination-field { min-height: 48px; height: 48px; font-family: ui-monospace, monospace; font-size: 12px; }
#dashboard .destination-field.html-mode { height: 220px; }
#dashboard .advanced-fields { margin-bottom: 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel2); }
#dashboard .advanced-fields > summary { padding: 13px 15px; cursor: pointer; font-size: 12.5px; }
#dashboard .advanced-body { padding: 8px 16px 0; }
#dashboard .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 6px; }
#dashboard .draft-form { scroll-margin-top: 0px; }
#dashboard #lf-rules > .form-grid2 > .form-group { margin-bottom: 16px; }
#dashboard :is(#profile-form, #sys-form, #u-form) > label { margin-bottom: 20px; }
#dashboard :is(#profile-form, #sys-form, #u-form) > .grid2 { gap: 20px; margin-bottom: 20px; }
#dashboard :is(#profile-form, #sys-form, #u-form) > .row:last-child { margin-bottom: 0; padding-top: 6px; }
#dashboard :is(#profile-form, #sys-form, #u-form) > h3 { padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border); font-size: 15px; }
#dashboard .profile-layout { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 16px; align-items: start; }
#dashboard .profile-identity-card { min-width: 0; }
#dashboard .profile-avatar { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--primary); color: var(--accent-ink); font-size: 30px; font-weight: 600; }
#dashboard .profile-name { margin-bottom: 7px; text-align: center; color: var(--text); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
#dashboard .profile-role { text-align: center; margin-bottom: 18px; font-size: 11.5px; color: var(--muted); }
#dashboard .profile-kv { margin: 0; }
#dashboard .profile-kv > div { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
#dashboard .profile-kv dt { color: var(--faint); flex: none; }
#dashboard .profile-kv dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#dashboard .profile-note { margin: 16px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
#dashboard .profile-divider { height: 1px; margin: 24px 0; background: var(--line-soft); }
#dashboard .stat { background: var(--panel); border-color: var(--border); box-shadow: var(--shadow); border-radius: 12px; }
#dashboard .stat-num { color: var(--text); font-size: 28px; font-weight: 500; }
#dashboard .stat-label { color: var(--muted); font-size: 12px; }
#dashboard .scrim { display: none; border: 0; border-radius: 0; padding: 0; background: rgb(8 28 18 / 48%); }
#dashboard .modal-box { max-width: calc(100vw - 32px); border-radius: 18px; padding: 28px; }
#toast { top: 20px; right: 24px; left: auto; bottom: auto; width: max-content; max-width: min(400px, calc(100vw - 32px)); padding: 15px 18px; border-radius: 12px; background: var(--shell); color: var(--shell-ink); border: 1px solid #4c6953; box-shadow: 0 10px 35px rgb(0 0 0 / 18%); font-size: 12px; line-height: 1.8; transform: translateY(-12px); }
#toast.show { transform: translateY(0); }
#qr-modal { width: fit-content; height: fit-content; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); inset: 0; margin: auto; padding: 0; border: 0; background: transparent; backdrop-filter: none; overflow-y: auto; }
#qr-modal::backdrop { background: rgba(4,8,14,.65); backdrop-filter: blur(3px); }
#qr-modal:not([open]) { display: none; }
#qr-modal > .modal-box { width: 350px; padding: 30px; border-radius: 20px; }
#qr-modal .button-link { margin: 10px 0; }
@media (min-width: 1001px) {
    #dashboard .rail-item:not([data-tab="users"]):not([data-tab="profile"]) { white-space: nowrap; }
}
@media (max-width: 1250px) and (min-width: 1001px) {
    :root { --rail-w: 230px; }
    #dashboard { padding-left: calc(var(--rail-w) + 24px); padding-right: 24px; }
    #dashboard .user-chip { max-width: 210px; }
    #dashboard .role-pill { display: none; }
    #dashboard .qs { padding: 15px; }
}
@media (max-width: 1000px) {
    #dashboard { padding: 0 24px 30px; }
    #dashboard .rail { width: min(292px, calc(100vw - 44px)); padding: 26px 16px; transform: translateX(-100%); visibility: hidden; transition: transform .2s, visibility .2s; z-index: 1002; }
    #dashboard .rail.open { transform: translateX(0); visibility: visible; transition-property: transform; }
    #dashboard .rail-head { padding-right: 30px; }
    #dashboard .menu-close { display: grid; place-items: center; position: absolute; right: 12px; top: 24px; width: 32px; min-height: 36px; padding: 0; border: 0; background: transparent; color: var(--shell-ink); font-size: 18px; }
    #dashboard .rail-item { min-height: 44px; }
    #dashboard .only-mobile { display: inline-flex; }
    #dashboard .scrim { z-index: 1001; }
    #dashboard .scrim.show { display: block; width: 100%; height: 100%; margin: 0; cursor: default; }
    #dashboard .quickstats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #dashboard .profile-layout { grid-template-columns: minmax(0, 1fr); }
    body.workspace-menu-open { overflow: hidden; }
}
@media (max-width: 900px) {
    #dashboard :where(.table-wrap) table { width: max-content; min-width: 100%; }
}
@media (max-width: 650px) {
    #dashboard { padding: 0 14px 24px; }
    #dashboard .topbar { padding: 20px 0 18px; margin-bottom: 18px; gap: 17px; }
    #dashboard .workspace-main { margin-bottom: 16px; }
    #dashboard .header-brand { flex: 1 1 100%; gap: 12px; }
    #dashboard .topbar h1 { font-size: 22px; }
    #dashboard #page-description { margin-top: 5px; font-size: 11.5px; }
    #dashboard .header-actions { width: 100%; gap: 7px; }
    #dashboard .user-chip { margin-right: auto; padding: 8px 10px; max-width: calc(100% - 141px); gap: 6px; }
    #dashboard #current-user-display { max-width: 115px; }
    #dashboard .role-pill, #dashboard .header-logout span { display: none; }
    #dashboard .header-logout { width: 40px; min-width: 40px; padding: 0; }
    #dashboard .quickstats { padding: 16px; gap: 10px; margin-bottom: 16px; border-radius: 14px; }
    #dashboard .quickstats.admin-stats { padding-bottom: 26px; }
    #dashboard .qs { padding: 14px; }
    #dashboard .qs-label { font-size: 11px; }
    #dashboard .qs-num { font-size: 25px; }
    #dashboard .workspace-panel, #dashboard .card { padding: 18px 16px; margin-bottom: 16px; border-radius: 14px; }
    #dashboard .section-title { font-size: 14px; padding-bottom: 14px; margin-bottom: 17px; flex-wrap: wrap; }
    #dashboard .form-grid2, #dashboard .switches-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    #dashboard .switches-grid { gap: 10px; }
    #dashboard .links-toolbar { gap: 9px; margin-bottom: 16px; }
    #dashboard .links-toolbar .toolbar-field { flex: 1 1 130px; min-width: 0; font-size: 13px; height: 44px; }
    #dashboard .toolbar-search { flex-basis: 100%; max-width: none; min-width: 0; }
    #dashboard .toolbar-owner { width: 100%; }
    #dashboard .toolbar-owner .toolbar-field { flex: 1; }
    #dashboard .toolbar-cta { width: 100%; margin-left: 0; }
    #dashboard :is(input:not([type="checkbox"]):not([type="range"]), select, textarea) { font-size: 16px; max-width: 100%; }
    #dashboard input::placeholder { font-size: 12px; }
    #dashboard .row-actions .mini { width: 40px; min-width: 40px; height: 40px; }
    #toast { top: 14px; right: 14px; max-width: calc(100vw - 28px); font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    #dashboard *, #dashboard *::before, #dashboard *::after, #toast { animation: none !important; transition: none !important; }
}

#dashboard textarea::placeholder { color: var(--faint); }

@keyframes slide-down {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
#dashboard :is(#tab-admin-links, #tab-profile, #tab-trash, #tab-domains, #tab-settings, #tab-blacklist, #tab-network-blocklist, #tab-logs, #tab-analytics) { animation: slide-down 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
