/* TheTechIdea clean terminal theme.
   Visual values come from BrandingConfig -> MudTheme CSS variables. */

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: var(--mud-typography-default-family);
    font-size: var(--mud-typography-default-size, 14px);
    line-height: var(--mud-typography-default-lineheight, 1.55);
    letter-spacing: 0;
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.font-mono,
.terminal-copy,
.terminal-label,
.terminal-command,
.terminal-panel,
.terminal-panel-flat,
.terminal-card,
.terminal-list-row,
.terminal-code,
.terminal-kpi,
.terminal-hero-title {
    font-family: var(--mud-typography-default-family);
    letter-spacing: 0;
}

.terminal-muted {
    color: var(--mud-palette-text-secondary);
}

.terminal-copy,
.terminal-label,
.terminal-command,
.terminal-command-muted {
    overflow-wrap: anywhere;
}

.terminal-accent {
    color: var(--mud-palette-primary);
}

.terminal-info {
    color: var(--mud-palette-info);
}

.terminal-warning {
    color: var(--mud-palette-warning);
}

.terminal-danger {
    color: var(--mud-palette-error);
}

.terminal-page {
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    min-height: 100vh;
}

.terminal-page .mud-input,
.terminal-page .mud-input-control,
.terminal-page .mud-select,
.terminal-page .mud-button,
.terminal-page .mud-chip,
.terminal-page .mud-table,
.terminal-page .mud-expansion-panel,
.terminal-page .mud-tabs,
.terminal-page .mud-typography {
    letter-spacing: 0;
}

.terminal-shell {
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    min-height: 100vh;
}

.terminal-section {
    padding-block: 3rem;
}

.terminal-page-title {
    color: var(--mud-palette-text-primary);
    font-family: var(--mud-typography-default-family);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.terminal-page-subtitle {
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-default-family);
    max-width: 72ch;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.terminal-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.terminal-page-header {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    box-shadow: none;
}

.terminal-breadcrumb {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    color: var(--mud-palette-text-secondary);
}

.terminal-hero {
    background: var(--mud-palette-background);
    border-bottom: 1px solid var(--mud-palette-divider);
    padding-block: 3.5rem;
}

.terminal-hero-grid {
    align-items: center;
}

.terminal-hero-title {
    color: var(--mud-palette-text-primary);
    font-size: 2.65rem;
    font-weight: 700;
    line-height: 1.12;
    margin: 0;
    max-width: 18ch;
    overflow-wrap: anywhere;
}

.terminal-hero-subtitle {
    color: var(--mud-palette-text-secondary);
    max-width: 64ch;
    line-height: 1.7;
}

.terminal-panel,
.terminal-panel-flat,
.terminal-card,
.terminal-code,
.terminal-list-row,
.terminal-state-panel,
.terminal-pricing-card,
.terminal-form-panel,
.terminal-table-shell,
.terminal-cta-panel {
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    box-shadow: none;
}

.terminal-panel,
.terminal-card,
.terminal-code,
.terminal-form-panel,
.terminal-pricing-card,
.terminal-table-shell,
.terminal-cta-panel {
    background: var(--mud-palette-surface);
}

.terminal-panel-flat,
.terminal-list-row,
.terminal-state-panel {
    background: var(--mud-palette-background);
}

.terminal-danger-panel {
    border-color: var(--mud-palette-error);
}

.terminal-success-panel {
    border-color: var(--mud-palette-primary);
}

.terminal-info-panel {
    border-color: var(--mud-palette-info);
}

.terminal-cta-panel {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 60%, var(--mud-palette-divider));
}

.terminal-panel-header {
    border-bottom: 1px solid var(--mud-palette-divider);
}

.terminal-card {
    transition: border-color 150ms ease-out, background-color 150ms ease-out;
}

.terminal-card,
.terminal-pricing-card,
.terminal-form-panel,
.terminal-state-panel,
.terminal-cta-panel {
    overflow: hidden;
}

.terminal-card:hover,
.terminal-list-row:hover,
.terminal-pricing-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 58%, var(--mud-palette-divider));
}

.terminal-card-accent {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 72%, var(--mud-palette-divider));
}

.terminal-card-info {
    border-color: color-mix(in srgb, var(--mud-palette-info) 70%, var(--mud-palette-divider));
}

.terminal-card-warning {
    border-color: color-mix(in srgb, var(--mud-palette-warning) 70%, var(--mud-palette-divider));
}

