:root {
    --red: #b11226;
    --black: #080808;
    --soft-black: #151515;
    --papaya: #ffefd5;
    --papaya-dark: #f3dcc0;
    --muted: #7b6f64;
    --white: #ffffff;
    --line: rgba(8, 8, 8, 0.10);
}

.account-actions { min-width: 240px; }
.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.account-form-grid .form-field { margin: 0; }
.account-notes, .account-form-actions { grid-column: 1 / -1; }
.export-field-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
}
.entity-modal-content { border: 0; border-radius: 16px; }
.state-select-row { display: flex; align-items: center; gap: 8px; }
.state-select-row select { flex: 1; }
.state-select-row button { min-width: 44px; font-size: 20px; }

@media (max-width: 800px) {
    .account-form-grid, .export-field-grid { grid-template-columns: 1fr; }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(177,18,38,.18), transparent 28%),
        var(--papaya);
    color: var(--black);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    background: var(--black);
    color: var(--papaya);
    padding: 22px 18px 18px;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 16px 0 40px rgba(8, 8, 8, .10);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 6px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--red);
    color: var(--papaya);
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(177, 18, 38, .35);
}

.brand-copy strong {
    display: block;
    letter-spacing: -.02em;
}

.brand small {
    display: block;
    color: var(--papaya-dark);
    font-size: 12px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    padding: 12px;
    gap: 18px;
}

.sidebar .nav-menu {
    padding: 0;
    flex: 1;
}

.nav-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-menu .nav-link-ui {
    color: inherit;
    text-decoration: none;
    display: grid;
    grid-template-columns: 30px 1fr 14px;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 650;
    color: rgba(255, 239, 213, .76);
    transition: background-color .18s ease, color .18s ease,
        transform .18s ease;
    cursor: pointer;
}

.nav-menu .nav-link-ui:hover,
.nav-menu .nav-link-ui:focus-visible {
    background: rgba(255, 255, 255, .08);
    color: var(--papaya);
    transform: translateX(2px);
    outline: none;
}

.nav-menu .nav-link-ui.active {
    background: linear-gradient(135deg, var(--red), #8f0e1f);
    color: white;
    box-shadow: 0 8px 20px rgba(177, 18, 38, .24);
}

.nav-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .08);
    color: var(--papaya);
    font-size: 13px;
    font-weight: 900;
}

.nav-link-ui.active .nav-icon {
    background: rgba(255, 255, 255, .16);
    color: white;
}

.nav-chevron {
    opacity: 0;
    transform: translateX(-3px);
    transition: opacity .18s ease, transform .18s ease;
}

.nav-link-ui:hover .nav-chevron,
.nav-link-ui.active .nav-chevron {
    opacity: .8;
    transform: translateX(0);
}

.mobile-topbar {
    height: 60px;
    background: var(--black);
    color: var(--papaya);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    font-weight: 800;
}

.offcanvas .offcanvas-header {
    background: var(--black);
    color: var(--papaya);
    border-bottom: 1px solid rgba(255, 255, 255, .10);
}

.offcanvas .btn-close {
    filter: invert(1);
}

.offcanvas .offcanvas-body,
.offcanvas .nav-menu {
    background: var(--black);
    color: var(--papaya);
}

.offcanvas .nav-menu {
    min-height: 100%;
    padding: 18px 14px;
}

.menu-btn {
    background: var(--red);
    color: var(--papaya);
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
}

.main {
    margin-left: 260px;
    padding: 28px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 22px;
}

.eyebrow {
    color: var(--red);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 12px;
}

.topbar h1 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
}

.content-card {
    background: rgba(255,255,255,.66);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(8,8,8,.08);
    backdrop-filter: blur(8px);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 18px;
}

.card {
    background: var(--black);
    color: var(--papaya);
    padding: 22px;
    border-radius: 18px;
    border: 0;
}

.card strong {
    display: block;
    font-size: 34px;
    line-height: 1;
    color: var(--papaya);
}

.card span {
    color: var(--papaya-dark);
}

table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    border-radius: 16px;
    overflow: hidden;
}

th, td {
    padding: 13px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: var(--black);
    color: var(--papaya);
}

.btn-red {
    background: var(--red);
    color: var(--papaya);
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
}

.btn-red:hover {
    background: #8f0e1f;
    color: var(--papaya);
}

