:root {
    color-scheme: dark;

    --bg: #101112;
    --surface: #181a1b;
    --surface-2: #202224;
    --border: #303437;

    --text: #f1f3f3;
    --muted: #949b9e;

    --accent: #00d2b2;
    --accent-hover: #00efca;

    --danger: #ff6b6b;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at top left,
            #172421 0,
            var(--bg) 420px
        );

    color: var(--text);
}

a {
    color: var(--accent);
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .02em;
}

.brand span {
    color: var(--accent);
}

.brand small {
    display: block;
    margin-top: 3px;

    color: var(--muted);

    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.login-body {
    display: grid;
    place-items: center;

    padding: 24px;
}

.login-card {
    width: min(100%, 420px);

    padding: 36px;

    background: rgba(24, 26, 27, .96);

    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, .35);
}

.login-card h1 {
    margin:
        34px 0 6px;

    font-size: 1.7rem;
}

.login-card form {
    display: grid;
    gap: 18px;

    margin-top: 28px;
}

label {
    display: grid;
    gap: 8px;

    color: #c7cbcd;
    font-size: .9rem;
}

input,
select {
    width: 100%;

    padding: 11px 12px;

    color: var(--text);
    background: #111314;

    border: 1px solid var(--border);
    border-radius: 7px;

    outline: none;
}

input:focus,
select:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 2px
        rgba(0, 210, 178, .12);
}

button {
    padding: 11px 16px;

    color: #07110f;
    background: var(--accent);

    border: 0;
    border-radius: 7px;

    font-weight: 700;
}

button:hover {
    background: var(--accent-hover);
}

.button-secondary {
    padding: 8px 12px;

    color: #d8dcdd;
    background: transparent;

    border: 1px solid var(--border);
}

.button-secondary:hover {
    color: white;
    background: var(--surface-2);
}

.alert {
    margin-top: 20px;
    padding: 12px 14px;

    color: #ffdada;
    background: rgba(255, 107, 107, .09);

    border: 1px solid rgba(255, 107, 107, .25);
    border-radius: 7px;
}

.muted {
    color: var(--muted);
}

.topbar {
    min-height: 68px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    background: rgba(16, 17, 18, .92);

    border-bottom: 1px solid var(--border);
}

.account {
    display: flex;
    align-items: center;
    gap: 18px;

    color: #b6bcbe;
    font-size: .88rem;
}

.page {
    width: min(1400px, calc(100% - 48px));

    margin: 44px auto;
}

.heading {
    display: flex;
    align-items: end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 28px;
}

.heading h1,
.section-title h2 {
    margin: 3px 0;
}

