/* Metro Finance Branding */
:root {
    --metro-purple: #4B4B8F;
    --metro-purple-dark: #3D3D7A;
    --metro-purple-deep: #333366;
    --metro-purple-light: #6B6BAF;
    --metro-light-bg: #f8f9fc;
    --metro-text: #2d3748;
    --metro-gray: #718096;
}

html,
body {
    font-family: 'DM Sans', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--metro-text);
    background-color: #fff;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: var(--metro-text);
}

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

a:hover {
    color: var(--metro-purple-dark);
}

.btn-primary,
.btn-metro {
    color: #fff;
    background-color: var(--metro-purple);
    border-color: var(--metro-purple);
    border-radius: 4px;
    font-weight: 500;
}

.btn-primary:hover,
.btn-metro:hover {
    background-color: var(--metro-purple-dark);
    border-color: var(--metro-purple-dark);
    color: #fff;
}

.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 rgba(75, 75, 143, 0.4);
}

.text-metro-dark {
    color: var(--metro-purple) !important;
}

.bg-metro-purple {
    background-color: var(--metro-purple) !important;
}

/* Type scale. Size lives on these classes rather than on the heading level, so headings can follow
   document structure (one h1 per page, which FocusOnNavigate targets) without changing the look.
   Four steps only — page > section > card > meta. */
.page-title {
    font-size: 1.75rem;
    font-weight: 700;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.subsection-title,
.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.room-name-link {
    color: var(--metro-purple);
    text-decoration: none;
}

.room-name-link:hover {
    color: var(--metro-purple-dark);
    text-decoration: underline;
}

/* Dashboard tile glyphs; repeated inline on every tile before this existed. */
.card-icon {
    font-size: 2.5rem;
    color: var(--metro-purple);
}

/* A table dropped into a flush .card-body keeps its own narrower cell padding, which leaves the
   first column stepped in from the card header above it. Match the header's 1rem gutter. The
   .table-responsive variant is the same table wrapped for horizontal scroll on small screens. */
.card > .card-body.p-0 > .table > * > tr > *:first-child,
.card > .card-body.p-0 > .table-responsive > .table > * > tr > *:first-child {
    padding-left: 1rem;
}

.card > .card-body.p-0 > .table > * > tr > *:last-child,
.card > .card-body.p-0 > .table-responsive > .table > * > tr > *:last-child {
    padding-right: 1rem;
}

/* Each report pack renders its own table, so auto layout sized every one to its own filenames and
   the columns stepped around from card to card. Fixed widths put them all on one grid.
   Desktop only: narrower than this the fixed columns total more than the card. */
@media (min-width: 768px) {
    .report-files-table {
        table-layout: fixed;
    }

    /* The unsized first column absorbs whatever is left over. Column 5 must clear the Download
       button plus cell padding, or the button overflows the fixed cell and the wrapper shows a
       horizontal scrollbar even on a wide viewport. */
    .report-files-table th:nth-child(2) { width: 90px; }
    .report-files-table th:nth-child(3) { width: 100px; }
    .report-files-table th:nth-child(4) { width: 130px; }
    .report-files-table th:nth-child(5) { width: 140px; }

    .report-files-table td:first-child {
        overflow-wrap: anywhere;
    }
}

.text-primary {
    color: var(--metro-purple) !important;
}

/* Cards are rendered on a white page with .border-0, so the ring is drawn as a shadow layer —
   a real border would be stripped by that utility. */
.card.shadow-sm {
    box-shadow: 0 0 0 1px rgba(45, 55, 72, 0.09), 0 2px 8px rgba(45, 55, 72, 0.06) !important;
}

/* Login Page - MyMetro Style */
.login-page {
    background-color: var(--metro-purple);
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.login-container {
    text-align: center;
    max-width: 480px;
    width: 100%;
}

.login-logo img,
.logo-white {
    filter: brightness(0) invert(1);
}

.login-title {
    color: #fff !important;
    font-size: 2.8rem;
    font-weight: 300;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.btn-login-action {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    background-color: var(--metro-purple-deep, #333366);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.5rem;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.btn-login-action:hover {
    background-color: var(--metro-purple-dark, #3D3D7A);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.login-help {
    font-size: 0.875rem;
}

.login-link {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
}

.login-link:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* Outline button utility */
.btn-metro-outline {
    border: 1px solid var(--metro-purple);
    color: var(--metro-purple);
    background-color: transparent;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-metro-outline:hover {
    background-color: var(--metro-purple);
    color: #fff;
}

.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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjY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yMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}