.dev-card {
    transition: border-color 150ms ease-out, background-color 150ms ease-out;
    border: 1px solid var(--mud-palette-divider);
}

.dev-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 58%, var(--mud-palette-divider));
}

/* Fake terminal window chrome removed for the professional theme. */
.terminal-window-bar {
    display: none;
}

.terminal-window-title {
    color: var(--mud-palette-text-secondary);
    font-size: 0.72rem;
    margin-left: 0.35rem;
}

.terminal-dot {
    display: none;
}

.terminal-dot.red {
    background: color-mix(in srgb, var(--mud-palette-error) 62%, var(--mud-palette-surface));
}

.terminal-dot.yellow {
    background: color-mix(in srgb, var(--mud-palette-warning) 62%, var(--mud-palette-surface));
}

.terminal-dot.green {
    background: color-mix(in srgb, var(--mud-palette-primary) 62%, var(--mud-palette-surface));
}

.terminal-dot.sm {
    width: 0.42rem;
    height: 0.42rem;
}

.terminal-command {
    color: var(--mud-palette-primary);
    font-size: 0.82rem;
}

.terminal-command-muted {
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-default-family);
    font-size: 0.82rem;
}

.terminal-pre-wrap {
    white-space: pre-wrap;
}

.terminal-label {
    color: var(--mud-palette-text-secondary);
    font-size: 0.72rem;
}

.terminal-code {
    color: var(--mud-palette-text-primary);
    padding: 1rem;
    overflow-x: auto;
    white-space: pre;
}

.terminal-code pre,
pre.terminal-code {
    margin: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: inherit;
    font-size: 0.78rem;
    line-height: 1.7;
}

.terminal-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.terminal-pill {
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-secondary);
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.terminal-pill.success {
    color: var(--mud-palette-primary);
    border-color: color-mix(in srgb, var(--mud-palette-primary) 60%, var(--mud-palette-divider));
}

.terminal-pill.info {
    color: var(--mud-palette-info);
    border-color: color-mix(in srgb, var(--mud-palette-info) 60%, var(--mud-palette-divider));
}

.terminal-pill.warning {
    color: var(--mud-palette-warning);
    border-color: color-mix(in srgb, var(--mud-palette-warning) 60%, var(--mud-palette-divider));
}

.terminal-list {
    display: grid;
    gap: 0.75rem;
}

.terminal-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    cursor: pointer;
    transition: border-color 150ms ease-out;
}

.terminal-kpi {
    color: var(--mud-palette-primary);
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.15;
}

.terminal-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
    color: var(--mud-palette-primary);
}

.terminal-icon-lg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface));
    color: var(--mud-palette-primary);
}

.terminal-price {
    color: var(--mud-palette-primary);
    font-family: var(--mud-typography-default-family);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.terminal-rating-score {
    color: var(--mud-palette-primary);
    font-family: var(--mud-typography-default-family);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.terminal-rating-label {
    color: var(--mud-palette-text-secondary);
    width: 2rem;
}

.terminal-rating-count {
    color: var(--mud-palette-text-secondary);
    text-align: right;
    width: 2.5rem;
}

.terminal-rating-bar .mud-progress-linear {
    border-radius: var(--mud-default-borderradius, 6px);
}

.terminal-sort-select {
    width: min(12.5rem, 100%);
}

.terminal-review-card {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
}

.terminal-form-panel .mud-input-control,
.terminal-form-panel .mud-input,
.terminal-form-panel .mud-select,
.terminal-filter-field .mud-input,
.terminal-filter-select .mud-input {
    font-family: var(--mud-typography-default-family);
}

.terminal-table-shell {
    overflow-x: auto;
}

.terminal-table-shell .mud-table,
.terminal-table-shell table,
.terminal-table {
    background: transparent;
    color: var(--mud-palette-text-primary);
}

.terminal-table-shell th,
.terminal-table-shell .mud-table-cell,
.terminal-table th,
.terminal-table td {
    font-family: var(--mud-typography-default-family);
    border-bottom: 1px solid var(--mud-palette-divider);
}

.terminal-table-shell th,
.terminal-table th {
    color: var(--mud-palette-info);
    background: var(--mud-palette-surface);
    font-weight: 600;
}

.terminal-table-shell td,
.terminal-table td {
    color: var(--mud-palette-text-primary);
}

.terminal-expansion {
    background: transparent;
}

.terminal-expansion .mud-expand-panel,
.terminal-expansion .mud-expansion-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    margin-bottom: 0.5rem;
    box-shadow: none;
}

.terminal-tabs {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    overflow: hidden;
}

.terminal-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.75rem;
}