.eyebrow {
    margin: 0;

    color: var(--accent);

    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.customer-switch {
    width: min(360px, 100%);
}

.card {
    padding: 26px;

    background: rgba(24, 26, 27, .94);

    border: 1px solid var(--border);
    border-radius: 12px;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 24px;
}

.role {
    padding: 4px 9px;

    color: var(--accent);
    background: rgba(0, 210, 178, .08);

    border: 1px solid rgba(0, 210, 178, .22);
    border-radius: 999px;

    font-size: .72rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 14px 12px;

    text-align: left;

    border-bottom: 1px solid #292c2e;

    white-space: nowrap;
}

th {
    color: var(--muted);

    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

td {
    font-size: .88rem;
}

.invoice-number {
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        monospace;
}

.money {
    text-align: right;
}

.action {
    text-align: right;
}

.pdf-link {
    display: inline-block;

    padding: 6px 11px;

    text-decoration: none;

    border: 1px solid rgba(0, 210, 178, .35);
    border-radius: 6px;
}

.pdf-link:hover {
    background: rgba(0, 210, 178, .08);
}

.status {
    display: inline-block;

    padding: 3px 8px;

    background: #25282a;

    border-radius: 999px;

    color: #bbc0c2;

    font-size: .72rem;
}

.status-paid {
    color: var(--accent);
}

@media (max-width: 720px) {

    .topbar {
        padding: 0 18px;
    }

    .account > span {
        display: none;
    }

    .page {
        width:
            calc(100% - 24px);

        margin: 24px auto;
    }

    .heading {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-switch {
        width: 100%;
    }

    .card {
        padding: 18px;
    }
}

.pdf-unavailable {
    display: inline-block;

    padding: 6px 10px;

    color: var(--muted);

    border: 1px solid var(--border);
    border-radius: 6px;

    font-size: .78rem;
}

/* ADMIN_PRICE_EDITOR_BEGIN */

.admin-price-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.admin-price-input {
    width: 90px;
    padding: 7px 9px;
    text-align: right;
}

.admin-price-save {
    padding: 7px 10px;
    font-size: .78rem;
}

.admin-success {
    margin-bottom: 22px;
    padding: 12px 14px;

    color: var(--accent);
    background: rgba(0, 210, 178, .08);

    border: 1px solid rgba(0, 210, 178, .25);
    border-radius: 7px;
}

/* ADMIN_PRICE_EDITOR_END */

/* ADMIN_PLAN_CREATE_BEGIN */

.admin-create-row td {
    padding-top: 8px;
    padding-bottom: 20px;
}

.admin-create-details {
    padding: 12px 14px;

    background: rgba(0, 210, 178, .03);

    border: 1px dashed
        rgba(0, 210, 178, .22);

    border-radius: 8px;
}

.admin-create-details summary {
    color: var(--accent);

    cursor: pointer;

    font-size: .84rem;
    font-weight: 700;
}

.admin-create-form {
    display: grid;

    grid-template-columns:
        minmax(180px, 2fr)
        minmax(180px, 1.6fr)
        minmax(140px, 1fr)
        minmax(130px, 1fr)
        auto;

    gap: 14px;

    align-items: end;

    margin-top: 18px;
}

.admin-money-field {
    display: flex;
    align-items: center;
    gap: 7px;
}

.admin-money-field input {
    min-width: 90px;
}

.admin-create-action {
    display: grid;
    gap: 6px;
}

.admin-create-action small {
    white-space: nowrap;
}

@media (max-width: 1050px) {

    .admin-create-form {
        grid-template-columns:
            1fr 1fr;
    }
}

/* ADMIN_PLAN_CREATE_END */

/* ADMIN_LEGEND_CSS_BEGIN */

.field-help {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: .72rem;
    line-height: 1.35;
}

.admin-legend {
    margin-top: 28px;
}

.legend-grid {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 16px;
}

.legend-grid > div {
    padding: 16px;

    background: var(--surface-2);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.legend-grid strong {
    display: block;

    margin-bottom: 8px;

    color: var(--accent);
}

.legend-grid code {
    display: inline-block;

    margin-bottom: 8px;

    color: #e7eeee;
}

.legend-grid p {
    margin: 0;

    color: var(--muted);

    font-size: .82rem;
    line-height: 1.45;
}

/* ADMIN_LEGEND_CSS_END */

/* ADMIN_STATUS_TOGGLE_BEGIN */

.admin-status-form {
    margin: 0;
}

.status-toggle {
    padding: 5px 10px;

    border-radius: 999px;

    font-size: .72rem;
    font-weight: 700;
}

.status-toggle-active {
    color: var(--accent);
    background: rgba(0, 210, 178, .08);

    border: 1px solid
        rgba(0, 210, 178, .25);
}

.status-toggle-active:hover {
    color: #07110f;
    background: var(--accent);
}

.status-toggle-inactive {
    color: var(--muted);
    background: #25282a;

    border: 1px solid var(--border);
}

.status-toggle-inactive:hover {
    color: white;
    background: #34383a;
}

/* ADMIN_STATUS_TOGGLE_END */

/* PLAN_STATUS_MODAL_BEGIN */

.status-toggle-archived {
    color: #ff8d8d;
    background: rgba(255, 107, 107, .08);

    border: 1px solid
        rgba(255, 107, 107, .28);
}

.status-toggle-archived:disabled {
    cursor: default;
    opacity: .85;
}

.admin-dialog {
    width: min(620px, calc(100% - 32px));

    padding: 0;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 12px;

    box-shadow:
        0 30px 100px
        rgba(0, 0, 0, .65);
}

.admin-dialog::backdrop {
    background:
        rgba(0, 0, 0, .72);
}

.admin-dialog form {
    padding: 26px;
}

.admin-dialog h2 {
    margin:
        5px 0 8px;
}

.status-choice-list {
    display: grid;
    gap: 10px;

    margin: 22px 0;
}

.status-choice-list label {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 14px;

    background: var(--surface-2);

    border: 1px solid var(--border);
    border-radius: 8px;

    cursor: pointer;
}

.status-choice-list input {
    width: auto;

    margin-top: 3px;
}

.status-choice-list span {
    display: grid;
    gap: 4px;
}

.status-choice-list small {
    color: var(--muted);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 24px;
}

.archive-blocked {
    margin-top: 14px;
    padding: 12px 14px;

    color: #ffb3b3;
    background:
        rgba(255, 107, 107, .08);

    border: 1px solid
        rgba(255, 107, 107, .28);

    border-radius: 7px;
}

.confirm-box {
    margin-top: 20px;
    padding: 16px;

    background: var(--surface-2);

    border: 1px solid var(--border);
    border-radius: 8px;
}

.archive-warning {
    margin-top: 20px;
    padding: 20px;

    color: #ffdada;
    background:
        rgba(255, 55, 55, .13);

    border: 2px solid #ff4d4d;
    border-radius: 9px;

    box-shadow:
        0 0 28px
        rgba(255, 50, 50, .12);
}

.archive-warning strong {
    color: #ff6363;

    font-size: 1.05rem;
}

.danger-button {
    color: white;
    background: #d93636;
}

.danger-button:hover {
    background: #f04444;
}

/* PLAN_STATUS_MODAL_END */

/* ADMIN_CREATE_HELP_CLEAN */

.admin-create-form label {
    min-width: 0;
}

.admin-create-form label small {
    display: block;

    margin-top: 5px;

    max-width: 100%;

    white-space: normal;
    overflow-wrap: anywhere;

    font-size: .72rem;
    line-height: 1.25;
}

/* ADMIN_CREATE_HELP_CLEAN_END */

/* STATUS_MODAL_HIDDEN_FIX */
.status-choice-list label[hidden] {
    display: none !important;
}
/* STATUS_MODAL_HIDDEN_FIX_END */


/* PRODUCT_GROUP_UI_BEGIN */

.product-group-row td {
    padding-top: 22px;
    padding-bottom: 12px;

    background:
        rgba(0, 210, 178, .025);

    border-bottom:
        1px solid rgba(0, 210, 178, .24);
}

.product-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.product-group-title {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.product-group-title strong {
    font-size: 1.05rem;
}

.product-group-title code {
    color: var(--muted);
    font-size: .82rem;
}

/* PRODUCT_GROUP_UI_END */


/* PRODUCT_ACTION_MENU_BEGIN */

.product-group-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-action-menu {
    position: relative;
}

.product-action-menu summary {
    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    cursor: pointer;

    color: var(--muted);

    border: 1px solid var(--border);
    border-radius: 50%;

    font-size: 1.25rem;
    line-height: 1;

    user-select: none;
}

.product-action-menu summary::-webkit-details-marker {
    display: none;
}

.product-action-menu summary::marker {
    content: "";
}

.product-action-menu summary:hover {
    color: var(--text);

    border-color:
        rgba(0, 210, 178, .55);

    background:
        rgba(0, 210, 178, .06);
}

.product-action-popup {
    position: absolute;
    z-index: 30;

    top: calc(100% + 8px);
    right: 0;

    min-width: 210px;

    padding: 7px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 9px;

    box-shadow:
        0 16px 45px
        rgba(0, 0, 0, .45);
}

.product-action-popup button {
    width: 100%;

    padding: 9px 10px;

    text-align: left;

    background: transparent;
    border: 0;
    border-radius: 6px;
}

.product-action-popup button:disabled {
    opacity: .55;
    cursor: default;
}

.product-action-separator {
    height: 1px;

    margin: 6px 4px;

    background: var(--border);
}

.product-action-future {
    display: block;

    padding: 7px 10px;

    color: var(--muted);
    font-size: .78rem;
}

/* PRODUCT_ACTION_MENU_END */


/* TARIFF_ROW_DOTS_BEGIN */

.tariff-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.tariff-action-menu {
    flex: 0 0 auto;
}

.tariff-action-menu summary {
    width: 28px;
    height: 28px;
}

/* TARIFF_ROW_DOTS_END */


/* DISABLED_MENU_ITEM_READABLE */
.product-action-popup button:disabled {
    opacity: 1 !important;
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
    cursor: default;
}
/* DISABLED_MENU_ITEM_READABLE_END */


/* ACTION_MENU_TEXT_FIX */
.product-action-popup button {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text) !important;
}

.product-action-popup button:hover:not(:disabled) {
    background: rgba(0, 210, 178, .08);
}
/* ACTION_MENU_TEXT_FIX_END */


/* TOP_ACCOUNT_MENU_BEGIN */

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

.top-account-menu > summary {
    list-style: none;
}

.top-account-menu > summary::-webkit-details-marker {
    display: none;
}

.top-account-menu > summary::marker {
    content: "";
}

.top-account-trigger {
    display: flex;
    align-items: center;
    gap: 9px;

    padding: 8px 12px;

    cursor: pointer;
    user-select: none;

    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 8px;

    background: transparent;
}

.top-account-trigger:hover {
    border-color: rgba(0, 210, 178, .55);

    background:
        rgba(0, 210, 178, .06);
}

.top-account-chevron {
    color: var(--muted);
    font-size: .8rem;

    transition:
        transform .15s ease;
}

.top-account-menu[open]
.top-account-chevron {
    transform: rotate(180deg);
}

.top-account-dropdown {
    position: absolute;
    z-index: 100;

    top: calc(100% + 8px);
    right: 0;

    width: 245px;

    padding: 8px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 10px;

    box-shadow:
        0 18px 50px
        rgba(0, 0, 0, .48);
}

.top-account-section {
    padding: 8px 10px 5px;

    color: var(--muted);

    font-size: .72rem;
    font-weight: 700;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.top-account-item {
    display: block;

    padding: 9px 10px;

    color: var(--text);
    text-decoration: none;

    border-radius: 6px;
}

a.top-account-item:hover {
    color: var(--text);

    background:
        rgba(0, 210, 178, .08);
}

.top-account-subitem {
    padding-left: 26px;

    font-size: .9rem;
}

.top-account-subitem::before {
    content: "└─";

    margin-right: 7px;

    color: var(--muted);
}

.top-account-item.is-disabled {
    color: var(--muted);
    opacity: .55;

    cursor: default;
}

.top-account-separator {
    height: 1px;

    margin: 7px 5px;

    background: var(--border);
}

.top-account-logout {
    margin: 0;
}

.top-account-logout button {
    width: 100%;

    padding: 9px 10px;

    cursor: pointer;

    color: var(--text);
    -webkit-text-fill-color: var(--text);

    text-align: left;

    border: 0;
    border-radius: 6px;

    background: transparent;
}

.top-account-logout button:hover {
    background:
        rgba(0, 210, 178, .08);
}

/* TOP_ACCOUNT_MENU_END */


/* TABLE_TOOLS_BEGIN */

.table-tools {
    display: flex;
    justify-content: flex-end;

    margin:
        0
        0
        14px;
}

.table-search {
    width: min(340px, 100%);

    padding:
        9px
        11px;

    color: var(--text);

    background: transparent;

    border:
        1px solid
        var(--border);

    border-radius: 7px;
}

.table-search:focus {
    outline: none;

    border-color:
        rgba(0, 210, 178, .65);
}

.sortable-header {
    cursor: pointer;
    user-select: none;
}

.sortable-header::after {
    content: " ↕";

    color: var(--muted);

    font-size: .72rem;
}

.sortable-header[data-direction="asc"]::after {
    content: " ↑";
}

.sortable-header[data-direction="desc"]::after {
    content: " ↓";
}

/* TABLE_TOOLS_END */


/* USER_ACTION_MENU_COMPACT_BEGIN */

.user-action-menu .product-action-popup {
    width: 185px;
    min-width: 185px;
    max-width: 185px;

    padding: 5px;
}

.user-action-menu .product-action-popup button,
.user-action-menu .product-action-popup a {
    box-sizing: border-box;

    width: 100%;

    padding: 7px 9px;

    font-size: .82rem;
    line-height: 1.25;

    text-align: left;
}

.user-action-menu .product-action-separator {
    margin: 4px 3px;
}

.user-action-menu summary {
    width: 26px;
    height: 26px;

    font-size: 1.05rem;
}

/* USER_ACTION_MENU_COMPACT_END */


/* USER_STATUS_DOTS_BEGIN */

.user-status-dot {
    display: inline-block;

    width: 10px;
    height: 10px;

    border-radius: 50%;

    vertical-align: middle;
}

.user-status-active {
    background: #00d2b2;
    box-shadow: 0 0 0 3px rgba(0, 210, 178, .10);
}

.user-status-invited {
    background: #d9a441;
}

.user-status-disabled {
    background: #666;
}

.user-status-unassigned {
    background: transparent;
    border: 1px solid #777;
}

/* USER_STATUS_DOTS_END */


/* CUSTOMER_USERS_NO_SCROLL_BEGIN */

.customer-users-wrap {
    overflow: visible !important;

    width: 100%;

    height: auto !important;
    max-height: none !important;

    /*
     * Platz für das geöffnete 3-Dot-Menü.
     * Damit bleibt auch die letzte Tabellenzeile entspannt.
     */
    padding-bottom: 190px;
}

.customer-users-table {
    width: 100% !important;
    min-width: 0 !important;
}

.customer-users-table th:last-child,
.customer-users-table td:last-child {
    width: 42px;
    white-space: nowrap;
}

.customer-users-table th:nth-last-child(2),
.customer-users-table td:nth-last-child(2) {
    width: 90px;
}

.customer-users-table td {
    overflow-wrap: anywhere;
}

/* CUSTOMER_USERS_NO_SCROLL_END */


/* SEMANTIC_STATUS_COLORS_BEGIN */

:root {
    --status-active: #00d2b2;
    --status-invited: #d9a441;
    --status-disabled: #70777d;
    --status-archived: #a86f78;
    --status-unassigned: #777d82;
}


/* BADGES */

.status-state-active {
    color: var(--status-active);

    background:
        rgba(0, 210, 178, .10);

    border-color:
        rgba(0, 210, 178, .28);
}

.status-state-invited {
    color: var(--status-invited);

    background:
        rgba(217, 164, 65, .10);

    border-color:
        rgba(217, 164, 65, .28);
}

.status-state-disabled {
    color: var(--status-disabled);

    background:
        rgba(112, 119, 125, .10);

    border-color:
        rgba(112, 119, 125, .24);
}


/* STATUSPUNKTE */

.user-status-active {
    background:
        var(--status-active);

    box-shadow:
        0 0 0 3px
        rgba(0, 210, 178, .10);
}

.user-status-invited {
    background:
        var(--status-invited);
}

.user-status-disabled {
    background:
        var(--status-disabled);
}

.user-status-unassigned {
    background: transparent;

    border:
        1px solid
        var(--status-unassigned);
}

/* SEMANTIC_STATUS_COLORS_END */


/* ADMIN_USERS_NO_SCROLL_BEGIN */

.admin-users-wrap {
    overflow: visible !important;

    width: 100%;

    height: auto !important;
    max-height: none !important;

    /*
     * Luft für das geöffnete 3-Dot-Menü.
     * Keine Scrollbar-Orgie innerhalb der Card.
     */
    padding-bottom: 190px;
}

#admin-users-table {
    width: 100% !important;
    min-width: 0 !important;
}

#admin-users-table th:last-child,
#admin-users-table td:last-child {
    width: 46px;
    white-space: nowrap;
}

.entity-link {
    color: inherit;
    text-decoration: none;
}

.entity-link:hover {
    color: #00d2b2;
    text-decoration: underline;
}

/* ADMIN_USERS_NO_SCROLL_END */


/* USER_MEMBERSHIPS_NO_SCROLL_BEGIN */

.user-memberships-wrap {
    overflow: visible !important;

    width: 100%;

    height: auto !important;
    max-height: none !important;

    padding-bottom: 170px;
}

.user-memberships-table {
    width: 100% !important;
    min-width: 0 !important;
}

.user-memberships-table th:last-child,
.user-memberships-table td:last-child {
    width: 46px;
    white-space: nowrap;
}

.user-memberships-table td {
    overflow-wrap: anywhere;
}

/* USER_MEMBERSHIPS_NO_SCROLL_END */


/* ACTION_MENU_COLUMN_FIX_BEGIN */

.user-action-menu .product-action-popup {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    overflow: hidden;
}

.user-action-menu .product-action-popup > a,
.user-action-menu .product-action-popup > button {
    display: block !important;

    box-sizing: border-box !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    margin: 0 !important;

    white-space: normal !important;
    overflow-wrap: break-word;

    text-align: left !important;
}

.user-action-menu .product-action-separator {
    width: 100%;
    flex: 0 0 auto;
}

/* ACTION_MENU_COLUMN_FIX_END */


/* ADMIN_PRODUCTS_NO_SCROLL_BEGIN */

.admin-products-wrap {
    overflow: visible !important;

    width: 100%;

    height: auto !important;
    max-height: none !important;

    padding-bottom: 190px;
}

.admin-products-wrap table {
    width: 100% !important;
    min-width: 0 !important;
}

.admin-products-wrap th:last-child,
.admin-products-wrap td:last-child {
    white-space: nowrap;
}

/* ADMIN_PRODUCTS_NO_SCROLL_END */



/* USER_ARCHIVED_STATUS_BEGIN */

.status-state-archived {
    color: var(--status-archived);
    background: rgba(168, 111, 120, .10);
    border-color: rgba(168, 111, 120, .28);
}

.user-status-archived {
    background: var(--status-archived);
}

/* USER_ARCHIVED_STATUS_END */

/* USER_UNASSIGNED_X_BEGIN */

.user-status-unassigned {
    position: relative;

    width: 14px;
    height: 14px;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0;

    color: var(--status-unassigned);
}

.user-status-unassigned::before {
    content: "×";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* USER_UNASSIGNED_X_END */


/* USER_ARCHIVED_X_BEGIN */

.user-status-archived {
    position: relative;

    width: 14px !important;
    height: 14px !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;

    color: var(--status-archived);
}

.user-status-archived::before {
    content: "×";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* USER_ARCHIVED_X_END */


/* USER_STATUS_SYMBOL_FIX_BEGIN */

.user-status-unassigned {
    position: static !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;

    background: transparent !important;
    border: 1px solid var(--status-unassigned) !important;
}

.user-status-unassigned::before {
    content: none !important;
}

.user-status-disabled {
    position: relative;
    width: 14px !important;
    height: 14px !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;

    color: var(--status-disabled);
}

.user-status-disabled::before {
    content: "×";

    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

/* USER_STATUS_SYMBOL_FIX_END */


/* ADMIN_CUSTOMERS_NO_SCROLL_BEGIN */

.admin-customers-wrap {
    overflow: visible !important;

    width: 100%;

    height: auto !important;
    max-height: none !important;

    padding-bottom: 170px;
}

#admin-customers-table {
    width: 100% !important;
    min-width: 0 !important;
}

#admin-customers-table th:last-child,
#admin-customers-table td:last-child {
    width: 46px;
    white-space: nowrap;
}

/* ADMIN_CUSTOMERS_NO_SCROLL_END */



/* USER_CUSTOMER_ASSIGN_COMPACT_BEGIN */

.compact-assign-dialog {
    width: min(360px, calc(100vw - 28px));
    max-width: 360px;
    min-width: 0;

    padding: 0;

    overflow: hidden;

    border-radius: 9px;
}

.compact-assign-dialog form,
.compact-assign-dialog .admin-create-form {
    display: grid;
    grid-template-columns: 1fr;

    gap: 10px;

    padding: 16px 18px;
}

.compact-assign-dialog .eyebrow {
    margin: 0;

    font-size: 10px;
    line-height: 1.2;
}

.compact-assign-dialog h2 {
    margin: 0 0 2px;

    font-size: 17px;
    line-height: 1.2;
}

.compact-assign-dialog p {
    margin: 0;

    font-size: 12px;
    line-height: 1.35;
}

.compact-assign-dialog label {
    display: grid;
    grid-template-columns: 1fr;

    gap: 4px;

    margin: 0;

    font-size: 12px;
}

.compact-assign-dialog select,
.compact-assign-dialog input {
    width: 100%;
    min-width: 0;
    height: 34px;

    box-sizing: border-box;

    padding: 6px 9px;

    font-size: 13px;
}

.compact-assign-dialog .dialog-actions {
    display: flex;

    justify-content: flex-end;
    align-items: center;

    gap: 7px;

    margin: 4px 0 0;
}

.compact-assign-dialog .dialog-actions button {
    width: auto;
    min-width: 0;
    height: 32px;

    padding: 6px 10px;

    font-size: 12px;
    line-height: 1;
}

/* USER_CUSTOMER_ASSIGN_COMPACT_END */


/* TOP_BACK_BUTTON_BEGIN */

.top-back-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    width: auto !important;
    min-width: 0 !important;

    height: 18px !important;
    min-height: 18px !important;

    margin: 0 8px 0 0 !important;
    padding: 0 7px !important;

    font-size: 9px !important;
    font-weight: 400 !important;
    line-height: 16px !important;

    color: var(--muted) !important;

    border: 1px solid var(--border) !important;
    border-radius: 5px !important;

    background: transparent !important;
    box-shadow: none !important;

    cursor: pointer;
}

.top-back-button:hover {
    color: var(--text) !important;

    border-color:
        rgba(0, 210, 178, .45) !important;

    background:
        rgba(0, 210, 178, .05) !important;
}

.top-back-button:focus-visible {
    outline:
        1px solid rgba(0, 210, 178, .55);

    outline-offset: 2px;
}

/* TOP_BACK_BUTTON_END */


/* STICKY_TOPBAR_BEGIN */

.topbar {
    position: sticky !important;
    top: 0;
    z-index: 1000;

    background: var(--surface);

    box-shadow:
        0 1px 0 var(--border),
        0 8px 24px rgba(0, 0, 0, .18);
}

/* STICKY_TOPBAR_END */


/* USER_DETAIL_MERGED_CARD_BEGIN */

.user-detail-divider {
    height: 1px;

    margin:
        28px
        0
        24px;

    background: var(--border);
}

/* USER_DETAIL_MERGED_CARD_END */


/* TOP_ADMIN_HEADER_NAV_BEGIN */

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 24px;

    margin-left: auto;
    min-width: 0;
}


.top-admin-nav {
    display: flex;
    align-items: center;

    gap: 26px;
}


.top-admin-group {
    display: grid;
    gap: 3px;
}


.top-admin-label {
    padding-left: 7px;

    color: var(--muted);

    font-size: .61rem;
    font-weight: 800;

    letter-spacing: .10em;
    line-height: 1;

    text-transform: uppercase;
}


.top-admin-links {
    display: flex;
    align-items: center;

    gap: 2px;
}


.top-admin-link {
    display: block;

    padding: 7px 8px;

    color: #d8dcdd;
    text-decoration: none;

    border-radius: 6px;

    font-size: .80rem;
    line-height: 1;

    white-space: nowrap;
}


a.top-admin-link:hover {
    color: var(--text);

    background:
        rgba(0, 210, 178, .08);
}


.top-admin-link.is-current {
    color: var(--accent);

    background:
        rgba(0, 210, 178, .08);
}


.top-admin-link.is-disabled {
    color: var(--muted);

    opacity: .42;

    cursor: default;
}


.top-account-dropdown {
    width: 220px;
}


@media (max-width: 1100px) {

    .topbar-tools {
        gap: 14px;
    }

    .top-admin-nav {
        gap: 10px;
    }

    .top-admin-label {
        display: none;
    }

    .top-admin-link {
        padding:
            6px
            6px;

        font-size: .75rem;
    }
}

/* TOP_ADMIN_HEADER_NAV_END */

/* CENTRAL_ENTITY_CREATE_BEGIN */

.admin-list-create {
    margin-bottom: 18px;
}


.admin-create-user-form {
    grid-template-columns:
        minmax(220px, 1.2fr)
        minmax(260px, 1.5fr)
        auto;
}


.admin-create-customer-form {
    grid-template-columns:
        repeat(
            4,
            minmax(150px, 1fr)
        );
}


.admin-create-customer-form button {
    justify-self: start;
}


@media (max-width: 1000px) {

    .admin-create-customer-form {
        grid-template-columns:
            repeat(
                2,
                minmax(180px, 1fr)
            );
    }
}


@media (max-width: 650px) {

    .admin-create-user-form,
    .admin-create-customer-form {
        grid-template-columns: 1fr;
    }
}

/* CENTRAL_ENTITY_CREATE_END */


/* CUSTOMER_NUMBER_CHECK_BEGIN */

.customer-number-status {
    display: block;

    margin-top: 6px;

    font-size: .78rem;
    line-height: 1.3;

    color: var(--muted);
}

.customer-number-status.is-available {
    color: #45d483;
}

.customer-number-status.is-taken,
.customer-number-status.is-invalid {
    color: #ff6868;
}

.customer-number-status.is-auto {
    color: var(--accent);
}

.customer-number-status.is-checking {
    color: var(--muted);
}

/* CUSTOMER_NUMBER_CHECK_END */


.customer-number-status:empty {
    display: none;
}


.customer-number-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.customer-number-label-row .customer-number-status {
    margin: 0;
    font-size: .72rem;
    line-height: 1;
    white-space: nowrap;
    text-align: right;
}



/* USER_LICENSES_BEGIN */

.user-license-count {
    width: 84px;
    text-align: center;
}

.license-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 28px;
    height: 26px;

    padding: 0 8px;

    border: 1px solid
        rgba(0, 220, 190, .25);

    border-radius: 999px;

    background:
        rgba(0, 220, 190, .07);

    color: var(--accent);

    font-size: .78rem;
    font-weight: 700;

    cursor: help;
}

.user-license-list {
    display: grid;
    gap: 8px;

    max-height: 340px;

    margin-top: 4px;

    overflow-y: auto;
}

.user-license-option {
    display: grid;
    gap: 8px;

    padding: 10px 0;

    border-bottom: 1px solid
        rgba(255,255,255,.07);
}

.user-license-option:last-child {
    border-bottom: 0;
}

.user-license-check {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 0;
    cursor: pointer;
}

.user-license-check input[type="checkbox"] {
    width: auto;
    min-width: 0;

    margin: 0;

    flex: 0 0 auto;
}

.user-license-check span {
    display: grid;
    gap: 2px;
}

.user-license-check small {
    color: var(--muted);
}

.user-license-option select {
    width: 100%;
}

.user-license-no-plan {
    padding-left: 25px;
    font-size: .75rem;
}

/* USER_LICENSES_END */



/* PRICE_CONFIRM_MINI_BEGIN */

.price-confirm-dialog {
    width: min(360px, calc(100vw - 32px));
    max-width: 360px;
}

.price-confirm-content {
    display: block;
}

.price-confirm-content h2 {
    margin-bottom: 18px;
}

.price-confirm-line {
    margin: 8px 0;
    line-height: 1.45;
}

.price-confirm-line strong {
    display: block;
    margin-top: 2px;
}

.price-confirm-content .dialog-actions {
    margin-top: 22px;
    justify-content: flex-end;
}

/* PRICE_CONFIRM_MINI_END */



/* PRICE_CONFIRM_MINI_BEGIN */

.price-confirm-dialog {
    width: min(360px, calc(100vw - 32px));
    max-width: 360px;
}

.price-confirm-content {
    display: block;
}

.price-confirm-content h2 {
    margin-bottom: 18px;
}

.price-confirm-line {
    margin: 8px 0;
    line-height: 1.45;
}

.price-confirm-line strong {
    display: block;
    margin-top: 2px;
}

.price-confirm-content .dialog-actions {
    margin-top: 22px;
    justify-content: flex-end;
}

/* PRICE_CONFIRM_MINI_END */



/* ADMIN_DIALOG_TARIFF_STANDARD_BEGIN */

/*
 * STANDARD FÜR ALLE ADMIN-POPUPS
 * Referenz: "Tarif bearbeiten"
 */

.admin-dialog {
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: 360px !important;
    min-width: 0 !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 40px) !important;

    padding: 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    color: var(--text);
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 10px;

    box-shadow:
        0 18px 55px
        rgba(0, 0, 0, .55);
}


