/* HDCO Report Central visual system */
:root,
html[data-theme="light"] {
    color-scheme: light;
    --hdco-orange: #f37720;
    --hdco-orange-strong: #d95f0b;
    --hdco-orange-soft: #fff1e7;
    --hdco-navy: #102a43;
    --hdco-navy-deep: #091d2f;
    --hdco-blue: #1976d2;
    --hdco-blue-soft: #eaf4ff;
    --hdco-mint: #68cfb2;
    --hdco-mint-soft: #e7f8f3;
    --hdco-gray: #738185;
    --hdco-bg: #f4f7fa;
    --hdco-surface: #ffffff;
    --hdco-surface-subtle: #f7f9fb;
    --hdco-surface-raised: #ffffff;
    --hdco-border: #dfe6ec;
    --hdco-border-strong: #cad5df;
    --hdco-text: #162b3b;
    --hdco-text-muted: #617180;
    --hdco-success: #168268;
    --hdco-success-soft: #e4f7f1;
    --hdco-warning: #b15c12;
    --hdco-warning-soft: #fff3df;
    --hdco-danger: #c63b4a;
    --hdco-danger-soft: #feebed;
    --hdco-shadow-sm: 0 1px 2px rgb(16 42 67 / 4%), 0 6px 18px rgb(16 42 67 / 5%);
    --hdco-shadow-md: 0 16px 36px rgb(16 42 67 / 10%);
    --hdco-radius-sm: 8px;
    --hdco-radius: 14px;
    --hdco-radius-lg: 22px;

    --primary: var(--hdco-navy);
    --secondary: #1d4967;
    --accent: #ffb37c;
    --primary-fg: #ffffff;
    --body-fg: var(--hdco-text);
    --body-bg: var(--hdco-bg);
    --body-quiet-color: var(--hdco-text-muted);
    --body-loud-color: var(--hdco-navy);
    --header-color: #ffffff;
    --header-branding-color: #ffffff;
    --header-bg: var(--hdco-navy);
    --header-link-color: #ffffff;
    --breadcrumbs-fg: var(--hdco-text-muted);
    --breadcrumbs-link-fg: var(--hdco-blue);
    --breadcrumbs-bg: var(--hdco-surface);
    --link-fg: #1469b7;
    --link-hover-color: var(--hdco-orange-strong);
    --link-selected-fg: var(--hdco-orange-strong);
    --hairline-color: var(--hdco-border);
    --border-color: var(--hdco-border-strong);
    --error-fg: var(--hdco-danger);
    --message-success-bg: var(--hdco-success-soft);
    --message-warning-bg: var(--hdco-warning-soft);
    --message-error-bg: var(--hdco-danger-soft);
    --darkened-bg: #edf2f6;
    --selected-bg: var(--hdco-blue-soft);
    --selected-row: #f0f7ff;
    --button-fg: #ffffff;
    --button-bg: var(--hdco-blue);
    --button-hover-bg: #0e62b1;
    --default-button-bg: var(--hdco-orange);
    --default-button-hover-bg: var(--hdco-orange-strong);
    --close-button-bg: #6b7781;
    --close-button-hover-bg: #56616a;
    --delete-button-bg: var(--hdco-danger);
    --delete-button-hover-bg: #a92d3a;
    --object-tools-fg: var(--hdco-navy);
    --object-tools-bg: var(--hdco-mint);
    --object-tools-hover-bg: #50b99d;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --hdco-orange-soft: #3a271c;
    --hdco-blue-soft: #132f49;
    --hdco-mint-soft: #173b35;
    --hdco-bg: #0b1722;
    --hdco-surface: #112331;
    --hdco-surface-subtle: #152a3a;
    --hdco-surface-raised: #172d3d;
    --hdco-border: #294151;
    --hdco-border-strong: #385465;
    --hdco-text: #e7eef3;
    --hdco-text-muted: #9fb0bc;
    --hdco-success: #68cfb2;
    --hdco-success-soft: #163a34;
    --hdco-warning: #f1a24b;
    --hdco-warning-soft: #3c2c1b;
    --hdco-danger: #ff8995;
    --hdco-danger-soft: #40242b;
    --hdco-shadow-sm: 0 8px 20px rgb(0 0 0 / 16%);
    --hdco-shadow-md: 0 18px 42px rgb(0 0 0 / 28%);

    --primary: #0b1f31;
    --secondary: #163c58;
    --accent: #ffab6d;
    --primary-fg: #ffffff;
    --body-fg: var(--hdco-text);
    --body-bg: var(--hdco-bg);
    --body-quiet-color: var(--hdco-text-muted);
    --body-loud-color: #ffffff;
    --header-color: #ffffff;
    --header-branding-color: #ffffff;
    --header-bg: #081a29;
    --header-link-color: #ffffff;
    --breadcrumbs-fg: var(--hdco-text-muted);
    --breadcrumbs-link-fg: #82bded;
    --breadcrumbs-bg: var(--hdco-surface);
    --link-fg: #78b9ee;
    --link-hover-color: #ffad72;
    --link-selected-fg: #ffad72;
    --hairline-color: var(--hdco-border);
    --border-color: var(--hdco-border-strong);
    --error-fg: var(--hdco-danger);
    --message-success-bg: var(--hdco-success-soft);
    --message-warning-bg: var(--hdco-warning-soft);
    --message-error-bg: var(--hdco-danger-soft);
    --darkened-bg: #0e202e;
    --selected-bg: #18354b;
    --selected-row: #173047;
    --close-button-bg: #536874;
    --object-tools-fg: #08241d;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="auto"] {
        color-scheme: dark;
        --hdco-orange-soft: #3a271c;
        --hdco-blue-soft: #132f49;
        --hdco-mint-soft: #173b35;
        --hdco-bg: #0b1722;
        --hdco-surface: #112331;
        --hdco-surface-subtle: #152a3a;
        --hdco-surface-raised: #172d3d;
        --hdco-border: #294151;
        --hdco-border-strong: #385465;
        --hdco-text: #e7eef3;
        --hdco-text-muted: #9fb0bc;
        --hdco-success: #68cfb2;
        --hdco-success-soft: #163a34;
        --hdco-warning: #f1a24b;
        --hdco-warning-soft: #3c2c1b;
        --hdco-danger: #ff8995;
        --hdco-danger-soft: #40242b;
        --hdco-shadow-sm: 0 8px 20px rgb(0 0 0 / 16%);
        --hdco-shadow-md: 0 18px 42px rgb(0 0 0 / 28%);
        --body-fg: var(--hdco-text);
        --body-bg: var(--hdco-bg);
        --body-quiet-color: var(--hdco-text-muted);
        --body-loud-color: #ffffff;
        --breadcrumbs-fg: var(--hdco-text-muted);
        --breadcrumbs-link-fg: #82bded;
        --breadcrumbs-bg: var(--hdco-surface);
        --link-fg: #78b9ee;
        --link-hover-color: #ffad72;
        --hairline-color: var(--hdco-border);
        --border-color: var(--hdco-border-strong);
        --darkened-bg: #0e202e;
        --selected-bg: #18354b;
        --selected-row: #173047;
    }

    html[data-theme="auto"] .hdco-auth-theme-toggle .hdco-theme-light {
        background: transparent;
        color: var(--hdco-text-muted);
    }

    html[data-theme="auto"] .hdco-auth-theme-toggle .hdco-theme-dark {
        background: var(--hdco-blue-soft);
        color: #8bc5f4;
    }
}

* {
    box-sizing: border-box;
}

html {
    background: var(--hdco-bg);
}

body {
    min-width: 320px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

a,
button,
input,
select,
textarea,
summary {
    transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

:focus-visible {
    outline: 3px solid rgb(25 118 210 / 30%);
    outline-offset: 2px;
}

/* Application chrome */
#header {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(310px, auto) 1fr auto;
    gap: 22px;
    min-height: 82px;
    padding: 13px 26px;
    background: linear-gradient(118deg, var(--hdco-navy-deep) 0%, var(--hdco-navy) 58%, #164f6a 100%);
    border-bottom: 3px solid var(--hdco-orange);
    box-shadow: 0 8px 24px rgb(5 24 38 / 16%);
    color: #ffffff;
}

#branding {
    display: flex;
    align-items: center;
}

.hdco-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff !important;
    text-decoration: none;
}

.hdco-brand-logo {
    display: grid;
    place-items: center;
    width: 166px;
    height: 50px;
    padding: 7px 11px;
    background: #ffffff;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 11px;
    box-shadow: 0 4px 14px rgb(0 0 0 / 14%);
}

.hdco-brand-logo img {
    display: block;
    max-width: 100%;
    max-height: 38px;
}

.hdco-brand-product {
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgb(255 255 255 / 22%);
    padding-left: 14px;
    line-height: 1.2;
}

.hdco-brand-product strong {
    font-size: 16px;
    letter-spacing: -.01em;
}

.hdco-brand-product small {
    margin-top: 4px;
    color: rgb(255 255 255 / 67%);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

#user-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    padding: 0;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.hdco-user-identity {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-right: 4px;
    padding-right: 12px;
    border-right: 1px solid rgb(255 255 255 / 18%);
}

.hdco-user-avatar {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hdco-orange), #ffab6d);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.hdco-user-identity > span:last-child {
    display: flex;
    flex-direction: column;
    max-width: 140px;
    line-height: 1.25;
}

.hdco-user-identity small {
    color: rgb(255 255 255 / 60%);
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hdco-user-identity strong {
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#user-tools a.hdco-header-link,
#user-tools button.hdco-header-link {
    min-height: 34px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgb(255 255 255 / 79%);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

#user-tools a.hdco-header-link:hover,
#user-tools button.hdco-header-link:hover {
    background: rgb(255 255 255 / 10%);
    color: #ffffff;
}

#logout-form {
    display: inline-flex;
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 3px;
    padding: 0;
    border: 1px solid rgb(255 255 255 / 18%);
    border-radius: 9px;
    background: rgb(255 255 255 / 8%);
}

.theme-toggle:hover {
    background: rgb(255 255 255 / 15%);
}

#header > .hdco-header-action {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--hdco-orange);
    box-shadow: 0 7px 18px rgb(0 0 0 / 15%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

#header > .hdco-header-action:hover {
    background: #ff8734;
    transform: translateY(-1px);
}

.hdco-header-action svg {
    width: 18px;
    height: 18px;
}

.breadcrumbs {
    min-height: 45px;
    padding: 13px 28px;
    border-bottom: 1px solid var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
    font-size: 12px;
}

.breadcrumbs a {
    color: var(--link-fg);
    font-weight: 650;
}

.breadcrumbs span {
    margin: 0 8px;
    color: var(--hdco-border-strong);
}

.main > #nav-sidebar {
    flex: 0 0 245px;
    width: 245px;
    margin-top: 0;
    border-right: 1px solid var(--hdco-border);
    background: var(--hdco-surface);
    box-shadow: 4px 0 18px rgb(16 42 67 / 3%);
}

#nav-sidebar .module {
    margin: 14px 12px;
    border: 0;
    background: transparent;
}

#nav-sidebar .module caption {
    padding: 9px 10px;
    background: transparent;
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

#nav-sidebar .module caption a {
    color: inherit;
}

#nav-sidebar .module th,
#nav-sidebar .module td {
    padding: 0;
    border: 0;
}

#nav-sidebar .module tr {
    border: 0;
}

#nav-sidebar .module th a {
    display: block;
    margin: 2px 0;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--hdco-text);
    font-weight: 620;
}

#nav-sidebar .module tr.current-model th a,
#nav-sidebar .module th a:hover {
    background: var(--hdco-blue-soft);
    color: var(--link-fg);
}

#nav-sidebar .module td a {
    display: none;
}

#nav-filter {
    margin: 14px 12px 4px;
    width: calc(100% - 24px);
    border: 1px solid var(--hdco-border);
    border-radius: 8px;
    background: var(--hdco-surface-subtle);
}

.toggle-nav-sidebar {
    border-right: 1px solid var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
}

#content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px;
}

#content > h1,
#content .content-title {
    color: var(--hdco-navy);
    font-weight: 780;
    letter-spacing: -.025em;
}

html[data-theme="dark"] #content > h1,
html[data-theme="dark"] #content .content-title {
    color: #ffffff;
}

#footer {
    padding: 0;
    border-top: 1px solid var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
}

.hdco-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 18px 28px;
    font-size: 11px;
}

.hdco-footer-inner span:first-child {
    color: var(--hdco-navy);
    font-weight: 800;
}

html[data-theme="dark"] .hdco-footer-inner span:first-child {
    color: #ffffff;
}

/* Shared controls and native Django surfaces */
.module,
.inline-group,
#changelist-filter,
.results,
.submit-row,
.selector,
.calendarbox,
.clockbox {
    overflow: hidden;
    border: 1px solid var(--hdco-border);
    border-radius: var(--hdco-radius);
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-sm);
}

.module h2,
.module caption,
.inline-group h2 {
    padding: 13px 16px;
    background: var(--hdco-navy);
    color: #ffffff;
    font-size: 12px;
    font-weight: 760;
    letter-spacing: .02em;
}

table thead th,
table thead th.sorted {
    padding: 11px 12px;
    border-bottom: 1px solid var(--hdco-border);
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

table tbody th,
table tbody td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--hdco-border);
    vertical-align: middle;
}

table tbody tr:last-child th,
table tbody tr:last-child td {
    border-bottom: 0;
}

#changelist .results {
    overflow-x: auto;
}

#changelist .results table {
    border: 0;
}

