/* App-level utilities (design tokens in executive-precision.css) */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

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

.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.d-block { display: block; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-0 { margin-bottom: 0; }
.h-100 { height: 100%; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.me-2 { margin-right: 0.5rem; }
.w-100 { width: 100%; }
.text-danger { color: var(--ep-error); }
.small { font-size: 12px; }
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}
.col-md-3, .col-md-6, .col-md-8, .col-md-12 {
    padding: 0 0.75rem;
    width: 100%;
}
@media (min-width: 768px) {
    .col-md-3 { width: 25%; }
    .col-md-6 { width: 50%; }
    .col-md-8 { width: 66.666%; }
    .col-md-12 { width: 100%; }
}

.ep-superadmin-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: var(--ep-surface-variant, #f3f4f6);
    border: 1px solid var(--ep-outline, #e5e7eb);
}

.ep-superadmin-banner p {
    margin: 0.25rem 0 0;
    color: var(--ep-on-surface-variant, #6b7280);
    font-size: 0.875rem;
}

.ep-tenant-warning {
    background: #fff8e6;
    border-color: #f59e0b;
}

.ep-tenant-warning .material-symbols-outlined {
    color: #d97706;
    flex-shrink: 0;
}

.ep-tenant-warning strong {
    color: #92400e;
}

.ep-content > .ep-tenant-warning,
.ep-content > .ep-superadmin-banner.ep-tenant-warning {
    margin: 1rem 1rem 0;
}

.ep-tenant-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 220px;
}

.ep-tenant-dropdown {
    min-width: 200px;
}

.ep-superadmin-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #7c3aed;
    color: #fff;
    margin-left: 0.35rem;
}

.ep-nav-section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.6;
    padding: 0.75rem 1rem 0.25rem;
}

.ep-admin-cards,
.ep-admin-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ep-admin-card {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--ep-outline, #e5e7eb);
    background: var(--ep-surface, #fff);
}

.ep-admin-card-icon {
    font-size: 2rem;
    color: var(--ep-primary, #2563eb);
}

.ep-admin-stats {
    margin: 0;
    padding-left: 1.25rem;
}

/* Tenants — lista móvil (sin scroll horizontal) */
.ep-tenant-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
}

.ep-tenant-mobile-card {
    padding: 1rem;
    border-radius: 12px;
}

.ep-tenant-mobile-card--selected {
    border-color: var(--ep-primary, #2563eb);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--ep-primary, #2563eb) 35%, transparent);
}

.ep-tenant-mobile-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.ep-tenant-mobile-card__name {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ep-tenant-mobile-card__status {
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ep-tenant-mobile-card__status.is-active {
    background: #dcfce7;
    color: #166534;
}

.ep-tenant-mobile-card__status.is-inactive {
    background: #f3f4f6;
    color: #6b7280;
}

.ep-tenant-mobile-card__id {
    margin: 0 0 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--ep-on-surface-variant, #6b7280);
    overflow-wrap: anywhere;
    word-break: break-all;
}

.ep-tenant-mobile-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ep-tenant-mobile-card__actions .e-btn {
    flex: 1 1 calc(50% - 0.25rem);
    min-width: 0;
}

.ep-tenant-mobile-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0 0.25rem;
}

.ep-tenant-mobile-pager__label {
    font-size: 0.875rem;
    color: var(--ep-on-surface-variant, #6b7280);
    min-width: 3.5rem;
    text-align: center;
}

.ep-tenant-grid-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ep-icon-link {
    display: inline-flex;
    color: inherit;
    text-decoration: none;
}
