:root {
    /* Drive Bootstrap's sans-serif stack (tooltips, popovers, modals, etc. reference this
       variable directly instead of inheriting body) to the same Arial stack used everywhere. */
    --bs-font-sans-serif: Arial, Helvetica, sans-serif;
}

html, body {
    /* Arial base typography. Standard 16px root (Bootstrap baseline); per-category text
       sizes are pinned explicitly below and in the component stylesheets. */
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
}

/* Report-parameter form: compact horizontal "label: control" rows, mirroring the WebForms
   Page_ReportsTab.ascx table layout so every parameter fits without scrolling. Shared by the
   ReportRunner modals and the /reports hub. */
.rp-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.rp-label {
    flex: 0 0 auto;
    width: 150px;
    min-width: 150px;
    text-align: right;
    font-weight: bold;
    font-size: 12px;
}

.rp-control {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 470px;
    display: flex;
    align-items: center;
}

.rp-control .form-control,
.rp-control .form-select,
.rp-control .msdd-wrap {
    width: 100%;
}

.rp-control .form-check-input {
    width: 1.1em;
    flex: 0 0 auto;
}

/* A literal date/year/month control paired with its relative-date "save as" selector. */
.rp-date-with-save {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    flex-wrap: wrap;
}

.rp-date-with-save .rp-save-select {
    flex: 1 1 200px;
    min-width: 160px;
}

.rp-run {
    margin-top: 14px;
}

/* Headings that carry an icon/image render in maroon throughout the app
   (e.g. page headers like "Daily Financials" and modal titles like "Enter Note For Day").
   :has() targets exactly the headings that include an <i>/<img>/<svg>, plus modal titles. */
h1:has(i), h2:has(i), h3:has(i), h4:has(i), h5:has(i), h6:has(i),
h1:has(img), h2:has(img), h3:has(img), h4:has(img), h5:has(img), h6:has(img),
h1:has(svg), h2:has(svg), h3:has(svg), h4:has(svg), h5:has(svg), h6:has(svg) {
    color: #6b1f2c; /* casino maroon */
}

/* Modal headers match the accordion bar (calendar-grid .collapsible-group-header):
   light-blue background, black bold title. The .modal-title rule also overrides the
   maroon heading rule above, since modal titles are <h5> elements containing an icon. */
.modal-header {
    background-color: #bfdbff;
}

.modal-title {
    color: #000000;
}

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;
}

/* ============================================================================
   LABELS - bold throughout for consistency (ported from Praxis app.css)
   ============================================================================ */
label,
.form-label,
.col-form-label,
.form-check-label,
.modal-title,
.card-header,
.card-title {
    font-weight: bold !important;
}

/* ============================================================================
   LOADING OVERLAY (Shared/LoadingOverlay.razor) - pure-CSS spinner
   ============================================================================ */
.loading-overlay-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.loading-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 24px 32px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}

/* The Praxis processing spinner image (wwwroot/images/loading.gif), sized to match Praxis (3rem). */
.loading-overlay-spinner {
    width: 3rem;
    height: 3rem;
}

.loading-overlay-message {
    font-weight: bold;
    color: #333;
}

/* ============================================================================
   STATUS MESSAGE (Shared/StatusMessage.razor)
   ============================================================================ */
.status-message-container {
    margin: 4px 0;
    opacity: 1;
    transition: opacity 1.5s ease-out; /* slow fade-out, matches Praxis + statusMessage.js timing */
}

.status-message-container.fade-out {
    opacity: 0 !important;
}

.ValidationLabel {
    color: #dc3545; /* error = red */
    font-weight: bold;
}

.success-message {
    color: #198754; /* success = green */
    font-weight: bold;
}

.warning-message {
    color: #997404; /* warning = amber */
    font-weight: bold;
}

/* ============================================================================
   REQUIRED FIELD INDICATOR  (Praxis parity: .input-required)
   ============================================================================
   Applied CONDITIONALLY to a required input while it is empty/invalid; the red
   border clears the moment the field is filled. Pages tag a required input with
   class="... @(string.IsNullOrWhiteSpace(model.Field) ? "input-required" : "")"
   and gate the Save / dependent buttons on an IsFormValid computed property. */