#changelist .results tbody tr:hover {
    background: var(--selected-row);
}

#changelist-filter {
    border: 1px solid var(--hdco-border) !important;
}

#changelist-filter h2 {
    padding: 14px 16px;
    background: var(--hdco-navy);
    color: #ffffff;
    font-size: 12px;
}

#changelist-filter h3 {
    margin: 0;
    padding: 14px 16px 7px;
    color: var(--hdco-text);
    font-size: 11px;
    font-weight: 800;
}

#changelist-filter li {
    margin: 0;
}

#changelist-filter li a {
    display: block;
    padding: 6px 16px;
}

#changelist-filter li.selected a {
    border-left: 3px solid var(--hdco-orange);
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
    font-weight: 700;
}

#toolbar,
.actions {
    border: 1px solid var(--hdco-border) !important;
    background: var(--hdco-surface) !important;
}

#toolbar {
    margin-bottom: 14px !important;
    padding: 10px !important;
    border-radius: var(--hdco-radius) !important;
    box-shadow: var(--hdco-shadow-sm);
}

.actions {
    padding: 10px !important;
    border-radius: var(--hdco-radius) var(--hdco-radius) 0 0;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
select,
textarea {
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--hdco-border-strong);
    border-radius: 9px;
    background: var(--hdco-surface);
    color: var(--hdco-text);
    font: inherit;
}

textarea {
    min-height: 120px;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus,
select:focus,
textarea:focus {
    border-color: var(--hdco-blue);
    box-shadow: 0 0 0 3px rgb(25 118 210 / 13%);
    outline: none;
}

input:disabled,
select:disabled,
textarea:disabled {
    opacity: .68;
    background: var(--darkened-bg);
}

.button,
input[type="submit"],
input[type="button"],
.submit-row input,
a.button,
.object-tools a,
.btn,
button.btn {
    min-height: 39px;
    padding: 9px 15px;
    border: 0;
    border-radius: 9px;
    background: var(--button-bg);
    box-shadow: none;
    color: #ffffff;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
}

.button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.btn:hover {
    background: var(--button-hover-bg);
    color: #ffffff;
}

input[type="submit"].default,
.submit-row input.default,
.btn-primary {
    background: var(--hdco-orange);
}

input[type="submit"].default:hover,
.submit-row input.default:hover,
.btn-primary:hover {
    background: var(--hdco-orange-strong);
}

.object-tools {
    margin-top: -43px;
}

.object-tools a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    border-radius: 9px;
    background: var(--hdco-mint);
    color: #08241d;
}

.object-tools a:hover {
    background: #50b99d;
}

.submit-row {
    padding: 13px 15px;
}

.form-row {
    padding: 15px 17px;
    border-bottom: 1px solid var(--hdco-border);
}

.aligned label {
    color: var(--hdco-text);
    font-weight: 700;
}

.help,
p.help,
form p.help {
    color: var(--hdco-text-muted);
    font-size: 12px;
}

.errorlist {
    margin: 6px 0 0;
    padding: 0;
    color: var(--hdco-danger);
    font-size: 12px;
    font-weight: 650;
}

.errorlist li {
    list-style: none;
}

ul.messagelist {
    max-width: 1600px;
    margin: 18px auto 0;
    padding: 0 28px;
}

ul.messagelist li {
    margin: 0 0 8px;
    padding: 13px 16px 13px 42px;
    border: 1px solid var(--hdco-border);
    border-radius: 10px;
    box-shadow: var(--hdco-shadow-sm);
}

.paginator {
    border-top: 0 !important;
    background: var(--hdco-surface) !important;
}

/* Reusable HDCO components */
.hdco-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 780;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.hdco-button:hover {
    color: inherit;
    transform: translateY(-1px);
}

.hdco-button-primary {
    border-color: var(--hdco-orange);
    background: var(--hdco-orange);
    box-shadow: 0 8px 18px rgb(243 119 32 / 18%);
    color: #ffffff !important;
}

.hdco-button-primary:hover {
    border-color: var(--hdco-orange-strong);
    background: var(--hdco-orange-strong);
}

.hdco-button-secondary {
    border-color: var(--hdco-border-strong);
    background: var(--hdco-surface);
    color: var(--hdco-text) !important;
}

.hdco-button-secondary:hover,
.hdco-button-quiet:hover {
    border-color: var(--hdco-blue);
    background: var(--hdco-blue-soft);
    color: var(--link-fg) !important;
}

.hdco-button-quiet {
    border-color: var(--hdco-border);
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text) !important;
}

.hdco-eyebrow {
    display: inline-block;
    color: var(--hdco-orange-strong);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .11em;
    text-transform: uppercase;
}

html[data-theme="dark"] .hdco-eyebrow {
    color: #ff9f5a;
}

.hdco-card,
.hdco-panel {
    border: 1px solid var(--hdco-border);
    border-radius: var(--hdco-radius);
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-sm);
}

.hdco-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--hdco-blue-soft);
    color: var(--hdco-blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.hdco-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.hdco-status-active,
.hdco-status-connected,
.hdco-status-available,
.hdco-status-received,
.hdco-status-ready,
.hdco-status-completed {
    background: var(--hdco-success-soft);
    color: var(--hdco-success);
}

.hdco-status-reserved,
.hdco-status-receiving,
.hdco-status-pending,
.hdco-status-processing,
.hdco-status-claimed {
    background: var(--hdco-warning-soft);
    color: var(--hdco-warning);
}

.hdco-status-revoked,
.hdco-status-disconnected,
.hdco-status-expired,
.hdco-status-failed {
    background: var(--hdco-danger-soft);
    color: var(--hdco-danger);
}

.hdco-status-consumed,
.hdco-status-never-seen,
.hdco-status-retired {
    background: var(--darkened-bg);
    color: var(--hdco-text-muted);
}

/* Dashboard */
.hdco-dashboard #content {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: 1600px;
    padding-top: 24px;
}

.hdco-dashboard-shell {
    display: grid;
    gap: 20px;
}

.hdco-dashboard-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 178px;
    overflow: hidden;
    padding: 31px 34px;
    border: 1px solid rgb(255 255 255 / 8%);
    border-radius: var(--hdco-radius-lg);
    background:
        radial-gradient(circle at 88% 22%, rgb(104 207 178 / 19%) 0 90px, transparent 91px),
        linear-gradient(120deg, var(--hdco-navy-deep), #123b59 72%, #17647a);
    box-shadow: var(--hdco-shadow-md);
    color: #ffffff;
}

.hdco-dashboard-hero::after {
    position: absolute;
    right: 18%;
    bottom: -62px;
    width: 170px;
    height: 170px;
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: 50%;
    content: "";
}

.hdco-dashboard-hero .hdco-eyebrow {
    color: #ff9c54;
}

.hdco-dashboard-hero h1 {
    margin: 6px 0 6px;
    color: #ffffff;
    font-size: clamp(28px, 3vw, 40px);
    font-weight: 820;
    letter-spacing: -.04em;
}

.hdco-dashboard-hero p {
    max-width: 590px;
    margin: 0;
    color: rgb(255 255 255 / 73%);
    font-size: 14px;
}

.hdco-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hdco-dashboard-hero .hdco-button-secondary {
    border-color: rgb(255 255 255 / 28%);
    background: rgb(255 255 255 / 8%);
    color: #ffffff !important;
}

.hdco-dashboard-hero .hdco-button-secondary:hover {
    background: rgb(255 255 255 / 15%);
}

.hdco-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hdco-stat-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 13px;
    align-items: start;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--hdco-border);
    border-radius: var(--hdco-radius);
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-sm);
    color: var(--hdco-text);
    text-decoration: none;
}

.hdco-stat-card:hover {
    border-color: var(--hdco-border-strong);
    box-shadow: var(--hdco-shadow-md);
    color: var(--hdco-text);
    transform: translateY(-2px);
}

.hdco-stat-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .04em;
}

.hdco-stat-icon-orange { background: var(--hdco-orange-soft); color: var(--hdco-orange-strong); }
.hdco-stat-icon-mint { background: var(--hdco-mint-soft); color: var(--hdco-success); }
.hdco-stat-icon-blue { background: var(--hdco-blue-soft); color: var(--hdco-blue); }
.hdco-stat-icon-navy { background: #e9eef3; color: var(--hdco-navy); }
.hdco-stat-icon-danger { background: var(--hdco-danger-soft); color: var(--hdco-danger); }
html[data-theme="dark"] .hdco-stat-icon-navy { background: #233d50; color: #d6e5ef; }

.hdco-stat-copy {
    display: grid;
    min-width: 0;
}

.hdco-stat-copy small {
    overflow: hidden;
    color: var(--hdco-text-muted);
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdco-stat-copy strong {
    margin: 1px 0;
    color: var(--hdco-navy);
    font-size: 28px;
    font-weight: 820;
    letter-spacing: -.04em;
    line-height: 1.2;
}

html[data-theme="dark"] .hdco-stat-copy strong { color: #ffffff; }

.hdco-stat-copy > span {
    overflow: hidden;
    color: var(--hdco-text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdco-dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
    gap: 18px;
    align-items: start;
}

.hdco-panel {
    min-width: 0;
    padding: 20px;
}

.hdco-panel-heading {
    margin-bottom: 15px;
}

.hdco-panel-heading-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: end;
}

.hdco-panel-heading h2 {
    margin: 3px 0 0;
    color: var(--hdco-navy);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

html[data-theme="dark"] .hdco-panel-heading h2 { color: #ffffff; }

.hdco-panel-heading > a {
    font-size: 11px;
    font-weight: 750;
}

.hdco-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
}

.hdco-quick-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--hdco-border);
    border-radius: 11px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text);
    text-decoration: none;
}

.hdco-quick-link:hover {
    border-color: rgb(25 118 210 / 35%);
    background: var(--hdco-blue-soft);
    color: var(--link-fg);
    transform: translateX(2px);
}

.hdco-quick-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--hdco-surface);
    color: var(--hdco-orange-strong);
    font-size: 10px;
    font-weight: 850;
}

.hdco-quick-link > span:nth-child(2) {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.hdco-quick-link strong {
    font-size: 12px;
}

.hdco-quick-link small {
    overflow: hidden;
    color: var(--hdco-text-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdco-quick-link b {
    color: var(--hdco-border-strong);
    font-size: 16px;
}

.hdco-recent-list {
    display: grid;
    gap: 8px;
}

.hdco-recent-item {
    display: grid;
    grid-template-columns: 8px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    min-width: 0;
    padding: 11px 8px;
    border-bottom: 1px solid var(--hdco-border);
    color: var(--hdco-text);
    text-decoration: none;
}

.hdco-recent-item:last-child { border-bottom: 0; }
.hdco-recent-item:hover { color: var(--link-fg); }

.hdco-report-mark {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--hdco-mint);
    box-shadow: 0 0 0 4px var(--hdco-mint-soft);
}

.hdco-recent-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.hdco-recent-copy strong,
.hdco-recent-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdco-recent-copy strong { font-size: 12px; }
.hdco-recent-copy small { color: var(--hdco-text-muted); font-size: 10px; }
.hdco-recent-item time { color: var(--hdco-text-muted); font-size: 9px; white-space: nowrap; }

.hdco-empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 24px;
    border: 1px dashed var(--hdco-border-strong);
    border-radius: 12px;
    text-align: center;
}

.hdco-empty-state > span { color: var(--hdco-mint); font-size: 30px; }
.hdco-empty-state strong { margin-top: 6px; color: var(--hdco-navy); }
html[data-theme="dark"] .hdco-empty-state strong { color: #ffffff; }
.hdco-empty-state p { margin: 2px 0 0; color: var(--hdco-text-muted); font-size: 11px; }

.hdco-native-apps {
    margin-top: 2px;
}

.hdco-native-apps details {
    border: 1px solid var(--hdco-border);
    border-radius: var(--hdco-radius);
    background: var(--hdco-surface);
}

.hdco-native-apps summary {
    padding: 14px 18px;
    color: var(--hdco-text-muted);
    font-size: 11px;
    font-weight: 750;
    cursor: pointer;
}

.hdco-native-app-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 14px 14px;
}

.hdco-native-app-grid .module {
    margin: 0;
    border-radius: 11px;
    box-shadow: none;
}

/* Bespoke server enrollment screens */
.hdco-page-shell {
    display: grid;
    gap: 20px;
    max-width: 1220px;
    margin: 0 auto;
}

.hdco-page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
}

.hdco-page-header h1 {
    margin: 4px 0 4px;
    color: var(--hdco-navy);
    font-size: clamp(27px, 3vw, 36px);
    font-weight: 820;
    letter-spacing: -.035em;
}

html[data-theme="dark"] .hdco-page-header h1 { color: #ffffff; }

.hdco-page-header p {
    margin: 0;
    color: var(--hdco-text-muted);
}

.hdco-step-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border: 1px solid var(--hdco-border);
    border-radius: 999px;
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.hdco-step-complete {
    border-color: rgb(22 130 104 / 22%);
    background: var(--hdco-success-soft);
    color: var(--hdco-success);
}

.hdco-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
    gap: 18px;
    align-items: start;
}

.hdco-form-card {
    padding: 25px;
}

.hdco-card-heading {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--hdco-border);
}

.hdco-card-icon {
    display: grid;
    place-items: center;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--hdco-blue-soft);
    color: var(--hdco-blue);
}

.hdco-card-icon svg { width: 25px; height: 25px; }