@media (max-width: 991px) {
    .main {
        margin-left: 0;
        padding: 18px;
    }

    .topbar {
        align-items: start;
        flex-direction: column;
    }

    .cards {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }

    .content-card {
        padding: 16px;
        border-radius: 18px;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

@media (max-width: 575px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .topbar h1 {
        font-size: 26px;
    }
}

.login-wrap {
    display: flex;
    justify-content: center;
    padding: 30px 0;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--black);
    color: var(--papaya);
    padding: 28px;
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(8,8,8,.18);
}

.login-card h2 {
    font-weight: 900;
    margin-bottom: 6px;
}

.login-card p {
    color: var(--papaya-dark);
}

.login-card label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: 700;
}

.login-card input {
    width: 100%;
    border: 1px solid rgba(255,255,255,.15);
    background: #1d1d1d;
    color: var(--papaya);
    border-radius: 12px;
    padding: 12px;
    outline: none;
}

.login-card input:focus {
    border-color: var(--red);
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(177,18,38,.24), transparent 30%),
        var(--papaya);
}

.auth-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 26px;
}

.auth-brand small {
    display: block;
    color: var(--papaya-dark);
    font-size: 12px;
}

.table-tools {
    margin-bottom: 16px;
}

.table-search,
.form-card input,
.form-card select,
.form-card textarea,
.inline-input,
.inline-select {
    border: 1px solid rgba(8,8,8,.14);
    background: white;
    color: var(--black);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
}

.table-search {
    width: 100%;
    max-width: 360px;
}

.inline-input {
    width: 100%;
    min-width: 180px;
}

.inline-select {
    min-width: 110px;
}

.geo-select,
.geo-select option {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji",
        Inter, Arial, sans-serif;
}

.geo-picker {
    position: relative;
    min-width: 230px;
}

.geo-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.geo-trigger,
.geo-search {
    width: 100%;
    border: 1px solid rgba(8, 8, 8, .14);
    background: white;
    color: var(--black);
    border-radius: 12px;
    padding: 10px 12px;
}

.geo-trigger {
    text-align: left;
}

.geo-trigger-label,
.geo-choice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.geo-menu {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 6px);
    left: 0;
    width: min(360px, 90vw);
    padding: 10px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(8, 8, 8, .18);
}

.geo-choices {
    max-height: 320px;
    margin-top: 8px;
    overflow-y: auto;
}

.geo-choice {
    width: 100%;
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 8px;
    text-align: left;
}

.geo-choice:hover,
.geo-choice:focus {
    background: var(--papaya);
}

.geo-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 0 1px rgba(8, 8, 8, .10);
    flex: 0 0 auto;
}

.form-card {
    max-width: 680px;
}

.form-card label {
    display: block;
    font-weight: 800;
    margin-top: 14px;
    margin-bottom: 6px;
}

.form-card input,
.form-card select,
.form-card textarea {
    width: 100%;
}

.form-card textarea {
    min-height: 110px;
}

.small-action {
    color: var(--red);
    font-weight: 800;
    text-decoration: none;
}

.inline-status {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 700;
}

.inline-status.ok {
    color: #166534;
}

.inline-status.error {
    color: var(--red);
}

.nav-section {
    margin: 0 10px 4px;
    color: var(--papaya-dark);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .75;
}

.sidebar-user {
    display: grid;
    grid-template-columns: 38px 1fr 30px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 14px;
    background: rgba(255, 255, 255, .05);
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: var(--papaya);
    color: var(--red);
    font-weight: 900;
}

.sidebar-user-copy {
    min-width: 0;
}