/* Inhalt */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {
    display: block !important;

    width: auto !important;
    min-width: 0 !important;

    padding: 16px 17px !important;

    margin: 0 !important;
}


/*
 * Wichtig:
 * admin-create-form ist außerhalb der Dialoge
 * teilweise ein mehrspaltiges Grid.
 * IN Dialogen darf das niemals greifen.
 */

.admin-dialog .admin-create-form {
    display: block !important;

    grid-template-columns: none !important;
    grid-template-rows: none !important;

    width: auto !important;
    min-width: 0 !important;

    gap: 0 !important;
}


/* Überschriften */

.admin-dialog .eyebrow {
    margin:
        0
        0
        7px;

    font-size: .72rem;
    line-height: 1.1;
}

.admin-dialog h2 {
    margin:
        0
        0
        15px !important;

    font-size: 1.15rem;
    line-height: 1.2;
}


/* Beschreibung / Benutzername */

.admin-dialog p {
    max-width: 100%;
}

.admin-dialog .muted {
    margin:
        0
        0
        14px;
}


/* Labels */

.admin-dialog label {
    display: block !important;

    width: 100% !important;

    margin:
        0
        0
        11px !important;
}


/* Inputs */

.admin-dialog input[type="text"],
.admin-dialog input[type="email"],
.admin-dialog input[type="password"],
.admin-dialog input[type="number"],
.admin-dialog select,
.admin-dialog textarea {
    display: block;

    box-sizing: border-box;

    width: 100% !important;
    max-width: 100% !important;

    margin-top: 5px;
}