.hdco-card-heading h2,
.hdco-guidance-card h2 {
    margin: 0;
    color: var(--hdco-navy);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

html[data-theme="dark"] .hdco-card-heading h2,
html[data-theme="dark"] .hdco-guidance-card h2 { color: #ffffff; }

.hdco-card-heading p {
    margin: 3px 0 0;
    color: var(--hdco-text-muted);
    font-size: 12px;
}

.hdco-field {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

.hdco-field > label,
.hdco-field > legend {
    display: block;
    margin-bottom: 7px;
    color: var(--hdco-text);
    font-size: 12px;
    font-weight: 780;
}

.hdco-field input,
.hdco-field select {
    width: 100%;
    max-width: none;
}

.hdco-field .help {
    margin: 6px 0 0;
}

.hdco-field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin: -3px 0 9px;
}

.hdco-count-badge {
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--darkened-bg);
    color: var(--hdco-text-muted);
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

#recipient-container {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
}

.recipient-row {
    display: flex;
    gap: 8px;
}

.recipient-row input { flex: 1; min-width: 0; }

.recipient-remove {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid var(--hdco-border);
    border-radius: 9px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.recipient-remove:hover {
    border-color: var(--hdco-danger);
    background: var(--hdco-danger-soft);
    color: var(--hdco-danger);
}

.recipient-remove span { font-size: 16px; line-height: 0; }

.hdco-inline-feedback,
.hdco-copy-feedback {
    min-height: 17px;
    margin: 6px 0 0;
    color: var(--hdco-success);
    font-size: 10px;
    font-weight: 650;
}

.hdco-inline-feedback.is-error,
.hdco-copy-feedback.is-error { color: var(--hdco-danger); }

.hdco-form-alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid rgb(198 59 74 / 22%);
    border-radius: 9px;
    background: var(--hdco-danger-soft);
    color: var(--hdco-danger);
}

.hdco-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--hdco-border);
}

.hdco-guidance-card {
    position: sticky;
    top: 20px;
    overflow: hidden;
    padding: 25px;
}

.hdco-guidance-card::before {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--hdco-orange), var(--hdco-mint));
    content: "";
}

.hdco-guidance-mark {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    margin-bottom: 16px;
    border-radius: 13px;
    background: var(--hdco-mint-soft);
    color: var(--hdco-success);
    font-size: 20px;
    font-weight: 850;
}

.hdco-guidance-card h2 { margin-top: 4px; }

.hdco-process-list {
    display: grid;
    gap: 16px;
    margin: 22px 0;
    padding: 0;
}

.hdco-process-list li {
    display: flex;
    gap: 11px;
    align-items: start;
    list-style: none;
}

.hdco-process-list li > span {
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border: 1px solid var(--hdco-border);
    border-radius: 50%;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-orange-strong);
    font-size: 10px;
    font-weight: 850;
}

.hdco-process-list div { display: flex; flex-direction: column; }
.hdco-process-list strong { color: var(--hdco-text); font-size: 11px; }
.hdco-process-list small { margin-top: 2px; color: var(--hdco-text-muted); font-size: 10px; line-height: 1.45; }

.hdco-security-note {
    padding: 13px 14px;
    border: 1px solid rgb(25 118 210 / 15%);
    border-radius: 10px;
    background: var(--hdco-blue-soft);
}

.hdco-security-note strong { color: var(--hdco-blue); font-size: 11px; }
.hdco-security-note p { margin: 3px 0 0; color: var(--hdco-text-muted); font-size: 10px; }

.hdco-token-page { max-width: 950px; }
.hdco-token-card { padding: 26px; }

.hdco-token-warning {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid rgb(177 92 18 / 20%);
    border-radius: 11px;
    background: var(--hdco-warning-soft);
    color: var(--hdco-warning);
}

.hdco-token-warning > span {
    display: grid;
    place-items: center;
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-weight: 850;
}

.hdco-token-warning strong { font-size: 12px; }
.hdco-token-warning p { margin: 2px 0 0; color: var(--hdco-text-muted); font-size: 10px; }

.hdco-token-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid var(--hdco-border);
    border-radius: 11px;
    background: var(--hdco-border);
}

.hdco-token-summary > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 12px 14px;
    background: var(--hdco-surface-subtle);
}

.hdco-token-summary small { color: var(--hdco-text-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; }
.hdco-token-summary strong { overflow: hidden; margin-top: 2px; color: var(--hdco-text); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }

.hdco-install-guide {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid var(--hdco-border);
    border-radius: 13px;
    background: linear-gradient(145deg, var(--hdco-surface), var(--hdco-surface-subtle));
}

.hdco-install-guide-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.hdco-install-guide-heading > div > span {
    color: var(--hdco-orange-strong);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.hdco-install-guide-heading h2 {
    margin: 4px 0 3px;
    color: var(--hdco-text);
    font-size: 17px;
}

.hdco-install-guide-heading p,
.hdco-install-step-copy p {
    margin: 0;
    color: var(--hdco-text-muted);
    font-size: 10.5px;
    line-height: 1.5;
}

.hdco-install-duration {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--hdco-mint-soft);
    color: var(--hdco-success);
    font-size: 9px;
    font-weight: 800;
}

.hdco-install-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
}

.hdco-install-steps > li {
    position: relative;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 17px;
    list-style: none;
}

.hdco-install-steps > li:last-child { padding-bottom: 0; }
.hdco-install-steps > li:not(:last-child)::after {
    position: absolute;
    top: 29px;
    bottom: 0;
    left: 14px;
    width: 1px;
    background: var(--hdco-border);
    content: "";
}

.hdco-install-step-number {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 29px;
    height: 29px;
    border: 1px solid rgb(243 119 32 / 25%);
    border-radius: 9px;
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
    font-size: 10px;
    font-weight: 850;
}

.hdco-install-step-copy { min-width: 0; padding-top: 5px; }
.hdco-install-step-copy > strong { display: block; margin-bottom: 3px; color: var(--hdco-text); font-size: 11.5px; }
.hdco-install-step-copy code { color: var(--hdco-orange-strong); }

.hdco-supported-systems {
    margin-top: 9px;
    border: 1px solid var(--hdco-border);
    border-radius: 9px;
    background: var(--hdco-surface);
}

.hdco-supported-systems summary {
    padding: 9px 11px;
    color: var(--hdco-text);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.hdco-supported-systems > div {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 0 11px 11px;
}

.hdco-supported-systems span {
    padding: 4px 7px;
    border-radius: 999px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
    font-size: 9px;
    font-weight: 700;
}

.hdco-install-command {
    margin-top: 9px;
    padding: 11px;
    border-radius: 10px;
    background: #0d263a;
}

.hdco-install-command > code {
    display: block;
    overflow-x: auto;
    color: #dff7ef;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 10px;
    line-height: 1.55;
    white-space: nowrap;
    user-select: all;
}

.hdco-command-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 7px 10px;
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 8px;
    background: rgb(255 255 255 / 8%);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 750;
    cursor: pointer;
}

.hdco-command-copy:hover,
.hdco-command-copy.is-copied { border-color: var(--hdco-mint); background: var(--hdco-mint); color: #09271f; }
.hdco-install-command .hdco-copy-feedback { color: #8ce0c9; }

.hdco-token-block {
    position: relative;
    padding: 19px;
    border-radius: 13px;
    background: linear-gradient(140deg, #091b2b, #102f47);
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 7%);
}

.hdco-token-label {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 750;
}

.hdco-token-label small { color: rgb(255 255 255 / 45%); font-size: 9px; text-transform: uppercase; }

.hdco-token-value {
    display: block;
    margin: 13px 0;
    padding: 14px;
    overflow-wrap: anywhere;
    border: 1px solid rgb(255 255 255 / 10%);
    border-radius: 9px;
    background: rgb(0 0 0 / 19%);
    color: #dff7ef;
    font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    user-select: all;
}

.hdco-copy-button.is-copied {
    border-color: var(--hdco-mint);
    background: var(--hdco-mint);
    color: #09271f !important;
}

.hdco-token-block .hdco-copy-feedback { color: #8ce0c9; }

.hdco-technical-details {
    margin-top: 16px;
    border: 1px solid var(--hdco-border);
    border-radius: 10px;
}

.hdco-technical-details summary {
    padding: 12px 14px;
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.hdco-technical-details dl {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0;
    padding: 0 14px 14px;
    font-size: 11px;
}

.hdco-technical-details dt { color: var(--hdco-text-muted); font-weight: 750; }
.hdco-technical-details dd { margin: 0; min-width: 0; }
.hdco-technical-details code { overflow-wrap: anywhere; color: var(--hdco-text); }
.hdco-technical-details ul { margin: 0; padding-left: 17px; }

.hdco-state-page {
    min-height: 58vh;
    place-items: center;
}

.hdco-state-card {
    max-width: 600px;
    padding: 38px;
    text-align: center;
}

.hdco-state-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    border-radius: 18px;
    background: var(--hdco-warning-soft);
    color: var(--hdco-warning);
    font-size: 24px;
    font-weight: 850;
}

.hdco-state-card h1 {
    margin: 5px 0 8px;
    color: var(--hdco-navy);
    font-size: 27px;
    font-weight: 820;
    letter-spacing: -.03em;
}

html[data-theme="dark"] .hdco-state-card h1 { color: #ffffff; }
.hdco-state-card > p { max-width: 470px; margin: 0 auto 20px; color: var(--hdco-text-muted); }
.hdco-state-card .hdco-security-note { text-align: left; }
.hdco-actions-centered { justify-content: center; }

/* Authentication and two-factor screens */
.hdco-auth-body {
    min-height: 100vh;
    margin: 0;
    background: var(--hdco-bg);
    color: var(--hdco-text);
}

.hdco-auth-shell {
    display: grid;
    grid-template-columns: minmax(340px, .85fr) minmax(460px, 1.15fr);
    min-height: 100vh;
}

.hdco-auth-brand-panel {
    position: relative;
    display: flex;
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(32px, 5vw, 64px);
    background:
        radial-gradient(circle at 90% 15%, rgb(104 207 178 / 18%) 0 125px, transparent 126px),
        linear-gradient(145deg, #081d2e, #113d5b 68%, #17647a);
    color: #ffffff;
}

.hdco-auth-brand-panel::after {
    position: absolute;
    right: -90px;
    bottom: -100px;
    width: 290px;
    height: 290px;
    border: 1px solid rgb(255 255 255 / 9%);
    border-radius: 50%;
    content: "";
}

.hdco-auth-logo {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: min(250px, 75%);
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgb(0 0 0 / 18%);
}

.hdco-auth-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.hdco-auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin: auto 0;
    padding: 60px 0;
}

.hdco-auth-brand-copy .hdco-eyebrow { color: #ff9b51; }

.hdco-auth-brand-copy h1 {
    margin: 8px 0 12px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 55px);
    font-weight: 830;
    letter-spacing: -.055em;
    line-height: 1.02;
}

.hdco-auth-brand-copy p {
    max-width: 430px;
    margin: 0;
    color: rgb(255 255 255 / 70%);
    font-size: 15px;
}

.hdco-auth-assurance {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    align-items: center;
    max-width: 360px;
    padding: 13px 15px;
    border: 1px solid rgb(255 255 255 / 13%);
    border-radius: 12px;
    background: rgb(255 255 255 / 7%);
}

.hdco-auth-assurance > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--hdco-mint);
    color: #08251e;
    font-weight: 850;
}

.hdco-auth-assurance div { display: flex; flex-direction: column; }
.hdco-auth-assurance strong { font-size: 11px; }
.hdco-auth-assurance small { color: rgb(255 255 255 / 57%); font-size: 9px; }

.hdco-auth-main {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    place-items: center;
    min-width: 0;
    padding: 50px clamp(28px, 7vw, 100px) 24px;
    background: var(--hdco-bg);
}

.hdco-auth-theme-toggle {
    position: absolute;
    top: 24px;
    right: 26px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    width: 66px;
    height: 34px;
    padding: 3px;
    border: 1px solid var(--hdco-border);
    border-radius: 999px;
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
    box-shadow: var(--hdco-shadow-sm);
    cursor: pointer;
}

.hdco-auth-theme-toggle span {
    display: grid;
    place-items: center;
    height: 26px;
    border-radius: 50%;
    font-size: 12px;
}

html[data-theme="light"] .hdco-theme-light,
html[data-theme="auto"] .hdco-theme-light {
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
}

html[data-theme="dark"] .hdco-theme-dark {
    background: var(--hdco-blue-soft);
    color: #8bc5f4;
}

.hdco-auth-content {
    width: 100%;
    max-width: 500px;
}

.hdco-auth-card {
    padding: clamp(25px, 4vw, 38px);
    border: 1px solid var(--hdco-border);
    border-radius: 18px;
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-md);
}

.hdco-auth-card h1,
.hdco-auth-card h2,
.hdco-auth-card h3 {
    color: var(--hdco-navy);
    font-weight: 820;
    letter-spacing: -.03em;
}

html[data-theme="dark"] .hdco-auth-card h1,
html[data-theme="dark"] .hdco-auth-card h2,
html[data-theme="dark"] .hdco-auth-card h3 { color: #ffffff; }

.hdco-auth-card h1 { margin: 0 0 8px; font-size: 27px; }
.hdco-auth-card h2 { font-size: 21px; }
.hdco-auth-card p { color: var(--hdco-text-muted); }

.hdco-auth-card form p,
.hdco-auth-card .form-group {
    margin: 0 0 17px;
}

.hdco-auth-card label {
    display: block;
    margin-bottom: 6px;
    color: var(--hdco-text);
    font-size: 11px;
    font-weight: 760;
}

.hdco-auth-card input:not([type="checkbox"]):not([type="radio"]),
.hdco-auth-card select {
    width: 100%;
}

.hdco-auth-card .btn,
.hdco-auth-card button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    margin-top: 5px;
    padding: 10px 16px;
}

.hdco-auth-card .btn-primary,
.hdco-auth-card button[type="submit"] {
    background: var(--hdco-orange);
    color: #ffffff;
}

.hdco-auth-card .btn-block,
.hdco-auth-card .btn-lg { width: 100%; }
.hdco-auth-card .btn-secondary { border: 1px solid var(--hdco-border); background: var(--hdco-surface-subtle); color: var(--hdco-text); }
.hdco-auth-card .btn-link { background: transparent; color: var(--link-fg); }
.hdco-auth-card .btn:disabled,
.hdco-auth-card button:disabled { opacity: .42; cursor: not-allowed; }

.hdco-auth-card .alert {
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid var(--hdco-border);
    border-radius: 9px;
    background: var(--hdco-blue-soft);
    color: var(--hdco-text);
    font-size: 11px;
}

.hdco-auth-card .alert-danger { background: var(--hdco-danger-soft); color: var(--hdco-danger); }
.hdco-auth-card .alert-warning { background: var(--hdco-warning-soft); color: var(--hdco-warning); }
.hdco-auth-card .list-group { margin: 14px 0; padding: 0; }
.hdco-auth-card .list-group-item { padding: 11px 12px; border: 1px solid var(--hdco-border); background: var(--hdco-surface-subtle); list-style: none; }
.hdco-auth-card .list-group-item + .list-group-item { border-top: 0; }
.hdco-auth-card table { width: 100%; margin: 15px 0; border: 1px solid var(--hdco-border); border-radius: 10px; }
.hdco-auth-card hr { border: 0; border-top: 1px solid var(--hdco-border); }
.hdco-auth-card img { max-width: 100%; height: auto; }
.hdco-auth-card .text-muted { color: var(--hdco-text-muted) !important; }
.hdco-auth-card .float-right { float: right; }

.hdco-auth-main > footer {
    align-self: end;
    color: var(--hdco-text-muted);
    font-size: 10px;
    text-align: center;
}

/* Responsive */
@media (max-width: 1180px) {
    #header {
        grid-template-columns: minmax(280px, auto) 1fr;
        gap: 12px;
    }

    #header > .hdco-header-action { display: none; }
    .hdco-brand-logo { width: 145px; }
    .hdco-user-identity { display: none; }
    .hdco-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hdco-dashboard-columns { grid-template-columns: 1fr; }
    .hdco-auth-shell { grid-template-columns: minmax(300px, .75fr) minmax(420px, 1.25fr); }
}

