/* ProjectX palette and spacing, shared by every Dev Cloud route. */
:root {
    --canvas: #151619;
    --surface: #282b31;
    --text: #f1f3f7;
    --text-secondary: #e0e5ed;
    --accent: #8ab4ff;
    --line: #3b414c;
    --muted: #b2bac8;
    --bs-body-bg: var(--canvas);
    --bs-body-color: var(--text);
    --bs-emphasis-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: #202329;
    --bs-border-color: var(--line);
    --bs-primary: #3d7ff2;
    --bs-primary-rgb: 61, 127, 242;
    --bs-link-color: var(--accent);
    --bs-link-hover-color: #c1d7ff;
    color-scheme: dark;
}
html, body { height: 100%; width: 100%; overflow: hidden; }
body[no-fuib-style] { margin: 0; padding: 0; background: var(--canvas); color: var(--text); font-family: "Segoe UI", Inter, system-ui, sans-serif; font-size: 15px; font-weight: 500; line-height: 1.5; }
* { box-sizing: border-box; }
a { color: var(--accent); }
a:hover { color: #c1d7ff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 { color: var(--text); line-height: 1.25; }
h1 { font-size: 32px; font-weight: 750; letter-spacing: -.7px; margin: 0 0 10px; }
h2 { font-size: 22px; font-weight: 700; }
h3 { font-size: 19px; font-weight: 700; }
h5 { font-size: 18px; font-weight: 650; }
p { line-height: 1.55; }
.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100dvh; overflow: hidden; }
.cloud-sidebar { background: #18191d; border-right: 1px solid var(--line); padding: 32px 22px 22px; display: flex; flex-direction: column; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.cloud-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 38px; font-size: 24px; font-weight: 700; text-decoration: none; color: var(--text); }
.cloud-brand:hover { color: var(--text); }
.brand-mark { width: 40px; height: 42px; display: grid; place-items: center; background: #3d7ff2; color: #fff; border-radius: 10px; flex-shrink: 0; }
.brand-subtitle { display: block; font-size: 12px; letter-spacing: 1.8px; color: var(--muted); font-weight: 650; }
.sidebar-label { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: 1.6px; text-transform: uppercase; margin: 0 12px 12px; }
.cloud-nav { display: grid; gap: 6px; margin-bottom: 24px; }
.cloud-nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cloud-nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 14px; font-weight: 650; color: var(--text-secondary); text-decoration: none; transition: background .15s; }
.cloud-nav-link i { width: 18px; font-size: 17px; flex-shrink: 0; }
.cloud-nav-link:hover { color: var(--text); background: #23262c; }
.cloud-nav-link.active { background: #2b313c; color: var(--accent); }
.admin-label { margin-top: 24px; margin-bottom: 8px; }
.sidebar-note { margin-top: auto; background: #202329; border: 1px solid #2c3038; border-radius: 12px; padding: 18px; font-size: 12px; }
.sidebar-note strong { display: block; font-size: 13px; margin-bottom: 7px; }
.sidebar-note p { margin: 0; color: var(--muted); }
.sidebar-profile { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 24px; }
.profile-link { display: flex; gap: 9px; align-items: center; min-width: 0; flex: 1; color: var(--text); text-decoration: none; }
.profile-avatar { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: #27344b; color: #c1d7ff; font-size: 12px; font-weight: 700; }
.profile-copy { display: flex; flex-direction: column; min-width: 0; }
.profile-copy strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--muted); font-size: 11px; }
.signout-link { color: var(--muted); padding: 7px; }
.main-shell { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cloud-topbar { flex: 0 0 72px; min-height: 72px; display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 0 40px; background: #18191d; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); min-width: 0; }
.breadcrumbs strong { color: var(--text-secondary); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-divider { color: #697281; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.topbar-right .navbar-text { color: var(--muted); font-size: 12px; }
.cloud-content { flex: 1; min-height: 0; width: 100%; padding: 38px 40px 48px; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; scroll-behavior: smooth; }
.cloud-content > * { max-width: 1680px; margin-left: auto; margin-right: auto; }
.page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.page-heading p { color: var(--muted); margin: 0; max-width: 780px; }
.cloud-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.8px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 0 22px; }
.section-heading h2 { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 40px; }
.workspace-stat { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 25px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.workspace-stat:hover { color: var(--text); border-color: #658dcd; }
.stat-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.stat-label i { font-size: 18px; color: var(--accent); }
.workspace-stat > strong { display: block; font-size: 35px; font-weight: 750; line-height: 1.3; margin: 14px 0 7px; }
.workspace-stat > span { display: block; color: var(--muted); font-size: 13px; }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.workspace-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 24px; color: var(--text); text-decoration: none; transition: transform .15s, border-color .15s, box-shadow .15s; }
.workspace-card:hover { color: var(--text); transform: translateY(-3px); border-color: #658dcd; box-shadow: 0 12px 30px #0003; }
.workspace-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); margin-bottom: 20px; }
.workspace-icon { width: 38px; height: 38px; border-radius: 9px; background: #27344b; color: var(--accent); display: grid; place-items: center; font-size: 20px; }
.workspace-card h3 { margin: 0 0 10px; }
.workspace-card > strong { color: var(--text-secondary); font-size: 13px; font-weight: 650; margin-bottom: 7px; }
.workspace-card p { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.card-link { display: flex; align-items: center; gap: 10px; color: var(--accent); font-size: 13px; font-weight: 650; margin-top: auto; }
.panel, .card { --bs-card-bg: var(--surface); --bs-card-color: var(--text); --bs-card-border-color: var(--line); background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
.panel { padding: 25px; margin-bottom: 22px; }
.card-header { border-color: var(--line); background: transparent; padding: 20px 24px; }
.card-body { padding: 24px; }
.card .card { background: #23262c; }
.card-title { color: var(--text); }
.card-footer { border-color: var(--line); background: #23262c; }
.form-label, .form-check-label { color: var(--text-secondary); font-size: 14px; font-weight: 650; }
.form-label { margin-bottom: 8px; }
.form-control, .form-select, .input-group-text { background-color: #202329; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; font-family: inherit; font-size: 14px; box-shadow: none; }
.form-control::placeholder { color: #8e98a8; opacity: 1; }
.form-control:focus, .form-select:focus { background-color: #202329; color: var(--text); border-color: #8ab4ff; box-shadow: 0 0 0 2px #3d7ff233; }
.form-control:disabled, .form-select:disabled { background-color: #292c32; color: #929baa; }
.form-text, .text-muted, .link-secondary { color: var(--muted) !important; }
.text-dark { color: var(--text) !important; }
.text-danger { color: #ffb8bc !important; }
.text-success { color: #9edcb6 !important; }
.text-primary { color: var(--accent) !important; }
.form-check-input { background-color: #202329; border-color: #687382; width: 18px; height: 18px; }
.form-check-input:checked { background-color: #3d7ff2; border-color: #3d7ff2; }
input[type=checkbox], input[type=radio] { accent-color: #3d7ff2; }
fluent-button { font-family: "Segoe UI", system-ui, sans-serif; font-size: 14px; font-weight: 650; min-height: 38px; border-radius: 8px; vertical-align: middle; gap: 8px; }
fluent-button.cloud-button-small { min-height: 30px; padding: 4px 8px; }
fluent-button.cloud-action-danger { color: #ffb8bc; border-color: #81505b; }
fluent-button.active { background: #27344b; border-color: #658dcd; color: #c1d7ff; }
fluent-button.cloud-icon-button { width: 34px; height: 34px; min-height: 34px; opacity: 1; }
fluent-button.w-100, .d-grid > fluent-button, .login-submit { display: flex; width: 100%; justify-content: center; }
.row-action { display: inline-flex; }
label.btn.app-btn-import { background: #202329; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 650; padding: 8px 12px; }
label.btn.app-btn-import:hover { background: #323743; }
.cloud-tabs { width: 100%; }
fluent-tablist { margin-bottom: 24px; }
.fluent-tab-panel { padding: 0; }
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 22px; }
.table-search { flex: 1 1 240px; max-width: 380px; position: relative; }
.table-search > i { position: absolute; left: 12px; top: 11px; color: var(--muted); pointer-events: none; }
.table-search .form-control { padding-left: 36px; }
.table-sort { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 12px; color: var(--muted); }
.table-sort .form-select { width: auto; min-width: 140px; padding-right: 35px; }
.cloud-grid-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.cloud-data-grid { width: 100%; min-width: 550px; --data-grid-row-height: 50px; }
.cloud-data-grid table { width: 100%; }
.cloud-data-grid th { background: #202329; color: var(--muted); font-size: 12px; font-weight: 650; }
.cloud-data-grid tr { cursor: pointer; }
.cloud-data-grid td { color: var(--text-secondary); font-size: 13px; border-color: var(--line); padding: 12px; }
.cloud-data-grid .fluent-data-grid-row:hover { background-color: #303642; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text-secondary); --bs-table-border-color: var(--line); --bs-table-striped-bg: #23262c; --bs-table-striped-color: var(--text-secondary); --bs-table-hover-bg: #303642; --bs-table-hover-color: var(--text); color: var(--text-secondary); }
.table th { color: var(--muted); font-size: 12px; font-weight: 650; padding: 12px; }
.table td { vertical-align: middle; padding: 12px; }
.table-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 22px; font-size: 12px; color: var(--muted); }
.table-pagination { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-pagination > span { padding: 0 8px; }
.empty-state { padding: 58px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: var(--muted); }
.empty-state > i { font-size: 28px; color: var(--accent); }
.empty-state strong { color: var(--text-secondary); }
.empty-state p { margin: 0; font-size: 13px; }
.alert { border-radius: 9px; padding: 14px 18px; font-size: 14px; line-height: 1.5; }
.alert-danger { background: #39242b; border: 1px solid #81505b; color: #ffb8bc; }
.alert-success { background: #22372b; border: 1px solid #477d5c; color: #9edcb6; }
.alert-warning { background: #3b3421; border: 1px solid #806b37; color: #f2d894; }
.alert-info, .alert-primary { background: #27344b; border: 1px solid #658dcd; color: #c1d7ff; }
.list-group { --bs-list-group-bg: #23262c; --bs-list-group-color: var(--text); --bs-list-group-border-color: var(--line); --bs-list-group-action-hover-bg: #303642; --bs-list-group-action-hover-color: var(--text); --bs-list-group-active-bg: #27344b; --bs-list-group-active-color: #c1d7ff; --bs-list-group-active-border-color: #658dcd; }
fluent-button.list-group-item { display: block; height: auto; width: 100%; white-space: normal; }
fluent-button.list-group-item::part(control) { white-space: normal; text-align: left; height: auto; padding: 12px; width: 100%; }
.label-v-center, .label-h-left-bordered { line-height: 1.5; }
.label-h-left-bordered { border-color: var(--line); }
.modal-content { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 20px 80px #0008; }
.modal-header, .modal-footer { border-color: var(--line); padding: 20px 24px; }
.modal-body { padding: 24px; line-height: 1.55; }
.modal-title { font-size: 20px; }
.modal-backdrop { background-color: #000; opacity: .65 !important; }
.auth-page { max-width: 580px; margin: 42px auto; }
.auth-page h1 { font-size: 36px; }
.auth-panel { padding: 32px; margin-top: 30px; }
.auth-panel .login-form { margin: 0; }
.auth-page .card { width: 100%; margin: 0; }
.auth-page .page-heading { margin-bottom: 28px; }
.auth-shell .cloud-nav { margin-bottom: 30px; }
.pr-loading-splash { min-height: 100dvh; background: var(--canvas); color: var(--text); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; }
.pr-loading-splash h1 { font-size: 24px; }
.pr-loading-spinner { color: var(--accent); }
#blazor-error-ui { background: #39242b; color: #ffb8bc; }
.pr-terminal, .terminal-output, pre { color: var(--text-secondary); background-color: #18191d; border-color: var(--line); }
.pr-terminal-line, .pr-terminal-meta { color: var(--muted); }
.pr-activity-summary, .pr-activity-metric, .pr-chart-panel, .we-summary { background: #23262c; border-color: var(--line); color: var(--text); }
.pr-map-container, .pr-activity-map, .course-map { border-color: var(--line); border-radius: 8px; overflow: hidden; }
.notification { background: var(--surface); color: var(--text); border-color: var(--line); }
.progress { background: #202329; border-radius: 6px; }
.progress-bar { background: #3d7ff2; }
.mobile-nav-button, .navigation-scrim { display: none; }
@media (min-width: 1800px) { .cloud-content { padding-left: max(40px, calc((100% - 1680px) / 2)); padding-right: max(40px, calc((100% - 1680px) / 2)); } }
@media (max-width: 1200px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cloud-content { padding: 30px 28px; } .cloud-topbar { padding: 0 28px; } .table-sort { margin-left: 0; } }
@media (max-width: 760px) {
    .app-shell { grid-template-columns: minmax(0, 1fr); }
    .cloud-sidebar { display: none; position: fixed; width: 250px; top: 0; bottom: 0; z-index: 1100; box-shadow: 20px 0 80px #0008; }
    .navigation-open .cloud-sidebar { display: flex; }
    .navigation-open .navigation-scrim { display: block; position: fixed; inset: 0; z-index: 1090; border: 0; background: #0008; }
    .mobile-nav-button { display: inline-flex; }
    .cloud-topbar { min-height: 60px; flex-basis: 60px; padding: 0 18px; }
    .breadcrumbs { gap: 10px; }
    .breadcrumbs > span:first-child, .breadcrumbs > .breadcrumb-divider { display: none; }
    .cloud-content { padding: 28px 18px 40px; scrollbar-gutter: auto; }
    h1 { font-size: 28px; }
    .page-heading { margin-bottom: 24px; }
    .page-heading p { font-size: 14px; }
    .stat-grid { gap: 12px; margin-bottom: 30px; }
    .workspace-stat { padding: 18px; }
    .workspace-stat > strong { font-size: 30px; }
    .workspace-stat > span { font-size: 12px; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .card-body, .card-header, .panel { padding: 18px; }
    .auth-page { margin: 12px auto; }
    .auth-panel { padding: 24px; }
    .table-sort { flex-wrap: wrap; width: 100%; }
    .table-sort .form-select { flex: 1; min-width: 120px; }
    .table-footer { align-items: flex-start; }
    .table-pagination { gap: 6px; }
    .table-pagination > span { width: 100%; order: -1; padding: 0 0 6px; }
    .modal-dialog { margin: 16px; }
}
@media (max-width: 390px) { .stat-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

.cloud-content, .cloud-sidebar, .cloud-topbar { font-family: "Segoe UI", Inter, system-ui, sans-serif; }
.auth-panel .form-label { text-transform: none; letter-spacing: normal; }

/* Let data cells size to their content; keep identifiers readable. */
.cloud-data-grid { min-width: 800px; }
.cloud-data-grid table { table-layout: auto; }
.cloud-data-grid td.text-truncate { max-width: 260px; }
.cloud-data-grid td, .cloud-data-grid .fluent-data-grid-cell { font-weight: 500; }
.cloud-data-grid td:first-child { min-width: 180px; }
.cloud-data-grid th { white-space: nowrap; }
.cloud-data-grid .fluent-data-grid-cell { min-height: 44px; }
.table-search + fluent-button, .table-search + fluent-button + fluent-button { min-width: 38px; padding: 8px; }
.cloud-content .canvas-bar-legend, .cloud-content .wbc-legend { color: var(--muted); }
.cloud-content .btn-group { gap: 8px; flex-wrap: wrap; }
.cloud-content .btn-group > fluent-button { flex: 1 1 auto; }
:root { --chart-grid: #3b414c; --chart-muted: #b2bac8; }

:root { --chart-background: #202329; --chart-text: #e0e5ed; }
fluent-button::part(content) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
fluent-button.list-group-item::part(content) { display: block; text-align: left; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; margin-top: 24px; }
.cloud-action-link { display: inline-flex; padding: 9px 16px; border-radius: 8px; background: #31559e; color: #fff; font-size: 14px; font-weight: 650; text-decoration: none; }
.cloud-action-link:hover { color: #fff; background: #3d7ff2; }