/* Checkboxen bleiben Checkboxen */

.admin-dialog input[type="checkbox"],
.admin-dialog input[type="radio"] {
    width: auto !important;
    min-width: 0 !important;
}


/* Button-Zeile */

.admin-dialog .dialog-actions {
    display: flex !important;

    align-items: center;
    justify-content: flex-end !important;

    gap: 8px !important;

    width: 100%;

    margin:
        15px
        0
        0 !important;
}


/* Buttons bewusst kompakt */

.admin-dialog .dialog-actions button {
    width: auto !important;
    min-width: 0 !important;

    padding:
        8px
        12px !important;

    font-size: .84rem;
}


/* Preisdialog: keine Sondergröße mehr */

.price-confirm-dialog {
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: 360px !important;
}

.price-confirm-content h2 {
    margin-bottom: 15px !important;
}

.price-confirm-line {
    margin:
        7px
        0 !important;
}

.price-confirm-line strong {
    display: block;

    margin-top: 2px;
}


/* Lizenzdialog bleibt kompakt,
   Liste darf intern scrollen */

#user-license-dialog .user-license-list {
    max-height: 280px;

    overflow-y: auto;
    overflow-x: hidden;

    margin-top: 10px;
}


/* Alte Sonderbreiten neutralisieren */

.compact-assign-dialog {
    width: min(360px, calc(100vw - 32px)) !important;
    max-width: 360px !important;
    min-width: 0 !important;
}