@media (max-width: 820px) {
    #header {
        display: flex;
        min-height: auto;
        flex-wrap: wrap;
        padding: 12px 16px;
    }

    #branding { flex: 1; }
    .hdco-brand-product { display: none; }
    #user-tools { width: auto; }
    #user-tools a.hdco-header-link { display: none; }
    .breadcrumbs { padding: 11px 18px; }
    #content { padding: 20px 16px; }
    .hdco-dashboard-hero { align-items: start; flex-direction: column; padding: 25px; }
    .hdco-form-layout { grid-template-columns: 1fr; }
    .hdco-guidance-card { position: static; }
    .hdco-auth-shell { display: block; }
    .hdco-auth-brand-panel { min-height: auto; padding: 23px; }
    .hdco-auth-brand-copy { display: none; }
    .hdco-auth-logo { width: 190px; }
    .hdco-auth-assurance { display: none; }
    .hdco-auth-main { min-height: calc(100vh - 110px); padding: 70px 20px 22px; }
}

@media (max-width: 580px) {
    .hdco-brand-logo { width: 132px; height: 45px; }
    #user-tools .hdco-logout { padding: 6px; }
    .hdco-footer-inner { flex-direction: column; padding: 16px 18px; }
    .hdco-stat-grid,
    .hdco-quick-grid,
    .hdco-native-app-grid { grid-template-columns: 1fr; }
    .hdco-dashboard-hero { border-radius: 16px; }
    .hdco-hero-actions { width: 100%; }
    .hdco-hero-actions .hdco-button { flex: 1; }
    .hdco-recent-item { grid-template-columns: 8px minmax(0, 1fr) auto; }
    .hdco-recent-item time { display: none; }
    .hdco-page-header { align-items: start; flex-direction: column; }
    .hdco-form-card,
    .hdco-guidance-card,
    .hdco-token-card { padding: 19px; }
    .recipient-row { align-items: stretch; }
    .recipient-remove { width: 40px; overflow: hidden; font-size: 0; }
    .recipient-remove span { margin: auto; font-size: 18px; }
    .hdco-token-summary { grid-template-columns: 1fr; }
    .hdco-install-guide { padding: 15px; }
    .hdco-install-guide-heading { flex-direction: column; gap: 8px; }
    .hdco-install-command > code { overflow-wrap: anywhere; white-space: normal; }
    .hdco-token-label { flex-direction: column; }
    .hdco-technical-details dl { grid-template-columns: 1fr; }
    .hdco-actions .hdco-button { width: 100%; }
    .hdco-state-card { padding: 26px 20px; }
}

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

/* Visual refinement: neutral surfaces with HostDime orange as the accent. */
:root,
html[data-theme="light"] {
    --hdco-bg: #f4f5f5;
    --hdco-surface: #ffffff;
    --hdco-surface-subtle: #f7f8f8;
    --hdco-surface-raised: #ffffff;
    --hdco-border: #dde2e3;
    --hdco-border-strong: #cbd3d5;
    --hdco-text: #263238;
    --hdco-text-muted: #65747a;
    --hdco-heading: #17262d;
    --hdco-header: #f4ebe3;
    --hdco-header-strong: #ead8ca;
    --hdco-sidebar: #fafafa;
    --hdco-shadow-sm: 0 1px 2px rgb(32 43 48 / 4%), 0 7px 22px rgb(32 43 48 / 5%);
    --hdco-shadow-md: 0 18px 42px rgb(32 43 48 / 10%);
    --primary: #39464b;
    --secondary: #536267;
    --header-bg: var(--hdco-header);
    --header-color: var(--hdco-heading);
    --header-link-color: var(--hdco-heading);
    --header-branding-color: var(--hdco-heading);
    --link-fg: #c6590e;
    --link-hover-color: #9f4206;
    --link-selected-fg: #9f4206;
    --breadcrumbs-bg: #fbf8f5;
    --breadcrumbs-fg: var(--hdco-text-muted);
    --breadcrumbs-link-fg: #b84d08;
    --darkened-bg: #eef1f1;
    --selected-bg: #fff1e6;
    --selected-row: #fff8f3;
    --object-tools-fg: #ffffff;
    --object-tools-bg: var(--hdco-orange);
    --object-tools-hover-bg: var(--hdco-orange-strong);
}

html[data-theme="dark"] {
    --hdco-bg: #111416;
    --hdco-surface: #1a1f22;
    --hdco-surface-subtle: #22282b;
    --hdco-surface-raised: #252c2f;
    --hdco-border: #333d41;
    --hdco-border-strong: #465258;
    --hdco-text: #edf1f2;
    --hdco-text-muted: #a6b0b4;
    --hdco-heading: #ffffff;
    --hdco-header: #f1e5db;
    --hdco-header-strong: #e6d2c1;
    --hdco-sidebar: #171c1f;
    --hdco-shadow-sm: 0 9px 24px rgb(0 0 0 / 22%);
    --hdco-shadow-md: 0 20px 46px rgb(0 0 0 / 32%);
    --primary: #242b2e;
    --secondary: #353f43;
    --header-bg: var(--hdco-header);
    --header-color: #20292d;
    --header-link-color: #20292d;
    --header-branding-color: #20292d;
    --link-fg: #ffad74;
    --link-hover-color: #ffc49d;
    --link-selected-fg: #ffc49d;
    --breadcrumbs-bg: #181d20;
    --breadcrumbs-fg: var(--hdco-text-muted);
    --breadcrumbs-link-fg: #ffad74;
    --darkened-bg: #202629;
    --selected-bg: #35271f;
    --selected-row: #24211f;
}

body,
#container {
    background: var(--hdco-bg);
    color: var(--hdco-text);
}

.hdco-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

[hidden] {
    display: none !important;
}

/* Warm brand bar: the transparent logo now belongs to the header. */
#header {
    grid-template-columns: minmax(330px, auto) 1fr auto;
    min-height: 76px;
    padding: 11px 24px;
    overflow: visible;
    border: 0;
    background:
        radial-gradient(circle at 87% -70%, rgb(243 119 32 / 18%) 0 125px, transparent 126px),
        linear-gradient(102deg, var(--hdco-header) 0%, #f9f4ef 62%, var(--hdco-header-strong) 100%);
    box-shadow: 0 7px 22px rgb(55 43 34 / 10%);
    color: #20292d;
}

#header::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hdco-orange), #ff9d59 58%, #d86313);
    content: "";
}

.hdco-brand {
    gap: 16px;
    color: #20292d !important;
}

.hdco-brand-logo {
    width: 184px;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hdco-brand-logo img {
    width: 100%;
    max-height: 42px;
    object-fit: contain;
}

.hdco-brand-product {
    padding-left: 16px;
    border-left-color: rgb(71 78 80 / 20%);
}

.hdco-brand-product strong {
    color: #20292d;
    font-size: 15px;
}

.hdco-brand-product small {
    color: #697377;
}

#user-tools {
    position: relative;
    gap: 9px;
    overflow: visible;
    color: #20292d;
}

.hdco-account-menu {
    position: relative;
}

.hdco-account-trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 45px;
    padding: 5px 9px 5px 5px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #263238;
    font: inherit;
    cursor: pointer;
}

.hdco-account-trigger:hover,
.hdco-account-trigger[aria-expanded="true"] {
    border-color: rgb(91 77 67 / 14%);
    background: rgb(255 255 255 / 55%);
}

.hdco-user-avatar {
    width: 35px;
    height: 35px;
    background: var(--hdco-orange);
    box-shadow: 0 5px 14px rgb(243 119 32 / 20%);
}

.hdco-user-copy {
    display: flex;
    min-width: 75px;
    max-width: 145px;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.hdco-user-copy small {
    color: #7b8589;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hdco-user-copy strong {
    overflow: hidden;
    color: #263238;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hdco-account-chevron {
    width: 16px;
    height: 16px;
    color: #7b8589;
}

.hdco-account-trigger[aria-expanded="true"] .hdco-account-chevron {
    transform: rotate(180deg);
}

.hdco-account-popover {
    position: absolute;
    z-index: 100;
    top: calc(100% + 11px);
    right: 0;
    width: 275px;
    padding: 8px;
    border: 1px solid var(--hdco-border);
    border-radius: 14px;
    background: var(--hdco-surface);
    box-shadow: 0 20px 48px rgb(25 31 34 / 18%);
    color: var(--hdco-text);
    text-align: left;
}

.hdco-account-heading {
    display: flex;
    flex-direction: column;
    margin: 0 3px 5px;
    padding: 9px 10px 11px;
    border-bottom: 1px solid var(--hdco-border);
}

.hdco-account-heading strong {
    color: var(--hdco-heading);
    font-size: 12px;
}

.hdco-account-heading small {
    color: var(--hdco-text-muted);
    font-size: 9px;
}

#user-tools .hdco-account-popover > a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 9px;
    align-items: center;
    margin: 2px 0;
    padding: 9px;
    border-radius: 9px;
    color: var(--hdco-text);
    text-decoration: none;
}

#user-tools .hdco-account-popover > a:hover {
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
}

.hdco-account-popover > a > svg {
    width: 20px;
    height: 20px;
    padding: 6px;
    overflow: visible;
    border-radius: 9px;
    background: var(--hdco-surface-subtle);
    box-sizing: content-box;
}

.hdco-account-popover > a > span {
    display: flex;
    flex-direction: column;
}

.hdco-account-popover > a strong {
    color: inherit;
    font-size: 11px;
}

.hdco-account-popover > a small {
    color: var(--hdco-text-muted);
    font-size: 9px;
}

.hdco-theme-switch {
    position: relative;
    display: block;
    flex: 0 0 58px;
    width: 58px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #cbd1d3;
    border-radius: 999px;
    background: #e1e5e6;
    color: #5a686e;
    box-shadow: inset 0 1px 3px rgb(28 36 39 / 10%);
    cursor: pointer;
}

.hdco-theme-switch:hover {
    border-color: #aeb8bb;
}

.hdco-theme-icon,
.hdco-theme-light,
.hdco-theme-dark {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    background: transparent !important;
    font-size: 11px;
    transform: translateY(-50%);
}