.terminal-meta-item {
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: var(--mud-palette-background);
    padding: 0.85rem;
}

.terminal-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 24rem);
    gap: 1.25rem;
    align-items: start;
}

.terminal-billing-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: var(--mud-palette-background);
    padding: 0.65rem 0.9rem;
}

.terminal-avatar {
    background: color-mix(in srgb, var(--mud-palette-primary) 18%, var(--mud-palette-surface)) !important;
    border: 1px solid var(--mud-palette-divider);
    color: var(--mud-palette-primary) !important;
}

.terminal-video-frame {
    aspect-ratio: 16 / 9;
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    overflow: hidden;
}

.terminal-video-frame iframe {
    border: 0;
    display: block;
    height: 100%;
    width: 100%;
}

.terminal-product-image {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    display: block;
    max-height: 15rem;
    object-fit: contain;
    padding: 1rem;
    width: 100%;
}

.terminal-docs {
    background: var(--mud-palette-background);
    min-height: 100vh;
    padding: 2rem;
}

.documentation-container {
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    min-height: 100vh;
    padding: 2rem;
}

.documentation-content {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    color: var(--mud-palette-text-primary);
    padding: 1.5rem;
    overflow-x: auto;
}

/* Embedded product documentation site (self-contained static HTML rendered in an iframe). */
.documentation-frame {
    width: 100%;
    height: calc(100vh - 220px);
    min-height: 600px;
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 8px);
    background: #ffffff;
}

.documentation-content h1,
.documentation-content h2,
.documentation-content h3,
.documentation-content h4,
.documentation-content h5,
.documentation-content h6,
.documentation-content code,
.documentation-content pre {
    font-family: var(--mud-typography-default-family);
    letter-spacing: 0;
}

.documentation-content a {
    color: var(--mud-palette-info);
}

.documentation-content pre,
.documentation-content code {
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
}

.documentation-content h1 {
    border-bottom: 2px solid var(--mud-palette-primary);
    color: var(--mud-palette-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
}

.documentation-content h2 {
    border-bottom: 1px solid var(--mud-palette-divider);
    color: var(--mud-palette-info);
    margin-bottom: 0.75rem;
    margin-top: 2rem;
    padding-bottom: 0.35rem;
}

.documentation-content h3 {
    color: var(--mud-palette-text-primary);
    margin-top: 1.5rem;
}

.documentation-content p {
    line-height: 1.7;
    margin-bottom: 1rem;
}

.documentation-content pre {
    overflow-x: auto;
    padding: 1rem;
}

.documentation-content code {
    padding: 0.2rem 0.4rem;
}

.documentation-content pre code {
    border: 0;
    padding: 0;
}

.documentation-content .feature-grid,
.documentation-content .stats-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    margin: 1.5rem 0;
}

.documentation-content .feature-card,
.documentation-content .stat-card,
.documentation-content .quick-start,
.documentation-content .documentation-footer {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    box-shadow: none;
    padding: 1.25rem;
}

.documentation-content .feature-card:hover,
.documentation-content .stat-card:hover {
    border-color: color-mix(in srgb, var(--mud-palette-primary) 58%, var(--mud-palette-divider));
}

.documentation-content table {
    border-collapse: collapse;
    border-radius: var(--mud-default-borderradius, 6px);
    margin: 1.5rem 0;
    overflow: hidden;
    width: 100%;
}

.documentation-content th,
.documentation-content td {
    border-bottom: 1px solid var(--mud-palette-divider);
    padding: 0.75rem;
    text-align: left;
}

.documentation-content th {
    background: var(--mud-palette-surface);
    color: var(--mud-palette-info);
}

.documentation-content .tip,
.documentation-content .note,
.documentation-content .warning,
.documentation-content .success {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-left: 3px solid var(--mud-palette-info);
    border-radius: var(--mud-default-borderradius, 6px);
    margin: 1rem 0;
    padding: 1rem;
}

.documentation-content .note {
    border-left-color: var(--mud-palette-tertiary);
}

.documentation-content .warning {
    border-left-color: var(--mud-palette-warning);
}

.documentation-content .success {
    border-left-color: var(--mud-palette-primary);
}

