/* ===== CSS Variables (Design Tokens) ===== */
:root {
    /* Primary Colors */
    --color-sidebar: #2B0748;
    --color-main-bg: #F6F1FA;
    --color-card-bg: #FFFFFF;
    --color-purple-accent: #6C2DA8;
    --color-purple-light: #B987F9;

    /* Legacy colors (for backward compatibility) */
    --color-lavender-light: #F6F1FA;
    --color-lavender: #EDE6F5;
    --color-purple: #6C2DA8;
    --color-dark-purple: #4B3C57;
    --color-darker-purple: #1D0F29;
    --color-white: #FFFFFF;
    --color-purple-light-transparent: rgba(185, 135, 249, 0.36);

    /* Text Colors */
    --color-text-primary: #1D0F29;
    --color-text-secondary: #4B3C57;
    --color-text-light: #FAFAFA;
    --color-text-muted: #B987F9;

    /* Stats Colors */
    --color-teal: #00BA9D;
    --color-blue: #176CD6;
    --color-yellow: #FFBB1C;
    --color-pink: #FF5470;
    --color-orange: #EF8121;

    /* Chart Colors */
    --color-chart-green: #00BA9D;
    --color-chart-blue: #176CD6;
    --color-chart-yellow: #FFBB1C;
    --color-chart-orange: #EF8121;

    /* Sponsor Level Colors */
    --color-gold: #FFBB1C;
    --color-silver: #B987F9;
    --color-bronze: #EF8121;
    --color-logo-sponsor: #176CD6;

    /* Typography */
    --font-primary: 'Roboto', sans-serif;
    --font-display: 'Playfair Display', serif;
    --font-heading: 'ArchivoSemiExpanded', 'Roboto', sans-serif;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-round: 50%;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.1);

    /* Layout */
    --sidebar-width: 375px;
    --sidebar-width-collapsed: 70px;
    --header-height: 70px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text-secondary);
    background-color: var(--color-main-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

#app {
    height: 100%;
    overflow-x: hidden;
}

/* ===== Form Input Styles ===== */
.form-input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 400;
    color: var(--color-text-secondary);
    background-color: var(--color-white);
    border: 1px solid var(--color-lavender);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.form-input::placeholder {
    color: var(--color-text-secondary);
    opacity: 0.6;
}

.form-input:focus {
    border-color: var(--color-purple);
    box-shadow: 0 0 0 3px var(--color-purple-light-transparent);
}

/* Remove default validation outlines */
.form-input.valid,
.form-input.invalid,
.form-input.modified {
    outline: none;
}

/* ===== Form Validation ===== */
.validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== Blazor Error UI ===== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.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."
}

/* ===== Loading Progress ===== */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--color-purple);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* ===== Button Styles ===== */
.btn-login {
    width: 100%;
    height: 44px;
    background-color: var(--color-purple);
    color: var(--color-white);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color var(--transition-normal), transform 0.1s ease;
    margin-top: 12px;
}

.btn-login:hover:not(:disabled) {
    background-color: var(--color-darker-purple);
}

.btn-login:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== Loading Auth ===== */
.loading-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-family: var(--font-primary);
    color: var(--color-text-secondary);
}

/* ===== Utility Classes ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid var(--color-purple-accent);
    outline-offset: 2px;
}

/* ===== Sidebar Styles ===== */
.sidebar {
    background-color: #2B0748;
}

.sidebar .nav-list {
    padding: 0 20px;
}

.sidebar .nav-item {
    margin-bottom: 12px;
}

.sidebar a,
.sidebar a:link,
.sidebar a:visited,
.sidebar a:hover,
.sidebar a:active,
.sidebar a:focus {
    text-decoration: none;
    color: #EDE6F5;
}

.sidebar .nav-link {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    color: #EDE6F5;
    text-decoration: none;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
    letter-spacing: 0px;
    border-radius: 10px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.sidebar .nav-link:hover {
    background-color: #5D2A8C;
    border-left: 6px solid #B987F9;
}

.sidebar .nav-link.active {
    background-color: #7B3FA8;
    font-weight: 500;
    border-left: 6px solid #B987F9;
}

.sidebar .nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
}

