/* ===========================================
   Prism Design System - Global Styles
   =========================================== */

/* CSS Custom Properties */
:root {
    --prism-blue-900: #1B1466;
    --prism-blue-700: #2C26D2;
    --prism-blue-600: #3E38F0;
    --prism-blue-500: #5B55FA;
    --prism-blue-400: #7B76FB;
    --prism-blue-100: #E8E7FE;
    --prism-blue-50: #F5F5FF;

    --prism-dark: #242B3A;
    --prism-text: #4A515F;
    --prism-text-secondary: #596275;
    --prism-text-muted: #6B7280;
    --prism-border: #E7E9F0;
    --prism-border-input: #CFD3DC;
    --prism-bg: #FAFAFF;
    --prism-bg-light: #F5F5FF;
    --prism-white: #FFFFFF;

    --prism-green-600: #1DD794;
    --prism-green-50: #E1F7F8;
    --prism-orange-600: #C96A00;
    --prism-orange-50: #FEF3E6;
    --prism-red-600: #C4162F;
    --prism-red-50: #FECDD6;

    --prism-radius-sm: 4px;
    --prism-radius-md: 8px;
    --prism-radius-lg: 12px;
    --prism-radius-xl: 16px;

    --prism-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --prism-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
    --prism-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);

    --prism-font: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===========================================
   Dark Theme - Prism Design System
   Inspired by Binance dark UI principles:
   - Deep dark base (#181A20) with blue undertone
   - Layered depth via background shades, not shadows
   - High-contrast text (#EAECEF primary)
   =========================================== */
[data-theme="dark"] {
    --prism-blue-900: #A8A5FD;
    --prism-blue-700: #8B87FC;
    --prism-blue-600: #7571EF;
    --prism-blue-500: #9693FC;
    --prism-blue-400: #B3B0FD;
    --prism-blue-100: #1F1D3D;
    --prism-blue-50: #1A1930;

    --prism-dark: #EAECEF;
    --prism-text: #B7BCC5;
    --prism-text-secondary: #A8B0BC;
    --prism-text-muted: #9CA3B0;
    --prism-border: #4A4A4A;
    --prism-border-input: #555555;
    --prism-bg: #303030;
    --prism-bg-light: #3B3B3B;
    --prism-white: #333333;

    --prism-green-600: #2EBD85;
    --prism-green-50: #102821;
    --prism-orange-600: #F0B90B;
    --prism-orange-50: #2A2210;
    --prism-red-600: #F6465D;
    --prism-red-50: #35141D;

    --prism-shadow-sm: none;
    --prism-shadow-md: 0 1px 2px rgba(0, 0, 0, 0.3);
    --prism-shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.4);

    color-scheme: dark;
}

/* Dark theme: make SVG <img> icons white (matching logo #FCFCFD) */
/* Exclude Shield Checkmark/Cross which have their own color filters */
[data-theme="dark"] img[src*="icons/Icon="]:not([src*="Shield Checkmark"]):not([src*="Shield Cross"]):not([src*="Shield Check"]) {
    filter: brightness(0) invert(1);
}

[data-theme="dark"] .active img[src*="icons/Icon="]:not([src*="Shield"]),
[data-theme="dark"] *:hover > img[src*="icons/Icon="]:not([src*="Shield"]) {
    filter: brightness(0) invert(1);
}

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--prism-font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--prism-dark);
    background: var(--ps-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    color: var(--prism-dark);
    line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

p { margin: 0; }

a {
    color: var(--prism-blue-600);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1:focus {
    outline: none;
}

/* Blazor Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--prism-green-600);
}

.invalid {
    outline: 1px solid var(--prism-red-600);
}

.validation-message {
    color: var(--prism-red-600);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.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;
}

/* ===========================================
   Prism Header Navigation — Linear/Notion style
   Live styles are duplicated in PrismHeader.razor (component-scoped),
   which takes precedence at runtime. This block stays in sync as a
   fallback reference.
   =========================================== */
.prism-header {
    background: var(--ps-bg);
    border-bottom: 1px solid var(--ps-border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 var(--ps-space-6);
}

.prism-header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.prism-header-left {
    display: flex;
    align-items: center;
    gap: 0;
    flex: 1;
    min-width: 0;
}

.prism-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: var(--ps-space-3);
    cursor: pointer;
}

.prism-logo img {
    width: 24px;
    height: 24px;
}

/* Tab Navigation */
.prism-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
    min-width: 0;
    overflow-x: auto;
}

.prism-tab {
    display: flex;
    align-items: center;
    gap: var(--ps-space-2);
    padding: 0 var(--ps-space-3);
    height: 32px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ps-text-secondary);
    font-size: var(--ps-text-sm);
    font-weight: 400;
    font-family: var(--ps-font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.12s, color 0.12s;
    position: relative;
    border-radius: var(--ps-r-sm);
    text-decoration: none;
}

.prism-tab:hover {
    color: var(--ps-text-primary);
    background: var(--ps-bg-hover);
    text-decoration: none;
}

.prism-tab.active {
    color: var(--ps-accent-text);
    background: var(--ps-accent-subtle);
    font-weight: 500;
}

.prism-tab-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: none;
    color: var(--ps-text-muted);
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--ps-r-xs);
    padding: 0;
    line-height: 1;
}