.hdco-theme-sun,
.hdco-theme-light { left: 6px; color: #d45e0d; }
.hdco-theme-moon,
.hdco-theme-dark { right: 6px; color: #647178; }

.hdco-theme-thumb {
    position: absolute;
    z-index: 1;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 6px rgb(36 44 48 / 25%);
}

html[data-theme="dark"] .hdco-theme-switch {
    border-color: #4c565b;
    background: #31393d;
}

html[data-theme="dark"] .hdco-theme-thumb {
    background: #f7ede5;
    transform: translateX(26px);
}

html[data-theme="dark"] .hdco-theme-sun,
html[data-theme="dark"] .hdco-theme-light { color: #737d81; }

html[data-theme="dark"] .hdco-theme-moon,
html[data-theme="dark"] .hdco-theme-dark { color: #7b4a26; }

.hdco-icon-button {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #566267;
    cursor: pointer;
}

.hdco-icon-button:hover {
    border-color: #e0c5b2;
    background: #fff8f2;
    color: var(--hdco-orange-strong);
}

.hdco-icon-button svg {
    width: 20px;
    height: 20px;
}

#header > .hdco-header-action {
    min-height: 42px;
    border: 1px solid #d85f0c;
    background: linear-gradient(180deg, #ff8737, var(--hdco-orange));
    box-shadow: 0 8px 18px rgb(243 119 32 / 22%);
}

/* Purpose-built, compact sidebar. */
.main > #nav-sidebar {
    flex-basis: 222px;
    width: 222px;
    padding: 18px 12px 14px;
    overflow-x: hidden;
    border-right-color: var(--hdco-border);
    background: var(--hdco-sidebar);
}

.toggle-nav-sidebar {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    padding: 0;
    border-right: 1px solid var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-text-muted);
}

.toggle-nav-sidebar svg {
    width: 16px;
    height: 16px;
}

.main.shifted .toggle-nav-sidebar svg {
    transform: rotate(180deg);
}

.hdco-sidebar-heading {
    display: flex;
    flex-direction: column;
    padding: 5px 10px 15px;
}

.hdco-sidebar-heading strong {
    margin-top: 3px;
    color: var(--hdco-heading);
    font-size: 12px;
}

.hdco-sidebar-links {
    display: grid;
    gap: 4px;
}

.hdco-sidebar-link {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    min-height: 43px;
    padding: 5px 9px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--hdco-text);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
}

.hdco-sidebar-link > svg {
    width: 18px;
    height: 18px;
    padding: 7px;
    overflow: visible;
    border-radius: 9px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
    box-sizing: content-box;
}

.hdco-sidebar-link:hover {
    border-color: var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-orange-strong);
}

.hdco-sidebar-link.is-active {
    border-color: rgb(243 119 32 / 18%);
    background: var(--hdco-orange-soft);
    box-shadow: inset 3px 0 var(--hdco-orange);
    color: var(--hdco-orange-strong);
}

.hdco-sidebar-link.is-active > svg {
    background: rgb(243 119 32 / 12%);
    color: var(--hdco-orange-strong);
}

.hdco-sidebar-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--hdco-border);
}

.hdco-sidebar-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 9px;
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 780;
    cursor: pointer;
    list-style: none;
}

.hdco-sidebar-section summary::-webkit-details-marker { display: none; }
.hdco-sidebar-section summary:hover { background: var(--hdco-surface-subtle); color: var(--hdco-text); }
.hdco-sidebar-section summary svg { width: 15px; height: 15px; }
.hdco-sidebar-section[open] summary svg { transform: rotate(180deg); }

.hdco-sidebar-section > div {
    display: grid;
    gap: 2px;
    padding: 4px 7px 0 18px;
}

.hdco-sidebar-section > div a {
    padding: 7px 9px;
    border-left: 1px solid var(--hdco-border);
    color: var(--hdco-text-muted);
    font-size: 10px;
    text-decoration: none;
}

.hdco-sidebar-section > div a:hover {
    border-left-color: var(--hdco-orange);
    color: var(--hdco-orange-strong);
}

.hdco-sidebar-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--hdco-border);
}

.hdco-sidebar-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 39px;
    border: 1px dashed var(--hdco-border-strong);
    border-radius: 9px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.hdco-sidebar-footer a:hover {
    border-color: var(--hdco-orange);
    color: var(--hdco-orange-strong);
}

.breadcrumbs {
    background: var(--breadcrumbs-bg);
}

#content > h1,
#content .content-title,
.hdco-stat-copy strong,
.hdco-panel-heading h2,
.hdco-empty-state strong,
.hdco-page-header h1,
.hdco-card-heading h2,
.hdco-guidance-card h2,
.hdco-state-card h1,
.hdco-auth-card h1,
.hdco-auth-card h2,
.hdco-auth-card h3 {
    color: var(--hdco-heading);
}

/* Neutral dashboard surfaces with orange providing hierarchy. */
.hdco-dashboard-hero {
    min-height: 164px;
    border-color: rgb(243 119 32 / 20%);
    background:
        radial-gradient(circle at 89% 18%, rgb(243 119 32 / 12%) 0 105px, transparent 106px),
        linear-gradient(118deg, #ffffff 0%, #fffaf6 66%, #fbe7d8 100%);
    box-shadow: var(--hdco-shadow-sm);
    color: var(--hdco-text);
}

.hdco-dashboard-hero::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background: var(--hdco-orange);
    content: "";
}

.hdco-dashboard-hero::after {
    border-color: rgb(243 119 32 / 12%);
}

.hdco-dashboard-hero h1 {
    color: var(--hdco-heading);
}

.hdco-dashboard-hero p {
    color: var(--hdco-text-muted);
}

.hdco-dashboard-hero .hdco-button-secondary {
    border-color: var(--hdco-border-strong);
    background: rgb(255 255 255 / 68%);
    color: var(--hdco-text) !important;
}

.hdco-dashboard-hero .hdco-button-secondary:hover {
    border-color: var(--hdco-orange);
    background: #ffffff;
    color: var(--hdco-orange-strong) !important;
}

html[data-theme="dark"] .hdco-dashboard-hero {
    border-color: #403832;
    background:
        radial-gradient(circle at 89% 18%, rgb(243 119 32 / 10%) 0 105px, transparent 106px),
        linear-gradient(118deg, #1b2022 0%, #202527 68%, #2b2521 100%);
    color: var(--hdco-text);
}

html[data-theme="dark"] .hdco-dashboard-hero .hdco-button-secondary {
    border-color: var(--hdco-border-strong);
    background: rgb(255 255 255 / 4%);
    color: var(--hdco-text) !important;
}

.hdco-stat-card,
.hdco-panel,
.hdco-quick-link,
.hdco-native-apps details {
    color: var(--hdco-text);
}

.hdco-stat-card:hover {
    border-color: rgb(243 119 32 / 35%);
}

.hdco-stat-copy strong {
    color: var(--hdco-heading);
}

.hdco-quick-link:hover {
    border-color: rgb(243 119 32 / 30%);
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
}

.hdco-quick-link b {
    color: var(--hdco-orange);
}

.hdco-recent-item {
    color: var(--hdco-text);
}

.hdco-recent-item:hover {
    color: var(--hdco-orange-strong);
}

.module h2,
.module caption,
.inline-group h2,
#changelist-filter h2 {
    background: #343d40;
    color: #ffffff;
}

html[data-theme="dark"] .module h2,
html[data-theme="dark"] .module caption,
html[data-theme="dark"] .inline-group h2,
html[data-theme="dark"] #changelist-filter h2 {
    background: #2b3235;
}

#changelist-filter li.selected a {
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
}

.field-observed_ip,
.column-observed_ip,
.field-internal_id,
.column-internal_id {
    white-space: nowrap;
}

.hdco-observed-ip {
    color: var(--hdco-text);
    font-variant-numeric: tabular-nums;
    font-weight: 750;
}

.hdco-observed-ip.is-empty {
    color: var(--hdco-text-muted);
    font-weight: 650;
}

.hdco-server-id {
    display: inline-flex;
    max-width: 172px;
    overflow: hidden;
    color: var(--hdco-text-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.hdco-inline-action,
.hdco-pdf-actions a {
    align-items: center;
    background: color-mix(in srgb, var(--hdco-orange) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--hdco-orange) 35%, transparent);
    border-radius: 999px;
    color: var(--hdco-orange-dark, #c94f00) !important;
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1;
    min-height: 28px;
    padding: 0 10px;
    text-decoration: none !important;
    white-space: nowrap;
}

.hdco-inline-action:hover,
.hdco-pdf-actions a:hover {
    background: var(--hdco-orange);
    color: #fff !important;
}

.hdco-inline-action.is-disabled {
    background: var(--hdco-surface-subtle);
    border-color: var(--hdco-border);
    color: var(--hdco-text-muted) !important;
}

.hdco-origin {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 5px 9px;
    text-transform: uppercase;
    white-space: nowrap;
}

.hdco-origin-manual {
    background: color-mix(in srgb, var(--hdco-orange) 14%, transparent);
    color: var(--hdco-orange-dark, #c94f00);
}

.hdco-origin-automatic {
    background: color-mix(in srgb, var(--hdco-mint) 20%, transparent);
    color: var(--hdco-success-dark, #08765d);
}

.hdco-pdf-actions {
    display: inline-flex;
    gap: 6px;
}

.hdco-pdf-actions a:last-child {
    background: transparent;
    border-color: var(--hdco-border);
    color: var(--hdco-text) !important;
}

.hdco-request-page {
    display: grid;
    justify-items: start;
    padding: 12px 0 36px;
}

.hdco-request-card {
    background: var(--hdco-surface);
    border: 1px solid var(--hdco-border);
    border-radius: 18px;
    box-shadow: var(--hdco-shadow-sm);
    max-width: 720px;
    padding: clamp(24px, 4vw, 42px);
    width: min(100%, 720px);
}

.hdco-request-card h1 {
    margin: 8px 0 10px;
}

.hdco-request-card > p {
    color: var(--hdco-text-muted);
    line-height: 1.65;
    margin: 0 0 24px;
}

.hdco-request-server {
    background: var(--hdco-surface-subtle);
    border: 1px solid var(--hdco-border);
    border-radius: 14px;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 26px;
    padding: 16px;
}

.hdco-request-server div {
    min-width: 0;
    padding: 0 14px;
}

.hdco-request-server div + div {
    border-left: 1px solid var(--hdco-border);
}

.hdco-request-server dt {
    color: var(--hdco-text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.hdco-request-server dd {
    font-weight: 800;
    margin: 0;
    overflow-wrap: anywhere;
}

.hdco-request-form .hdco-field {
    display: grid;
    gap: 8px;
}

.hdco-request-form label {
    font-weight: 800;
}

.hdco-request-form input[type="month"] {
    background: var(--hdco-surface);
    border: 1px solid var(--hdco-border-strong);
    border-radius: 10px;
    color: var(--hdco-text);
    font: inherit;
    max-width: 260px;
    min-height: 44px;
    padding: 0 12px;
}

.hdco-request-form small {
    color: var(--hdco-text-muted);
}

.hdco-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

@media (max-width: 700px) {
    .hdco-request-server {
        grid-template-columns: 1fr;
    }

    .hdco-request-server div {
        padding: 10px 4px;
    }

    .hdco-request-server div + div {
        border-left: 0;
        border-top: 1px solid var(--hdco-border);
    }
}

/* Native Django buttons: centered, fully visible and consistent. */
.object-tools {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    height: auto !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
}

.object-tools li {
    float: none !important;
    display: flex;
    height: auto !important;
    margin: 0 !important;
}

.object-tools a,
.object-tools a:link,
.object-tools a:visited {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 15px !important;
    border: 1px solid var(--hdco-orange) !important;
    border-radius: 9px !important;
    background: var(--hdco-orange) !important;
    background-image: none !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-align: center;
}

.object-tools a:hover {
    border-color: var(--hdco-orange-strong) !important;
    background: var(--hdco-orange-strong) !important;
}

.submit-row {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    min-height: 68px;
    padding: 13px 15px;
    overflow: visible;
}

.submit-row p {
    display: flex;
    align-items: center;
    margin: 0 !important;
}

.submit-row input,
.submit-row a,
.submit-row .deletelink {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px !important;
    padding: 9px 15px !important;
    border-radius: 9px !important;
    line-height: 1.2 !important;
    text-align: center;
}

.submit-row .deletelink-box {
    margin-right: 0 !important;
    margin-left: auto !important;
}

.submit-row .deletelink {
    background: var(--hdco-danger) !important;
    color: #ffffff !important;
}

#toolbar form,
#toolbar form > div,
.actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

#toolbar input,
#toolbar button,
.actions select,
.actions button {
    min-height: 40px;
}

/* Authentication uses the same warm, integrated brand treatment. */
.hdco-auth-brand-panel {
    background:
        radial-gradient(circle at 90% 15%, rgb(243 119 32 / 14%) 0 125px, transparent 126px),
        linear-gradient(145deg, #f6eee7, #ead8ca 68%, #e7c8b1);
    color: #263238;
}

.hdco-auth-brand-panel::after {
    border-color: rgb(112 77 53 / 12%);
}

.hdco-auth-logo {
    width: min(270px, 78%);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.hdco-auth-brand-copy h1 {
    color: #20292d;
}

.hdco-auth-brand-copy p {
    color: #5f6b70;
}

.hdco-auth-assurance {
    border-color: rgb(84 71 62 / 14%);
    background: rgb(255 255 255 / 42%);
    color: #263238;
}

.hdco-auth-assurance small {
    color: #687479;
}

.hdco-auth-theme-toggle {
    position: absolute;
    top: 24px;
    right: 26px;
    display: block;
}

@media (max-width: 1180px) {
    #header {
        grid-template-columns: minmax(280px, auto) 1fr;
    }

    .hdco-user-copy,
    .hdco-account-chevron {
        display: none;
    }

    .hdco-account-trigger {
        min-width: 43px;
        padding-right: 5px;
    }
}

@media (max-width: 820px) {
    #header {
        background: var(--hdco-header);
    }

    .hdco-brand-logo {
        width: 154px;
    }

    #user-tools {
        display: flex;
    }

    .hdco-account-popover {
        position: fixed;
        top: 70px;
        right: 12px;
    }
}

@media (max-width: 580px) {
    #header {
        gap: 8px;
        padding: 9px 12px;
    }

    .hdco-brand-logo {
        width: 130px;
        height: auto;
    }

    .hdco-theme-switch {
        flex-basis: 52px;
        width: 52px;
    }

    html[data-theme="dark"] .hdco-theme-thumb {
        transform: translateX(20px);
    }

    .submit-row,
    .object-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-row p,
    .submit-row input,
    .submit-row a,
    .object-tools li,
    .object-tools a {
        width: 100% !important;
    }

    .submit-row .deletelink-box {
        margin-left: 0 !important;
    }
}

/* Perfiles operativos y acciones compactas */
.hdco-server-actions,
.hdco-pdf-actions,
.hdco-profile-actions,
.hdco-ip-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hdco-icon-action,
.hdco-pdf-actions a {
    display: inline-grid !important;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0 !important;
    border: 1px solid color-mix(in srgb, var(--hdco-orange) 34%, var(--hdco-border));
    border-radius: 10px;
    background: var(--hdco-surface);
    color: var(--hdco-orange-strong) !important;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

.hdco-icon-action:hover,
.hdco-pdf-actions a:hover {
    transform: translateY(-1px);
    background: var(--hdco-orange-soft);
    border-color: var(--hdco-orange);
}

.hdco-icon-action svg,
.hdco-pdf-actions svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hdco-icon-action.is-disabled {
    opacity: .45;
    cursor: not-allowed;
}

.hdco-profile-link {
    font-weight: 750;
    color: var(--hdco-orange-strong) !important;
}

.hdco-profile-actions a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid var(--hdco-border);
    border-radius: 10px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text) !important;
    font-weight: 700;
}

.hdco-ip-chip {
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--hdco-mint) 40%, var(--hdco-border));
    border-radius: 999px;
    background: color-mix(in srgb, var(--hdco-mint) 12%, var(--hdco-surface));
    color: var(--hdco-text);
}

.hdco-cert-health,
.hdco-secret-state,
.hdco-email-state {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
}

.hdco-cert-health.is-ok,
.hdco-secret-state.is-set {
    background: color-mix(in srgb, var(--hdco-mint) 18%, transparent);
    color: #08755d;
}

.hdco-cert-health.is-warning {
    background: #fff1d8;
    color: #905600;
}

.hdco-secret-state.is-empty,
.hdco-email-state.is-empty {
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
}

.hdco-cert-copy {
    display: block;
    margin-top: 7px;
    color: var(--hdco-text-muted);
}

.hdco-operation-page {
    max-width: 820px;
    margin: 26px auto;
}

.hdco-operation-card {
    padding: 28px;
    border: 1px solid var(--hdco-border);
    border-top: 4px solid var(--hdco-orange);
    border-radius: 18px;
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-md);
}