/* kein horizontaler Scrollbalken */

.admin-dialog,
.admin-dialog * {
    box-sizing: border-box;
}

/* ADMIN_DIALOG_TARIFF_STANDARD_END */


/* ADMIN_DIALOG_COMPACT_DENSITY_BEGIN */

/*
 * Dialoggröße NICHT erzwingen.
 * Der Inhalt bestimmt Breite und Höhe.
 */

.admin-dialog {
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: calc(100vh - 32px) !important;

    overflow: visible !important;

    padding: 0 !important;
}


/*
 * Inhalt kompakt, aber nicht auf künstliche
 * Dialogbreite aufblasen.
 */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {
    display: block !important;

    width: max-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 50px) !important;

    padding: 13px 15px !important;

    margin: 0 !important;
}


/*
 * Überschriften
 */

.admin-dialog .eyebrow {
    margin: 0 0 6px !important;

    font-size: .66rem !important;
    line-height: 1.05 !important;
}

.admin-dialog h2 {
    margin: 0 0 12px !important;

    font-size: 1rem !important;
    line-height: 1.15 !important;
}


/*
 * Normaler Text
 */

.admin-dialog,
.admin-dialog p,
.admin-dialog label {
    font-size: .78rem !important;
}

.admin-dialog .muted {
    margin: 0 0 11px !important;

    font-size: .76rem !important;
    line-height: 1.3 !important;
}


