@import url("hysec-itembank.css?v=20261030-ui-1");
@import url('style-guidelines.css?v=20261030-settings-1');
@import url('dialog-overrides.css?v=20261030-ui-1');

:root {
    --calendar-type-0-color: var(--success-color);
    --calendar-type-0-rgb: var(--success-rgb);
    --calendar-type-1-color: var(--error-color);
    --calendar-type-1-rgb: var(--error-rgb);
    --calendar-type-2-color: #2196F3;
    --calendar-type-2-rgb: 33, 150, 243;
    --calendar-type-3-color: rgba(var(--primary-text-rgb), 0.95);
    --calendar-type-3-rgb: var(--primary-text-rgb);
    --calendar-type-4-color: #9C27B0;
    --calendar-type-4-rgb: 156, 39, 176;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--accent-color);
}

/* .btn-primary styles removed as they should be handled elsewhere (e.g., style-guidelines or component library) */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--accent-color), 0 0 0 0.25rem var(--glow-color);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-color);
}

.invalid {
    outline: 1px solid var(--error-color);
}

.validation-message {
    color: var(--error-color);
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, var(--error-color);
    padding: 1rem 1rem 1rem 3.7rem;
    color: var(--primary-text);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

body {
    overflow-x: hidden;
}

html,
body {
    scrollbar-gutter: auto;
}

/* Global scrollbar skin aligned with ItemBank colors. */
html,
body,
html body * {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--accent-color-rgb), 0.34) var(--scrollbar-track) !important;
}

html body *::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
}

html body *::-webkit-scrollbar-track {
    background: var(--scrollbar-track) !important;
    border-radius: 999px !important;
}

html body *::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-color-rgb), 0.3) !important;
    border: 2px solid var(--scrollbar-thumb-border) !important;
    border-radius: 999px !important;
}

html body *::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-color-rgb), 0.38) !important;
}

html body *::-webkit-scrollbar-corner {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Training Textfield Styling */

/* Calendar Widget Hover Effect */
.event-item {
    transition: all var(--duration-fast, 0.15s) ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.025);
    margin-bottom: 4px;
    padding: var(--space-2, 8px);
    border-radius: var(--radius-sm, 12px);
    border: 1px solid transparent;
}

.event-item:hover {
    background: rgba(var(--accent-color-rgb, 228, 167, 56), 0.1);
    border-color: rgba(var(--accent-color-rgb, 228, 167, 56), 0.16);
}

.events-list, .widget-content {
    overflow-x: auto;
    overflow-y: auto;
    padding-right: 4px; /* Space for scrollbar */
}

/* ═══════════════════════════════════════════════════════════════════════════════
   MARKDOWN CONTENT STYLING (Global - for dynamically rendered Markdown)
   ═══════════════════════════════════════════════════════════════════════════════ */

.markdown-content {
    font-family: var(--hy-font-family, 'Jura', sans-serif);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    overflow-x: auto;
    color: var(--primary-text);
}

/* Paragraphs */
.markdown-content p {
    margin: 0 0 0.75em 0;
}

.markdown-content p:last-child {
    margin-bottom: 0;
}

/* Bold */
.markdown-content strong,
.markdown-content b {
    font-weight: 700;
    color: rgba(var(--primary-text-rgb), 0.95);
}

/* Italic */
.markdown-content em,
.markdown-content i {
    font-style: italic;
}

/* Strikethrough */
.markdown-content del,
.markdown-content s {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Underline */
.markdown-content ins,
.markdown-content u {
    text-decoration: underline;
}

/* Code inline */
.markdown-content code {
    background: rgba(var(--accent-color-rgb), 0.1);
    border: 1px solid rgba(var(--accent-color-rgb), 0.3);
    border-radius: var(--radius-xs);
    padding: 0.15em 0.4em;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    color: var(--accent-color);
}

/* Code blocks */
.markdown-content pre {
    background: rgba(10, 12, 16, 0.6);
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
    border-radius: 8px;
    padding: 1em;
    margin: 0.75em 0;
    overflow-x: auto;
}

.markdown-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.85em;
    color: rgba(var(--primary-text-rgb), 0.9);
}

/* Blockquotes */
.markdown-content blockquote {
    border-left: 4px solid rgba(var(--accent-color-rgb), 0.5);
    background: rgba(var(--accent-color-rgb), 0.05);
    margin: 0.75em 0;
    padding: 0.75em 1em;
    color: rgba(var(--primary-text-rgb), 0.8);
    border-radius: 0 8px 8px 0;
}