.documentation-content .btn-beep {
    background: var(--mud-palette-primary);
    border-radius: var(--mud-default-borderradius, 6px);
    color: var(--mud-palette-primary-text);
    display: inline-block;
    margin: 0.25rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
}

.documentation-content .btn-beep:hover {
    background: var(--mud-palette-primary-darken);
    text-decoration: none;
}

.documentation-content .quick-start {
    border-color: color-mix(in srgb, var(--mud-palette-info) 55%, var(--mud-palette-divider));
    margin: 2rem 0;
}

.documentation-content .quick-start-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.documentation-content .documentation-footer {
    border-top: 1px solid var(--mud-palette-divider);
    margin-top: 3rem;
}

.documentation-content .footer-content {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.documentation-content .footer-links a {
    margin-left: 1rem;
}

.terminal-appbar {
    background: var(--mud-palette-appbar-background);
    border-bottom: 1px solid var(--mud-palette-divider);
}

/* Admin tab overrides (moved from AdminUserDetail.razor) */
.mud-tabs-header-custom {
    background-color: var(--mud-palette-surface);
    border-bottom: 1px solid var(--mud-palette-divider);
}
.mud-tab-active-custom {
    color: var(--mud-palette-primary) !important;
    border-bottom: 2px solid var(--mud-palette-primary);
}
.mud-tab {
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-default-family);
}

.terminal-brand {
    min-width: 0;
    text-transform: none;
}

.terminal-brand-text {
    color: var(--mud-palette-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.terminal-search {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    max-width: 22rem;
    min-width: 15rem;
}

.terminal-drawer {
    background: var(--mud-palette-drawer-background);
    border-right: 1px solid var(--mud-palette-divider);
    overflow-x: hidden;
}

/* Top navigation (primary nav lives on the AppBar; drawer is mobile/overflow only) */
.terminal-topnav {
    gap: 0.15rem;
    margin-left: 0.5rem;
}

.terminal-topnav-link,
.terminal-topnav .mud-button-root {
    text-transform: none;
    font-family: var(--mud-typography-default-family);
    color: var(--mud-palette-text-primary);
    letter-spacing: 0.02em;
}

.terminal-topnav-link:hover,
.terminal-topnav .mud-button-root:hover {
    color: var(--mud-palette-primary);
}

/* Shown only on mobile (the hamburger that opens the overflow drawer) */
.terminal-mobile-only {
    display: none !important;
}

@media (max-width: 960px) {
    .terminal-mobile-only {
        display: inline-flex !important;
    }
}

/* Account area: side rail + content */
.terminal-account-shell {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 1400px;
    margin-inline: auto;
    padding: 1.5rem;
}

.terminal-account-rail {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 4rem;
}

.terminal-account-nav {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
}

.terminal-account-content {
    flex: 1;
    min-width: 0;
}

@media (max-width: 960px) {
    .terminal-account-shell {
        flex-direction: column;
        padding: 1rem;
    }

    .terminal-account-rail {
        width: 100%;
        position: static;
    }
}

.terminal-main {
    background: var(--mud-palette-background);
    min-height: 100vh;
}

/* Blazor reconnection overlay (terminal-themed) — hidden until blazor.web.js toggles a state class */
#components-reconnect-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--mud-palette-background) 82%, transparent);
    backdrop-filter: blur(2px);
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

.terminal-reconnect-panel {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.75rem;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}

.terminal-reconnect-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--mud-palette-divider);
    border-top-color: var(--mud-palette-primary);
    border-radius: 50%;
    animation: terminal-reconnect-spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes terminal-reconnect-spin {
    to { transform: rotate(360deg); }
}

.terminal-reconnect-text {
    display: flex;
    flex-direction: column;
    font-family: var(--mud-typography-default-family);
}

.terminal-reconnect-cmd {
    color: var(--mud-palette-primary);
    font-size: 0.95rem;
}

.terminal-reconnect-sub {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8rem;
}

/* Global footer */
.terminal-footer {
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-divider);
    padding-block: 2.5rem 1.75rem;
    margin-top: 3rem;
}

.terminal-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
}

.terminal-footer-col {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.terminal-footer-link {
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-default-family);
    font-size: 0.85rem;
}

.terminal-footer-link:hover {
    color: var(--mud-palette-primary);
}

.terminal-footer-social {
    display: flex;
    gap: 0.25rem;
}