.sidebar .nav-icon img,
.sidebar .nav-icon svg {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.sidebar .nav-text {
    color: #EDE6F5;
    line-height: 22px;
}

/* Tablet/Medium screens (765px - 1075px) - Icons only */
@media screen and (min-width: 765px) and (max-width: 1075px) {
    .sidebar .nav-list {
        padding: 0 10px;
    }

    .sidebar .nav-link {
        justify-content: center;
        padding: 14px;
        gap: 0;
    }

    .sidebar .nav-link:hover,
    .sidebar .nav-link.active {
        border-left: none;
        border-radius: 10px;
    }

    .sidebar .nav-text {
        display: none;
    }
}


/* ===== Scrollbar Styling ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-lavender-light);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-purple-light);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-purple-accent);
}

/* ===== Shared Page Components ===== */

/* Loading Indicator */
.loading-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--color-text-secondary);
    box-shadow: var(--shadow-sm);
}

.loading-indicator::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: var(--spacing-sm);
    border: 2px solid var(--color-lavender);
    border-top-color: var(--color-purple-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Banner */
.error-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    color: #991B1B;
}

.error-banner span {
    flex: 1;
}

.error-banner button {
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: transparent;
    border: 1px solid #991B1B;
    border-radius: var(--radius-sm);
    color: #991B1B;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.error-banner button:hover {
    background-color: #FCA5A5;
}

/* Success Banner — mirrors .error-banner shape, green palette.
 * Promoted from AdminUsers.razor.css per CLAUDE.md (cross-page admin
 * styles live in app.css, not scoped .razor.css). Scoped per-page
 * overrides still win by Blazor's [b-XXXX] specificity if any page
 * needs a variant. */
.success-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: #DCFCE7;
    border: 1px solid #86EFAC;
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 14px;
    color: #166534;
}

.success-banner span {
    flex: 1;
}

.success-banner button {
    padding: var(--spacing-xs) var(--spacing-md);
    background-color: transparent;
    border: 1px solid #166534;
    border-radius: var(--radius-sm);
    color: #166534;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.success-banner button:hover {
    background-color: #86EFAC;
}

/* Conference name in page title */
.conference-name {
    font-size: 16px;
    font-weight: 400;
    color: #B987F9;
    margin-left: 4px;
    position: relative;
    top: -3px;
}

/* Empty table state */
.empty-row td {
    text-align: center;
    padding: 40px 16px !important;
    color: #9CA3AF;
    font-size: 14px;
    font-family: var(--font-primary);
}

/* Header action button. Canonical global copy — identical per-page duplicates
   still exist in several .razor.css files and are harmlessly redundant. */
.btn-add {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #6C2DA8;
    color: #FFFFFF;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-add:hover {
    background-color: #5D2A8C;
}

/* Disabled button styles */
.btn-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Translatable Field Indicator ===== */
.translatable-field .form-label::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: -1px;
    opacity: 0.35;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236C2DA8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ===== Translation language bar (reusable across admin pages) =====
 * The .translation-lang-tabs / .translation-lang-hint / .globe-icon-inline
 * rules were already global; the bar container + per-tab styles below were
 * duplicated across every entity's scoped razor.css (Speakers, Events,
 * Hotels, Workshops, Sponsors, Committee). Promoted here so Conferences
 * and any future page get the canonical pill-tab look without copy-paste.
 */
.translation-lang-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    background: #F9F5FF;
    border: 1px solid #EDE6F5;
    border-radius: 6px;
    margin-bottom: 12px;
}

.translation-lang-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.translation-lang-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #8B7A9E;
    background: #fff;
    border: 1px solid #E0D4ED;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.translation-lang-tab:hover {
    color: #6C2DA8;
    border-color: #B987F9;
}

.translation-lang-tab-active {
    color: #fff;
    background: #6C2DA8;
    border-color: #6C2DA8;
    font-weight: 600;
}

.translation-lang-badge {
    font-size: 10px;
    font-weight: 400;
    opacity: 0.7;
    text-transform: lowercase;
}

.translation-lang-hint {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: rgba(75, 60, 87, 0.45);
    margin-top: 6px;
    line-height: 1.4;
}