.markdown-content blockquote p {
    margin: 0;
}

/* Lists */
.markdown-content ul,
.markdown-content ol {
    margin: 0.75em 0;
    padding-left: 1.75em;
}

.markdown-content li {
    margin: 0.35em 0;
}

.markdown-content ul {
    list-style-type: disc;
}

.markdown-content ol {
    list-style-type: decimal;
}

/* Nested lists */
.markdown-content ul ul,
.markdown-content ol ol,
.markdown-content ul ol,
.markdown-content ol ul {
    margin: 0.25em 0;
}

/* Links */
.markdown-content a {
    color: var(--accent-color);
    text-decoration: none;
    border-bottom: 1px dotted rgba(var(--accent-color-rgb), 0.5);
    transition: all 0.2s ease;
}

.markdown-content a:hover {
    color: #f0b84a;
    border-bottom-color: #f0b84a;
}

/* Headers */
.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    font-family: var(--hy-font-family, 'Jura', sans-serif);
    color: var(--primary-text-strong);
    margin: 1em 0 0.5em 0;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    text-transform: none;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
    margin-top: 0;
}

.markdown-content h1 { font-size: 1.4em; }
.markdown-content h2 { font-size: 1.25em; }
.markdown-content h3 { font-size: 1.1em; }
.markdown-content h4 { font-size: 1em; }
.markdown-content h5 { font-size: 0.95em; }
.markdown-content h6 { font-size: 0.9em; }

/* Horizontal rule */
.markdown-content hr {
    border: none;
    border-top: 1px solid rgba(var(--accent-color-rgb), 0.3);
    margin: 1.5em 0;
}

/* Tables */
.markdown-content table {
    border-collapse: collapse;
    margin: 0.75em 0;
    width: 100%;
    min-width: min(100%, 420px);
    max-width: 100%;
    border: 1px solid rgba(var(--accent-color-rgb), 0.2);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(10, 12, 16, 0.26);
}

.markdown-content th,
.markdown-content td {
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
    padding: 0.6em 1em;
    text-align: left;
    vertical-align: top;
    overflow-wrap: break-word;
}

.markdown-content th[align="center"],
.markdown-content td[align="center"] {
    text-align: center;
}

.markdown-content th[align="right"],
.markdown-content td[align="right"] {
    text-align: right;
}

.markdown-content th {
    background: rgba(var(--accent-color-rgb), 0.1);
    font-weight: 600;
    color: var(--accent-color);
    font-family: var(--hy-font-family, 'Jura', sans-serif);
    font-size: 0.85em;
    letter-spacing: 0.02em;
    text-transform: none;
}

.markdown-content tr:nth-child(even) {
    background: rgba(18, 22, 30, 0.3);
}

.markdown-content table p,
.markdown-content table ul,
.markdown-content table ol {
    margin-top: 0;
    margin-bottom: 0;
}

/* Task lists */
.markdown-content .task-list-item,
.markdown-content li:has(> input[type="checkbox"]:first-child) {
    list-style: none;
    margin-left: -1.35em;
}

.markdown-content input[type="checkbox"] {
    accent-color: var(--accent-color);
    margin: 0 0.45em 0 0;
    vertical-align: -0.12em;
}

/* Definition lists */
.markdown-content dl {
    margin: 0.75em 0;
}

.markdown-content dt {
    color: var(--primary-text-strong);
    font-weight: 700;
}

.markdown-content dd {
    margin: 0.25em 0 0.65em 1.25em;
    color: rgba(var(--primary-text-rgb), 0.82);
}

/* Footnotes */
.markdown-content .footnotes {
    margin-top: 1.1em;
    padding-top: 0.75em;
    border-top: 1px solid rgba(var(--accent-color-rgb), 0.18);
    color: rgba(var(--primary-text-rgb), 0.76);
    font-size: 0.9em;
}

.markdown-content .footnote-ref,
.markdown-content .footnote-back-ref,
.markdown-content .footnote-backref {
    color: var(--accent-color);
    border-bottom: none;
}