.terminal-footer-baseline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 960px) {
    .terminal-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .terminal-footer-grid {
        grid-template-columns: 1fr;
    }
}

.terminal-nav-shell {
    width: 250px;
    background: transparent;
    max-width: 100%;
    overflow-x: hidden;
}

.terminal-drawer .mud-drawer-content {
    overflow-x: hidden;
}

.terminal-nav-header,
.terminal-nav-footer {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
}

.terminal-nav-menu,
.terminal-nav-menu .mud-nav-link,
.terminal-nav-menu .mud-nav-link-text,
.terminal-nav-menu .mud-nav-group .mud-nav-link-text,
.terminal-nav-menu .mud-nav-group .mud-nav-group {
    font-family: var(--mud-typography-default-family);
    letter-spacing: 0;
}

.terminal-admin-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-tertiary);
    border-radius: var(--mud-default-borderradius, 6px);
}

.terminal-admin-label {
    color: var(--mud-palette-tertiary);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.terminal-root-chip {
    font-size: 0.55rem;
    height: 1rem;
}

.terminal-filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.terminal-filter-field {
    max-width: 20rem;
    min-width: 14rem;
}

.terminal-filter-select {
    max-width: 13rem;
    min-width: 11rem;
}

.terminal-pagination .mud-pagination-item {
    background: var(--mud-palette-background);
    border: 1px solid var(--mud-palette-divider);
    color: var(--mud-palette-text-secondary);
    font-family: var(--mud-typography-default-family);
}

.terminal-pagination .mud-pagination-item-selected {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.terminal-dialog .mud-dialog {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    box-shadow: none;
}

.terminal-dialog .mud-dialog-title {
    border-bottom: 1px solid var(--mud-palette-divider);
}

.terminal-dialog .mud-dialog-actions {
    border-top: 1px solid var(--mud-palette-divider);
}

/* Blinking terminal cursor removed for the professional theme. */
.cursor-blink::after {
    content: none;
}

.code-text,
kbd {
    font-family: var(--mud-typography-default-family);
    border: 1px solid var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
    color: var(--mud-palette-primary);
    padding: 0.1rem 0.35rem;
}

blockquote {
    border-block: 1px solid var(--mud-palette-divider);
    margin: 1rem 0;
    padding: 1rem 1.25rem;
}

hr {
    border: none;
    border-top: 1px solid var(--mud-palette-divider);
    margin: 1.5rem 0;
}

mark {
    background: color-mix(in srgb, var(--mud-palette-primary) 22%, transparent);
    color: var(--mud-palette-text-primary);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mud-palette-background);
}

::-webkit-scrollbar-thumb {
    background: var(--mud-palette-divider);
    border-radius: var(--mud-default-borderradius, 6px);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-primary);
}

.mud-nav-link:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent) !important;
}

.arabic-content,
[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: embed;
}

.arabic-content,
[dir="rtl"] * {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif !important;
}

[dir="rtl"] .mud-stack-row {
    flex-direction: row-reverse !important;
}

[dir="rtl"] .mud-button .mud-button-start-icon {
    margin-left: 8px !important;
    margin-right: 0 !important;
}

@media (max-width: 960px) {
    .terminal-desktop-only {
        display: none !important;
    }

    .terminal-search {
        min-width: 0;
        max-width: 10rem;
        padding-inline: 0.35rem !important;
    }

    .terminal-brand-text {
        max-width: 9rem;
    }

    .terminal-hero-title {
        font-size: 2.25rem;
        max-width: 100%;
    }

    .terminal-section {
        padding-block: 2.5rem;
    }

    .terminal-hero {
        padding-block: 2.75rem;
    }
}

