.tenant-admin-page {
    width: 100%;
    padding: 18px 0 32px;
}

.organization-administration-overview .ui-panel {
    padding: 22px 24px;
}

.tenant-admin-card {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 26px 28px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.tenant-admin-section {
    margin: 0 0 28px;
    padding: 0 0 26px;
    border: 0;
    border-bottom: 1px solid var(--border);
}

.tenant-admin-section:last-of-type {
    margin-bottom: 0;
}

.tenant-admin-section legend {
    width: 100%;
    margin: 0 0 5px;
    padding: 0;
    color: var(--text);
    font-size: 18px;
    font-weight: 750;
    line-height: 1.25;
}

.tenant-admin-section-intro {
    margin: 0 0 18px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.tenant-admin-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
}

.tenant-admin-wide {
    grid-column: 1 / -1;
}

.tenant-admin-form label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.tenant-admin-form input,
.tenant-admin-form select {
    display: block;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
}

.tenant-admin-form .help-text,
.tenant-admin-form .form-help {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.tenant-profile-notice {
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f6f8f9;
}

.tenant-profile-notice strong {
    display: block;
    color: var(--text);
    font-size: 13px;
}

.tenant-profile-notice p {
    margin: 5px 0 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.tenant-admin-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding-top: 22px;
}

.tenant-admin-actions .primary-button,
.tenant-admin-actions .secondary-button {
    width: auto;
    min-width: 120px;
    min-height: 38px;
    margin-top: 0;
}

.tenant-admin-actions .primary-button {
    min-width: 150px;
}

.admin-statistic-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    margin: 12px 0 28px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.admin-statistic-card {
    min-width: 0;
    padding: 15px 18px;
}

.admin-statistic-card:not(:last-child) {
    border-right: 1px solid var(--border);
}

.admin-statistic-card small,
.admin-statistic-card strong {
    display: block;
}

.admin-statistic-card small {
    margin-bottom: 7px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-statistic-card strong {
    color: var(--text);
    font-size: 29px;
    line-height: 1;
}

.admin-module-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.admin-module-card {
    position: relative;
    display: flex;
    min-height: 190px;
    flex-direction: column;
    overflow: hidden;
    padding: 24px;
    border: 1px solid var(--border);
    background: var(--surface);
}

.admin-module-number {
    position: absolute;
    top: 17px;
    right: 20px;
    color: #e7eaed;
    font-size: 46px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.08em;
}

.admin-module-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    padding-top: 42px;
}

.admin-module-content h2 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 17px;
    line-height: 1.25;
}

.admin-module-content p {
    max-width: 360px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-module-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    min-height: 27px;
    margin-top: 20px;
}

.admin-module-action,
.admin-module-planned {
    position: static;
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    font-size: 12px;
    font-weight: 800;
}

.admin-module-action {
    color: var(--accent);
    text-decoration: none;
}

.admin-module-action:hover {
    text-decoration: underline;
}

.admin-module-planned {
    color: var(--text-muted);
}

.tenant-list-panel {
    margin-top: 12px;
    padding: 13px;
}

.tenant-list-table {
    min-width: 1180px;
}

.tenant-list-table th,
.tenant-list-table td {
    vertical-align: middle;
}

.tenant-list-table td:first-child {
    min-width: 220px;
}

.tenant-list-table code {
    white-space: nowrap;
}

.tenant-list-table .row-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
}

.tenant-list-table .row-actions form {
    margin: 0;
}

.tenant-list-table .secondary-button {
    width: auto;
    min-height: 32px;
    margin-top: 0;
    white-space: nowrap;
}

.tenant-type-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f6f8f9;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 1050px) {
    .admin-module-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .organization-administration-overview .ui-panel {
        padding: 18px 16px;
    }

    .tenant-admin-page {
        padding-top: 10px;
    }

    .tenant-admin-card {
        padding: 20px 16px;
    }

    .tenant-admin-grid,
    .admin-statistic-grid,
    .admin-module-grid {
        grid-template-columns: 1fr;
    }

    .tenant-admin-wide {
        grid-column: auto;
    }

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

    .tenant-admin-actions .primary-button,
    .tenant-admin-actions .secondary-button {
        width: 100%;
    }

    .admin-statistic-card:not(:last-child) {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .admin-module-card {
        min-height: 170px;
    }
}
.tenant-delete-panel {
    margin-top: 24px;
    padding: 26px;
    border: 1px solid #e4b8b2;
    border-left: 4px solid #b93f32;
}

.tenant-delete-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.tenant-delete-heading h2 {
    margin: 6px 0 8px;
}

.tenant-delete-heading p,
.tenant-delete-warning p,
.tenant-delete-blocked p {
    color: #687687;
    line-height: 1.55;
}

.tenant-delete-icon {
    display: grid;
    flex: 0 0 42px;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: #b93f32;
    font-size: 22px;
    font-weight: 800;
}

.tenant-delete-blocked,
.tenant-delete-warning {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 7px;
    background: #fff3f1;
}

.tenant-delete-warning ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.tenant-delete-form {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-top: 22px;
}

.tenant-delete-form label {
    font-weight: 700;
}

.tenant-delete-form input {
    width: min(100%, 440px);
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid #c7a09a;
    border-radius: 6px;
    font: inherit;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 16px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: #a9362b;
    font-weight: 700;
    cursor: pointer;
}

.danger-button:hover {
    background: #84271f;
}