/* Images */
.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.75em 0;
    border: 1px solid rgba(var(--accent-color-rgb), 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PERFORMANCE MODE - Disables all expensive CSS effects during drag/resize
   Applied to the manipulated window by JavaScript
   ═══════════════════════════════════════════════════════════════════════════ */
/* NOTE: performance-mode sits on the window being dragged/resized and covers its frame only. On <html> or with a
    universal selector (`*`) it restyled every element at drag start and drop and restarted content animations. */
.app-window.performance-mode,
.app-window.performance-mode > .window-header {
    /* Disable all blur effects - these are EXTREMELY expensive during animation */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    /* Disable transitions to prevent layout thrashing */
    transition: none !important;
    /* Disable animations inside windows only */
    animation: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHELL PERFORMANCE
   No backdrop blur on the shell surfaces and no infinite decorative animations
   ═══════════════════════════════════════════════════════════════════════════ */

.app-window,
.start-menu-container,
.start-menu-overlay,
.taskbar,
.window-header,
.mud-dialog,
.mud-popover-paper,
.context-menu {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.status-dot,
.category-title::before,
[class*="pulse"],
[class*="glow"],
.scanline-overlay {
    animation: none !important;
}

.mud-dialog-title .mud-typography,
.mud-dialog-content .mud-typography-h6 {
    color: var(--primary-text-strong) !important;
}

/* Shared sticky-table chrome: Mud fixed-header tables (and the training matrix headers)
   share one header geometry, header surface and scrollbar. */
html body .mud-table-container,
html body .mud-data-grid {
    scrollbar-color: rgba(var(--accent-color-rgb), 0.32) transparent;
}

html body .mud-table-container::-webkit-scrollbar,
html body .mud-data-grid::-webkit-scrollbar {
    width: var(--sticky-table-scrollbar-size);
    height: var(--sticky-table-scrollbar-size);
}

html body .mud-table-container::-webkit-scrollbar-track,
html body .mud-data-grid::-webkit-scrollbar-track {
    background: transparent;
}

html body .mud-table-container::-webkit-scrollbar-thumb,
html body .mud-data-grid::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-color-rgb), 0.28);
    border-radius: 999px;
}

html body .mud-table-container::-webkit-scrollbar-thumb:hover,
html body .mud-data-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--accent-color-rgb), 0.4);
}

html body .mud-table-sticky-header .mud-table-head,
html body .mud-table-sticky-header .mud-table-root thead,
html body .mud-table-sticky-header .mud-data-grid-header,
html body .mud-data-grid .mud-table-sticky-header .mud-data-grid-header,
html body .tm-member-header,
html body .tm-category-header,
html body .tm-training-header,
html body .tm-summary-header {
    background: var(--sticky-table-header-overlay), var(--sticky-table-header-bg) !important;
    border-bottom-color: var(--sticky-table-header-border) !important;
    backdrop-filter: blur(var(--sticky-table-header-blur)) !important;
    -webkit-backdrop-filter: blur(var(--sticky-table-header-blur)) !important;
    box-shadow: inset 0 -1px 0 rgba(var(--accent-color-rgb), 0.18) !important;
}

html body .mud-table-sticky-header .mud-table-head,
html body .mud-table-sticky-header .mud-table-root thead {
    position: relative;
    overflow: hidden;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

html body .mud-table-sticky-header .mud-table-head .mud-table-cell,
html body .mud-table-sticky-header .mud-table-root thead th,
html body .mud-table-sticky-header .mud-data-grid-header-cell {
    position: relative;
    z-index: 1;
}

html body .mud-table-sticky-header .mud-table-head .mud-table-cell,
html body .mud-table-sticky-header .mud-table-root thead th,
html body .mud-table-sticky-header .mud-data-grid-header-cell,
html body .tm-member-header,
html body .tm-category-header,
html body .tm-summary-header {
    font-family: var(--hy-font-family, 'Jura', sans-serif) !important;
    font-size: var(--sticky-table-header-font-size) !important;
    font-weight: 600 !important;
    letter-spacing: var(--sticky-table-header-letter-spacing) !important;
    text-transform: uppercase !important;
    color: var(--sticky-table-header-text) !important;
    line-height: 1.2 !important;
}

html body .mud-table-sticky-header .mud-table-head .mud-table-cell,
html body .mud-table-sticky-header .mud-table-root thead th,
html body .mud-table-sticky-header .mud-data-grid-header-cell {
    min-height: var(--sticky-table-header-height);
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
    border-bottom: 1px solid var(--sticky-table-header-border) !important;
}

html body .mud-table-container:has(.mud-table-sticky-header),
html body .mud-data-grid:has(.mud-table-sticky-header) {
    position: relative;
    overflow: auto !important;
    scrollbar-gutter: stable;
}

html body .mud-table-container:has(.mud-table-sticky-header)::after,
html body .mud-data-grid:has(.mud-table-sticky-header)::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: var(--sticky-table-scrollbar-size);
    height: var(--sticky-table-header-height);
    background: var(--sticky-table-header-overlay), var(--sticky-table-header-bg);
    border-bottom: 1px solid var(--sticky-table-header-border);
    border-top-right-radius: inherit;
    pointer-events: none;
    z-index: 4;
}

