html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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;
}

/* Auth page form inputs */
.auth-field {
    margin-bottom: 16px;
}

.auth-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 6px;
    letter-spacing: 0.03em;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    padding: 14px 12px;
    border: 1px solid rgba(0, 0, 0, 0.23);
    border-radius: 4px;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s ease-in-out;
    background: transparent;
    box-sizing: border-box;
    color: rgba(0, 0, 0, 0.87);
}

.auth-field input:hover,
.auth-field select:hover,
.auth-field textarea:hover {
    border-color: rgba(0, 0, 0, 0.87);
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    border: 2px solid #1f5f8b;
    padding: 13px 11px;
}

/* Spam trap on the public enrolment form: off-screen for people, still filled in by bots. */
.camp-ascuns {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-field .validation-message {
    display: block;
    font-size: 0.75rem;
    color: #d32f2f;
    margin-top: 4px;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.auth-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1f5f8b;
    cursor: pointer;
    flex-shrink: 0;
}

.auth-remember label {
    font-size: 0.875rem;
    color: rgba(0, 0, 0, 0.87);
    cursor: pointer;
    font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

/* Logout button in the navigation drawer, styled like a nav link. */
.buton-iesire { display:flex; align-items:center; gap:8px; width:100%; background:none; border:none; cursor:pointer;
                padding:8px 16px; color:inherit; font-size:0.875rem; border-radius:4px; }
.buton-iesire:hover { background:rgba(0,0,0,0.08); }
/* Language selector (Shared/SelectorLimba.razor): white on the app bar, dark on the account pages. */
.selector-limba {
    display: flex;
    gap: 2px;
    margin-right: 8px;
}

.selector-limba a {
    color: inherit;
    text-decoration: none;
    font: 500 0.8rem Roboto, Arial, sans-serif;
    padding: 3px 6px;
    border-radius: 4px;
    opacity: 0.75;
}

.selector-limba a:hover {
    opacity: 1;
    background: rgba(127, 127, 127, 0.18);
}

.selector-limba a.activ {
    opacity: 1;
    font-weight: 700;
    outline: 1px solid currentColor;
}

.selector-limba-cont {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1300;
    color: #1f5f8b;
}

/* Profile editor (Pages/ProfilEditor.razor): compact segment table, charts. */
.tabel-segmente {
    border-collapse: collapse;
    font-size: 0.85rem;
}

.tabel-segmente th {
    font-weight: 500;
    text-align: left;
    white-space: nowrap;
    padding: 2px 6px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.tabel-segmente td {
    padding: 0 6px;
    vertical-align: middle;
}

.tabel-segmente .camp-numar {
    width: 92px;
    min-width: 92px;
}

/* The row number and its menu stay in view while the wide table is scrolled sideways. */
.tabel-segmente .coloana-fixa {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--mud-palette-surface);
}

/* The row menu (⋮ or right-click on a row), opened at the mouse; the backdrop closes it on any click outside. */
.meniu-rand-fundal {
    position: fixed;
    inset: 0;
    z-index: 1400;
}

.meniu-rand {
    position: fixed;
    z-index: 1401;
    min-width: 220px;
    padding: 4px 0;
    outline: none;
    background: var(--mud-palette-surface);
}

.meniu-rand-titlu {
    padding: 2px 16px 4px;
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.meniu-rand-element {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 6px 16px;
    border: 0;
    background: none;
    color: var(--mud-palette-text-primary);
    font: inherit;
    font-size: 0.875rem;
    text-align: left;
    cursor: pointer;
}

.meniu-rand-element:hover:not(:disabled) {
    background: var(--mud-palette-action-default-hover);
}

.meniu-rand-element:disabled {
    color: var(--mud-palette-text-disabled);
    cursor: default;
}

.tabel-segmente .nr-rand {
    display: inline-block;
    min-width: 1.6em;
    text-align: right;
}

.grafice-profil {
    width: 100%;
    min-height: 120px;
}

/* Key figures of a law at a glance (editor, above the charts). */
.cifre-cheie {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cifra {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    padding: 6px 12px;
    min-width: 120px;
    background: var(--mud-palette-surface);
}

.cifra .eticheta {
    font-size: 0.72rem;
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cifra .valoare {
    font-size: 1.05rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

/* Numbered steps of the import: data → compute → compare and decide. */
.pas-titlu {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.pas-nr {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Cam table export: the first lines of the file, as they will be written. */
.cama-previzualizare {
    margin: 4px 0 0;
    padding: 8px 10px;
    max-height: 220px;
    overflow: auto;
    font-size: 12px;
    line-height: 1.5;
    background: var(--mud-palette-background-gray);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    white-space: pre;
}

/* ── The printed report (/legi/{id}/raport): an A4 sheet on screen, the same on paper or in a PDF. ── */
.raport-pagina {
    background: #eceff1;
    min-height: 100vh;
    padding: 16px;
    font-family: Roboto, Arial, sans-serif;
    color: #212121;
}
.raport-bara {
    max-width: 210mm;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 14px;
}
.raport-bara a { color: #1f5f8b; text-decoration: none; }
.raport-bara button {
    background: #1f5f8b;
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 6px 16px;
    font: 500 14px Roboto, Arial, sans-serif;
    cursor: pointer;
}
.raport-bara button:disabled { background: #9e9e9e; cursor: default; }
.raport-bara span { color: #616161; font-size: 12px; }
.raport-eroare { max-width: 210mm; margin: 0 auto; color: #c62828; }
.raport {
    max-width: 210mm;
    margin: 0 auto;
    background: #fff;
    padding: 12mm;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    font-size: 12px;
    line-height: 1.4;
}
.raport h1 { font-size: 20px; margin: 2px 0 0; font-weight: 500; }
.raport h2 { font-size: 14px; margin: 18px 0 6px; font-weight: 600; color: #1f5f8b; border-bottom: 1px solid #cfd8dc; padding-bottom: 2px; }
.raport-antet { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.raport-produs { font-size: 11px; color: #616161; text-transform: uppercase; letter-spacing: 0.05em; }
.raport-info th { text-align: left; font-weight: 500; color: #616161; padding-right: 10px; }
.raport-comentariu { margin: 8px 0 0; }
.raport-tabel { border-collapse: collapse; width: 100%; }
.raport-tabel th, .raport-tabel td { border: 1px solid #cfd8dc; padding: 2px 5px; text-align: right; white-space: nowrap; }
.raport-tabel th { background: #f5f7f8; font-weight: 600; }
.raport-tabel td:first-child, .raport-tabel th:first-child { text-align: left; }
.raport-cifre { width: auto; min-width: 60%; }
.raport-segmente { font-size: 9.5px; }
.raport-segmente td:nth-child(2) { text-align: left; }
.raport-armonice { width: auto; }
.raport-peste { color: #c62828; font-weight: 600; }
.raport-gri { color: #9e9e9e; }
.raport-nota { color: #616161; font-size: 10.5px; margin: 4px 0 0; }
.raport-grafice { display: grid; gap: 6px; }
.raport-grafic { width: 100%; height: auto; display: block; }

@media print {
    @page { size: A4; margin: 10mm; }
    .raport-pagina { background: #fff; padding: 0; min-height: 0; }
    .raport-bara { display: none; }
    .raport { box-shadow: none; padding: 0; max-width: none; }
    .raport-pagina-noua { break-before: page; }
    .raport-tabel tr, .raport-grafic { break-inside: avoid; }
    .raport h2 { break-after: avoid; }
}