.input-required {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.3);
}

.input-required:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
    outline: none;
}

.input-required-container input,
.input-required-container select,
.input-required-container textarea {
    border: 2px solid #dc3545 !important;
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Inline per-field validation message (WebForms RequiredFieldValidator/format parity). Shown
   reactively under an invalid field — the exact WebForms message text — while the red border
   shows and the gated Save stays disabled. */
.input-validation-msg {
    display: block;
    color: #dc3545;
    font-size: 0.8125rem;
    margin-top: 2px;
}

/* ============================================================================
   LOGIN PAGE (Pages/Login.razor) - modern casino theme
   ============================================================================ */
.login-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    background: #ffffff;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.login-card-header {
    background: linear-gradient(135deg, #2980b9 0%, #1f6aa5 100%);
    color: #ffffff;
    text-align: center;
    padding: 28px 20px 22px;
}

.login-card-header .login-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.login-card-header .login-subtitle {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #e8f2fa;
    opacity: 0.95;
}

.login-card-body {
    padding: 26px 28px 30px;
}

.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: #444;
}

.login-field .form-control,
.login-field .form-select {
    font-size: 0.95rem;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-right: 38px;
}

.password-toggle-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

.password-toggle-btn:hover {
    color: #5b9bd5;
}

.login-actions {
    text-align: center;
    margin-top: 18px;
}

.login-system-message {
    margin-top: 18px;
    padding: 12px 14px;
    background-color: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6d4c00;
}

/* ============================================================================
   CHANGE PASSWORD PAGE (Pages/ChangePassword.razor)
   ============================================================================ */
.change-password-card {
    max-width: 460px;
    margin: 30px auto;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.change-password-card .card-header {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    color: #ffd54a;
    padding: 16px 20px;
    font-size: 1.1rem;
}

.change-password-card .card-body {
    padding: 22px 24px 26px;
}

/* ============================================================================
   ADMINISTRATION PAGES (Pages/Admin*.razor)
   ============================================================================ */
.admin-page {
    padding: 16px 20px 40px;
}

.admin-page-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}

.admin-page-header h3 {
    margin: 0;
}

.admin-page-subtitle {
    color: #6c757d;
    margin-bottom: 18px;
    text-align: center;
}

/* Landing tile grid */
.admin-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.admin-tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, transform .15s, border-color .15s;
}

.admin-tile:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
    border-color: #4a8ac4;
}

.admin-tile-icon {
    font-size: 1.6rem;
    color: #4a8ac4;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.admin-tile-body .admin-tile-title {
    font-weight: 600;
    font-size: 1.02rem;
    margin-bottom: 3px;
}

.admin-tile-body .admin-tile-desc {
    color: #6c757d;
    font-size: .85rem;
}

/* Admin form card + toolbar */
.admin-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    padding: 18px 22px 22px;
    margin: 0 auto 20px;
}

.admin-card-title {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #5b9bd5;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-form-row {
    margin-bottom: 14px;
}

.admin-form-row .form-label {
    font-weight: 600;
    margin-bottom: 4px;
}

/* Admin grid (security/casino/account-reporting tables) */
.admin-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.admin-grid th {
    background: linear-gradient(135deg, #5b9bd5 0%, #4a8ac4 100%);
    color: #ffd54a;
    text-align: left;
    padding: 8px 10px;
    font-weight: 600;
    white-space: nowrap;
}

.admin-grid td {
    padding: 7px 10px;
    border-bottom: 1px solid #eee;
}

.admin-grid tbody tr:nth-child(even) {
    background-color: #faf7f7;
}

.admin-grid tbody tr.selected {
    background-color: #fdeccd;
}

.admin-grid tbody tr.clickable {
    cursor: pointer;
}

.admin-grid tbody tr.clickable:hover {
    background-color: #f3e6e8;
}

.admin-grid .col-center {
    text-align: center;
}

/* Accordion (user-security activity categories) */
.admin-accordion-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.admin-accordion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background-color: #f5eeef;
    border: none;
    text-align: left;
    font-weight: 600;
    color: #5b9bd5;
    cursor: pointer;
}