.mud-input-control.mud-input-focused .mud-input-outlined-border,
.mud-input-outlined.mud-input-root-focused .mud-input-outlined-border,
.mud-select:focus-within .mud-input-outlined-border,
.mud-autocomplete:focus-within .mud-input-outlined-border {
    box-shadow: 0 0 0 4px rgba(var(--accent-color-rgb), 0.12) !important;
}

/* Taskbar popups are MudMenu portals, not children of Taskbar.razor in the DOM.
   Keep popup visuals global and enforce one visible frame to prevent double borders. */
.mud-popover:has(.taskbar-popup-surface) {
    margin-top: -12px;
    padding: 0 !important;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 22%),
        var(--panel-bg-solid) !important;
    background-color: var(--surface-0) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

.mud-popover .taskbar-popup-surface {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    font-family: var(--hy-font-family, 'Jura', sans-serif);
}

/* Desktop inbox styles live in desktop-overview.css. */

/* Calendar popup */
.mud-popover .calendar-popup {
    width: 340px;
}

.mud-popover .calendar-popup .calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    background: transparent;
    border-bottom: 1px solid var(--panel-border);
}

.mud-popover .calendar-popup .calendar-header .nav-btn.hysec-icon-btn {
    padding: 0;
}

.mud-popover .calendar-popup .current-month {
    font-size: .9rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.04em;
}

.mud-popover .calendar-popup .calendar-grid {
    padding: var(--space-3);
}

.mud-popover .calendar-popup .weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.mud-popover .calendar-popup .weekday {
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    color: rgba(var(--accent-color-rgb), 0.6);
    letter-spacing: 0.06em;
    text-transform: none;
    padding: 6px 0;
}

.mud-popover .calendar-popup .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-1);
}

.mud-popover .calendar-popup .day {
    aspect-ratio: 1;
    padding: 0;
    min-width: 0;
    border: 1px solid transparent;
    background: transparent;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(var(--primary-text-rgb), 0.75);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
    position: relative;
}

.mud-popover .calendar-popup .day:hover:not(.empty) {
    background: rgba(var(--accent-color-rgb), 0.12);
    color: rgba(var(--primary-text-rgb), 0.95);
}

.mud-popover .calendar-popup .day.empty {
    cursor: default;
}

.mud-popover .calendar-popup .day.today {
    background: rgba(var(--accent-color-rgb), 0.15);
    border: 1px solid rgba(var(--accent-color-rgb), 0.4);
    color: var(--accent-color);
    font-weight: 700;
}

.mud-popover .calendar-popup .day.selected {
    background: rgba(var(--accent-color-rgb), 0.25);
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
}

.mud-popover .calendar-popup .day-dots {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 3px;
    pointer-events: none;
}

.mud-popover .calendar-popup .day-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(var(--primary-text-rgb), 0.55);
}

.mud-popover .calendar-popup .day-dot.type-0 { background: rgba(var(--calendar-type-0-rgb), 0.95); }
.mud-popover .calendar-popup .day-dot.type-1 { background: rgba(var(--calendar-type-1-rgb), 0.95); }
.mud-popover .calendar-popup .day-dot.type-2 { background: rgba(var(--calendar-type-2-rgb), 0.95); }
.mud-popover .calendar-popup .day-dot.type-3 { background: rgba(var(--calendar-type-3-rgb), 0.75); }
.mud-popover .calendar-popup .day-dot.type-4 { background: rgba(var(--calendar-type-4-rgb), 0.95); }

.mud-popover .calendar-popup .calendar-events {
    border-top: 1px solid var(--panel-border);
    max-height: 200px;
    overflow-y: auto;
}