/*
 * Labels / Felder
 */

.admin-dialog label {
    display: block !important;

    width: auto !important;

    margin: 0 0 9px !important;
}

.admin-dialog input[type="text"],
.admin-dialog input[type="email"],
.admin-dialog input[type="password"],
.admin-dialog input[type="number"],
.admin-dialog select,
.admin-dialog textarea {
    display: block;

    width: 300px !important;
    max-width: calc(100vw - 80px) !important;

    min-height: 32px !important;
    height: 32px;

    margin-top: 4px !important;

    padding: 5px 8px !important;

    font-size: .78rem !important;

    border-radius: 6px !important;
}

.admin-dialog textarea {
    height: auto;
    min-height: 60px !important;
}


/*
 * Checkbox / Radio natürlich lassen
 */

.admin-dialog input[type="checkbox"],
.admin-dialog input[type="radio"] {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;

    margin: 0 !important;
}


/*
 * Buttons wie bei Tarif bearbeiten:
 * klein, kompakt, unten rechts.
 */

.admin-dialog .dialog-actions {
    display: flex !important;

    justify-content: flex-end !important;
    align-items: center !important;

    gap: 7px !important;

    width: auto !important;

    margin: 13px 0 0 !important;
}

.admin-dialog .dialog-actions button {
    width: auto !important;
    min-width: 0 !important;
    height: 32px !important;

    padding: 5px 11px !important;

    font-size: .76rem !important;
    line-height: 1 !important;

    border-radius: 7px !important;
}


/*
 * Fremde Grid-Regeln in Dialogen neutralisieren.
 */

.admin-dialog .admin-create-form {
    display: block !important;

    width: max-content !important;
    max-width: calc(100vw - 50px) !important;

    grid-template-columns: none !important;
    gap: 0 !important;
}


/*
 * Lizenzdialog:
 * Modal bleibt inhaltshoch.
 * Nur die Lizenzliste scrollt,
 * falls wirklich viele Lizenzen vorhanden sind.
 */

#user-license-dialog {
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
}

#user-license-dialog .user-license-list {
    max-height: 230px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    margin-top: 8px !important;
}

#user-license-dialog .user-license-option {
    gap: 5px !important;

    padding: 7px 0 !important;
}

#user-license-dialog .user-license-check {
    gap: 7px !important;
}

#user-license-dialog .user-license-check small {
    font-size: .68rem !important;
}


/*
 * Preisdialog ebenfalls wieder inhaltsabhängig.
 */