.hdco-operation-card h1 {
    margin: 6px 0 10px;
}

.hdco-operation-note,
.hdco-operation-error,
.hdco-recipient-preview {
    margin: 20px 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--hdco-surface-subtle);
}

.hdco-operation-error {
    border-left: 4px solid #c84848;
    background: #fff0f0;
    color: #8e2929;
}

.hdco-operation-field {
    display: grid;
    gap: 8px;
    margin: 22px 0;
}

.hdco-operation-field select {
    min-height: 44px;
}

.hdco-operation-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* 2026-08 identity, delivery trace and secondary-screen polish */
ul.messagelist li {
    position: relative;
    min-height: 24px;
    padding: 15px 18px 15px 54px !important;
    background-image: none !important;
    font-weight: 650;
    line-height: 1.45;
}

ul.messagelist li::before {
    position: absolute;
    top: 50%;
    left: 18px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--hdco-text-muted);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    content: "i";
    transform: translateY(-50%);
}

ul.messagelist li.success::before { background: var(--hdco-success); content: "✓"; }
ul.messagelist li.warning::before { background: var(--hdco-warning); content: "!"; }
ul.messagelist li.error::before { background: var(--hdco-danger); content: "×"; }

.hdco-operation-card h1,
#content h1,
#content h2,
.module caption,
.inline-group h2 {
    letter-spacing: -.025em;
}

.hdco-operation-card .hdco-button,
.hdco-operation-actions .hdco-button {
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 800;
}

.hdco-operation-actions .hdco-button-secondary {
    border-color: var(--hdco-border);
    background: var(--hdco-surface);
    color: var(--hdco-text) !important;
}

.module.aligned,
.inline-group,
#content-main > form > div > fieldset.module {
    overflow: hidden;
    border: 1px solid var(--hdco-border);
    border-radius: 15px;
    background: var(--hdco-surface);
    box-shadow: var(--hdco-shadow-sm);
}

fieldset.module > h2,
.inline-group > h2 {
    padding: 14px 18px !important;
    border-bottom: 1px solid var(--hdco-border);
    background: color-mix(in srgb, var(--hdco-orange) 8%, var(--hdco-surface)) !important;
    color: var(--hdco-text) !important;
    font-size: 14px !important;
    font-weight: 850 !important;
}

/* Django repeats each recipient's original value inside tabular inlines. */
.hdco-recipient-inline td.original p {
    display: none !important;
}

.hdco-recipient-inline td.original {
    vertical-align: middle;
}

.hdco-detected-identity,
.hdco-delivery-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hdco-detected-identity > span,
.hdco-delivery-summary > span,
.hdco-smtp-detail > span {
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 13px 15px;
    border: 1px solid var(--hdco-border);
    border-radius: 11px;
    background: var(--hdco-surface-subtle);
}

.hdco-detected-identity small,
.hdco-delivery-summary small,
.hdco-smtp-detail small,
.hdco-mail-preview small {
    color: var(--hdco-text-muted);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.hdco-detected-addresses {
    grid-column: 1 / -1;
    padding: 2px 4px;
    text-transform: none !important;
}

.hdco-status-active,
.hdco-status-sent {
    background: var(--hdco-success-soft);
    color: var(--hdco-success);
}

/* VPS / HD classification and protected customer identity. */
.hdco-machine-type-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.hdco-machine-type-fieldset > legend {
    margin-bottom: 5px;
    color: var(--hdco-text);
    font-size: 12px;
    font-weight: 800;
}

.hdco-machine-type-fieldset #id_server_type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.hdco-machine-type-fieldset #id_server_type > div {
    min-width: 0;
}

.hdco-machine-type-fieldset #id_server_type label {
    position: relative;
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid var(--hdco-border-strong);
    border-radius: 12px;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text);
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.hdco-machine-type-fieldset #id_server_type label:hover {
    border-color: var(--hdco-orange);
}

.hdco-machine-type-fieldset #id_server_type label:has(input:checked) {
    border-color: var(--hdco-orange);
    background: var(--hdco-orange-soft);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hdco-orange) 12%, transparent);
}

.hdco-machine-type-fieldset #id_server_type input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--hdco-orange);
}

#id_new_client_reference_id:disabled {
    border-style: dashed;
    border-color: color-mix(in srgb, var(--hdco-success) 35%, var(--hdco-border));
    background: var(--hdco-success-soft);
    color: var(--hdco-text);
    font-weight: 800;
    opacity: 1;
    cursor: not-allowed;
}

.hdco-machine-type {
    display: inline-flex;
    min-width: 42px;
    justify-content: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hdco-machine-type-vps {
    background: var(--hdco-blue-soft);
    color: var(--hdco-blue);
}

.hdco-machine-type-hd {
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
}

.hdco-hd-id {
    display: inline-flex;
    padding: 5px 9px;
    border: 1px solid color-mix(in srgb, var(--hdco-orange) 25%, var(--hdco-border));
    border-radius: 8px;
    background: var(--hdco-orange-soft);
    color: var(--hdco-orange-strong);
    font-size: 11px;
    letter-spacing: .025em;
    white-space: nowrap;
}

html[data-theme="dark"] .hdco-machine-type-vps {
    color: #8bc5f4;
}

html[data-theme="dark"] .hdco-machine-type-hd,
html[data-theme="dark"] .hdco-hd-id {
    color: #ffb17a;
}

@media (max-width: 580px) {
    .hdco-machine-type-fieldset #id_server_type {
        grid-template-columns: 1fr;
    }
}

/* Lightweight action feedback: shared by forms, reports, tokens and mail. */
body.hdco-feedback-open {
    overflow: hidden;
}

.hdco-action-feedback[hidden] {
    display: none !important;
}

.hdco-action-feedback {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 24px;
    animation: hdco-feedback-fade-in .2s ease-out both;
}

.hdco-action-feedback.is-leaving {
    pointer-events: none;
    animation: hdco-feedback-fade-out .22s ease-in both;
}

.hdco-action-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(7 21 32 / 58%);
}

@supports (backdrop-filter: blur(4px)) {
    .hdco-action-backdrop {
        backdrop-filter: blur(4px);
    }
}

.hdco-action-dialog {
    --hdco-action-accent: var(--hdco-orange);
    --hdco-action-soft: var(--hdco-orange-soft);
    position: relative;
    display: grid;
    width: min(100%, 410px);
    justify-items: center;
    overflow: hidden;
    padding: 34px 34px 30px;
    border: 1px solid color-mix(in srgb, var(--hdco-action-accent) 32%, var(--hdco-border));
    border-radius: 24px;
    background: var(--hdco-surface-raised);
    box-shadow: 0 26px 70px rgb(4 20 32 / 30%);
    color: var(--hdco-text);
    text-align: center;
    animation: hdco-feedback-card-in .36s cubic-bezier(.2, .8, .2, 1) both;
}

.hdco-action-dialog::before {
    position: absolute;
    top: -92px;
    left: 50%;
    width: 250px;
    height: 170px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--hdco-action-accent) 12%, transparent);
    content: "";
    transform: translateX(-50%);
}

.hdco-action-feedback[data-variant="email"] .hdco-action-dialog {
    --hdco-action-accent: var(--hdco-blue);
    --hdco-action-soft: var(--hdco-blue-soft);
}

.hdco-action-feedback[data-variant="token"] .hdco-action-dialog {
    --hdco-action-accent: var(--hdco-orange);
    --hdco-action-soft: var(--hdco-orange-soft);
}

.hdco-action-feedback[data-variant="report"] .hdco-action-dialog {
    --hdco-action-accent: var(--hdco-mint);
    --hdco-action-soft: var(--hdco-mint-soft);
}

.hdco-action-feedback[data-state="success"] .hdco-action-dialog {
    --hdco-action-accent: var(--hdco-success);
    --hdco-action-soft: var(--hdco-success-soft);
}

.hdco-action-feedback[data-state="error"] .hdco-action-dialog {
    --hdco-action-accent: var(--hdco-danger);
    --hdco-action-soft: var(--hdco-danger-soft);
    animation: hdco-feedback-card-in .32s ease-out both, hdco-feedback-error-shake .34s .3s ease-in-out;
}

.hdco-action-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--hdco-border);
    border-radius: 50%;
    background: var(--hdco-surface-subtle);
    color: var(--hdco-text-muted);
    font: 700 22px/1 Arial, sans-serif;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, transform .18s ease;
}

.hdco-action-close:hover,
.hdco-action-close:focus-visible {
    border-color: var(--hdco-action-accent);
    color: var(--hdco-action-accent);
    transform: rotate(6deg) scale(1.04);
}

.hdco-action-visual {
    position: relative;
    z-index: 1;
    display: grid;
    width: 116px;
    height: 116px;
    margin-bottom: 18px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--hdco-action-accent) 24%, var(--hdco-border));
    border-radius: 36px;
    background: var(--hdco-action-soft);
    box-shadow: inset 0 0 0 8px color-mix(in srgb, var(--hdco-surface) 44%, transparent), 0 12px 26px color-mix(in srgb, var(--hdco-action-accent) 16%, transparent);
    transform: rotate(-3deg);
}

.hdco-action-illustration,
.hdco-action-result-icon {
    display: none;
    width: 82px;
    height: 82px;
    color: var(--hdco-action-accent);
}

.hdco-action-feedback[data-state="busy"][data-variant="email"] .hdco-action-illustration-email,
.hdco-action-feedback[data-state="busy"][data-variant="token"] .hdco-action-illustration-token,
.hdco-action-feedback[data-state="busy"][data-variant="report"] .hdco-action-illustration-report,
.hdco-action-feedback[data-state="busy"][data-variant="generic"] .hdco-action-illustration-generic {
    display: block;
}

.hdco-action-feedback[data-state="success"] .hdco-action-result-success,
.hdco-action-feedback[data-state="error"] .hdco-action-result-error {
    display: block;
}

.hdco-action-illustration svg,
.hdco-action-result-icon {
    overflow: visible;
}

.hdco-action-kicker {
    color: var(--hdco-action-accent);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.hdco-action-dialog h2 {
    margin: 8px 0 8px !important;
    color: var(--hdco-text) !important;
    font-size: clamp(22px, 5vw, 28px) !important;
    font-weight: 850 !important;
    letter-spacing: -.035em;
    line-height: 1.12;
}

.hdco-action-dialog p {
    max-width: 330px;
    margin: 0;
    color: var(--hdco-text-muted);
    font-size: 14px;
    line-height: 1.55;
}

.hdco-action-progress {
    width: 148px;
    height: 4px;
    overflow: hidden;
    margin-top: 22px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hdco-action-accent) 15%, var(--hdco-border));
}

.hdco-action-progress span {
    display: block;
    width: 48%;
    height: 100%;
    border-radius: inherit;
    background: var(--hdco-action-accent);
    animation: hdco-action-progress 1.05s ease-in-out infinite;
}