@media (max-width: 600px) {
    .terminal-mobile-hidden {
        display: none !important;
    }

    .terminal-search {
        display: none !important;
    }

    .terminal-section,
    .terminal-hero {
        padding-block: 1.5rem;
    }

    .terminal-hero-title {
        font-size: 2rem;
    }

    .terminal-kpi {
        font-size: 1.45rem;
    }

    .terminal-list-row {
        grid-template-columns: 1fr;
    }

    .terminal-filter-field,
    .terminal-filter-select {
        max-width: none;
        width: 100%;
    }

    .terminal-filter-row {
        align-items: stretch;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   TermilUI additions — body grid + scanlines + vignette
   Inspired by openmonoagent.ai. Subtle effects MudBlazor can't do.
   ============================================================ */

/* Dot-grid overlay on the body background */
body::before {
    content: "";
    pointer-events: none;
    z-index: 0;
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(110, 255, 138, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(110, 255, 138, 0.02) 1px, transparent 1px);
    background-position: -1px -1px;
    background-size: 48px 48px;
}

/* Scanline overlay */
body::after {
    content: "";
    pointer-events: none;
    z-index: 1;
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 3px,
        transparent 4px
    );
}

/* Edge vignette removed for the professional light theme. */
.terminal-main::before {
    content: none;
}

/* ============================================================
   Section eyebrow + heading pattern (professional label style)
   ============================================================ */

.terminal-eyebrow {
    color: var(--mud-palette-primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-family: var(--mud-typography-default-family);
}

.terminal-eyebrow::before {
    content: none;
}

.terminal-section-heading {
    font-family: var(--mud-typography-default-family);
    font-size: clamp(1.85rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    color: var(--mud-palette-text-primary);
}

.terminal-section-heading em {
    color: var(--mud-palette-primary);
    font-family: inherit;
    font-style: normal;
    font-weight: 700;
}

.terminal-section-intro {
    color: var(--mud-palette-text-secondary);
    font-size: 1.05rem;
    max-width: 40rem;
    line-height: 1.65;
    margin-bottom: 2.5rem;
}

@media (max-width: 600px) {
    .terminal-eyebrow {
        font-size: 0.62rem;
        gap: 0.5rem;
    }
    .terminal-eyebrow::before {
        width: 1.25rem;
    }
    .terminal-section-heading {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
}

/* ============================================================
   TermilUI — terminal syntax text spans
   Matches openmonoagent.ai terminal body (.prompt, .cmd, ...)
   ============================================================ */

/* Fake shell "$" prompt removed for the professional theme. */
.terminal-prompt {
    display: none;
}

.terminal-cmd {
    color: var(--mud-palette-text-primary);
}

.terminal-comment {
    color: var(--mud-palette-text-secondary);
    font-style: italic;
}

.terminal-output {
    color: var(--mud-palette-text-secondary);
}

.terminal-ok {
    color: var(--mud-palette-primary);
}

.terminal-warn {
    color: var(--mud-palette-warning);
}

/* Blinking caret removed for the professional theme. */
.terminal-cursor {
    display: none;
}

/* ============================================================
   TermilUI — scroll-reveal animation
   ============================================================ */

/* Content is always visible — no JS-gated reveal. (A prior IntersectionObserver hid these
   until scrolled into view but never re-ran after Blazor enhanced navigation, blanking pages
   reached via nav links.) The .in class is retained as a harmless no-op so markup needn't change. */
.terminal-reveal {
    opacity: 1;
    transform: none;
}

.terminal-reveal.in {
    opacity: 1;
    transform: none;
}

/* ============================================================
   TermilUI — hero top-line badge (animated dot + tagline)
   ============================================================ */

.terminal-hero-topline {
    color: var(--mud-palette-primary);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0;
    border: 1px solid color-mix(in srgb, var(--mud-palette-primary) 35%, transparent);
    background: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1.5rem;
    font-family: var(--mud-typography-default-family);
}

.terminal-hero-topline .dot {
    background: var(--mud-palette-primary);
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
}

/* ============================================================
   TermilUI — feature card grid (3-col bordered, openmonoagent style)
   ============================================================ */

.terminal-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--mud-palette-divider);
    border-left: 1px solid var(--mud-palette-divider);
}

.terminal-feature-card {
    border-right: 1px solid var(--mud-palette-divider);
    border-bottom: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface);
    padding: 2rem 1.75rem;
    position: relative;
    transition: background 0.2s ease-out;
}

.terminal-feature-card:hover {
    background: color-mix(in srgb, var(--mud-palette-primary) 4%, var(--mud-palette-surface));
}

.terminal-feature-num {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--mud-palette-text-secondary);
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    font-family: var(--mud-typography-default-family);
}

.terminal-feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    color: var(--mud-palette-text-primary);
    font-family: var(--mud-typography-default-family);
}

.terminal-feature-card p {
    color: var(--mud-palette-text-secondary);
    font-size: 0.84rem;
    line-height: 1.65;
}