.price-confirm-dialog {
    width: auto !important;
    max-width: calc(100vw - 32px) !important;
}

.price-confirm-line {
    margin: 5px 0 !important;
}


/* ADMIN_DIALOG_COMPACT_DENSITY_END */



/* ==========================================================
   ADMIN_DIALOG_DYNAMIC_COMPACT_BEGIN

   Standard:
   - Größe durch Inhalt
   - nur Viewport-Begrenzung
   - kompakte Controls
   - Referenz: Tarif bearbeiten
   ========================================================== */


/* ----------------------------------------------------------
   MODAL SELBST
   ---------------------------------------------------------- */

.admin-dialog,
.compact-assign-dialog,
.price-confirm-dialog {

    width: auto !important;
    min-width: 0 !important;

    max-width:
        min(
            560px,
            calc(100vw - 28px)
        ) !important;


    height: auto !important;
    min-height: 0 !important;

    max-height:
        calc(100vh - 28px) !important;


    overflow-x: hidden !important;
    overflow-y: auto !important;


    padding: 0 !important;

    border-radius: 10px !important;
}


/* ----------------------------------------------------------
   INHALT
   ---------------------------------------------------------- */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {

    display: block !important;

    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    padding:
        14px
        16px !important;

    margin: 0 !important;
}


/*
 * admin-create-form darf innerhalb eines Dialogs
 * KEIN Grid / Breitbildformular mehr werden.
 */

.admin-dialog .admin-create-form {

    display: block !important;

    grid-template-columns:
        none !important;

    grid-template-rows:
        none !important;

    width: auto !important;
    min-width: 0 !important;

    gap: 0 !important;
}


/* ----------------------------------------------------------
   TYPOGRAFIE
   ---------------------------------------------------------- */

.admin-dialog .eyebrow {

    margin:
        0
        0
        7px !important;

    font-size:
        .68rem !important;

    line-height:
        1.1 !important;
}


.admin-dialog h2 {

    margin:
        0
        0
        13px !important;

    font-size:
        1.08rem !important;

    line-height:
        1.2 !important;
}


.admin-dialog p {

    margin:
        7px
        0 !important;

    font-size:
        .80rem !important;

    line-height:
        1.35 !important;
}


.admin-dialog .muted {

    font-size:
        .78rem !important;
}


/* ----------------------------------------------------------
   LABELS
   ---------------------------------------------------------- */

.admin-dialog label {

    display: block !important;

    width: auto !important;

    margin:
        0
        0
        10px !important;

    font-size:
        .76rem !important;

    line-height:
        1.25 !important;
}


/* ----------------------------------------------------------
   EINGABEFELDER
   ---------------------------------------------------------- */

.admin-dialog input[type="text"],
.admin-dialog input[type="email"],
.admin-dialog input[type="password"],
.admin-dialog input[type="number"],
.admin-dialog select,
.admin-dialog textarea {

    box-sizing: border-box;

    width: auto !important;
    min-width: 280px !important;

    max-width:
        calc(100vw - 62px) !important;

    margin-top:
        4px !important;

    padding:
        6px
        9px !important;

    font-size:
        .79rem !important;
}


/*
 * Select darf bei längerem Inhalt etwas breiter werden.
 * Dialog wächst dann entsprechend mit.
 */

.admin-dialog select {

    width: auto !important;
}


/* Checkbox / Radio nicht aufblasen */

.admin-dialog input[type="checkbox"],
.admin-dialog input[type="radio"] {

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
}


/* ----------------------------------------------------------
   BUTTONS
   ---------------------------------------------------------- */

.admin-dialog .dialog-actions {

    display: flex !important;

    align-items: center !important;
    justify-content: flex-end !important;

    gap:
        7px !important;

    width: auto !important;

    margin:
        14px
        0
        0 !important;
}


.admin-dialog .dialog-actions button {

    width: auto !important;
    min-width: 0 !important;

    padding:
        7px
        11px !important;

    font-size:
        .77rem !important;

    line-height:
        1.15 !important;
}


/* ----------------------------------------------------------
   LIZENZZUWEISUNG
   ---------------------------------------------------------- */

#user-license-dialog .user-license-list {

    width: auto !important;

    height: auto !important;
    min-height: 0 !important;

    /*
     * Normal wächst die Liste einfach mit.
     * Erst bei echtem Platzmangel scrollt sie.
     */
    max-height:
        calc(100vh - 230px) !important;

    overflow-x:
        hidden !important;

    overflow-y:
        auto !important;

    margin:
        8px
        0
        0 !important;
}


#user-license-dialog .user-license-option {

    gap:
        5px !important;

    padding:
        7px
        0 !important;
}


#user-license-dialog .user-license-check {

    gap:
        8px !important;

    margin:
        0 !important;

    font-size:
        .79rem !important;
}


#user-license-dialog .user-license-check strong {

    font-size:
        .80rem !important;
}


#user-license-dialog .user-license-check small {

    font-size:
        .67rem !important;
}


#user-license-dialog .user-license-option select {

    margin-top:
        4px !important;

    min-width:
        300px !important;
}


/* ----------------------------------------------------------
   PREISBESTÄTIGUNG
   ---------------------------------------------------------- */

.price-confirm-dialog {

    width:
        auto !important;

    max-width:
        min(
            420px,
            calc(100vw - 28px)
        ) !important;
}


.price-confirm-content {

    width:
        auto !important;
}


.price-confirm-line {

    margin:
        6px
        0 !important;
}


.price-confirm-line strong {

    margin-top:
        1px !important;
}


/* ADMIN_DIALOG_DYNAMIC_COMPACT_END */



/* ADMIN_DIALOG_CONTENT_HEIGHT_BEGIN */

/*
 * Dialoghöhe ausschließlich durch Inhalt bestimmen.
 * Nur wenn der Inhalt höher als der Viewport wird,
 * darf der Dialog begrenzt werden.
 */

.admin-dialog,
.price-confirm-dialog,
.compact-assign-dialog {

    height: fit-content !important;
    min-height: unset !important;

    block-size: fit-content !important;
    min-block-size: 0 !important;

    max-height: calc(100dvh - 32px) !important;
    max-block-size: calc(100dvh - 32px) !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}


/* Direkter Inhalt darf ebenfalls niemals aufziehen */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {

    height: fit-content !important;
    min-height: 0 !important;
    max-height: none !important;

    block-size: fit-content !important;

    flex: none !important;
}


/* Preisdialog explizit absichern */

#price-confirm-dialog {

    height: fit-content !important;
    min-height: 0 !important;

    block-size: fit-content !important;
}


/* ADMIN_DIALOG_CONTENT_HEIGHT_END */