.prism-tab-close:hover {
    color: var(--ps-text-primary);
    background: var(--ps-bg-active);
}

.prism-tab-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: var(--ps-text-muted);
    font-size: 1.125rem;
    cursor: pointer;
    border-radius: var(--ps-r-sm);
    margin-left: var(--ps-space-1);
    flex-shrink: 0;
}

.prism-tab-add:hover {
    background: var(--ps-bg-hover);
    color: var(--ps-accent-text);
}

/* Right side user section */
.prism-header-right {
    display: flex;
    align-items: center;
    gap: var(--ps-space-3);
    flex-shrink: 0;
    margin-left: var(--ps-space-3);
}

.prism-user {
    display: flex;
    align-items: center;
    gap: var(--ps-space-2);
    padding: 0 var(--ps-space-2);
    height: 32px;
    border-radius: var(--ps-r-sm);
    cursor: pointer;
    color: var(--ps-text-primary);
    font-size: var(--ps-text-sm);
    font-weight: 400;
    transition: background 0.12s;
}

.prism-user:hover {
    background: var(--ps-bg-hover);
}

.prism-user-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.prism-user-icon svg {
    width: 18px;
    height: 18px;
    color: var(--ps-text-secondary);
}

.prism-btn-logout {
    border: none;
    background: none;
    color: var(--ps-text-primary);
    font-size: var(--ps-text-sm);
    font-weight: 400;
    font-family: var(--ps-font);
    cursor: pointer;
    padding: 0.375rem 0;
}

.prism-btn-logout:hover {
    color: var(--ps-accent-text);
}

/* Breadcrumb */
.prism-breadcrumb {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    color: var(--prism-text-muted);
}

.prism-breadcrumb a {
    color: var(--prism-text-secondary);
    text-decoration: none;
}

.prism-breadcrumb a:hover {
    color: var(--prism-blue-600);
    text-decoration: underline;
}

.prism-breadcrumb-sep {
    margin: 0 0.5rem;
    color: var(--prism-text-muted);
}

/* ===========================================
   Form Controls (Prism Style)
   =========================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--prism-dark);
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--prism-border-input);
    border-radius: var(--prism-radius-md);
    font-size: 0.875rem;
    font-family: var(--prism-font);
    color: var(--prism-dark);
    background: var(--prism-white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus {
    outline: none;
    border-color: var(--prism-blue-600);
    box-shadow: 0 0 0 3px rgba(62, 56, 240, 0.08);
}

.form-control::placeholder {
    color: var(--prism-text-muted);
}

/* ===========================================
   ps-field — Form primitives (Linear/Notion style)
   Usage:
     <div class="ps-field">
       <label class="ps-label">Name</label>
       <input class="ps-input" />
       <span class="ps-help">Optional hint</span>
       <span class="ps-error-text">Validation message</span>
     </div>
   =========================================== */
.ps-field {
    display: flex;
    flex-direction: column;
    gap: var(--ps-space-1);
}

.ps-label {
    font-size: var(--ps-text-sm);
    font-weight: 500;
    color: var(--ps-text-primary);
    line-height: 1.4;
}

.ps-label.required::after {
    content: ' *';
    color: var(--ps-error);
}

.ps-help {
    font-size: var(--ps-text-xs);
    color: var(--ps-text-muted);
    line-height: 1.4;
}

.ps-error-text {
    font-size: var(--ps-text-xs);
    color: var(--ps-error);
    line-height: 1.4;
}

