html, body {
    font-family: 'Sarabun', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Shared page shell styles for Components/Pages. Use these class names on new pages to keep width, spacing, and overflow consistent. */
.report-page,
.ma-page,
.verify-page,
.calendar-page {
    box-sizing: border-box;
    margin: 0;
    min-height: calc(100vh - 5.1rem);
    overflow-x: hidden;
    padding: 0.75rem;
}

.report-nav {
    overflow-x: auto;
    top: 0;
}

.report-nav-inner,
.report-content,
.ma-content,
.verify-content {
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
    max-width: 82rem;
    min-width: 0;
    width: 100%;
}

.report-content,
.ma-content,
.verify-content {
    padding: 1.25rem 0 3.25rem;
}

.table-wrap {
    max-width: 100%;
}

@media (max-width: 760px) {
    .report-page,
    .ma-page,
    .verify-page,
    .calendar-page {
        padding: 0.75rem;
    }
}

/* Shared page styles. These were moved from Home.razor.css so every page in Components/Pages can use them. */
.radar-workspace {
    display: grid;
    grid-template-columns: 21rem minmax(48rem, 1fr) 31rem;
    min-height: calc(100vh - 4rem);
    transition: grid-template-columns 0.18s ease;
}

.radar-workspace.filter-collapsed,
.radar-workspace:has(> .filter-rail.collapsed) {
    grid-template-columns: 4.75rem minmax(48rem, 1fr) 31rem;
}

.filter-rail,
.detail-panel {
    background: #ffffff;
    border-color: #dbe3ef;
    color: #44546a;
}

.filter-rail {
    border-right: 1px solid #dbe3ef;
    min-width: 0;
    overflow-y: auto;
    padding-bottom: 1rem;
    transition: width 0.18s ease;
    width: 100%;
}

.filter-rail.collapsed {
    max-width: 4.75rem;
    min-width: 4.75rem;
    overflow-x: hidden;
    width: 4.75rem;
}

.icon-button {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
}

.icon-button.small {
    min-height: 1.9rem;
    min-width: 1.9rem;
}

.rail-head {
    align-items: center;
    border-bottom: 1px solid #dbe3ef;
    display: flex;
    height: 3.75rem;
    justify-content: space-between;
    padding: 0 1rem;
}

.rail-head strong {
    color: #334155;
    font-size: 1.05rem;
}

.filter-rail.collapsed .rail-head {
    justify-content: center;
    padding: 0;
}

.filter-rail.collapsed .rail-head strong {
    display: none;
}

.rail-actions {
    border-bottom: 1px solid #dbe3ef;
    display: grid;
    gap: 0.35rem;
    grid-template-columns: 1fr 1fr;
    padding: 0.75rem 1rem;
}

.rail-actions button,
.resource-item,
.view-button,
.segmented-control,
.command-row button {
    border-radius: 8px;
}

.rail-actions button {
    background: #f1f5f9;
    border: 0;
    color: #52627a;
    font-weight: 650;
    min-height: 2.45rem;
}

.resource-group {
    padding: 0.75rem 0.75rem 0;
}

.filter-rail.collapsed .resource-group {
    padding: 0.75rem 0.55rem 0;
}

.resource-group h2 {
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0.4rem 0 0.55rem 0.25rem;
}

.filter-rail.collapsed .resource-group h2 {
    display: none;
}

.resource-item {
    align-items: center;
    background: #f3f6f9;
    border: 0;
    color: #0f172a;
    display: grid;
    font-size: 1rem;
    font-weight: 650;
    gap: 0.75rem;
    grid-template-columns: 1.5rem 1fr auto;
    margin-bottom: 0.35rem;
    min-height: 3rem;
    padding: 0 0.75rem;
    text-align: left;
    width: 100%;
}

.filter-rail.collapsed .resource-item {
    gap: 0;
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 2.75rem;
    padding: 0;
}

.filter-rail.collapsed .resource-item .resource-label,
.filter-rail.collapsed .resource-item strong {
    display: none;
}

.resource-item strong,
.topology-group header > strong {
    background: #e2e8f0;
    border-radius: 7px;
    color: #475569;
    font-size: 0.9rem;
    padding: 0.2rem 0.55rem;
}

.resource-icon {
    align-items: center;
    border: 2px solid currentColor;
    border-radius: 6px;
    display: inline-flex;
    font-size: 0.62rem;
    font-weight: 800;
    height: 1rem;
    justify-content: center;
    line-height: 1;
    width: 1rem;
}

.resource-icon:empty::before {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: 0.38rem;
    width: 0.38rem;
}

.resource-icon.purple { color: #a855f7; }
.resource-icon.blue { color: #2f80ff; }
.resource-icon.green { color: #00b884; }
.resource-icon.teal { color: #14b8a6; }
.resource-icon.cyan { color: #06b6d4; }
.resource-icon.lime { color: #84cc16; }
.resource-icon.orange { color: #f97316; }
.resource-icon.amber { color: #f59e0b; }
.resource-icon.pink { color: #ec4899; }

.topology-stage {
    background-color: #fbfdff;
    background-image: radial-gradient(#d7e1ee 0.8px, transparent 0.8px);
    background-size: 18px 18px;
    min-width: 0;
    overflow: auto;
    padding: 1.25rem 1.5rem 2rem;
}

.stage-toolbar {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.view-button,
.segmented-control {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    min-height: 2.55rem;
}

.view-button {
    color: #0f172a;
    font-weight: 650;
    padding: 0 0.9rem;
}

.segmented-control {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
}

.segmented-control button {
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #475569;
    font-weight: 650;
    padding: 0 0.9rem;
}

.segmented-control button.active {
    background: #2f80ff;
    color: #07111f;
}

.topology-grid {
    align-items: start;
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(2, minmax(25rem, 1fr));
    min-width: 54rem;
}

.topology-group {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #a8e4d1;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.topology-group.wide {
    grid-column: span 1;
}

.topology-group header {
    align-items: center;
    background: #dff7ed;
    color: #008069;
    display: flex;
    justify-content: space-between;
    min-height: 3.25rem;
    padding: 0 0.8rem;
}

.topology-group.mint header {
    background: #e3f7f0;
}

.topology-group header div {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.topology-group h2 {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tag-icon {
    border: 2px solid #00a887;
    border-radius: 5px;
    height: 1rem;
    transform: rotate(45deg);
    width: 1rem;
}

.node-flow {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, minmax(9rem, 1fr));
    padding: 1rem;
}

.resource-node {
    background: #ffffff;
    border-left: 3px solid #10b981;
    border-radius: 5px;
    box-shadow: 0 1px 6px rgba(15, 23, 42, 0.06);
    min-height: 4.1rem;
    padding: 0.55rem 0.65rem;
    position: relative;
}

.resource-node::after {
    background: #10b981;
    border-radius: 999px;
    content: "";
    height: 0.35rem;
    position: absolute;
    right: 0.55rem;
    top: 0.55rem;
    width: 0.35rem;
}

.resource-node.danger {
    background: #fff1f2;
    border-color: #ff5b66;
    outline: 1px solid #ff8f99;
}

.resource-node.warn {
    background: #fff8ed;
    border-color: #f59e0b;
    outline: 1px solid #fbbf24;
}

.resource-node.warn::after {
    background: #f59e0b;
}

.resource-node.danger::after {
    background: #ef4444;
}

.node-kind {
    color: #64748b;
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
}

.resource-node strong,
.resource-node small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-node strong {
    color: #0f172a;
    font-size: 0.78rem;
}

.resource-node small {
    color: #334155;
    font-size: 0.68rem;
}

.detail-panel {
    border-left: 1px solid #dbe3ef;
    overflow-y: auto;
    padding: 1.35rem 1.5rem 2rem;
}

.detail-actions {
    display: flex;
    gap: 0.55rem;
    justify-content: flex-end;
}

.detail-title {
    margin-top: 0.75rem;
}

.detail-title h2 {
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 1rem 0 0.25rem;
    overflow-wrap: anywhere;
}

.detail-title p {
    color: #64748b;
    font-size: 1.05rem;
    margin: 0;
}

.pill {
    border-radius: 6px;
    display: inline-flex;
    font-weight: 750;
    margin-right: 0.35rem;
    padding: 0.25rem 0.65rem;
}

.pill.ok {
    background: #ddf7bf;
    color: #3f7d00;
}

.pill.danger {
    background: #ffe1e1;
    color: #ef4444;
}

.pill.warn {
    background: #fdebbd;
    color: #ca8a04;
}

.command-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.2rem 0;
}

.command-row button {
    background: #44546a;
    border: 0;
    color: #ffffff;
    font-weight: 700;
    min-height: 2.65rem;
    padding: 0 0.9rem;
}

.command-row button.primary {
    background: #2563eb;
}

.command-row button.danger {
    background: #ffffff;
    border: 1px solid #ff8f99;
    color: #ef4444;
}

.issue-box {
    background: #ffe8e8;
    border: 1px solid #ff9ba3;
    border-radius: 8px;
    color: #ff6b73;
    margin: 1.5rem 0;
    padding: 1.15rem;
}

.issue-box h3,
.detail-section h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0 0 0.65rem;
}

.issue-box p {
    margin: 0.25rem 0 0.25rem 1rem;
}

.detail-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.detail-section dl {
    display: grid;
    gap: 0.65rem 1.2rem;
    grid-template-columns: 8rem 1fr;
    margin: 0;
}

.detail-section dt {
    color: #64748b;
    font-weight: 650;
}

.detail-section dd {
    color: #0f172a;
    font-weight: 650;
    margin: 0;
    overflow-wrap: anywhere;
}

.container-card {
    background: #f8fafc;
    border-radius: 8px;
    margin-top: 1.4rem;
    padding: 1rem;
}

.container-card div {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.container-card strong {
    color: #0f172a;
    margin-right: auto;
}

.container-card p {
    color: #52627a;
    margin: 0.35rem 0;
    overflow-wrap: anywhere;
}

.access-denied-panel,
.admin-page {
    margin: 2rem auto;
    max-width: 64rem;
    padding: 0 1.25rem;
}

.access-denied-panel {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    color: #334155;
    padding: 2rem;
}

.access-denied-panel h1,
.admin-page h1 {
    color: #0f172a;
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.access-denied-panel p {
    margin-bottom: 1.25rem;
}

.admin-page header p {
    color: #2563eb;
    font-weight: 800;
    margin: 0 0 0.25rem;
    text-transform: uppercase;
}

.admin-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    margin-top: 1.5rem;
}

.admin-summary-grid article {
    background: #ffffff;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
}

.admin-link-card {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    text-decoration: none;
}

.admin-link-card:hover {
    border-color: #2563eb;
}

.admin-summary-grid strong {
    color: #52627a;
}

.admin-summary-grid span {
    color: #0f172a;
    font-size: 1.2rem;
    font-weight: 800;
}

@media (max-width: 1500px) {
    .radar-workspace {
        grid-template-columns: 19rem minmax(42rem, 1fr);
    }

    .detail-panel {
        grid-column: 1 / -1;
        border-left: 0;
        border-top: 1px solid #dbe3ef;
    }
}

@media (max-width: 900px) {
    .radar-workspace {
        display: block;
    }

    .filter-rail {
        border-bottom: 1px solid #dbe3ef;
        border-right: 0;
    }

    .resource-group {
        display: inline-block;
        min-width: 15rem;
        vertical-align: top;
    }

    .topology-stage {
        padding: 1rem;
    }

    .stage-toolbar {
        justify-content: flex-start;
        overflow-x: auto;
    }
}