.globe-icon-inline {
    display: inline-block;
    width: 12px;
    height: 12px;
    vertical-align: -1px;
    opacity: 0.6;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C2DA8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='2' y1='12' x2='22' y2='12'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ===== Form Hint (ghost text under fields) ===== */
.form-hint {
    display: block;
    font-family: 'Roboto', sans-serif;
    font-size: 11px;
    color: rgba(75, 60, 87, 0.45);
    margin-top: 4px;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* ===== Checkbox label (reusable across admin pages) =====
 * Promoted from CompRegistration.razor.css so cross-page modals and forms
 * can use it without redefining. Scoped per-page overrides still win by
 * Blazor's [b-XXXX] attribute specificity if a page needs a variant.
 */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4B3C57;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #6C2DA8;
    cursor: inherit;
}

/* ===== Primary / Secondary buttons (reusable across admin pages) =====
 * Promoted from CompRegistration.razor.css. Pages with scoped overrides
 * (e.g. .bulk-action-bar .btn-primary) keep winning by specificity; new
 * code that just wants the default pill-button gets it for free.
 */
.btn-primary {
    padding: 12px 24px;
    background-color: #6C2DA8;
    color: #FFFFFF;
    font-weight: 700;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}
.btn-primary:hover:not(:disabled) { background-color: #5D2A8C; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary {
    padding: 10px 20px;
    background-color: #FFFFFF;
    color: #6C2DA8;
    font-weight: 600;
    border: 1.5px solid #6C2DA8;
    border-radius: 30px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}
.btn-secondary:hover:not(:disabled) { background-color: #F6F1FA; }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== List-editor buttons (reusable across admin pages) =====
 * Originally lived only in Events.razor.css, but Blazor CSS isolation
 * scopes scoped styles per component, so they were invisible elsewhere.
 * Promoted to app.css so every page with an "add/remove row" pattern
 * (Conferences, Events, future list editors) renders the same.
 */
.btn-remove-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #FEE2E2;
    border: none;
    border-radius: 8px;
    color: #DC2626;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-remove-item:hover {
    background-color: #FECACA;
}

.btn-add-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background-color: transparent;
    border: 1px dashed #B987F9;
    border-radius: 8px;
    color: #6C2DA8;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-item:hover {
    background-color: #F6F1FA;
    border-color: #6C2DA8;
}

/* ===== Side-panel flexbox overflow guard =====
 * Every admin page defines its own .side-panel / .panel-header /
 * .panel-content / .panel-footer in scoped .razor.css — they all use
 * display:flex + flex:1 on the scrollable content, but none set
 * min-height:0 on that child. Without min-height:0, a flex child whose
 * content is taller than the container does NOT activate its
 * overflow-y:auto; it just spills past the parent's bounds, which
 * pushes the footer's Save/Cancel buttons off-screen.
 *
 * Applied globally + !important so we don't have to patch 17 scoped
 * files. Header and footer get flex-shrink:0 so they always keep their
 * full height and the scroll area absorbs any overflow.
 */
.side-panel .panel-content {
    min-height: 0 !important;
}

.side-panel .panel-header,
.side-panel .panel-footer {
    flex-shrink: 0 !important;
}

/* ===== Cancel / Refund modal (shared across admin grids) =====
 * Cross-page modal styles — keep here, not in scoped *.razor.css, so
 * any admin page that imports the trigger button also picks the styles.
 */
.cor-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 13, 50, 0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.cor-modal {
    background: #ffffff;
    border-radius: 12px;
    max-width: 560px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    padding: 24px 28px;
}

.cor-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cor-modal-header h2 {
    margin: 0;
    font-size: 18px;
    color: #050d32;
    font-weight: 600;
}

.cor-modal-close {
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
    padding: 0 6px;
}
.cor-modal-close:hover { color: #050d32; }

.cor-modal-summary {
    background: #f8fafc;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #374151;
}
.cor-modal-summary > div { padding: 2px 0; }
.cor-label {
    display: inline-block;
    min-width: 60px;
    color: #6b7280;
    font-weight: 600;
}
.cor-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background: #e5e7eb;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.cor-modal-section {
    margin: 16px 0;
}

.cor-section-title {
    margin: 0 0 10px 0;
    font-weight: 600;
    color: #050d32;
    font-size: 14px;
}

.cor-section-note {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #6b7280;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    border-radius: 4px;
}

/* The modal stacks two .checkbox-label rows (project-global style) and adds
 * an indented hint underneath each one — wrapped in this container so the
 * label + hint align without overriding the global label rules. */
.cor-check-row {
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
}
.cor-check-row:first-of-type { border-top: 0; }
.cor-check-row .checkbox-label {
    font-weight: 600;
    color: #050d32;
    align-items: flex-start;
}
.cor-check-row .checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}
.cor-check-hint {
    color: #6b7280;
    font-size: 12px;
    margin: 4px 0 0 26px;  /* line up with the label text past the checkbox */
}
.cor-check-row .checkbox-label input[type="checkbox"]:disabled ~ span {
    color: #9ca3af;
}

