:root {
    color-scheme: light;
    accent-color: #b95679;
    --bg: #fbf2f6;
    --surface: rgba(255,255,255,.68);
    --surface-soft: rgba(255,255,255,.40);
    --text: #483844;
    --muted: #988691;
    --border: rgba(177,137,157,.18);
    --accent: #b95679;
    --accent-dark: #9e3e61;
    --green: #398c78;
    --red: #b94e69;
    --glass-line: 1px solid rgba(255,255,255,.9);
    --glass-shadow: 0 6px 24px rgba(126,76,104,.055), inset 0 1px 0 rgba(255,255,255,.8);
}
* { -webkit-tap-highlight-color: transparent; }
::selection { color: #673b50; background: #f3c4d8; }
input:focus-visible,select:focus-visible,textarea:focus-visible { outline: 2px solid #d995b1; outline-offset: 2px; }
input[type=checkbox],input[type=radio] { accent-color: var(--accent); }
option:checked { color: #873d5b; background-color: #f8e0eb; }
body { background: #fbf0f5; background-image: linear-gradient(#ffffff99,#ffffff99),url('glass-texture.png'); background-position: center; background-size: cover; background-attachment: fixed; color: var(--text); }
button { box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }
button:disabled { background: rgba(238,227,233,.58); border-color: rgba(207,185,197,.2); color: #b3a4ad; }
.secondary-btn { background: rgba(255,255,255,.5); border-color: rgba(185,86,121,.3); color: #a45270; }
.secondary-btn:hover { background: rgba(255,244,249,.9); border-color: #d29bb0; }
.text-btn { color: #ae5777; }
.text-btn:hover, .icon-btn:hover { background: #f6e2eb; color: #a7476a; }
.icon-btn { color: #a18594; box-shadow: none; }
.danger-small { background: #fff2f6; border-color: #ebc4d1; color: #b94e69; }
.danger-small:hover { background: #fce3ec; border-color: #dc9ab2; color: #9e3e61; }
input, select, textarea { background: rgba(255,255,255,.55); color: #594954; border-color: #d9c8d2; box-shadow: inset 0 1px 2px #ffffff70; }
input::placeholder, textarea::placeholder { color: #b1a0ab; }
input:focus, select:focus, textarea:focus { border-color: #d08ba7; box-shadow: 0 0 0 3px #f9dfeb; background: rgba(255,255,255,.82); }
label { color: #705763; }
button:focus-visible, summary:focus-visible { outline-color: #e8afc6; }
.brand-mark { background: #c26b8c; box-shadow: inset 0 1px 2px #ffffff73; }
.brand { padding-bottom: 25px; }
.brand strong { color: #573e4e; }
.sidebar { inset: 16px auto 16px 14px; width: 216px; border: var(--glass-line); border-radius: 12px; background: rgba(255,255,255,.56); backdrop-filter: blur(22px); box-shadow: var(--glass-shadow); padding-top: 22px; }
.sidebar nav { gap: 6px; overflow-y: auto; }
.nav-btn { font-weight: 400; color: #7f6776; box-shadow: none; }
.nav-btn:hover { background: rgba(248,225,235,.68); color: #a14e70; }
.nav-btn.active { color: #a34a6c; background: rgba(246,208,225,.7); box-shadow: inset 0 1px 1px #fff9; }
.logout { border-top-color: var(--border); color: #a08694; box-shadow: none; }
.logout:hover { background: rgba(248,225,235,.68); color: #a14e70; }
.workspace { margin-left: 244px; padding: 16px 22px 30px; }
.topbar { margin: 0; min-height: 48px; padding: 8px 16px; border: var(--glass-line); border-radius: 8px; background: rgba(255,255,255,.55); backdrop-filter: blur(18px); box-shadow: var(--glass-shadow); }
.breadcrumb > span { color: #ab8f9f; }
.breadcrumb strong { color: #805c70; }
.breadcrumb-divider { color: #d1b5c4 !important; }
.account-switch > .icon { color: #b193a4; }
.account-switch select { background: rgba(255,255,255,.46); border-color: #dec9d4; }
.panel { padding-top: 22px; }
h1 { font-size: 24px; color: #553948; }
h2 { color: #654454; font-size: 17px; }
h3 { color: #765063; }
.section-head { margin-bottom: 18px; }
.heading-count { color: #b18d9f; }
.customer-tabs { display: flex; gap: 0; border-bottom: 1px solid #ffffffd9; margin-bottom: 18px; }
.customer-tabs button { min-height: 42px; min-width: 140px; color: #9d7b8d; background: #ffffff60; border: 1px solid #ffffffd9; border-bottom: 0; border-radius: 8px 8px 0 0; box-shadow: inset 0 1px 0 #fff7; }
.customer-tabs button.active { background: #bd6385; color: #fff; }
.customer-tabs button > span { font-size: 11px; opacity: .8; }
.grant-workspace { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,.85fr); gap: 16px; }
.domain-selector, .permission-editor { min-width: 0; padding: 22px; background: rgba(255,255,255,.39); border: var(--glass-line); border-radius: 8px; backdrop-filter: blur(14px); box-shadow: var(--glass-shadow); }
.customer-choice { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 14px; align-items: center; margin-bottom: 22px; }
.customer-choice label { margin: 0; font-size: 15px; font-weight: 600; }
.selector-heading { margin-bottom: 10px; }
.selector-heading h2 { margin: 0; font-size: 15px; }
.selector-heading button { min-height: 32px; font-size: 12px; padding: 5px 10px; }
.grant-selector-toolbar { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; color: #a08294; font-size: 12px; }
.grant-selector-toolbar > span { margin-left: auto; white-space: nowrap; }
.grant-selector-toolbar b { color: var(--accent); font-weight: 600; }
.grant-selector-toolbar .check-row { font-size: 12px; margin: 0; padding: 6px 0; }
.grant-selector-toolbar > .icon-btn { min-height: 28px; width: 28px; flex-basis: 28px; padding: 5px; }
.grant-zone-list { min-height: 255px; max-height: 320px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d7adbf transparent; }
.grant-zone-option { display: flex; align-items: center; gap: 12px; min-height: 40px; margin: 0; padding: 9px 10px; border-bottom: 1px solid #ffffffce; font-size: 13px; font-weight: 400; cursor: pointer; }
.grant-zone-option:hover { background: #fffc; }
.grant-zone-option.selected { background: #f4cddd80; }
.grant-zone-option.unavailable { background: #e7e2e954; color: #a8a0ac; cursor: not-allowed; }
.grant-zone-name { min-width: 0; overflow-wrap: anywhere; }
.grant-owner { margin-left: auto; font-size: 11px; white-space: nowrap; color: #a394a4; }
.grant-empty { min-height: 250px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; color: #b197a7; font-size: 13px; }
.permission-editor { display: flex; flex-direction: column; align-items: stretch; }
.permission-editor h2 { margin-bottom: 26px; }
.permission-options { display: grid; gap: 12px; margin-bottom: 24px; }
.permission-options .check-row { margin: 0; padding: 0; }
.permission-editor > label:not(.check-row) { margin: 0 0 10px; }
.permission-editor .toggle-row { margin: 18px 0; gap: 10px; }
.permission-editor .grant-submit { margin-top: auto; min-height: 44px; font-size: 14px; }
.toggle-row input[role=switch] { background: #d8ccd4; }
.toggle-row input[role=switch]:checked { background: #52bda6; }
.editing-domain { display: flex; align-items: center; gap: 12px; padding: 30px 4px; min-height: 270px; overflow-wrap: anywhere; }
.records-heading { margin: 24px 0 14px; }
.records-heading h2 { margin-bottom: 0; }
.records-heading .heading-count { font-size: 12px; }
.table-scroll { background: rgba(255,255,255,.43); border: var(--glass-line); box-shadow: var(--glass-shadow); backdrop-filter: blur(16px); }
.grant-record-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.grant-record-table th { padding: 12px 16px; color: #8f657a; font-weight: 500; background: #f7e6ef65; white-space: nowrap; }
.grant-record-table td { padding: 13px 16px; border-top: 1px solid #fff; }
.grant-record-table td:first-child { overflow-wrap: anywhere; }
.grant-record-table td b { font-weight: 500; }
.grant-record-table small { display: block; margin-top: 4px; }
.grant-record-table .token-actions { justify-content: flex-end; }
.grant-record-table button { min-height: 29px; padding: 4px 10px; font-size: 11px; }
.grant-record-table .danger-small { background: #e7f6f4b8; color: #438e87; border-color: #a0d6ce; }
.customer-account-editor { max-width: 960px; padding: 24px; background: rgba(255,255,255,.4); border: var(--glass-line); border-radius: 8px; backdrop-filter: blur(14px); box-shadow: var(--glass-shadow); }
.account-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 24px; }
.account-field-grid label { margin-top: 0; }
.account-field-grid > .toggle-row { margin: 20px 0 0; align-self: center; }
.path-preview { display: block; color: #b1849a; font-size: 11px; margin-top: 5px; overflow-wrap: anywhere; }
.customer-account-editor .section-head { margin-bottom: 20px; }
.customer-account-editor .section-head h2 { margin: 0; }
.customer-account-editor .section-head button { min-height: 30px; font-size: 12px; }
.token-row { border-color: #ffffffba; }
.token-row span { color: #aa8d9e; }
.token-row a { color: #b56183; }
.token-row.active b::after { background: #dbf4eb; color: #5b9e86; }
.success-notice { display: flex; align-items: center; gap: 10px; background: #effaf3c9; border-color: #c5e8d9; color: #608b79; }
.success-notice .icon-btn { margin-left: auto; }
.notice { background: #ffffff85; color: #947282; border-color: #ead0dd; }
.error-notice { background: #fff2f4de; color: #b14c6b; border-color: #eac2d0; }
.selection-bar { background: #ffffff60; border: var(--glass-line); color: #ac879c; backdrop-filter: blur(14px); }
.selection-bar > span { border-color: #ead7e1; }
.search-field > .icon { color: #b094a4; }
.domain-table th { background: #f7e7f08c; color: #98798a; }
.domain-table td { border-color: #ffffffd9; }
.domain-row:hover { background: #fff9; }
.domain-row.is-selected { background: #f7dbe980; }
.zone-status { color: #a38c9a; }
.zone-status.status-active, .zone-status.status-authorized { color: #549c86; }
.zone-status.status-active::before, .zone-status.status-authorized::before { background: #68b59b; }
.zone-status.status-pending { color: #b99155; }
.zone-status.status-pending::before { background: #d6af73; }
.dns-summary { color: #ad8299; }
.table-footer { color: #b094a4; }
.task-form { max-width: 780px; border: var(--glass-line); border-radius: 8px; padding: 24px; background: #ffffff65; backdrop-filter: blur(14px); box-shadow: var(--glass-shadow); }
.form-footer { border-color: #ffffffb8; }
.grid-2 { gap: 20px; }
.log-card { background: #ffffff69; border: var(--glass-line); box-shadow: var(--glass-shadow); backdrop-filter: blur(14px); }
.log-card summary { color: #9a7288; }
.log-card summary > span { color: #bd9eb0; }
.log-card[open] summary { border-color: #fff; }
.log-box { background: #ffffff3b; color: #a58b99; }
.log-box .success { color: #62917f; }
.log-box .error { color: #b96580; }
.activity { background: #ffffff80; border: var(--glass-line); box-shadow: var(--glass-shadow); }
.activity-label { color: #ac6c8a; }
.activity-track { background: #efdce6; }
.auth-shell { background: transparent; }
.auth-card { background: #ffffff94; border: var(--glass-line); box-shadow: 0 12px 56px #ae73911c,inset 0 1px 0 #fff; backdrop-filter: blur(22px); }
.auth-brand { border-color: #ecdce4; color: #795567; }
.auth-card h1 { color: #a56380; }
.modal-backdrop { background: #ad86a04a; backdrop-filter: blur(5px); }
.modal-card { background: #fff9fcf0; border: var(--glass-line); box-shadow: 0 18px 70px #a6789230; backdrop-filter: blur(28px); }
.modal-card p { color: #aa879b; }
.modal-header { border-color: #ecd9e3; }
.modal-card pre { background: #f5e6ef88; border-color: #ecd9e3; color: #a16a87; }
.modal-actions button:first-child { background: #fff8; color: #a87791; border-color: #e2c9d8; }
.dns-record-form { border-color: #ecdae3; }
.record-type { color: #b27d98; background: #f6e6ee; }
.record-meta > span:not(.record-type) { color: #b195a4; }
.record-meta small { color: #75a494; }
.grant-preview-list { margin: 18px 0; max-height: 300px; overflow-y: auto; }
.grant-preview-list > div { padding: 11px 0; border-bottom: 1px solid #ecdde5; display: flex; flex-direction: column; gap: 3px; }
.grant-preview-list b { font-weight: 500; font-size: 13px; overflow-wrap: anywhere; }
.grant-preview-list span { font-size: 11px; color: #b08d9f; }
.grant-preview-list .error-text { color: #b94e69; }
.dns-profile-editor { border: var(--glass-line); border-radius: 8px; background: #ffffff6b; padding: 22px; backdrop-filter: blur(14px); box-shadow: var(--glass-shadow); }
.dns-profile-editor h2 { margin-bottom: 0; }
.profile-records { margin-top: 18px; display: grid; gap: 10px; }
.profile-record-editor { display: grid; grid-template-columns: 100px minmax(100px,.65fr) minmax(180px,1.5fr) auto 32px; gap: 10px; align-items: center; }
.profile-record-editor .check-row { white-space: nowrap; margin: 0; padding: 0; font-size: 12px; }
.token-default-field { width: 220px; min-width: 160px; }
.token-default-field label { margin-top: 0; font-size: 11px; }
.token-default-field select { font-size: 12px; }
.domain-table { min-width: 930px; }
.domain-table .domain-name { width: auto; max-width: 230px; }
.ns-cell { min-width: 220px; }
.ns-addresses { display: flex; align-items: center; gap: 8px; }
.ns-addresses > div { min-width: 0; }
.ns-addresses span { display: block; font: 11px/1.7 ui-monospace,monospace; color: #9b788e; overflow-wrap: anywhere; }
.ns-addresses .icon-btn { width: 28px; min-height: 28px; padding: 5px; flex-basis: 28px; }
.ns-addresses .icon { width: 14px; height: 14px; flex-basis: 14px; }
.zone-actions { flex-wrap: nowrap; }
.quick-profile-preview { max-height: 220px; overflow: auto; }
.quick-profile-preview .token-row { padding: 10px 0; }
.log-card summary > .icon-btn { width: 28px; flex-basis: 28px; min-height: 28px; }
.log-card[open] summary > .icon-btn .icon { transform: none; }
@media(max-width: 1150px) {
    .grant-workspace { grid-template-columns: minmax(0,1.1fr) minmax(250px,.9fr); }
    .domain-selector, .permission-editor { padding: 18px; }
    .grant-owner { white-space: normal; max-width: 110px; text-align: right; }
    .grant-record-table { min-width: 700px; }
}
@media(max-width: 800px) {
    .profile-record-editor { grid-template-columns: 90px minmax(0,1fr) 32px; }
    .profile-record-editor > input:nth-of-type(2) { grid-column: 1 / 3; grid-row: 2; }
    .profile-record-editor > .icon-btn { grid-column: 3; grid-row: 1; }
    .profile-record-editor > .check-row { grid-column: 1 / 3; grid-row: 3; padding-bottom: 8px; }
    .sidebar { inset: 0 auto 0 0; width: 240px; border-radius: 0 12px 12px 0; background: #fff6fad9; }
    .workspace { margin: 0; padding: 12px 16px 24px; }
    .topbar { margin: 0; padding: 8px 10px; }
    .sidebar-backdrop { background: #c29cb048; }
    .grant-workspace { grid-template-columns: 1fr; }
    .permission-editor .grant-submit { margin-top: 18px; }
    .permission-editor h2 { margin-bottom: 20px; }
    .permission-options { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
    .permission-options .check-row { align-items: flex-start; font-size: 12px; }
    .permission-options .check-row input { margin-top: 1px; }
    .grant-zone-list { min-height: 180px; max-height: 280px; }
    .domain-selector, .permission-editor { padding: 18px; }
    .grant-empty { min-height: 160px; }
    .customer-account-editor { padding: 20px; }
}
@media(max-width: 480px) {
    .token-default-field { width: 100%; }
    .dns-profile-editor { padding: 16px; }
    .workspace { padding: 12px 12px 24px; }
    .topbar { margin: 0; }
    .customer-panel > .section-head { flex-direction: row; align-items: center; }
    .customer-tabs button { min-width: 0; flex: 1; font-size: 13px; padding: 8px 12px; }
    .customer-choice { grid-template-columns: 1fr; gap: 8px; }
    .customer-choice label { font-size: 13px; }
    .selector-heading { flex-direction: row; align-items: center; }
    .grant-zone-option { gap: 9px; flex-wrap: wrap; }
    .grant-zone-name { flex: 1 1 190px; font-size: 12px; }
    .grant-owner { max-width: none; font-size: 10px; }
    .permission-options { grid-template-columns: 1fr; gap: 14px; }
    .permission-options .check-row { font-size: 13px; }
    .account-field-grid { grid-template-columns: 1fr; }
    .records-heading { flex-direction: row; align-items: center; }
    .token-actions { flex-wrap: wrap; }
    .token-row { gap: 12px; }
    .customer-account-editor .section-head { flex-direction: row; align-items: center; }
    .task-form { padding: 18px; }
    .bulk-actions { flex-wrap: wrap; }
    .bulk-actions button { flex-basis: 40%; }
}
@supports not (backdrop-filter: blur(1px)) {
    .sidebar, .topbar, .domain-selector, .permission-editor, .table-scroll, .task-form, .customer-account-editor { background: #fff6fa; }
}
