html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Ensure MudMainContent clears the fixed AppBar */
.mud-main-content {
    padding-top: 64px !important;
}

/* ── Prompt preview <pre> ── */
.prompt-preview {
    margin: 10px 0 0;
    background: var(--rz-base-200);
    border: 1px solid var(--rz-base-300);
    border-radius: 4px;
    padding: 10px;
    font-size: 0.8rem;
    white-space: pre-wrap;
    max-height: 120px;
    overflow-y: auto;
    color: var(--rz-text-color);
}

/* ── Textarea that matches Radzen theme ── */
.rz-textarea {
    width: 100%;
    font-family: monospace;
    font-size: 0.82rem;
    padding: 8px;
    border: 1px solid var(--rz-base-300);
    border-radius: 4px;
    resize: vertical;
    background: var(--rz-base-background-color);
    color: var(--rz-text-color);
    box-sizing: border-box;
}

.rz-textarea-edit {
    border-color: var(--rz-primary);
}

.rz-textarea:focus, .rz-textarea-edit:focus {
    outline: none;
    border-color: var(--rz-primary);
    box-shadow: 0 0 0 2px var(--rz-primary-lighter);
}

/* ── Log detail expanded row ── */
.log-detail-pre {
    margin: 0;
    background: var(--rz-base-200);
    border: 1px solid var(--rz-base-300);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 0.8rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
    color: var(--rz-text-color);
}

.log-detail-pre--error {
    border-color: var(--rz-danger-lighter);
    color: var(--rz-danger);
}

/* ── Expandable code/JSON <pre> ── */
.code-pre {
    background: var(--rz-base-200);
    border: 1px solid var(--rz-base-300);
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: pre;
    max-height: 500px;
    overflow-y: auto;
    color: var(--rz-text-color);
}

/* ── Common page typography ── */
.page-title { font-weight: bold; margin: 0; }
.page-subtitle { color: var(--rz-text-secondary-color); margin: 0; }
.section-header { font-weight: bold; margin-bottom: 16px; }
.table-card-header { padding: 12px 16px; border-bottom: 1px solid #e0e0e0; }
.no-data-chart { color: var(--rz-text-secondary-color); text-align: center; padding: 40px 0; }
.icon-lg { font-size: 3rem; }

/* ── Auth panel content (shared across auth pages) ── */
.auth-brand-title  { color: white !important; font-weight: 700; margin: 0; line-height: 1.2; }
.auth-brand-body   { color: rgba(255, 255, 255, 0.75) !important; margin: 0; line-height: 1.6; }
.auth-feature-icon { color: rgba(255, 255, 255, 0.9) !important; font-size: 1.1rem; }
.auth-feature-text { color: rgba(255, 255, 255, 0.85) !important; margin: 0; }
.auth-form-heading { font-weight: 700; margin: 0; }
.auth-form-hint    { color: var(--rz-text-secondary-color); margin: 0; }
.auth-copyright    { color: var(--rz-text-secondary-color); text-align: center; margin: 0; }
.auth-link         { font-size: 0.78rem; color: var(--rz-primary); text-decoration: none; }

/* ── Auth page layout ── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 920px;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
    border-radius: 12px;
}

.auth-card-body {
    display: flex;
    min-height: 560px;
}

.auth-card-body--sm {
    min-height: 500px;
}

.auth-panel-left {
    flex: 1;
    background: linear-gradient(160deg, #0a2e6e 0%, #1565c0 60%, #1976d2 100%);
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    min-width: 0;
}

.auth-panel-right {
    flex: 1;
    padding: 48px 40px;
    display: flex;
    align-items: center;
    background: white;
    min-width: 0;
}

.pw-toggle-btn {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    min-width: 0 !important;
    padding: 6px !important;
    color: var(--rz-text-secondary-color);
}

.dev-code-display {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 6px;
    font-family: monospace;
}

/* ── Shared page cards ── */
.filter-card {
    border: 1px solid #e0e0e0 !important;
    box-shadow: none !important;
    margin-bottom: 16px;
    padding: 16px 20px !important;
}

.filter-card--themed {
    border: 1px solid var(--rz-base-300) !important;
    box-shadow: none !important;
    margin-bottom: 16px;
    padding: 16px 20px !important;
}

.table-card {
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
    padding: 0 !important;
}

.table-card--themed {
    box-shadow: none !important;
    border: 1px solid var(--rz-base-300) !important;
    padding: 0 !important;
}

.chart-card {
    border: 1px solid #f0f0f0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    padding: 20px !important;
    margin-bottom: 24px;
}

/* ── Grid loading overlay ── */
.grid-container { position: relative; }

.grid-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    z-index: 10;
    min-height: 80px;
}