.cor-field-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #050d32;
    font-size: 13px;
}
.cor-required { color: #ef4444; }
.cor-field-hint {
    display: inline-block;
    font-weight: 400;
    color: #6b7280;
    font-size: 12px;
    margin-left: 8px;
}

.cor-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: #050d32;
    resize: vertical;
    min-height: 70px;
}
.cor-textarea:focus {
    outline: none;
    border-color: #f6a100;
    box-shadow: 0 0 0 3px rgba(246, 161, 0, 0.2);
}

.cor-char-count {
    text-align: right;
    color: #6b7280;
    font-size: 11px;
    margin-top: 4px;
}

.cor-callout {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
}
.cor-callout-warn {
    background: #fff7ed;
    border-left: 3px solid #f59e0b;
    color: #374151;
}
.cor-callout-info {
    background: #eff6ff;
    border-left: 3px solid #3b82f6;
    color: #374151;
    margin-top: 8px;
}
.cor-callout ul {
    margin: 4px 0 0 0;
    padding-left: 20px;
}
.cor-callout li { padding: 2px 0; }
.cor-callout-foot {
    margin-top: 8px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.cor-error {
    margin: 8px 0;
    padding: 10px 12px;
    background: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 6px;
    color: #991b1b;
    font-size: 13px;
}

.cor-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.action-btn-cancel-refund {
    color: #ef4444;
}
.action-btn-cancel-refund:hover:not(:disabled) {
    background: #fef2f2;
    color: #991b1b;
}

/* ===== Account setup invites page (Phase 2A.3) =====
 * Cross-page styles for the stat-grid + action-card pattern used by the
 * backfill-campaign admin page. Kept here so any future "campaign-style"
 * admin page can reuse the same chrome.
 */
.account-setup-page .page-subtitle {
    color: #6B7280;
    font-size: 14px;
    margin-top: 4px;
    max-width: 720px;
}

.account-setup-page .stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0 28px 0;
}

.account-setup-page .stat-card {
    background: #FFFFFF;
    border: 1px solid #EDE6F5;
    border-radius: 12px;
    padding: 16px 18px;
}
.account-setup-page .stat-label {
    color: #6B7280;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.account-setup-page .stat-value {
    color: #1D0F29;
    font-size: 28px;
    font-weight: 700;
    margin: 6px 0 4px 0;
}
.account-setup-page .stat-hint {
    color: #6B7280;
    font-size: 12px;
}

.account-setup-page .action-card {
    background: #FFFFFF;
    border: 1px solid #EDE6F5;
    border-radius: 12px;
    padding: 20px 22px;
}
.account-setup-page .card-title {
    color: #1D0F29;
    font-size: 16px;
    margin: 0 0 6px 0;
}
.account-setup-page .card-hint {
    color: #6B7280;
    font-size: 13px;
    margin: 0 0 14px 0;
    max-width: 640px;
}
.account-setup-page .form-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.account-setup-page .form-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: #4B3C57;
    font-weight: 600;
}
.account-setup-page .form-input-small {
    width: 110px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #EDE6F5;
    border-radius: 8px;
    font-size: 14px;
    color: #1D0F29;
}
.account-setup-page .action-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.account-setup-page .result-block {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: #1D0F29;
}
.account-setup-page .result-ok {
    background: #ECFDF5;
    border-left: 3px solid #10B981;
}
.account-setup-page .result-warn {
    background: #FEF3C7;
    border-left: 3px solid #F59E0B;
}
.account-setup-page .result-meta {
    color: #6B7280;
    font-size: 12px;
    margin-top: 4px;
}

/* ===== Page tabs (reusable across admin pages) =====
 * Sibling-page switching, e.g. Users → Administrators / Staff Users.
 * Visual matches Settings' scoped .settings-tab pattern. Each tab is a
 * NavLink to a real route; ActiveClass="page-tab-active" highlights the
 * one whose URL matches the current page.
 */
.page-tabs {
    display: flex;
    gap: 4px;
    background-color: var(--color-white);
    padding: 6px;
    border-radius: 8px;
    margin: -8px 0 16px 0;
    width: fit-content;
}

.page-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #8B7A9E;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-tab:hover {
    color: #6C2DA8;
    background-color: #F6F1FA;
}

.page-tab-active {
    color: #6C2DA8;
    background-color: #EDE6F5;
    font-weight: 600;
}