.hdco-action-feedback[data-state="success"] .hdco-action-progress,
.hdco-action-feedback[data-state="error"] .hdco-action-progress {
    display: none;
}

.hdco-action-mail-paper,
.hdco-action-mail-body {
    fill: var(--hdco-surface);
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.hdco-action-mail-paper {
    animation: hdco-mail-paper 1.35s ease-in-out infinite;
}

.hdco-action-mail-line,
.hdco-action-mail-fold {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.5;
}

.hdco-action-mail-line {
    opacity: .6;
    animation: hdco-mail-paper 1.35s ease-in-out infinite;
}

.hdco-action-illustration-email svg {
    animation: hdco-mail-float 1.35s ease-in-out infinite;
}

.hdco-action-mail-trail {
    position: absolute;
    top: 44px;
    left: -1px;
    width: 14px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    opacity: .45;
    animation: hdco-mail-trail 1.35s ease-out infinite;
}

.hdco-action-mail-trail-two {
    top: 54px;
    width: 9px;
    animation-delay: .18s;
}

.hdco-action-lock-shackle,
.hdco-action-lock-key,
.hdco-action-report-page,
.hdco-action-report-fold,
.hdco-action-report-line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.hdco-action-lock-body {
    fill: color-mix(in srgb, var(--hdco-action-accent) 17%, var(--hdco-surface));
    stroke: currentColor;
    stroke-width: 3;
}

.hdco-action-lock-shackle {
    transform-origin: 48px 44px;
    animation: hdco-lock-shackle 1.4s ease-in-out infinite;
}

.hdco-action-lock-key {
    animation: hdco-lock-key 1.4s ease-in-out infinite;
}

.hdco-action-spark {
    position: absolute;
    width: 7px;
    height: 7px;
    border: 2px solid currentColor;
    transform: rotate(45deg);
    animation: hdco-token-spark 1.4s ease-in-out infinite;
}

.hdco-action-spark-one { top: 11px; right: 11px; }
.hdco-action-spark-two { bottom: 12px; left: 8px; animation-delay: .32s; }

.hdco-action-report-page {
    fill: color-mix(in srgb, var(--hdco-action-accent) 8%, var(--hdco-surface));
}

.hdco-action-report-line {
    stroke-dasharray: 26;
    stroke-dashoffset: 26;
    animation: hdco-report-write 1.5s ease-in-out infinite;
}

.hdco-action-report-line-two { animation-delay: .16s; }
.hdco-action-report-line-three { animation-delay: .32s; }

.hdco-action-illustration-generic {
    position: relative;
    width: 76px;
    height: 76px;
}

.hdco-action-illustration-generic span {
    position: absolute;
    top: 31px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: currentColor;
    animation: hdco-generic-dot .9s ease-in-out infinite;
}

.hdco-action-illustration-generic span:nth-child(1) { left: 6px; }
.hdco-action-illustration-generic span:nth-child(2) { left: 31px; animation-delay: .12s; }
.hdco-action-illustration-generic span:nth-child(3) { left: 56px; animation-delay: .24s; }

.hdco-action-result-icon circle,
.hdco-action-result-icon path {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 5;
}

.hdco-action-result-icon circle {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: hdco-result-circle .52s ease-out forwards;
}

.hdco-action-result-icon path {
    stroke-dasharray: 55;
    stroke-dashoffset: 55;
    animation: hdco-result-mark .42s .36s ease-out forwards;
}

@keyframes hdco-feedback-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hdco-feedback-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes hdco-feedback-card-in {
    from { opacity: 0; transform: translateY(16px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hdco-feedback-error-shake {
    0%, 100% { transform: translateX(0); }
    30% { transform: translateX(-5px); }
    65% { transform: translateX(4px); }
}

@keyframes hdco-action-progress {
    0% { transform: translateX(-105%); }
    50% { transform: translateX(55%); }
    100% { transform: translateX(210%); }
}

@keyframes hdco-mail-float {
    0%, 100% { transform: translate(0, 1px) rotate(-2deg); }
    50% { transform: translate(4px, -4px) rotate(2deg); }
}

@keyframes hdco-mail-paper {
    0%, 100% { transform: translateY(3px); }
    50% { transform: translateY(-3px); }
}

@keyframes hdco-mail-trail {
    0% { opacity: 0; transform: translateX(13px) scaleX(.4); }
    30% { opacity: .55; }
    100% { opacity: 0; transform: translateX(-12px) scaleX(1.2); }
}

@keyframes hdco-lock-shackle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes hdco-lock-key {
    0%, 100% { opacity: .55; transform: scale(.9); transform-origin: 48px 60px; }
    50% { opacity: 1; transform: scale(1.08); transform-origin: 48px 60px; }
}

@keyframes hdco-token-spark {
    0%, 100% { opacity: .2; transform: rotate(45deg) scale(.55); }
    50% { opacity: .9; transform: rotate(135deg) scale(1); }
}

@keyframes hdco-report-write {
    0%, 15% { stroke-dashoffset: 26; }
    55%, 82% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -26; }
}

@keyframes hdco-generic-dot {
    0%, 100% { opacity: .35; transform: translateY(4px) scale(.8); }
    50% { opacity: 1; transform: translateY(-6px) scale(1); }
}

@keyframes hdco-result-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes hdco-result-mark {
    to { stroke-dashoffset: 0; }
}

@media (max-width: 520px) {
    .hdco-action-feedback { padding: 16px; }
    .hdco-action-dialog { padding: 28px 22px 26px; border-radius: 20px; }
    .hdco-action-visual { width: 104px; height: 104px; border-radius: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    .hdco-action-feedback,
    .hdco-action-feedback.is-leaving,
    .hdco-action-dialog,
    .hdco-action-illustration *,
    .hdco-action-progress span,
    .hdco-action-result-icon circle,
    .hdco-action-result-icon path {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

.hdco-status-partial {
    background: var(--hdco-warning-soft);
    color: var(--hdco-warning);
}

.hdco-status-link {
    display: inline-flex;
    border-radius: 999px;
    text-decoration: none !important;
}

.hdco-status-link:hover {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hdco-orange) 16%, transparent);
}

.hdco-recipient-log {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
}

.hdco-recipient-log li {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 3px 16px;
    padding: 13px 15px;
    border: 1px solid var(--hdco-border);
    border-left: 4px solid var(--hdco-warning);
    border-radius: 10px;
    background: var(--hdco-surface-subtle);
    list-style: none;
}

.hdco-recipient-log li.is-accepted { border-left-color: var(--hdco-success); }
.hdco-recipient-log li.is-failed { border-left-color: var(--hdco-danger); }
.hdco-recipient-log li span { font-weight: 800; }
.hdco-recipient-log li small { grid-column: 1 / -1; color: var(--hdco-text-muted); }

.hdco-smtp-detail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hdco-smtp-detail code {
    overflow-wrap: anywhere;
    white-space: normal;
}

.hdco-smtp-detail p {
    grid-column: 1 / -1;
    margin: 0;
    padding: 13px 15px;
    border-radius: 10px;
    background: var(--hdco-surface-subtle);
}

.hdco-mail-preview {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 18px;
    align-items: center;
    margin: 22px 0;
    padding: 20px;
    border: 1px solid var(--hdco-border);
    border-radius: 14px;
    background: var(--hdco-surface-subtle);
}

.hdco-mail-preview > div { display: grid; gap: 4px; }
.hdco-mail-preview > div > strong { font-size: 15px; }
.hdco-mail-preview > div > span { color: var(--hdco-text-muted); }
.hdco-mail-preview-icon,
.hdco-failure-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--hdco-orange) 14%, var(--hdco-surface));
    color: var(--hdco-orange-strong);
    font-size: 20px;
    font-weight: 900;
}

.hdco-failed-deliveries { margin-top: 0; }
.hdco-failed-deliveries .hdco-panel-heading p { margin: 5px 0 0; color: var(--hdco-text-muted); }
.hdco-failure-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--hdco-danger-soft); color: var(--hdco-danger); }
.hdco-empty-success > span { color: var(--hdco-success); }

@media (max-width: 820px) {
    .hdco-detected-identity,
    .hdco-delivery-summary,
    .hdco-smtp-detail,
    .hdco-mail-preview {
        grid-template-columns: 1fr;
    }

    .hdco-mail-preview-icon { display: none; }
}

/* Dark-mode contrast pass for native Django and secondary admin screens. */
html[data-theme="dark"] {
    --hdco-orange-strong: #ff9f5a;
    --hdco-orange-dark: #ffad74;
    --hdco-blue: #82c2f4;
    --hdco-success: #83ddc4;
    --hdco-success-dark: #99e5d0;
    --hdco-warning: #f4b466;
    --hdco-danger: #ff9da7;
    --header-bg: #2b3235;
    --header-color: #f4f7f8;
    --header-link-color: #f4f7f8;
    --header-branding-color: #f4f7f8;
    --button-hover-bg: #2d86d1;
}

html[data-theme="dark"] .module.collapse > details > summary,
html[data-theme="dark"] fieldset.collapse > details > summary,
html[data-theme="dark"] .inline-related .collapse > details > summary {
    border-color: var(--hdco-border) !important;
    background: var(--hdco-surface-subtle) !important;
    color: var(--hdco-text) !important;
}

html[data-theme="dark"] .collapse summary .fieldset-heading,
html[data-theme="dark"] .collapse summary .inline-heading {
    background: transparent !important;
    color: inherit !important;
}

html[data-theme="dark"] .hdco-cert-health.is-ok,
html[data-theme="dark"] .hdco-secret-state.is-set {
    border: 1px solid color-mix(in srgb, var(--hdco-success) 30%, var(--hdco-border));
    background: color-mix(in srgb, var(--hdco-success) 20%, var(--hdco-surface)) !important;
    color: var(--hdco-success-dark) !important;
}

html[data-theme="dark"] .hdco-cert-health.is-warning {
    border: 1px solid color-mix(in srgb, var(--hdco-warning) 30%, var(--hdco-border));
    background: var(--hdco-warning-soft);
    color: var(--hdco-warning);
}

html[data-theme="dark"] .hdco-operation-error {
    border-left-color: var(--hdco-danger);
    background: var(--hdco-danger-soft);
    color: var(--hdco-danger);
}

html[data-theme="dark"] .hdco-inline-action,
html[data-theme="dark"] .hdco-origin-manual,
html[data-theme="dark"] .hdco-profile-link,
html[data-theme="dark"] .hdco-mail-preview-icon {
    color: var(--hdco-orange-dark) !important;
}

html[data-theme="dark"] .hdco-origin-automatic,
html[data-theme="dark"] .hdco-empty-success > span {
    color: var(--hdco-success-dark) !important;
}

html[data-theme="dark"] input[type="submit"].default,
html[data-theme="dark"] .submit-row input.default,
html[data-theme="dark"] .btn-primary,
html[data-theme="dark"] .hdco-button-primary {
    color: #21160f !important;
}

html[data-theme="dark"] .readonly,
html[data-theme="dark"] .description,
html[data-theme="dark"] pre,
html[data-theme="dark"] code,
html[data-theme="dark"] select option {
    color: var(--hdco-text);
}

html[data-theme="dark"] select option,
html[data-theme="dark"] .calendarbox .calendar,
html[data-theme="dark"] .clockbox h2,
html[data-theme="dark"] .selector-available h2,
html[data-theme="dark"] .selector-chosen h2 {
    background: var(--hdco-surface);
}

html[data-theme="dark"] table tbody tr.row1,
html[data-theme="dark"] table tbody tr.row2 {
    color: var(--hdco-text);
}