.ps-input,
.ps-select,
.ps-textarea {
    width: 100%;
    padding: 0 var(--ps-space-3);
    border: 1px solid var(--ps-border-default);
    border-radius: var(--ps-r-sm);
    font-size: var(--ps-text-sm);
    font-family: var(--ps-font);
    color: var(--ps-text-primary);
    background: var(--ps-bg);
    transition: border-color 0.12s, box-shadow 0.12s;
    outline: none;
}

.ps-input,
.ps-select { height: 36px; }

.ps-textarea {
    padding: var(--ps-space-2) var(--ps-space-3);
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.ps-input:focus,
.ps-select:focus,
.ps-textarea:focus {
    border-color: var(--ps-accent);
    box-shadow: var(--ps-focus-ring);
}

.ps-input::placeholder,
.ps-textarea::placeholder { color: var(--ps-text-muted); }

.ps-input:disabled,
.ps-select:disabled,
.ps-textarea:disabled {
    background: var(--ps-bg-subtle);
    color: var(--ps-text-disabled);
    cursor: not-allowed;
}

/* Validation states */
.ps-input.is-invalid,
.ps-select.is-invalid,
.ps-textarea.is-invalid {
    border-color: var(--ps-error);
}

.ps-input.is-invalid:focus,
.ps-select.is-invalid:focus,
.ps-textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px var(--ps-error-bg);
}

.ps-input.is-valid,
.ps-select.is-valid,
.ps-textarea.is-valid {
    border-color: var(--ps-success);
}

/* ===========================================
   Buttons (Prism Style)
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--prism-radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    font-family: var(--prism-font);
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary {
    background: var(--ps-accent);
    color: #fff;
}

.btn-primary:hover {
    background: var(--ps-accent-hover);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--ps-bg);
    color: var(--ps-accent-text);
    border: 1px solid var(--ps-border-default);
}

.btn-secondary:hover {
    border-color: var(--ps-accent);
    background: var(--ps-accent-subtle);
}

.btn-text {
    background: none;
    border: none;
    color: var(--ps-accent-text);
    padding: 0.375rem 0.5rem;
}

.btn-text:hover {
    background: var(--ps-accent-subtle);
}

/* ===========================================
   ps-btn — Flat button system (Linear/Notion style)
   Usage: <button class="ps-btn ps-btn-primary">
   Aliases: .btn-primary / .btn-secondary / .btn-text above
   =========================================== */
.ps-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ps-space-2);
    padding: 0 var(--ps-space-4);
    height: 36px;
    border: 1px solid transparent;
    border-radius: var(--ps-r-sm);
    font-size: var(--ps-text-sm);
    font-weight: 500;
    font-family: var(--ps-font);
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    line-height: 1;
}

.ps-btn:focus-visible {
    outline: none;
    box-shadow: var(--ps-focus-ring);
}

.ps-btn:disabled,
.ps-btn[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* Sizes */
.ps-btn-sm { height: 28px; padding: 0 var(--ps-space-3); font-size: var(--ps-text-xs); }
.ps-btn-md { height: 36px; padding: 0 var(--ps-space-4); font-size: var(--ps-text-sm); }
.ps-btn-lg { height: 40px; padding: 0 var(--ps-space-5); font-size: var(--ps-text-base); }

/* Primary — solid accent fill */
.ps-btn-primary {
    background: var(--ps-accent);
    color: #fff;
    border-color: var(--ps-accent);
}
.ps-btn-primary:hover:not(:disabled)  { background: var(--ps-accent-hover);    border-color: var(--ps-accent-hover); }
.ps-btn-primary:active:not(:disabled) { background: var(--ps-accent-pressed);  border-color: var(--ps-accent-pressed); }

/* Secondary — outlined */
.ps-btn-secondary {
    background: var(--ps-bg);
    color: var(--ps-accent-text);
    border-color: var(--ps-border-default);
}
.ps-btn-secondary:hover:not(:disabled)  { background: var(--ps-bg-hover); border-color: var(--ps-accent); }
.ps-btn-secondary:active:not(:disabled) { background: var(--ps-bg-active); border-color: var(--ps-accent); }

/* Ghost — no border, text only */
.ps-btn-ghost {
    background: transparent;
    color: var(--ps-text-secondary);
    border-color: transparent;
}
.ps-btn-ghost:hover:not(:disabled)  { background: var(--ps-bg-hover);   color: var(--ps-text-primary); }
.ps-btn-ghost:active:not(:disabled) { background: var(--ps-bg-active);  color: var(--ps-text-primary); }

/* Danger — solid error fill */
.ps-btn-danger {
    background: var(--ps-error);
    color: #fff;
    border-color: var(--ps-error);
}
.ps-btn-danger:hover:not(:disabled)  { filter: brightness(1.08); }
.ps-btn-danger:active:not(:disabled) { filter: brightness(0.92); }

/* ===========================================
   Cards (Prism Style)
   =========================================== */
.prism-card {
    background: var(--prism-white);
    border: 1px solid var(--prism-border);
    border-radius: var(--prism-radius-lg);
    padding: 1.5rem;
}

.prism-card-header {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--prism-dark);
    margin-bottom: 1rem;
}