.mud-popover .calendar-popup .events-header {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(var(--accent-color-rgb), 0.7);
    letter-spacing: 0.06em;
    text-transform: none;
    padding: 10px 14px;
    border-bottom: 1px solid var(--panel-border);
    background: var(--popover-footer-bg);
}

.mud-popover .calendar-popup .events-list {
    padding: var(--space-2);
}

.mud-popover .calendar-popup .event-item {
    width: 100%;
    text-align: left;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    background: rgba(var(--panel-bg-rgb), 0.5);
    border: 1px solid var(--panel-border);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.mud-popover .calendar-popup .event-item:hover {
    background: rgba(var(--accent-color-rgb), 0.08);
    border-color: var(--panel-border-hover);
}

.mud-popover .calendar-popup .event-subject {
    font-size: .9rem;
    font-weight: 700;
    color: var(--primary-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mud-popover .calendar-popup .event-time {
    font-size: 0.75rem;
    color: rgba(var(--primary-text-rgb), 0.55);
}

.mud-popover .calendar-popup .loading-spinner {
    text-align: center;
    font-size: 0.8rem;
    color: var(--accent-color);
    padding: 18px;
    letter-spacing: 0.04em;
}

.mud-popover .calendar-popup .no-events {
    text-align: center;
    font-size: 0.8rem;
    color: rgba(var(--primary-text-rgb), 0.62);
    padding: 18px;
}

.mud-popover .calendar-popup .calendar-retry { display: block; margin: 12px auto 0; padding: 8px 14px; border: 1px solid var(--panel-border); border-radius: var(--radius-sm); color: var(--accent-color); background: transparent; font: inherit; cursor: pointer; }
.mud-popover .calendar-popup button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: -2px; }

/* ─── HYSEC Global MudBlazor Form Component Overrides ──────────────────────
   Applies to MudTextField, MudSelect, MudNumericField, MudAutocomplete with
   Variant.Outlined. Removes double borders from wrapper+fieldset, applies
   the HYSEC dark-gold design language globally.
   ─────────────────────────────────────────────────────────────────────────── */

/* Reset outer wrapper chrome so only the fieldset border shows */
.mud-input-control:not(.military-autocomplete .mud-input-control):not(.hysec-tab-keepnative .mud-input-control) {
    box-shadow: none !important;
}

/* Paint the surface behind the input, never on its overlaid border fieldset. */
.mud-input-outlined {
    background: var(--field-border-bg, var(--field-surface-bg)) !important;
    border-radius: var(--radius-input) !important;
}
.mud-input-outlined.mud-input-root-focused,
.mud-input-control.mud-input-focused .mud-input-outlined {
    background: var(--field-border-bg, var(--field-surface-bg-focus)) !important;
}

/* Shared single-line density for text, search, select and autocomplete. */
.mud-input-outlined.mud-input-margin-dense:not(.mud-input-multiline) {
    min-height: 44px;
}

/* The visible border (fieldset .mud-input-outlined-border) */
.mud-input-outlined .mud-input-outlined-border {
    border-color: rgba(var(--primary-text-rgb), 0.14) !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    box-shadow: none !important;
    transition:
        border-color var(--duration-normal) var(--ease-smooth),
        background var(--duration-normal) var(--ease-smooth),
        box-shadow var(--duration-normal) var(--ease-smooth) !important;
}

/* Hover */
.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: rgba(var(--accent-color-rgb), 0.32) !important;
}

/* Focus */
.mud-input-outlined.mud-input-root-focused .mud-input-outlined-border,
.mud-input-control.mud-input-focused .mud-input-outlined-border {
    border-color: var(--accent-color) !important;
    background: transparent !important;
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.12) !important;
}

/* Input text and background */
.mud-input-outlined .mud-input-slot,
.mud-input-outlined .mud-input-root {
    color: var(--primary-text) !important;
    font-family: var(--hy-font-family, 'Jura', sans-serif) !important;
    font-size: 0.92rem !important;
    background: transparent !important;
}

/* Placeholder */
.mud-input-outlined .mud-input-slot::placeholder,
.mud-input-outlined input::placeholder,
.mud-input-outlined textarea::placeholder {
    color: var(--field-placeholder) !important;
    opacity: 1 !important;
}