/* Monthly reporting identity and photographic sign-in */
#footer { display: none; }
.hdco-brand-product {
    min-width: 205px;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.hdco-brand-product strong { font-size: 16px; line-height: 1.15; }
.hdco-brand-product small { margin-top: 3px; letter-spacing: .13em; font-size: 9px; }
.hdco-auth-brand-panel { isolation: isolate; background: #0a1d2a; color: #fff; }
.hdco-auth-brand-panel::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgb(5 18 29 / 23%) 0%, rgb(5 18 29 / 16%) 29%, rgb(5 18 29 / 68%) 68%, rgb(5 18 29 / 90%) 100%);
    content: "";
    pointer-events: none;
}
.hdco-auth-brand-panel::after { display: none; }
.hdco-auth-photo {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    transition: opacity .7s ease;
}
.hdco-auth-photo-day { background-image: url("img/datacenter-day-v1.webp"); background-position: 43% center; opacity: 1; }
.hdco-auth-photo-night { background-image: url("img/datacenter-night-v1.webp"); background-position: 52% center; opacity: 0; }
html[data-theme="dark"] .hdco-auth-photo-day { opacity: 0; }
html[data-theme="dark"] .hdco-auth-photo-night { opacity: 1; }
.hdco-auth-logo {
    z-index: 2;
    width: min(260px, 77%);
    padding: 10px 13px;
    border-radius: 12px;
    background: rgb(255 255 255 / 95%);
    box-shadow: 0 12px 28px rgb(0 0 0 / 22%);
}
.hdco-auth-brand-copy { z-index: 2; margin: auto 0 0; padding: 65px 0 10px; }
.hdco-auth-brand-copy .hdco-eyebrow { color: #ffab70; letter-spacing: .16em; }
.hdco-auth-brand-copy h1 { max-width: 520px; color: #fff; font-size: clamp(34px, 4.6vw, 58px); letter-spacing: -.046em; line-height: 1.04; text-wrap: balance; }
.hdco-auth-brand-copy p { max-width: 450px; color: rgb(255 255 255 / 88%); font-size: 15px; line-height: 1.5; }
.hdco-auth-main { grid-template-rows: 1fr; padding-bottom: 50px; }

/* The HostDime mark assembles during navigation and long-running actions. */
.hdco-mark-loader { display: block; width: 78px; height: 66px; overflow: visible; }
.hdco-mark-piece { opacity: 0; transform-box: fill-box; transform-origin: center; animation: hdco-mark-drop 2.35s cubic-bezier(.25,.72,.3,1) infinite both; }
.hdco-mark-middle { animation-delay: .15s; }
.hdco-mark-bottom { animation-delay: .3s; }
.hdco-mark-side { animation-delay: .46s; }
@keyframes hdco-mark-drop {
    0%, 5% { opacity: 0; transform: translateY(-48px); }
    27% { opacity: 1; transform: translateY(5px); }
    39% { transform: translateY(-3px); }
    52%, 86% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(0); }
}
.hdco-page-loader {
    position: fixed;
    z-index: 9000;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgb(246 249 250 / 88%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, visibility .22s ease;
}
html[data-theme="dark"] .hdco-page-loader { background: rgb(11 22 30 / 91%); }
html.hdco-loading .hdco-page-loader { opacity: 1; visibility: visible; pointer-events: auto; }
.hdco-page-loader-card {
    display: grid;
    justify-items: center;
    gap: 10px;
    min-width: 160px;
    padding: 26px 32px;
    border: 1px solid var(--hdco-border);
    border-radius: 22px;
    background: var(--hdco-surface-raised);
    box-shadow: var(--hdco-shadow-md);
}
.hdco-page-loader-label { color: var(--hdco-text-muted); font-size: 12px; font-weight: 750; }
.hdco-action-loading-mark { display: none; }
.hdco-action-feedback[data-state="busy"] .hdco-action-loading-mark { display: block; }
.hdco-action-feedback[data-state="busy"][data-variant] .hdco-action-illustration { display: none; }
.hdco-action-loading-mark .hdco-mark-loader { width: 80px; height: 70px; }
@media (max-width: 820px) {
    .hdco-auth-brand-panel { min-height: 112px; padding: 20px 24px; }
    .hdco-auth-photo-day { background-position: center 37%; }
    .hdco-auth-photo-night { background-position: center 41%; }
    .hdco-auth-main { min-height: calc(100vh - 112px); }
}
@media (prefers-reduced-motion: reduce) {
    .hdco-auth-photo, .hdco-page-loader { transition: none; }
    .hdco-mark-piece { animation: none; opacity: 1; }
}

/* Closeout: one searchable client control, compact lists, and clear operations. */
.hdco-client-combobox { position: relative; display: none; align-items: center; }
.hdco-client-combobox.is-ready { display: flex; }
.hdco-client-combobox .hdco-client-search { padding-right: 46px; }
.hdco-client-toggle { position: absolute; right: 4px; top: 4px; bottom: 4px; width: 38px; border: 0; border-left: 1px solid var(--hdco-border); border-radius: 8px; background: transparent; color: var(--hdco-text-muted); font-size: 24px; cursor: pointer; }
.hdco-client-combobox.is-ready + .hdco-client-native-select { display: none; }
.hdco-client-options { position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; right: 0; max-height: 292px; overflow-y: auto; padding: 5px; border: 1px solid var(--hdco-border-strong); border-radius: 12px; background: var(--hdco-surface-raised); box-shadow: var(--hdco-shadow-md); }
.hdco-client-options[hidden] { display: none; }
.hdco-client-option { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--hdco-text); text-align: left; cursor: pointer; }
.hdco-client-option small { color: var(--hdco-text-muted); font-size: 11px; white-space: nowrap; }
.hdco-client-option:hover, .hdco-client-option.is-active, .hdco-client-option[aria-selected="true"] { background: var(--hdco-orange-soft); color: var(--hdco-orange-strong); }
.hdco-client-empty { margin: 4px; padding: 12px; color: var(--hdco-text-muted); }

.hdco-dashboard-hero { flex-direction: column; justify-content: center; min-height: 210px; text-align: center; }
.hdco-dashboard-hero > div:first-child { position: relative; z-index: 1; display: grid; justify-items: center; }
.hdco-dashboard-hero h1 { margin: 10px 0; font-size: clamp(31px, 3.5vw, 46px); }
.hdco-dashboard-hero h1::after { display: block; width: 58px; height: 4px; margin: 12px auto 0; border-radius: 8px; background: var(--hdco-orange); content: ""; }
.hdco-dashboard-hero p { max-width: 720px; }
.hdco-failure-mark { flex: none; width: 30px; height: 30px; line-height: 1; font-size: 18px; }
.hdco-disconnected-item, .hdco-failed-item { grid-template-columns: 30px minmax(0, 1fr) auto auto; gap: 14px; }

#changelist-filter[hidden] { display: none !important; }
.hdco-filter-toggle { margin: 4px 10px; padding: 8px 13px; border: 1px solid var(--hdco-border-strong); border-radius: 9px; background: var(--hdco-surface); color: var(--hdco-text); font-weight: 750; cursor: pointer; }
.hdco-filter-toggle:hover { border-color: var(--hdco-orange); color: var(--hdco-orange-strong); }
#changelist .results table { width: 100%; }
#changelist .results td, #changelist .results th { overflow-wrap: anywhere; }
#changelist .results .field-token_hint, #changelist .results .field-hd_badge, #changelist .results .field-hd_identifier { white-space: normal; }
.hdco-token-identity { display: grid; gap: 3px; min-width: 150px; }
.hdco-token-identity strong { color: var(--hdco-orange-strong); font-size: 12px; overflow-wrap: anywhere; }
.hdco-token-identity small { color: var(--hdco-text-muted); font-size: 11px; }
#changelist .results .field-token_identity { width: 31%; }
.hdco-profile-actions .hdco-danger-link { color: var(--hdco-danger); }
.hdco-button-danger { border: 1px solid var(--hdco-danger); background: var(--hdco-danger); color: white !important; }
.hdco-removal-steps { margin: 22px 0; padding: 20px; border: 1px solid var(--hdco-border); border-radius: 14px; background: var(--hdco-surface-subtle); }
.hdco-removal-steps h2 { margin: 0 0 12px; }
.hdco-removal-steps li { margin: 8px 0; }
.hdco-removal-steps pre { overflow-wrap: anywhere; white-space: pre-wrap; padding: 14px; border-radius: 9px; background: var(--hdco-navy-deep); color: #fff; }
.hdco-removal-mode label { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px; border: 1px solid var(--hdco-border); border-radius: 10px; background: var(--hdco-surface-subtle); cursor: pointer; }
.hdco-removal-mode label:has(input:checked) { border-color: var(--hdco-orange-strong); background: #fff5ee; }
.hdco-removal-mode input[type="radio"] { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--hdco-orange-strong); }
@media (max-width: 900px) {
    .hdco-disconnected-item, .hdco-failed-item { grid-template-columns: 30px minmax(0, 1fr); }
    .hdco-disconnected-item .hdco-status, .hdco-disconnected-item time, .hdco-failed-item .hdco-status, .hdco-failed-item time { display: none; }
    #changelist .results .field-last_seen_at, #changelist .results .column-last_seen_at, #changelist .results .field-created_at, #changelist .results .column-created_at { display: none; }
}

/* Keep the search usable when the content column narrows. */
#toolbar form { display: block; width: 100%; min-width: 0; }
#toolbar form > div { display: flex; flex-wrap: wrap; width: 100%; min-width: 0; gap: 8px; }
#toolbar #searchbar { flex: 1 1 240px; width: auto; min-width: 160px; max-width: none; }
#toolbar form label, #toolbar input[type="submit"] { flex: 0 0 auto; }
#toolbar .quiet { flex: 0 1 auto; }
@media (min-width: 1201px) {
    #header { position: relative; }
    .hdco-brand-product { position: absolute; left: 50%; transform: translateX(-50%); align-items: center; border-left: 0; padding-left: 0; text-align: center; }
    .hdco-brand-product strong { font-size: clamp(22px, 1.6vw, 28px); }
    .hdco-brand-product::after { content: ""; width: 42px; height: 3px; margin-top: 8px; border-radius: 9px; background: var(--hdco-orange); }
}
/* Every list field remains visible, without horizontal scrolling. */
@media (max-width: 1200px) {
    body.change-list #changelist .results { overflow: visible; }
    body.change-list #result_list { display: block; width: 100%; }
    body.change-list #result_list thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    body.change-list #result_list tbody { display: grid; gap: 12px; }
    body.change-list #result_list tbody tr { position: relative; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 18px; padding: 18px 18px 18px 46px; border: 1px solid var(--hdco-border); border-radius: 13px; background: var(--hdco-surface); }
    body.change-list #result_list tbody th, body.change-list #result_list tbody td { display: block !important; width: auto !important; min-width: 0; padding: 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
    body.change-list #result_list tbody .action-checkbox { position: absolute; top: 18px; left: 14px; }
    body.change-list #result_list tbody th::before, body.change-list #result_list tbody td:not(.action-checkbox)::before { display: block; margin-bottom: 4px; color: var(--hdco-text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
    body.change-list #result_list .field-hd_badge::before { content: "HD"; }
    body.change-list #result_list .field-hostname::before { content: "Hostname"; }
    body.change-list #result_list .field-client::before { content: "Cliente"; }
    body.change-list #result_list .field-status_badge::before { content: "Estado"; }
    body.change-list #result_list .field-connectivity_badge::before { content: "Conectividad"; }
    body.change-list #result_list .field-primary_ip::before { content: "IP principal"; }
    body.change-list #result_list .field-last_seen_at::before { content: "Última comunicación"; }
    body.change-list #result_list .field-report_actions::before { content: "Acciones"; }
}
@media (max-width: 580px) {
    body.change-list #result_list tbody tr { grid-template-columns: minmax(0,1fr); gap: 10px; }
    #toolbar #searchbar { min-width: 130px; }
}

@media (max-width: 1200px) {
    body.change-list #result_list { min-width: 0; max-width: 100%; }
    body.change-list #result_list tbody [data-hdco-label]::before { content: attr(data-hdco-label); }
    body.change-list #result_list tbody .action-checkbox::before { content: none; }
    body.change-list #result_list thead { display: block; position: static; width: auto; height: auto; overflow: visible; clip-path: none; padding: 12px; margin-bottom: 12px; border-radius: 12px; background: var(--hdco-surface-subtle); }
    body.change-list #result_list thead::before { content: "Ordenar y seleccionar"; display: block; margin-bottom: 8px; color: var(--hdco-text-muted); font-size: 10px; font-weight: 750; text-transform: uppercase; }
    body.change-list #result_list thead tr { display: flex; flex-wrap: wrap; gap: 8px; }
    body.change-list #result_list thead th { display: block; width: auto; padding: 5px 8px; border: 1px solid var(--hdco-border); border-radius: 7px; background: var(--hdco-surface); }
    body.change-list #result_list thead th:not(:has(a)):not(:has(input)) { display: none; }
    body.change-list #result_list thead th:has(input)::after { content: "Seleccionar todo"; padding-left: 6px; }
}

/* Keep the bulk selection label inside its responsive control. */
@media (max-width: 1200px) {
    body.change-list #result_list thead th:has(input) { display: flex !important; width: auto !important; min-width: 0; align-items: center; gap: 6px; flex: 0 0 auto; }
    body.change-list #result_list thead th:has(input)::after { padding-left: 0; }
    body.change-list #result_list thead th:has(input) input { margin: 0; flex: 0 0 auto; }
}

/* A compact disclosure keeps navigation reachable on small screens. */
@media (max-width: 767px) {
    #main { display: block !important; }
    #main > #toggle-nav-sidebar { display: flex; position: static; width: 100%; height: auto; min-height: 42px; padding: 10px 16px; border: 0; border-bottom: 1px solid var(--hdco-border); font-size: 0; }
    #main > #toggle-nav-sidebar::before { content: "Mostrar navegación"; font-size: 13px; font-weight: 750; }
    #main.hdco-mobile-nav-open > #toggle-nav-sidebar::before { content: "Ocultar navegación"; }
    #main > #nav-sidebar { display: none; position: static; width: auto; max-height: none; margin: 0; visibility: hidden; border-right: 0; border-bottom: 1px solid var(--hdco-border); }
    #main.hdco-mobile-nav-open > #nav-sidebar { display: block; visibility: visible; }
    #main > #nav-sidebar + .content, #main.shifted > #nav-sidebar + .content { width: auto; max-width: 100%; }
}

/* Filters open beside their trigger, before the result list at every width. */
#changelist-filter.hdco-inline-filters { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); flex: none; width: auto; min-width: 0; max-width: 100%; margin: 0 0 16px; padding: 0 12px 12px; border: 1px solid var(--hdco-border); border-radius: 12px; background: var(--hdco-surface); }
#changelist-filter.hdco-inline-filters > h2, #changelist-filter.hdco-inline-filters > #changelist-filter-extra-actions { grid-column: 1 / -1; }
#changelist-filter.hdco-inline-filters > h2 { margin: 0 -12px 4px; border-radius: 11px 11px 0 0; }
html[data-theme="dark"] { --header-color: #20292d; --header-link-color: #20292d; --header-branding-color: #20292d; }
#header #logout-form .hdco-logout { color: #566267; }
#header #logout-form .hdco-logout:hover { color: #ac4b0a; background: #fff8f2; }