.sidebar-user-copy strong {
    display: block;
    overflow: hidden;
    color: white;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.role-tag {
    display: inline-flex;
    margin-top: 3px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.role-admin {
    background: rgba(251, 191, 36, .18);
    color: #fcd34d;
}

.role-agent {
    background: rgba(96, 165, 250, .18);
    color: #93c5fd;
}

.logout-link {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--papaya-dark);
    text-decoration: none;
    cursor: pointer;
}

.logout-link:hover {
    background: rgba(177, 18, 38, .24);
    color: white;
}

button,
select,
[role="button"] {
    cursor: pointer;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
textarea {
    cursor: text;
}

.default-badge,
.status-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 900;
    margin-left: 6px;
    font-family: inherit;
    letter-spacing: .035em;
    text-transform: capitalize;
    cursor: default;
}

.default-badge {
    background: var(--red);
    color: var(--papaya);
}

.status-badge.active {
    background: #dcfce7;
    color: #166534;
}

.actions-cell {
    white-space: nowrap;
}

.inline-form {
    display: inline;
    margin-left: 10px;
}

.link-danger {
    border: 0;
    background: transparent;
    color: var(--red);
    font-weight: 800;
    padding: 0;
}

.form-note {
    margin-top: 7px;
    color: var(--muted);
    font-size: 13px;
}

.crud-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.crud-search-wrap {
    flex: 1;
}

.crud-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary-ui {
    display: inline-block;
    border: 1px solid rgba(8, 8, 8, .16);
    background: rgba(255, 255, 255, .75);
    color: var(--black);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
}

.btn-secondary-ui:hover {
    background: white;
    color: var(--red);
}

.table-responsive-ui {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

.data-table {
    min-width: 760px;
}

.status-select {
    font-weight: 800;
}

.status-select:has(option[value="active"]:checked) {
    color: #166534;
}

.status-select:has(option[value="disabled"]:checked) {
    color: #991b1b;
}

.status-badge.disabled {
    background: #fee2e2;
    color: #991b1b;
}

.protected-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.readonly-value {
    font-weight: 700;
}

.entity-form {
    max-width: 780px;
}

.entity-form-secondary {
    margin-top: 24px;
}

.entity-form-panel {
    overflow: visible;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.entity-form-header {
    padding: 22px 24px;
    background: var(--black);
    color: var(--papaya);
    border-radius: 19px 19px 0 0;
}

.entity-form-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.entity-form-header p {
    margin: 6px 0 0;
    color: var(--papaya-dark);
}

.entity-form-body {
    padding: 24px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-weight: 900;
    margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(8, 8, 8, .14);
    background: white;
    color: var(--black);
    border-radius: 12px;
    padding: 11px 13px;
    outline: none;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(177, 18, 38, .10);
}

.form-field input[readonly] {
    background: #f3eee7;
    color: var(--muted);
}

.form-field small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.protected-record {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(177, 18, 38, .18);
    background: rgba(177, 18, 38, .06);
    border-radius: 14px;
}

.protected-icon {
    font-size: 24px;
}

.protected-record strong {
    display: block;
}

.protected-record p {
    margin: 3px 0 0;
    color: var(--muted);
}

@media (max-width: 767px) {
    .crud-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crud-toolbar-actions {
        justify-content: flex-end;
    }

    .table-search {
        max-width: none;
    }

    .entity-form-body,
    .entity-form-header {
        padding: 18px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions a,
    .form-actions button {
        width: 100%;
        text-align: center;
    }
}

.crud-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.crud-search-wrap {
    flex: 1;
}

.crud-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary-ui {
    display: inline-block;
    border: 1px solid rgba(8, 8, 8, .16);
    background: rgba(255, 255, 255, .75);
    color: var(--black);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
}

.btn-secondary-ui:hover {
    background: white;
    color: var(--red);
}

.table-responsive-ui {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

.data-table {
    min-width: 760px;
}

.status-select {
    font-weight: 800;
}

.status-select:has(option[value="active"]:checked) {
    color: #166534;
}

.status-select:has(option[value="disabled"]:checked) {
    color: #991b1b;
}

.status-badge.disabled {
    background: #fee2e2;
    color: #991b1b;
}

.protected-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.readonly-value {
    font-weight: 700;
}

.entity-form {
    max-width: 780px;
}

.entity-form-secondary {
    margin-top: 24px;
}

.entity-form-panel {
    overflow: visible;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.entity-form-header {
    padding: 22px 24px;
    background: var(--black);
    color: var(--papaya);
    border-radius: 19px 19px 0 0;
}

.entity-form-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.entity-form-header p {
    margin: 6px 0 0;
    color: var(--papaya-dark);
}

.entity-form-body {
    padding: 24px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-weight: 900;
    margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(8, 8, 8, .14);
    background: white;
    color: var(--black);
    border-radius: 12px;
    padding: 11px 13px;
    outline: none;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(177, 18, 38, .10);
}

.form-field input[readonly] {
    background: #f3eee7;
    color: var(--muted);
}

.form-field small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.protected-record {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(177, 18, 38, .18);
    background: rgba(177, 18, 38, .06);
    border-radius: 14px;
}

.protected-icon {
    font-size: 24px;
}

.protected-record strong {
    display: block;
}

.protected-record p {
    margin: 3px 0 0;
    color: var(--muted);
}

@media (max-width: 767px) {
    .crud-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crud-toolbar-actions {
        justify-content: flex-end;
    }

    .table-search {
        max-width: none;
    }

    .entity-form-body,
    .entity-form-header {
        padding: 18px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions a,
    .form-actions button {
        width: 100%;
        text-align: center;
    }
}

.crud-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.crud-search-wrap {
    flex: 1;
}

.crud-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary-ui {
    display: inline-block;
    border: 1px solid rgba(8, 8, 8, .16);
    background: rgba(255, 255, 255, .75);
    color: var(--black);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    text-decoration: none;
}

.btn-secondary-ui:hover {
    background: white;
    color: var(--red);
}

.table-responsive-ui {
    width: 100%;
    overflow-x: auto;
    border-radius: 16px;
}

.data-table {
    min-width: 760px;
}

.status-select {
    font-weight: 800;
}

.status-select:has(option[value="active"]:checked) {
    color: #166534;
}

.status-select:has(option[value="disabled"]:checked) {
    color: #991b1b;
}

.status-badge.disabled {
    background: #fee2e2;
    color: #991b1b;
}

.protected-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
}

.readonly-value {
    font-weight: 700;
}

.entity-form {
    max-width: 780px;
}

.entity-form-secondary {
    margin-top: 24px;
}

.entity-form-panel {
    overflow: visible;
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line);
    border-radius: 20px;
}

.entity-form-header {
    padding: 22px 24px;
    background: var(--black);
    color: var(--papaya);
    border-radius: 19px 19px 0 0;
}

.entity-form-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 900;
}

.entity-form-header p {
    margin: 6px 0 0;
    color: var(--papaya-dark);
}

.entity-form-body {
    padding: 24px;
}

.form-field {
    margin-bottom: 18px;
}

.form-field label {
    display: block;
    font-weight: 900;
    margin-bottom: 7px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    border: 1px solid rgba(8, 8, 8, .14);
    background: white;
    color: var(--black);
    border-radius: 12px;
    padding: 11px 13px;
    outline: none;
}

.form-field textarea {
    min-height: 120px;
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(177, 18, 38, .10);
}

.form-field input[readonly] {
    background: #f3eee7;
    color: var(--muted);
}

.form-field small {
    display: block;
    color: var(--muted);
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.protected-record {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    margin-bottom: 18px;
    border: 1px solid rgba(177, 18, 38, .18);
    background: rgba(177, 18, 38, .06);
    border-radius: 14px;
}

.protected-icon {
    font-size: 24px;
}

.protected-record strong {
    display: block;
}

.protected-record p {
    margin: 3px 0 0;
    color: var(--muted);
}

@media (max-width: 767px) {
    .crud-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .crud-toolbar-actions {
        justify-content: flex-end;
    }

    .table-search {
        max-width: none;
    }

    .entity-form-body,
    .entity-form-header {
        padding: 18px;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .form-actions a,
    .form-actions button {
        width: 100%;
        text-align: center;
    }
}

.secret-value {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 900;
}

.secret-value.empty {
    background: #f3f4f6;
    color: #6b7280;
}

.status-badge.inactive {
    background: #f3f4f6;
    color: #4b5563;
}

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.disabled {
    background: #fef3c7;
    color: #92400e;
}

.small-button {
    border: 0;
    background: var(--black);
    color: var(--papaya);
    border-radius: 9px;
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 800;
}

.check-message {
    max-width: 260px;
    white-space: normal;
    font-size: 12px;
}

.machine-port-input {
    min-width: 90px;
    width: 90px;
}

.bulk-recovery-form,
.bulk-results-panel {
    max-width: 980px;
}

.bulk-results-panel {
    margin-top: 24px;
}

.bulk-textarea {
    min-height: 260px !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    line-height: 1.55;
    white-space: pre;
}

.machine-install-command-text {
    display: block;
    width: 100%;
    min-height: 360px !important;
    margin: 14px 0 10px;
    padding: 14px;
    resize: vertical;
}

.bulk-format-example {
    margin-bottom: 20px;
    padding: 14px;
    border: 1px solid rgba(177, 18, 38, .12);
    border-radius: 12px;
    background: rgba(177, 18, 38, .05);
}

.bulk-format-example strong,
.bulk-format-example code {
    display: block;
}

.bulk-format-example code {
    margin-top: 8px;
    color: #7f1d1d;
}

.bulk-error-list {
    display: grid;
    gap: 8px;
}

.bulk-error-list > div {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
}

.pagination-bar {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.pagination-summary,
.per-page-form {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.per-page-form {
    display: flex;
    align-items: center;
    gap: 7px;
}

.per-page-form select {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    padding: 6px 9px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 5px;
}

.pagination-pages a,
.pagination-pages span {
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--black);
    text-decoration: none;
    font-size: 13px;
    font-weight: 850;
}

.pagination-pages a:hover {
    background: var(--papaya-dark);
}

.pagination-pages a.active {
    background: var(--red);
    color: white;
}

.pagination-pages .disabled {
    color: #b7aea6;
    cursor: default;
}

.secret-button {
    border: 1px solid rgba(177, 18, 38, .18);
    border-radius: 9px;
    background: rgba(177, 18, 38, .07);
    color: var(--red);
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 850;
}

.secret-button:hover {
    background: var(--red);
    color: white;
}

.secret-modal-overlay {
    position: fixed;
    z-index: 2000;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: transparent;
    pointer-events: none;
}

.secret-modal-overlay[hidden] {
    display: none;
}

.secret-modal-dialog {
    width: min(520px, 100%);
    height: auto;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border-radius: 18px;
    background: white;
    box-shadow: -24px 0 70px rgba(8, 8, 8, .24);
    pointer-events: auto;
}

.secret-modal-dialog .proxy-result-modal {
    min-height: 0;
    border-radius: 18px;
}

.secret-modal-dialog .modal-body {
    padding: 24px;
}

.secret-modal-dialog .modal-footer {
    margin-top: auto;
    padding: 18px 24px;
}

@media (max-width: 575px) {
    .secret-modal-dialog,
    .secret-modal-dialog .proxy-result-modal {
        width: 100%;
        border-radius: 16px;
    }
}

.secret-modal-email {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8f6f2;
    font-weight: 800;
}

.secret-reveal-panel {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    background: #f0fdf4;
}

.secret-reveal-panel > label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 900;
}

.secret-output-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
}

.secret-output-row input {
    min-width: 0;
    border: 1px solid #86efac;
    border-radius: 10px;
    padding: 9px 11px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.secret-reveal-panel small {
    display: block;
    margin-top: 8px;
    color: #166534;
}

@media (max-width: 575px) {
    .secret-output-row {
        grid-template-columns: 1fr 1fr;
    }

    .secret-output-row input {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .pagination-bar {
        grid-template-columns: 1fr auto;
    }

    .pagination-pages {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

.result-button {
    min-width: 76px;
    border: 0;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 850;
    transition: transform .16s ease, box-shadow .16s ease;
}

.result-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(8, 8, 8, .14);
}

.result-button.result-active {
    background: #dcfce7;
    color: #166534;
}

.result-button.result-error {
    background: #fee2e2;
    color: #991b1b;
}

.result-button.result-inactive,
.result-button.result-disabled {
    background: #f3f4f6;
    color: #4b5563;
}

.proxy-result-modal {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(8, 8, 8, .24);
}

.proxy-result-modal .modal-header {
    background: var(--black);
    color: var(--papaya);
    border: 0;
}

.proxy-result-modal .btn-close {
    filter: invert(1);
}

.modal-eyebrow {
    margin-bottom: 3px;
    color: #fca5a5;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 0 0 18px;
}

.result-details > div {
    padding: 12px;
    background: #f8f6f2;
    border-radius: 12px;
}

.result-details dt,
.result-message-wrap > strong {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.result-details dd {
    margin: 5px 0 0;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.result-message {
    margin: 7px 0 0;
    padding: 14px;
    max-height: 260px;
    overflow: auto;
    border-radius: 12px;
    background: #111827;
    color: #e5e7eb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 575px) {
    .result-details {
        grid-template-columns: 1fr;
    }
}
.fingerprint-json-content {
    max-height: 65vh;
    margin: 0;
    padding: 1rem;
    overflow: auto;
    border: 1px solid #d9dde5;
    border-radius: 8px;
    background: #f7f8fa;
    color: #172033;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.small-button.prepare-success {
    border-color: #16834a;
    background: #16834a;
    color: #fff;
}