/* ===========================================
   Tables — spreadsheet style (Linear/Notion)
   Dense rows, thin horizontal dividers, hover-only tint,
   active row via --ps-bg-active. Column headers uppercase + muted.

   .ps-table / .ps-th / .ps-td / .ps-table-row  — new classes
   .prism-table                                 — legacy alias
   =========================================== */
.ps-table,
.prism-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--ps-text-sm);
    color: var(--ps-text-primary);
    background: var(--ps-bg);
}

.ps-table thead th,
.ps-th,
.prism-table th {
    text-align: left;
    padding: var(--ps-space-2) var(--ps-space-3);
    font-size: var(--ps-text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ps-text-muted);
    background: var(--ps-bg-subtle);
    border-bottom: 1px solid var(--ps-border-subtle);
    white-space: nowrap;
}

.ps-table tbody td,
.ps-td,
.prism-table td {
    padding: var(--ps-space-2) var(--ps-space-3);
    font-size: var(--ps-text-sm);
    color: var(--ps-text-primary);
    border-bottom: 1px solid var(--ps-border-subtle);
    vertical-align: middle;
    line-height: 1.4;
}

/* Hover-only row tint */
.ps-table tbody tr:hover td,
.ps-table-row:hover,
.prism-table tbody tr:hover td,
.prism-table tr:hover td {
    background: var(--ps-bg-hover);
}

/* Active/selected row */
.ps-table tbody tr.is-active td,
.ps-table tbody tr[aria-selected="true"] td,
.ps-table-row.is-active,
.prism-table tbody tr.is-active td {
    background: var(--ps-bg-active);
}

/* Trailing row — no border */
.ps-table tbody tr:last-child td,
.prism-table tbody tr:last-child td {
    border-bottom: none;
}

/* Density modifier: even tighter rows */
.ps-table-compact thead th,
.ps-table-compact tbody td {
    padding: var(--ps-space-1) var(--ps-space-3);
}

/* Numeric alignment helper */
.ps-td-num,
.ps-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ===========================================
   Badges (Prism Style)
   =========================================== */
.prism-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: var(--prism-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
}

.prism-badge-blue {
    background: var(--prism-blue-100);
    color: var(--prism-blue-600);
}

.prism-badge-green {
    background: var(--prism-green-50);
    color: var(--prism-green-600);
}

.prism-badge-orange {
    background: var(--prism-orange-50);
    color: var(--prism-orange-600);
}

.prism-badge-red {
    background: var(--prism-red-50);
    color: var(--prism-red-600);
}

/* ===========================================
   Prism Brand Badge Colors — semantic tokens
   Uses --ps-* from tokens.css. !important required to override
   Blazor component-scoped styles ([b-*]).
   =========================================== */