/* ADMIN_DIALOG_CONTENT_WIDTH_BEGIN */

/*
 * Dialogbreite folgt dem Inhalt.
 * Keine Vollbild-/Containerbreite mehr.
 */

.admin-dialog,
.compact-assign-dialog,
.price-confirm-dialog {

    width: fit-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;

    inline-size: fit-content !important;
    min-inline-size: 0 !important;
    max-inline-size: calc(100vw - 32px) !important;
}


/*
 * Auch der direkte Inhalt darf den Dialog
 * nicht künstlich auf Seitenbreite ziehen.
 */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {

    width: fit-content !important;
    min-width: 0 !important;
    max-width: 100% !important;

    inline-size: fit-content !important;
    max-inline-size: 100% !important;
}


/*
 * Standardfelder sorgen für eine vernünftige
 * Mindestbreite, bestimmen aber nicht den ganzen Screen.
 */

.admin-dialog input[type="text"],
.admin-dialog input[type="email"],
.admin-dialog input[type="password"],
.admin-dialog input[type="number"],
.admin-dialog select,
.admin-dialog textarea {

    width: 100% !important;

    min-width: 280px !important;
    max-width: 420px !important;
}


/*
 * Lizenzdialog darf etwas breiter werden,
 * weil Tarifnamen und Produktnamen länger sind.
 */

#user-license-dialog {

    width: fit-content !important;
    max-width: min(
        460px,
        calc(100vw - 32px)
    ) !important;
}


#user-license-dialog > form {

    width: fit-content !important;
    max-width: 100% !important;
}


#user-license-dialog select {

    min-width: 320px !important;
    max-width: 420px !important;
}


/*
 * Kleine Bestätigungsdialoge bleiben automatisch
 * besonders kompakt.
 */

#price-confirm-dialog {

    width: fit-content !important;
    max-width: min(
        420px,
        calc(100vw - 32px)
    ) !important;
}


/* ADMIN_DIALOG_CONTENT_WIDTH_END */



/* ==========================================================
   ADMIN_POPUP_STANDARD_FINAL
   Verbindlicher Standard für alle Portal-Popups
   ========================================================== */

:root {
    --admin-dialog-field-min: 280px;
    --admin-dialog-field-max: 420px;
}


/* Dialog passt sich dem Inhalt an */

.admin-dialog,
.compact-assign-dialog,
.price-confirm-dialog,
#user-license-dialog {

    width: fit-content !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;

    height: fit-content !important;
    min-height: 0 !important;
    max-height: calc(100dvh - 32px) !important;

    inline-size: fit-content !important;
    block-size: fit-content !important;

    padding: 0 !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}


/* Inhalt bestimmt die Dialoggröße */

.admin-dialog > form,
.admin-dialog > .price-confirm-content {

    display: block !important;

    width: fit-content !important;
    min-width: 0 !important;
    max-width: 100% !important;

    height: fit-content !important;
    min-height: 0 !important;

    padding: 14px 16px !important;
    margin: 0 !important;
}


/* Keine Grid-Layouts innerhalb von Popups */

.admin-dialog .admin-create-form {

    display: block !important;

    grid-template-columns: none !important;
    grid-template-rows: none !important;

    width: fit-content !important;
    min-width: 0 !important;

    gap: 0 !important;
}


/* Kompakte Typografie */

.admin-dialog .eyebrow {
    margin: 0 0 7px !important;

    font-size: .68rem !important;
    line-height: 1.1 !important;
}

.admin-dialog h2 {
    margin: 0 0 13px !important;

    font-size: 1.08rem !important;
    line-height: 1.2 !important;
}

.admin-dialog p {
    margin: 7px 0 !important;

    font-size: .80rem !important;
    line-height: 1.35 !important;
}

.admin-dialog .muted {
    font-size: .78rem !important;
}


/* Kompakte Labels */

.admin-dialog label {

    display: block !important;

    width: auto !important;

    margin: 0 0 10px !important;

    font-size: .76rem !important;
    line-height: 1.25 !important;
}


/* Kompakte Felder */

.admin-dialog input[type="text"],
.admin-dialog input[type="email"],
.admin-dialog input[type="password"],
.admin-dialog input[type="number"],
.admin-dialog select,
.admin-dialog textarea {

    box-sizing: border-box;

    width: 100% !important;

    min-width:
        var(--admin-dialog-field-min) !important;

    max-width:
        var(--admin-dialog-field-max) !important;

    margin-top: 4px !important;

    padding: 6px 9px !important;

    font-size: .79rem !important;
}


/* Checkboxen / Radios nicht aufblasen */

.admin-dialog input[type="checkbox"],
.admin-dialog input[type="radio"] {

    width: auto !important;
    min-width: 0 !important;

    margin: 0 !important;
}


/* Aktionen unten rechts */

.admin-dialog .dialog-actions {

    display: flex !important;

    align-items: center !important;
    justify-content: flex-end !important;

    gap: 7px !important;

    width: auto !important;

    margin: 14px 0 0 !important;
}


/* Kleine Buttons */

.admin-dialog .dialog-actions button {

    width: auto !important;
    min-width: 0 !important;

    padding: 7px 11px !important;

    font-size: .77rem !important;
    line-height: 1.15 !important;
}


/* Listen dürfen erst bei echtem Platzmangel scrollen */

.admin-dialog .user-license-list {

    height: auto !important;
    min-height: 0 !important;

    max-height: calc(100dvh - 230px) !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;
}


/* ==========================================================
   END ADMIN_POPUP_STANDARD_FINAL
   ========================================================== */



/* ==========================================================
   HEADLINE ADD BUTTON STANDARD
   ========================================================== */

.section-title-actions,
.product-group-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.headline-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 30px;
    height: 30px;

    padding: 0;

    color: var(--accent);
    background: transparent;

    border: 1px solid rgba(0, 210, 178, .45);
    border-radius: 50%;

    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1;

    cursor: pointer;
}

.headline-add-button:hover,
.headline-add-button[aria-expanded="true"] {
    background: rgba(0, 210, 178, .09);
    border-color: var(--accent);
}

.product-headline-add-button {
    width: 26px;
    height: 26px;

    font-size: 1rem;
}

.inline-create-panel {
    margin: 10px 0 18px;
    padding: 12px 14px;

    border: 1px dashed rgba(0, 210, 178, .22);
    border-radius: 8px;

    background: rgba(0, 210, 178, .025);
}

.inline-create-panel[hidden],
.admin-create-row[hidden] {
    display: none !important;
}

.inline-create-panel-row {
    margin: 0;
}

.admin-create-row td {
    padding-top: 10px;
    padding-bottom: 14px;
}

/* END HEADLINE ADD BUTTON STANDARD */

