﻿/* Layout shell, navigation, header controls, and app loading state. */

.material .rz-layout,
.material .rz-body {
    background: var(--sm-light-canvas) !important;
    color: var(--sm-light-text);
}

.material .rz-header {
    background: var(--sm-light-header) !important;
    border-bottom: 1px solid #dfe4ee !important;
    box-shadow: 0 1px 8px rgba(35, 45, 70, 0.12) !important;
}

.material .rz-footer {
    background: #f1f3f8 !important;
    border-top: 1px solid #dfe4ee !important;
    color: #7b8496 !important;
}

.app-footer-content {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 1rem;
}

.app-footer-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    min-width: 0;
}

.app-footer-icon-tooltip-target {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.app-footer-tooltip-target {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.app-footer-timezone {
    color: inherit !important;
    font-size: 0.8rem;
    opacity: 0.75;
    text-decoration: none !important;
    white-space: nowrap;
}

.app-footer-timezone:hover,
.app-footer-timezone:focus-visible {
    opacity: 1;
    color: var(--rz-text-color) !important;
}

.app-footer-versions-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.app-footer-versions-link:hover,
.app-footer-versions-link:focus-visible {
    color: var(--rz-text-color);
}

/* Admin footer Versions: the same table in the hover tooltip and the click dialog. */
:is(.material, .material-dark) .rz-tooltip.smt-header-tooltip.smt-versions-tooltip .rz-tooltip-content,
:is(.material, .material-dark) .rz-tooltip-content.smt-header-tooltip.smt-versions-tooltip {
    max-width: min(580px, calc(100vw - 32px));
    padding: 0;
    border-radius: 14px;
    white-space: normal;
    font-weight: 400;
    letter-spacing: normal;
}

.smt-versions-card {
    --vc-text: var(--sm-light-text, #2d3548);
    --vc-muted: var(--sm-light-text-muted, #697386);
    --vc-line: var(--sm-light-border, #e3e7ef);
    --vc-hover: var(--sm-light-panel-soft, #f7f9fc);
    --vc-accent: var(--sm-light-primary, #5965e8);
    --vc-accent-soft: var(--sm-light-primary-soft, #eef0ff);
    --vc-fresh: var(--sm-light-green, #0f9f7a);
    --vc-recent: #2f6fe4;
    --vc-old: #8a93a6;
    --vc-warn: #c2410c;
    --vc-tone: var(--vc-old);
    --vc-mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
    min-width: 460px;
    color: var(--vc-text);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
}

.material-dark .smt-versions-card {
    --vc-text: var(--sm-dark-text, #e8ebf4);
    --vc-muted: var(--sm-dark-text-muted, #aeb4c4);
    --vc-line: var(--sm-dark-border, #2d3442);
    --vc-hover: var(--sm-dark-row-alt, #20242d);
    --vc-accent: var(--sm-dark-purple, #a984ff);
    --vc-accent-soft: var(--sm-dark-purple-soft, #312a47);
    --vc-fresh: var(--sm-dark-green, #57d37a);
    --vc-recent: #7aa7ff;
    --vc-old: #8b93a7;
    --vc-warn: #ffad66;
}

.smt-versions-card.is-dialog {
    min-width: 0;
    overflow-x: auto;
}

.smt-versions-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px 12px;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(135deg, color-mix(in srgb, var(--vc-accent) 16%, transparent), transparent 72%);
}

.smt-versions-card.is-dialog .smt-versions-head {
    margin-bottom: 10px;
    border-radius: 12px;
}

.smt-versions-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--vc-accent-soft);
    color: var(--vc-accent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vc-accent) 28%, transparent);
}

.smt-versions-head-icon .rzi {
    font-size: 20px;
}

.smt-versions-head-main {
    flex: 1 1 auto;
    min-width: 0;
}

.smt-versions-label {
    color: var(--vc-muted);
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.smt-versions-server {
    font-family: var(--vc-mono);
    font-size: 0.95rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.smt-versions-uptime {
    flex: 0 0 auto;
    text-align: right;
}

.smt-versions-uptime-value {
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.smt-versions-uptime-since,
.smt-versions-date,
.smt-versions-days {
    color: var(--vc-muted);
    font-size: 0.68rem;
}

.smt-versions-now {
    margin-top: 2px;
    color: var(--vc-muted);
    font-size: 0.72rem;
}

.smt-versions-alert {
    margin: 0 16px 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--vc-warn) 14%, transparent);
    color: var(--vc-warn);
    font-weight: 700;
}

.smt-versions-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.smt-versions-caption {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.smt-versions-table th {
    padding: 7px 16px 6px;
    border-top: 1px solid var(--vc-line);
    border-bottom: 1px solid var(--vc-line);
    color: var(--vc-muted);
    font-size: 0.64rem;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

.smt-versions-table td {
    padding: 7px 16px;
    border-bottom: 1px solid color-mix(in srgb, var(--vc-line) 60%, transparent);
    vertical-align: middle;
    white-space: nowrap;
}

.smt-versions-table tbody tr:last-child td {
    border-bottom: 0;
}

.smt-versions-table tbody tr:hover td {
    background: var(--vc-hover);
}

.smt-versions-table .is-numeric {
    text-align: right;
}

.smt-versions-platform {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 600;
}

.smt-versions-platform-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 7px;
    background: color-mix(in srgb, var(--smt-platform-accent) 14%, transparent);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--smt-platform-accent) 40%, transparent);
}

.smt-versions-platform-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.smt-versions-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--vc-accent-soft);
    color: var(--vc-accent);
    font-family: var(--vc-mono);
    font-size: 0.75rem;
    font-weight: 700;
}

.smt-versions-when {
    font-weight: 600;
}

.smt-versions-age {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--vc-tone) 14%, transparent);
    color: var(--vc-tone);
    font-weight: 700;
}

.smt-versions-dot {
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--vc-tone);
}

.smt-versions-row.is-fresh,
.smt-versions-legend-item.is-fresh {
    --vc-tone: var(--vc-fresh);
}

.smt-versions-row.is-recent,
.smt-versions-legend-item.is-recent {
    --vc-tone: var(--vc-recent);
}

.smt-versions-row.is-fresh .smt-versions-dot {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--vc-fresh) 28%, transparent);
}

.smt-versions-row.is-missing .smt-versions-platform-name,
.smt-versions-none {
    color: var(--vc-muted);
}

.smt-versions-row.is-missing .smt-versions-platform-icon {
    filter: grayscale(1);
    opacity: 0.55;
}

.smt-versions-missing {
    color: var(--vc-warn);
    font-weight: 700;
}

.smt-versions-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 9px 16px 12px;
    border-top: 1px solid var(--vc-line);
    color: var(--vc-muted);
    font-size: 0.68rem;
}

.smt-versions-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.smt-versions-empty {
    padding: 12px 16px;
    color: var(--vc-muted);
}

.footer-connect-client.rz-button {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 12px !important;
    white-space: nowrap;
    /* Clears the floating Skye button (58px wide, 24px from the right; see AIAssistantPanel.razor.css). */
    margin-right: 78px;
}

@media (max-width: 640px) {
    .app-footer-content {
        gap: 8px;
        padding: 0 8px;
    }

    .app-footer-left > .rz-label {
        display: none;
    }
}

@media (max-width: 620px) {
    /* The Skye button shrinks to 52px, 15px from the right, at this width. */
    .footer-connect-client.rz-button {
        margin-right: 69px;
    }
}

.material .rz-sidebar {
    background: var(--sm-light-sidebar) !important;
    border-right: 1px solid #e7ebf2 !important;
    color: var(--sm-light-text);
}

.material .app-sidebar,
.material .app-sidebar.rz-sidebar {
    background: var(--sm-light-sidebar) !important;
    border-right: 1px solid #e7ebf2 !important;
}

/* One icon and interaction style for all sidebar groups and their submenus. */
.app-sidebar {
    --sidebar-nav-text: var(--sm-light-text, var(--rz-text-color));
    --sidebar-nav-strong: var(--sm-light-text, var(--rz-text-color));
    --sidebar-nav-accent: var(--sm-light-primary, var(--rz-primary));
    --sidebar-nav-active-text: var(--sm-light-primary-dark, var(--rz-primary));
    --sidebar-nav-active: var(--sm-light-purple-soft, var(--rz-primary-lighter));
    --sidebar-nav-hover: color-mix(in srgb, var(--sidebar-nav-accent) 18%, var(--sm-light-sidebar, #ffffff));
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.material-dark .app-sidebar {
    --sidebar-nav-text: var(--sm-dark-text);
    --sidebar-nav-strong: var(--sm-dark-text);
    --sidebar-nav-accent: var(--sm-dark-purple);
    --sidebar-nav-active-text: var(--sm-dark-link);
    --sidebar-nav-active: var(--sm-dark-purple-soft);
    --sidebar-nav-hover: color-mix(in srgb, var(--sidebar-nav-accent) 24%, var(--sm-dark-panel));
}

.app-sidebar .smt-sidebar-menu.rz-panel-menu,
.app-sidebar .smt-sidebar-menu .rz-navigation-menu,
.app-sidebar .smt-sidebar-menu .rz-navigation-item-wrapper {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.app-sidebar .smt-sidebar-menu.rz-panel-menu {
    padding: 8px;
    margin: 0;
    font-family: inherit;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-item {
    margin: 2px 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-item-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    margin: 0;
    padding: 0 12px;
    border: 0;
    border-left: 3px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--sidebar-nav-text);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
    box-shadow: none;
    transition: background-color 140ms ease, color 140ms ease;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-item-link:hover {
    background: var(--sidebar-nav-hover);
    color: var(--sidebar-nav-strong);
}

.app-sidebar .smt-sidebar-menu .menu-item-active > .rz-navigation-item-wrapper > .rz-navigation-item-link,
.app-sidebar .smt-sidebar-menu .rz-navigation-menu .rz-navigation-item-link-active {
    background: var(--sidebar-nav-active);
    border-left-color: var(--sidebar-nav-accent);
    color: var(--sidebar-nav-active-text);
    font-weight: 600;
}

.material .app-sidebar .smt-sidebar-menu .rz-navigation-item-link:hover {
    background: var(--sidebar-nav-hover);
    color: var(--sidebar-nav-active-text);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sidebar-nav-accent) 40%, transparent);
}

.material-dark .app-sidebar .smt-sidebar-menu .rz-navigation-item-link:hover {
    background: var(--sidebar-nav-hover);
    color: var(--sidebar-nav-strong);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sidebar-nav-accent) 55%, transparent);
}

.app-sidebar .smt-sidebar-menu .rz-navigation-item-link:focus-visible,
.app-sidebar .smt-sidebar-menu .rz-navigation-item:focus-visible > .rz-navigation-item-wrapper > .rz-navigation-item-link,
.app-sidebar .smt-sidebar-menu .rz-navigation-item.rz-state-focused > .rz-navigation-item-wrapper > .rz-navigation-item-link {
    outline: 2px solid var(--sidebar-nav-accent);
    outline-offset: -2px;
}

.app-sidebar .smt-sidebar-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: inherit;
}

.app-sidebar .smt-sidebar-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-item-toggler {
    margin-left: auto;
    color: inherit;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-menu {
    padding: 2px 0 4px 12px;
}

.app-sidebar .smt-sidebar-menu .rz-navigation-menu .rz-navigation-item-link {
    min-height: 40px;
    gap: 9px;
    padding-inline: 8px;
    border-radius: 10px;
    font-size: 14px;
}

.app-sidebar.collapsed .smt-sidebar-menu.rz-panel-menu {
    padding-inline: 6px;
}

.app-sidebar.collapsed .smt-sidebar-menu .rz-navigation-item-link {
    justify-content: center;
    gap: 0;
    padding: 0 3px 0 0;
}

.app-sidebar.collapsed .smt-sidebar-label {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .app-sidebar .smt-sidebar-menu .rz-navigation-item-link {
        transition: none;
    }
}

.material .rz-button.rz-button-light,
.material .rz-button.rz-light,
.material .rz-button-light {
    background: #ffffff !important;
    border: 1px solid #dfe4ee !important;
    color: #394152 !important;
    border-radius: 999px !important;
    box-shadow: 0 1px 3px rgba(35, 45, 70, 0.08) !important;
    font-weight: 700;
}

.material .rz-button.rz-button-light:hover,
.material .rz-button.rz-light:hover,
.material .rz-button-light:hover {
    background: #f7f9fc !important;
    color: #202650 !important;
}

.material .rz-button.rz-state-disabled,
.material .rz-button:disabled {
    opacity: 0.42 !important;
}

.material .history-nav-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    border-color: #dfe4ee !important;
    color: #202650 !important;
    box-shadow: 0 1px 4px rgba(35, 45, 70, 0.12) !important;
}

.material .history-nav-button .rzi {
    font-size: 1.45rem;
}

.header-history-actions {
    flex: 1 1 auto;
    min-width: 0;
}

.header-history-actions.sidebar-collapsed {
    margin-left: 1rem;
}

.material .header-round-button {
    background: #202650 !important;
    border: 1px solid rgba(32, 38, 80, 0.18) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(32, 38, 80, 0.22) !important;
}

.header-actions {
    margin-left: auto;
    margin-right: 1rem;
    flex-wrap: nowrap;
    min-width: 0;
}

.header-action-tooltip-target {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.material .rz-tooltip.smt-header-tooltip .rz-tooltip-content,
.material .rz-tooltip-content.smt-header-tooltip {
    padding: 0.5rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--sm-light-primary, #5965e8) 30%, var(--sm-light-border, #e3e7ef));
    border-radius: 8px;
    background: var(--sm-light-panel-strong, #ffffff);
    color: var(--sm-light-text, #2d3548);
    box-shadow: 0 10px 28px rgba(35, 45, 70, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.material-dark .rz-tooltip.smt-header-tooltip .rz-tooltip-content,
.material-dark .rz-tooltip-content.smt-header-tooltip {
    border-color: color-mix(in srgb, var(--sm-dark-purple, #a984ff) 42%, var(--sm-dark-border, #2d3442));
    background: var(--sm-dark-panel-strong, #232733);
    color: var(--sm-dark-text, #e8ebf4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(169, 132, 255, 0.08);
}

.header-action-button.rz-button {
    --header-action-accent: #2563eb;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0 !important;
    border-radius: 50% !important;
    letter-spacing: 0;
    line-height: 1;
    overflow: hidden;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.header-action-button.rz-button .rz-button-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 0;
}

.header-action-button.rz-button:hover,
.header-storage-button:hover {
    transform: translateY(-1px);
}

.header-action-button.rz-button .rzi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 50%;
    font-size: 1.35rem;
    background: transparent;
    color: var(--header-action-accent);
}

.header-action-contact {
    --header-action-accent: #2563eb;
}

.header-action-knowledge {
    --header-action-accent: #d97706;
}

.header-action-account {
    --header-action-accent: #7c3aed;
}

.material .header-action-button.rz-button {
    background: #ffffff !important;
    border: 1px solid color-mix(in srgb, var(--header-action-accent) 32%, #dfe4ee) !important;
    color: #202650 !important;
    box-shadow: 0 2px 8px rgba(35, 45, 70, 0.1), inset 0 0 0 4px color-mix(in srgb, var(--header-action-accent) 10%, transparent) !important;
}

.material .header-action-button.rz-button:hover {
    background: #f8fafc !important;
    border-color: color-mix(in srgb, var(--header-action-accent) 48%, #cfd7e6) !important;
    box-shadow: 0 7px 18px rgba(35, 45, 70, 0.14) !important;
}

.header-storage-button {
    --header-storage-color: #2e7d32;
    --header-storage-percent: 0%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 4px;
    align-items: center;
    column-gap: 9px;
    row-gap: 5px;
    min-width: 212px;
    max-width: 272px;
    height: 38px;
    padding: 6px 12px 7px 9px;
    border-radius: 999px;
    font: inherit;
    cursor: pointer;
    letter-spacing: 0;
    text-align: left;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.material .header-storage-button {
    background: #ffffff;
    border: 1px solid #dfe4ee;
    color: #202650;
    box-shadow: 0 2px 8px rgba(35, 45, 70, 0.1);
}

.material .header-storage-button:hover {
    background: #f8fafc;
    border-color: color-mix(in srgb, var(--header-storage-color) 45%, #cfd7e6);
    box-shadow: 0 7px 18px rgba(35, 45, 70, 0.14);
}

.header-storage-icon {
    grid-row: 1 / span 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--header-storage-color) 13%, transparent);
    color: var(--header-storage-color);
}

.header-storage-icon .rz-icon,
.header-storage-icon .rzi {
    font-size: 1.12rem;
}

.header-storage-copy {
    display: flex;
    align-items: baseline;
    gap: 7px;
    min-width: 0;
    line-height: 1;
}

.header-storage-label {
    flex: 0 0 auto;
    color: #697386;
    font-size: 0.72rem;
    font-weight: 800;
}

.header-storage-value {
    min-width: 0;
    overflow: hidden;
    color: var(--header-storage-color);
    font-size: 0.82rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-storage-track {
    grid-column: 2;
    display: block;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--header-storage-color) 13%, #e5e7eb);
}

.header-storage-fill {
    display: block;
    width: var(--header-storage-percent);
    height: 100%;
    border-radius: inherit;
    background: var(--header-storage-color);
    transition: width 0.2s ease;
}

/* Sidebar groups: a small label when expanded, a thin rule when collapsed. */
.app-sidebar .sidebar-main-menu {
    scrollbar-width: thin;
}

.app-sidebar .sidebar-group-label {
    box-sizing: border-box;
    list-style: none;
    padding: 16px 12px 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-sidebar .sidebar-group-label-collapsed {
    height: 0;
    margin: 8px 16px;
    padding: 0;
    border-top: 1px solid;
}

.material .app-sidebar .sidebar-group-label {
    color: color-mix(in srgb, var(--sm-light-text) 35%, var(--sm-light-text-muted));
}

.material .app-sidebar .sidebar-group-label-collapsed {
    border-top-color: #e3e7ef;
}

.material-dark .app-sidebar .sidebar-group-label {
    color: color-mix(in srgb, var(--sm-dark-text) 45%, var(--sm-dark-text-muted));
}

.material-dark .app-sidebar .sidebar-group-label-collapsed {
    border-top-color: #2c3240;
}

/* Settings, Admin and Download stay at the bottom of the sidebar. */
.app-sidebar .sidebar-footer {
    margin-top: auto;
    padding-bottom: 12px;
    display: flex;
    flex-direction: column;
}

.app-sidebar .sidebar-footer-menu.rz-panel-menu {
    background: transparent;
    box-shadow: none;
}

.material .app-sidebar .sidebar-footer {
    border-top: 1px solid #e7ebf2;
}

.material-dark .app-sidebar .sidebar-footer {
    border-top: 1px solid #262c38;
}

.app-sidebar .sidebar-footer .rz-navigation-item:last-child {
    border-bottom: 0 !important;
}

.download-installer-shell {
    box-sizing: border-box;
    padding: 10px 12px 0;
}

.download-installer-button {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 54px;
    padding: 8px 10px;
    border-radius: 12px !important;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    text-decoration: none !important;
    transition: background-color 140ms ease;
}

.download-installer-icon {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, currentColor 16%, transparent);
}

.download-installer-icon .rzi {
    font-size: 1.2rem;
}

.download-installer-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    line-height: 1.2;
}

.download-installer-title {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.download-installer-hint {
    font-size: 0.72rem;
    font-weight: 500;
    color: color-mix(in srgb, currentColor 80%, transparent);
}

.download-installer-shell-collapsed {
    display: flex;
    justify-content: center;
    padding: 10px 0 0;
}

.download-installer-shell-collapsed .download-installer-button {
    width: 40px;
    min-height: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 50% !important;
}

.download-installer-shell-collapsed .download-installer-icon {
    background: transparent;
}

.material .download-installer-button {
    background: #202650 !important;
    color: #ffffff !important;
    border: 1px solid rgba(32, 38, 80, 0.18) !important;
    box-shadow: none !important;
}

.material .download-installer-button:hover,
.material .download-installer-button:focus-visible {
    background: #2b3268 !important;
}

.material-dark .rz-layout,
.material-dark .rz-body {
    background: var(--sm-dark-canvas) !important;
    color: var(--sm-dark-text);
}

.material-dark .rz-header {
    background: var(--sm-dark-header) !important;
    border-bottom: 1px solid #1c2330 !important;
    box-shadow: none !important;
}

.material-dark .rz-footer {
    background: #0b0f17 !important;
    border-top: 1px solid #242b36 !important;
    color: #9ea5b7 !important;
}

.material-dark .rz-sidebar {
    background: var(--sm-dark-sidebar) !important;
    border-right: 1px solid #262c38 !important;
    color: var(--sm-dark-text);
}

.material-dark .app-sidebar,
.material-dark .app-sidebar.rz-sidebar {
    background: var(--sm-dark-sidebar) !important;
    border-right: 1px solid #262c38 !important;
}

.material-dark .rz-button.rz-button-light,
.material-dark .rz-button.rz-light,
.material-dark .rz-button-light {
    background: #353a46 !important;
    border: 1px solid #424858 !important;
    color: #e2e6f1 !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    font-weight: 700;
}

.material-dark .rz-button.rz-button-light:hover,
.material-dark .rz-button.rz-light:hover,
.material-dark .rz-button-light:hover {
    background: #404655 !important;
    color: #ffffff !important;
}

.material-dark .rz-button.rz-state-disabled,
.material-dark .rz-button:disabled {
    opacity: 0.38 !important;
}

.material-dark .history-nav-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #232731 !important;
    border-color: #303747 !important;
}

.material-dark .history-nav-button .rzi {
    font-size: 1.45rem;
}

.material-dark .header-round-button {
    background: linear-gradient(135deg, #a89cff, #7f73d6) !important;
    border: 1px solid rgba(205, 195, 255, 0.28) !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 1px rgba(169, 132, 255, 0.25), 0 8px 18px rgba(91, 77, 172, 0.32) !important;
}

.material-dark .header-action-button.rz-button {
    background: #161b24 !important;
    border: 1px solid #303747 !important;
    color: var(--sm-dark-text, #e8ebf4) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18), inset 0 0 0 4px color-mix(in srgb, var(--header-action-accent) 12%, transparent) !important;
}

.material-dark .header-action-button.rz-button:hover {
    background: #1d2330 !important;
    border-color: color-mix(in srgb, var(--header-action-accent) 42%, #414a5f) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26) !important;
}

.material-dark .header-action-contact {
    --header-action-accent: #67e8f9;
}

.material-dark .header-action-knowledge {
    --header-action-accent: #fbbf24;
}

.material-dark .header-action-account {
    --header-action-accent: #c4b5fd;
}

.material-dark .header-action-button.rz-button .rzi {
    background: transparent;
    color: var(--header-action-accent);
}

.material-dark .header-storage-button {
    background: #161b24;
    border: 1px solid #303747;
    color: var(--sm-dark-text, #e8ebf4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.material-dark .header-storage-button:hover {
    background: #1d2330;
    border-color: color-mix(in srgb, var(--header-storage-color) 36%, #414a5f);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
}

.material-dark .header-storage-label {
    color: var(--sm-dark-text-muted, #aeb4c4);
}

.material-dark .header-storage-icon {
    background: color-mix(in srgb, var(--header-storage-color) 20%, transparent);
}

.material-dark .header-storage-track {
    background: color-mix(in srgb, var(--header-storage-color) 18%, #222938);
}

.material-dark .download-installer-button {
    background: #b1a1ff !important;
    color: #171827 !important;
    border: 1px solid rgba(218, 211, 255, 0.6) !important;
    box-shadow: none !important;
}

.material-dark .download-installer-button:hover,
.material-dark .download-installer-button:focus-visible {
    background: #c5b8ff !important;
}

@media (max-width: 960px) {
    .header-actions {
        margin-right: 0.75rem;
    }

    .header-action-button.rz-button {
        width: 38px;
        min-width: 38px;
        padding: 0 !important;
    }

    .header-action-button.rz-button .rz-button-text {
        display: none;
    }

    .header-storage-button {
        min-width: 180px;
        max-width: 210px;
    }

    .header-storage-label {
        display: none;
    }
}

@media (max-width: 640px) {
    .header-actions {
        gap: 6px !important;
        margin-right: 0.5rem;
    }

    .header-action-button.rz-button {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
    }

    .header-storage-button {
        min-width: 148px;
        max-width: 172px;
        height: 36px;
        padding-right: 10px;
    }

    .header-storage-copy {
        gap: 0;
    }

    .header-storage-value {
        font-size: 0.76rem;
    }
}

/* Startup screen (index.html). It matches the "Connecting" card App.razor shows next (its
   .server-unavailable-* styles), so the download, the session check and the server check read as
   one screen whose status line changes. */
.loading-container {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top, rgba(218, 228, 255, 0.9), transparent 38%),
        linear-gradient(160deg, #f6f8fc 0%, #eef2f8 52%, #e4ebf5 100%);
    color: #132238;
}

.loading-card {
    width: min(32rem, 100%);
    padding: 2.5rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(26, 45, 74, 0.14);
    border: 1px solid rgba(19, 34, 56, 0.08);
}

.loading-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: #202650;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.loading-card h1 {
    margin: 1.25rem 0 0.75rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
}

.loading-card p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #4d5d75;
}

/* Blazor sets this text while it downloads the app ("45%"). */
.loading-status:after {
    content: var(--blazor-load-percentage-text, "Loading...");
}

/* App.razor's cards are styled for Light only; in Dark they flashed a light screen before the app. */
.material-dark .loading-container,
.material-dark .server-unavailable-shell {
    background:
        radial-gradient(circle at top, rgba(49, 93, 168, 0.28), transparent 38%),
        linear-gradient(160deg, #0d1320 0%, var(--sm-dark-canvas, #0a0f17) 52%, #070b12 100%);
    color: var(--sm-dark-text, #e8ebf4);
}

.material-dark .loading-card,
.material-dark .server-unavailable-card {
    background: rgba(31, 35, 45, 0.94);
    border-color: var(--sm-dark-border, #2d3442);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.material-dark .loading-badge,
.material-dark .server-unavailable-badge {
    background: #315da8;
}

.material-dark .loading-card p,
.material-dark .server-unavailable-card p {
    color: var(--sm-dark-text-muted, #aeb4c4);
}

/* Christmas decorations are always in the layout; christmas-decorations.css, loaded only in the
   Christmas themes, shows them. Decorative only: no pointer targets, focus stops, or motion. */
.sm-xmas-lights,
.sm-xmas-snow,
.sm-xmas-baubles,
.sm-xmas-scenery,
.sm-xmas-scenery svg {
    display: none;
    pointer-events: none;
    user-select: none;
}