/* Floating label */
.mud-input-label-inputcontrol,
.mud-input-label {
    color: rgba(var(--primary-text-rgb), 0.52) !important;
    font-family: var(--hy-font-family, 'Jura', sans-serif) !important;
    font-size: 0.84rem !important;
}

.mud-input-root-focused ~ .mud-input-label-inputcontrol .mud-input-label,
.mud-input-root-not-empty ~ .mud-input-label-inputcontrol .mud-input-label,
.mud-input-shrink .mud-input-label {
    color: var(--accent-color) !important;
}

/* MudSelect / MudAutocomplete dropdown list font */
.mud-list {
    font-family: var(--hy-font-family, 'Jura', sans-serif) !important;
}

/* Prevent .mud-list from being a second scroll container inside popups */
.mud-popover .mud-list {
    overflow: visible !important;
}

/* Style the popup paper for select/autocomplete dropdowns only.
   Excludes taskbar tray popups which have their own .taskbar-popup-surface rule. */
.mud-popover-paper:has(.mud-list):not(:has(.taskbar-popup-surface)) {
    background: var(--surface-2) !important;
    border: 1px solid rgba(var(--accent-color-rgb), 0.16) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
}

.mud-list-item {
    color: var(--primary-text) !important;
    font-family: var(--hy-font-family, 'Jura', sans-serif) !important;
    font-size: 0.9rem !important;
}

.mud-list-item:hover,
.mud-list-item-clickable:hover {
    background: rgba(var(--accent-color-rgb), 0.1) !important;
    color: var(--accent-color) !important;
}

.mud-selected-item {
    background: rgba(var(--accent-color-rgb), 0.15) !important;
    color: var(--accent-color) !important;
}

/* MudSelect arrow icon */
.mud-select-input .mud-input-adornment .mud-icon-root,
.mud-input-outlined .mud-input-adornment .mud-icon-root {
    color: rgba(var(--primary-text-rgb), 0.48) !important;
}

.mud-input-root-focused .mud-input-adornment .mud-icon-root {
    color: var(--accent-color) !important;
}

/* MudCheckBox and MudRadioGroup inside forms */
.mud-checkbox .mud-button-root,
.mud-radio .mud-button-root {
    color: rgba(var(--primary-text-rgb), 0.62) !important;
}

.mud-checkbox.mud-checkbox-checked .mud-button-root,
.mud-radio.mud-checked .mud-button-root {
    color: var(--accent-color) !important;
}

/* ── Global sticky table th — ItemBank-matching dark header with backdrop-filter ─
   Scoped CSS files set the final values on th directly; this global rule
   acts as a consistent fallback baseline.
   ──────────────────────────────────────────────────────────────────────────── */
.hangar-table th {
    background: var(--sticky-table-header-bg);
    backdrop-filter: blur(var(--sticky-table-header-blur));
    -webkit-backdrop-filter: blur(var(--sticky-table-header-blur));
    border-bottom: 1px solid var(--sticky-table-header-border);
}

/* HELIOS Control Plane baseline editor */

.helios-baseline-preview {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(var(--primary-text-rgb), 0.14);
    background: rgba(0, 0, 0, 0.22);
    color: var(--primary-text);
    font-family: "JetBrains Mono", "Cascadia Mono", "Consolas", monospace;
    font-size: 0.86rem;
    line-height: 1.45;
    outline: none;
    transition: border-color var(--duration-normal, 160ms) var(--ease-smooth, ease), box-shadow var(--duration-normal, 160ms) var(--ease-smooth, ease), background-color var(--duration-normal, 160ms) var(--ease-smooth, ease);
}

.helios-baseline-preview {
    min-height: 18rem;
    max-height: 34rem;
    overflow: auto;
    padding: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
}

/* DesktopEnv creates the docking preview under body, outside Blazor CSS isolation. */
.snap-preview {
    position:fixed;
    box-sizing:border-box;
    background:rgba(var(--accent-color-rgb),.07);
    border:1px solid rgba(var(--accent-color-rgb),.38);
    border-radius:var(--radius-lg,22px);
    box-shadow:inset 0 0 0 1px rgba(var(--primary-text-rgb),.04);
    z-index:9999;
    pointer-events:none;
    animation:window-snap-enter .16s ease-out both;
}
@keyframes window-snap-enter { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion:reduce) { .snap-preview { animation:none; } }