.mon-ev-reg-courts,.mon-ev-reg-enforcement,.mon-ev-reg-mvs{background:var(--ps-error)!important;color:#fff!important}
.mon-ev-reg-edr{background:var(--ps-accent)!important;color:#fff!important}
.mon-ev-reg-sanctions{background:var(--ps-warning)!important;color:#fff!important}
.mon-ev-reg-tax{background:var(--ps-success)!important;color:#fff!important}
.mon-ev-reg-default{background:var(--ps-neutral)!important;color:#fff!important}
.mon-diff-old{color:#fff!important;background:var(--ps-error)!important}
.mon-diff-new{color:#fff!important;background:var(--ps-success)!important}
.mon-reg-active{background:var(--ps-accent)!important;color:#fff!important;border:1px solid var(--ps-accent-pressed)!important}
.tz-role-buyer,.tz-role-contractor{background:var(--ps-accent)!important;color:#fff!important;border-color:var(--ps-accent)!important}
.tz-role-bidder{background:var(--ps-warning)!important;color:#fff!important;border-color:var(--ps-warning)!important}
.tz-role-winner{background:var(--ps-success)!important;color:#fff!important;border-color:var(--ps-success)!important}
.tz-pill-active,.ct-pill-active,.ct-pill-actual{background:var(--ps-success)!important;color:#fff!important}
.tz-pill-complete{background:var(--ps-neutral)!important;color:#fff!important}
.ct-pill-closed{background:var(--ps-accent)!important;color:#fff!important}
.tz-pill-cancelled{background:var(--ps-error)!important;color:#fff!important}
.tz-pill-pending,.ct-pill-returned{background:var(--ps-warning)!important;color:#fff!important}
.ct-pill-default,.ct-pill-inactive{background:var(--ps-neutral)!important;color:#fff!important}
.tz-chip-buyer,.tz-chip-contractor{background:var(--ps-accent)!important;border-color:var(--ps-accent)!important;color:#fff!important}
.tz-chip-bidder{background:var(--ps-warning)!important;border-color:var(--ps-warning)!important;color:#fff!important}
.tz-chip-winner{background:var(--ps-success)!important;border-color:var(--ps-success)!important;color:#fff!important}
.ct-role-chip.role-plaintiff{background:var(--ps-success)!important;color:#fff!important;border-color:var(--ps-success)!important}
.ct-role-chip.role-defendant,.ct-role-chip.role-convicted{background:var(--ps-error)!important;color:#fff!important;border-color:var(--ps-error)!important}
.ct-role-chip.role-other{background:var(--ps-neutral)!important;color:#fff!important;border-color:var(--ps-neutral)!important}
.ct-chip-status{background:var(--ps-accent)!important;border-color:var(--ps-accent)!important;color:#fff!important}
.ct-chip-review{background:var(--ps-success)!important;border-color:var(--ps-success)!important;color:#fff!important}
.vp-status-debtor{background:var(--ps-warning)!important;color:#fff!important}
.vp-status-paid{background:var(--ps-success)!important;color:#fff!important}
.vp-state-open,.vp-state-forced{background:var(--ps-error)!important;color:#fff!important;border-color:var(--ps-error)!important}
.vp-state-completed{background:var(--ps-success)!important;color:#fff!important;border-color:var(--ps-success)!important}
.vp-state-closed{background:var(--ps-accent)!important;color:#fff!important;border-color:var(--ps-accent)!important}
.vp-state-paused,.vp-state-other{background:var(--ps-neutral)!important;color:#fff!important;border-color:var(--ps-neutral)!important}
.vp-chip-open{background:var(--ps-warning)!important;border-color:var(--ps-warning)!important;color:#fff!important}
.vp-chip-forced{background:var(--ps-error)!important;border-color:var(--ps-error)!important;color:#fff!important}
.vp-chip-other{background:var(--ps-neutral)!important;border-color:var(--ps-neutral)!important;color:#fff!important}

/* ===========================================
   Type Badges
   =========================================== */
.type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.125rem 0.375rem;
    border-radius: var(--prism-radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 28px;
}

.type-badge-uo {
    color: var(--prism-blue-600);
}

.type-badge-fop {
    color: var(--prism-orange-600);
}

.type-badge-fo {
    color: var(--prism-text-secondary);
}

/* ===========================================
   Alert
   =========================================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--prism-radius-md);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-danger {
    background: var(--prism-red-50);
    color: var(--prism-red-600);
    border: 1px solid #FCA5A5;
}

.alert-success {
    background: var(--prism-green-50);
    color: var(--prism-green-600);
}

/* ===========================================
   Utility Classes
   =========================================== */
.text-muted { color: var(--prism-text-muted); }
.text-secondary { color: var(--prism-text-secondary); }
.text-primary { color: var(--prism-blue-600); }
.text-success { color: var(--prism-green-600); }
.text-danger { color: var(--prism-red-600); }
.text-warning { color: var(--prism-orange-600); }

/* ===========================================
   Skeleton shimmer + tab spinner (shared)
   Раніше ці стилі жили всередині <style> блоків
   CompanyProfile.razor / Search.razor — і не
   підхоплювались на інших сторінках (ВП/Суди/
   Декларації/Публічні діячі). Виносимо сюди, щоб
   будь-яка сторінка могла використовувати
   .skeleton / .tab-spinner без дублювання.
   =========================================== */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--ps-border-subtle) 25%, var(--ps-bg-muted) 37%, var(--ps-border-subtle) 63%);
    background-size: 800px 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 6px;
}

.tab-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--ps-border-subtle);
    border-top-color: var(--ps-accent);
    border-radius: 50%;
    margin-left: 4px;
    flex-shrink: 0;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}