.grid-loading-overlay--muted {
    background: rgba(128, 128, 128, 0.15);
}

/* ── Detail page cards ── */
.detail-card {
    border: 1px solid var(--rz-base-300) !important;
    box-shadow: none !important;
    margin-bottom: 20px;
}

.detail-card--no-pad {
    padding: 0 !important;
}

.detail-card-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--rz-base-300);
}

.detail-row {
    border-bottom: 1px solid var(--rz-base-300);
    padding: 16px;
}

.detail-section-row {
    border-bottom: 1px solid var(--rz-base-300);
    padding: 14px 16px;
}

.empty-section {
    padding: 24px;
    text-align: center;
    color: var(--rz-text-secondary-color);
}

/* ── Loading center ── */
.loading-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Inline loading ── */
.loading-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

/* ── Expand row detail ── */
.expand-row-detail {
    padding: 12px 16px; 
}

/* ── Color utilities ── */
.text-success { color: #4caf50; }
.text-danger  { color: #f44336; }
.text-warning { color: #ff9800; }
.text-info    { color: #1976d2; }

/* ── Misc ── */
.not-set-label {
    margin-top: 6px;
    font-size: 0.82rem;
    color: var(--rz-text-secondary-color);
    font-style: italic;
}

.comment-body {
    white-space: pre-wrap;
    font-size: 0.9rem;
}

.scope-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.round-tag {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.round-tag--info    { background: var(--rz-info-lighter);    color: var(--rz-info-dark); }
.round-tag--success { background: var(--rz-success-lighter); color: var(--rz-success-dark); }
.round-tag--danger  { background: var(--rz-danger-lighter);  color: var(--rz-danger-dark); }

/* ── Section label (expand row headers) ── */
.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--rz-text-secondary-color);
    margin-bottom: 4px;
}

.section-label--danger { color: var(--rz-danger); }

/* ── Password toggle wrapper ── */
.pw-wrapper { position: relative; }

/* ── Exception cell in log grid ── */
/* ── Typography utilities ── */
.text-meta {
    font-size: 0.8rem;
    color: var(--rz-text-secondary-color);
}

.text-meta-xs {
    font-size: 0.78rem;
    color: var(--rz-text-secondary-color);
}

/* ── Ticket summary period cards ── */
.summary-label {
    font-size: 0.68rem;
    color: var(--rz-text-disabled-color);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.summary-value {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
}

.round-label {
    font-weight: 600;
    font-size: 0.95rem;
}

.verdict-value { font-weight: 600; }

/* ── Exception cell in log grid ── */
.exception-cell {
    font-size: 0.8rem;
    color: var(--rz-danger);
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    display: block;
    max-width: 280px;
    text-overflow: ellipsis;
}

/* ── User dropdown menu ── */
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.875rem;
    color: var(--rz-text-color);
    cursor: pointer;
    transition: background 0.15s;
}

.user-menu-item:hover {
    background: var(--rz-base-200);
}

.user-menu-item--danger {
    color: var(--rz-danger);
}

/* ── JSON/code toggle button (AlertDetail) ── */
.json-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rz-primary);
    padding: 2px 0;
}

.json-toggle:hover { text-decoration: underline; }