.admin-accordion-header:hover {
    background-color: #efe2e3;
}

.admin-accordion-body {
    padding: 8px 12px 12px;
}

/* Company logo preview */
.company-logo-preview {
    max-width: 320px;
    max-height: 160px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 6px;
    background: #fff;
}

/* ============================================================================
   TYPOGRAPHY STANDARDIZATION (px). Inputs/lists/labels = 12px; Event Management
   tool-tile headers + Open button + admin accordions = 14px. Tables, buttons,
   tabs, page headers (.PageHeaderLabel) and the terms link are pinned in their
   own stylesheets (calendar-grid.css, buttons.css, TabLayout.razor.css).
   ============================================================================ */
.form-control,
.form-select,
textarea,
select,
input:not([type="checkbox"]):not([type="radio"]) {
    font-size: 12px;
}

label,
.form-label,
.col-form-label,
.form-check-label {
    font-size: 12px;
}

/* Event Management tool tiles: card-header heading bar + Open button */
.nav-tool-card .card-header,
.nav-tool-card .btn {
    font-size: 14px;
}

/* Admin user-security accordion headers */
.admin-accordion-header {
    font-size: 14px;
}

/* ============================================================================
   SHARED CLASSES (inline-style refactor)
   Reusable replacements for the static inline styles that were scattered across
   the .razor pages. Bootstrap utilities are reused where an exact equivalent
   exists (fw-normal, overflow-x-auto); the classes below cover the remaining
   distinct literal values so every page references the same shared definition.
   ============================================================================ */

/* --- Accent icon/text color (page-header + section icons) --- */
.text-accent {
    color: #4a8ac4;
}

/* --- Modal/overlay dim backdrop (all rgba(0,0,0,.5) spelling variants) --- */
.modal-dim {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Raise a nested overlay above an already-open modal */
.z-1065 {
    z-index: 1065;
}

/* --- Tooltip/help wrapper (icon that reveals a hover tip) --- */
.help-anchor {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

/* --- Fixed 32x32 icon/image box --- */
.icon-32 {
    width: 32px;
    height: 32px;
}

/* --- Extra-extra-small text (former 0.6rem / 0.65rem close buttons) --- */
.text-xxs {
    font-size: 10px;
}

/* --- One-off width utilities (table column / control widths) --- */
.w-60 { width: 60px; }
.w-110 { width: 110px; }
.w-120 { width: 120px; }
.w-130 { width: 130px; }
.w-140 { width: 140px; }
.w-150 { width: 150px; }
.w-160 { width: 160px; }
.w-180 { width: 180px; }
.w-200 { width: 200px; }
.w-220 { width: 220px; }

/* --- One-off min-width utilities --- */
.minw-240 { min-width: 240px; }

/* --- One-off max-width utilities (cards, controls, responsive tables) --- */
.mw-140 { max-width: 140px; }
.mw-200 { max-width: 200px; }
.mw-220 { max-width: 220px; }
.mw-260 { max-width: 260px; }
.mw-480 { max-width: 480px; }
.mw-680 { max-width: 680px; }
.mw-720 { max-width: 720px; }
.mw-760 { max-width: 760px; }
.mw-820 { max-width: 820px; }
.mw-860 { max-width: 860px; }
.mw-1100 { max-width: 1100px; }

/* --- Floating note / assigned-items popover (absolute panel under a toggle) --- */
.note-popover {
    position: absolute;
    top: 38px;
    left: 0;
    z-index: 1050;
    width: 340px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    padding: 10px 12px;
    text-align: left;
}

/* --- "Copied event" badge on the events calendar (light green, dark text) --- */
.badge-copied {
    background-color: #ccffcc;
    color: #000;
}