@media (max-width: 900px) {
    .terminal-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .terminal-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Inline-style replacement utilities (F12 sweep, 2026-08-14)
   --------------------------------------------------------------------------
   Each class is 1:1 with the exact inline declaration block it replaced across
   the components — pure relocation into the central stylesheet, no visual
   change intended. Prefer these (or the terminal-* system above) over any new
   inline Style="…" — the styling standard forbids new inline styles.
   ========================================================================== */
.t-font { font-family: var(--mud-typography-default-family); }
.t-text { color: var(--mud-palette-text-primary); }
.t-text-2 { color: var(--mud-palette-text-secondary); }
.t-info { color: var(--mud-palette-info); }
.t-error { color: var(--mud-palette-error); }
.t-warning { color: var(--mud-palette-warning); }
.t-caption { color: var(--mud-palette-text-secondary); font-family: var(--mud-typography-default-family); font-size: 0.75rem; }
.t-muted { color: var(--mud-palette-text-secondary); font-family: var(--mud-typography-default-family); }
.t-muted-sm { color: var(--mud-palette-text-secondary); font-family: var(--mud-typography-default-family); font-size: 0.85rem; }
.t-copy { color: var(--mud-palette-text-primary); font-family: var(--mud-typography-default-family); }
.t-copy-sm { color: var(--mud-palette-text-primary); font-family: var(--mud-typography-default-family); font-size: 0.85rem; }
.t-surface-copy { font-family: var(--mud-typography-default-family); color: var(--mud-palette-text-primary); background: var(--mud-palette-surface); }
.t-info-font { color: var(--mud-palette-info); font-family: var(--mud-typography-default-family); }
.t-info-link { color: var(--mud-palette-info); font-family: var(--mud-typography-default-family); font-size: 0.85rem; text-decoration: none; }
.t-primary-strong { color: var(--mud-palette-primary); font-family: var(--mud-typography-default-family); font-size: 1rem; font-weight: 600; }
.t-fs-90 { font-size: 0.9rem; }
.t-bg-transparent { background: transparent; }
.t-bg-page { background: var(--mud-palette-background); }
.t-page-fill { background: var(--mud-palette-background); min-height: 100vh; }
.t-underline-surface { border-bottom: 1px solid var(--mud-palette-surface); }
.t-panel { background: var(--mud-palette-background); border: 1px solid var(--mud-palette-divider); border-radius: 8px; }
.t-panel-surface { background: var(--mud-palette-surface); border: 1px solid var(--mud-palette-divider); border-radius: 8px; }
.t-panel-dashed { background: var(--mud-palette-surface); border: 1px dashed var(--mud-palette-divider); border-radius: 8px; }
.t-th { background: var(--mud-palette-surface); color: var(--mud-palette-text-secondary); font-family: var(--mud-typography-default-family); font-size: 0.75rem; border-bottom: 1px solid var(--mud-palette-divider); }
.t-th-info { background: var(--mud-palette-surface); color: var(--mud-palette-info); font-family: var(--mud-typography-default-family); border-bottom: 1px solid var(--mud-palette-divider); }
.t-cell { background: var(--mud-palette-surface); color: var(--mud-palette-text-secondary); font-family: var(--mud-typography-default-family); font-size: 0.75rem; }
.t-success-btn { background: linear-gradient(135deg, var(--mud-palette-success) 0%, var(--mud-palette-success) 100%); color: white; font-family: var(--mud-typography-default-family); text-transform: none; }
/* F12 sweep tier 2 — primitives composed with the utilities above */
.t-bg-surface { background: var(--mud-palette-surface); }
.t-white { color: white; }
.t-primary { color: var(--mud-palette-primary); }
.t-bold { font-weight: 700; }
.t-semibold { font-weight: 600; }
.t-fs-100 { font-size: 1rem; }
.t-fs-85 { font-size: 0.85rem; }
.t-fs-80 { font-size: 0.8rem; }
.t-fs-70 { font-size: 0.7rem; }
.t-notransform { text-transform: none; }
.t-flex-1 { flex: 1; }
.t-border-top { border-top: 1px solid var(--mud-palette-divider); }
.t-border-divider { border-color: var(--mud-palette-divider); }
.t-outline { background: var(--mud-palette-background); border: 1px solid var(--mud-palette-divider); }
.t-empty-icon { color: var(--mud-palette-divider); font-size: 4rem; margin-bottom: 1rem; }
.t-empty-title { color: var(--mud-palette-text-primary); font-size: 1.1rem; }
.t-menu-panel { min-width: 320px; max-width: 380px; }
.t-dot-xs { font-size: 8px; }
