/* Evico.UI shared blocks: the one layout and control layer of the web and the app. Palette variables come from tokens.css; the values
   are the ones of docs/design/evico/evico.css. Where the design and the code name the same thing differently, the code's name stays:
   .btn.primary is .btn-primary (secondary is the plain .btn), .btn.sm is .btn-sm, .btn.ink is .btn-ink, .btn.danger is .btn-danger,
   .field input is .input, .field .req is .required-mark, .field .err is .field-status.bad,
   .tabs, .card, .row, .list, .split, .callout, .steps, .empty, .dropzone and the rest keep the design's names. */

/* ---------- Page frame: the same left edge and width everywhere ---------- */

.page { width: 100%; max-width: var(--ev-page-width); margin: 0 auto; padding: 40px var(--ev-page-gutter) 64px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 32px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 420px; }
.page-head h1 { margin: 6px 0 0; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.page-head .sub { margin: 8px 0 0; color: var(--ev-text-2); max-width: 640px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.page-actions:empty { display: none; }
/* Up to 640px (web and app): the whole line, the buttons under each other at full width, the primary first; a small one keeps its width. */
@media (max-width: 640px) {
    .page-actions { flex: 1 1 100%; flex-direction: column; align-items: stretch; }
    .page-actions > .btn-primary { order: -1; }
    .page-actions > .btn-sm { align-self: flex-start; }
}
.crumb { font-size: 14px; color: var(--ev-muted); display: flex; width: fit-content; gap: 8px; align-items: center; margin-bottom: 12px; }
.crumb:hover { color: var(--ev-text); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 1.3; text-transform: uppercase; color: var(--ev-primary-ink); }

/* Content layouts: full width, split (form or list and an aside), list and detail. Nothing is centred narrow. */
.split { display: grid; grid-template-columns: minmax(0, 720px) minmax(260px, 1fr); gap: 32px; align-items: start; }
.stack { display: grid; gap: 24px; }
.stack-s { display: grid; gap: 12px; }
/* A list and the open thing beside it (ListDetail.razor); one under the other when there is no room for both. */
.list-detail { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.list-detail-list { flex: 1 1 300px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
.list-detail-detail { flex: 2.2 1 560px; min-width: 0; grid-template-columns: minmax(0, 1fr); }
/* The labels and values of a card (FactList.razor). */
.fact-list { display: grid; grid-template-columns: minmax(96px, 2fr) minmax(0, 3fr); gap: 10px 16px; margin: 0; font-size: 14px; }
.fact-list dt { color: var(--ev-muted); }
.fact-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.fact-list dd a { color: inherit; text-decoration: underline; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.muted { color: var(--ev-muted); }
.small { font-size: 14px; line-height: 1.5; }
.caption { font-size: 13px; line-height: 1.45; color: var(--ev-muted); }

/* ---------- Brand ---------- */

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ev-text); font-weight: 800; font-size: 20px; line-height: normal; letter-spacing: -.045em; }
.brand:hover { color: var(--ev-text); }
.brand-mark { flex: none; display: block; }
.brand-mark-bg { fill: var(--ev-logo-bg); }
.brand-mark-page { fill: var(--ev-logo-fg); }
.brand-mark-fold { fill: var(--ev-logo-fold); }
.brand-mark-go { fill: var(--ev-logo-go); }
/* The wordmark is drawn (logo A), never set as text: 0.78 em high, "Evi" in the text colour, "co" in the logo's orange. */
.brand-word { display: inline-block; height: .78em; width: auto; vertical-align: baseline; overflow: visible; }
.brand-word-evi { fill: currentColor; }
.brand-word-co { fill: var(--ev-logo-go); }

/* ---------- Buttons: 48 px, 40 px in rows. One primary per screen, never in the site header. ---------- */

.btn {
    --btn-bg: var(--ev-surface);
    --btn-fg: var(--ev-text);
    --btn-border: var(--ev-border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    min-height: 48px; padding: 0 22px;
    font: 700 16px/1.2 var(--ev-font);
    color: var(--btn-fg); background: var(--btn-bg);
    border: 1px solid var(--btn-border); border-radius: var(--ev-radius);
    cursor: pointer; white-space: nowrap;
    transition: background .2s ease, border-color .2s ease;
}
.btn:hover { color: var(--btn-fg); border-color: var(--ev-text-2); }
.btn:disabled, label.btn:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.btn-primary { --btn-bg: var(--ev-primary); --btn-fg: var(--ev-on-primary); --btn-border: transparent; }
.btn-primary:hover { --btn-bg: var(--ev-primary-hover); border-color: transparent; }
.btn-ink { --btn-bg: var(--ev-ink); --btn-fg: var(--ev-on-ink); --btn-border: transparent; }
.btn-ink:hover { --btn-bg: var(--ev-text-2); border-color: transparent; }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; padding: 0 14px; }
.btn-ghost:hover { background: var(--ev-surface-2); border-color: transparent; }
.btn-danger { --btn-fg: var(--ev-danger-ink); --btn-border: var(--ev-danger-border); }
.btn-danger:hover { background: var(--ev-danger-soft); border-color: var(--ev-danger-border); }
.btn-danger-ghost { --btn-bg: transparent; --btn-border: transparent; --btn-fg: var(--ev-danger-ink); padding: 0 14px; }
.btn-danger-ghost:hover { background: var(--ev-danger-soft); border-color: transparent; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn-sm.btn-ghost, .btn-sm.btn-danger-ghost { padding: 0 12px; }
.btn-block { width: 100%; }
.iconbtn { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 12px; background: transparent; color: var(--ev-text); cursor: pointer; }
.iconbtn:hover { background: var(--ev-surface-2); }

/* ---------- Cards, rows, tables, empty states ---------- */

.card { background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); padding: 24px; box-shadow: var(--ev-shadow-sm); }
:where(.phone-main) .card { padding: 20px; border-radius: 18px; }
.card > h2, .card > h3, .card-title { margin: 0 0 4px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.card-sub { margin: 0 0 20px; color: var(--ev-text-2); font-size: 14px; }
.list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 16px 20px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius); color: var(--ev-text); }
.row .main { display: grid; gap: 4px; min-width: 0; flex: 1 1 280px; }
.row .title { font-weight: 700; font-size: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.row .meta { font-size: 14px; color: var(--ev-muted); }
.row > .action-error { flex: 1 0 100%; margin-top: 0; }
/* A row that opens its detail beside the list; the open one is marked. */
.pick-row { min-height: 64px; }
.row.pick-row .main { flex: 1 1 130px; gap: 2px; }
.pick-row.current { border-color: var(--ev-ink); background: var(--ev-surface-2); }
.row .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
/* A hidden column title belongs to the scrolling box (position), so it never widens the page. */
.table-wrap { position: relative; overflow-x: auto; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ev-muted); padding: 14px 20px; border-bottom: 1px solid var(--ev-border); white-space: nowrap; }
table.t td { padding: 14px 20px; border-bottom: 1px solid var(--ev-border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
.table-actions { display: flex; justify-content: flex-end; gap: 8px; }
.table-actions .btn { width: auto; }
.empty { display: grid; justify-items: start; gap: 8px; padding: 32px 24px; background: var(--ev-surface); border: 1px dashed var(--ev-border-strong); border-radius: var(--ev-radius-lg); color: var(--ev-text-2); }
.empty strong { font-size: 16px; color: var(--ev-text); }
.empty p { margin: 0; }
.empty-icon { display: grid; }
.empty-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* A card in place of a page that has nothing to show (a dossier that is not found, a refused page): left, like everything else. */
.empty-state { display: grid; justify-items: start; gap: 12px; padding: 32px 24px; }
.empty-state h1, .empty-state h2, .empty-state p { margin: 0; }

/* ---------- Badges, tabs, progress, steps ---------- */

.badge, .task-chip {
    display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--ev-pill);
    font-size: 12px; font-weight: 700; background: var(--ev-surface-2); color: var(--ev-text-2); white-space: nowrap;
}
.badge.ok, .task-chip.ok { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.badge.warn, .task-chip.warn { background: var(--ev-warning-soft); color: var(--ev-warning-ink); }
.badge.bad, .task-chip.bad { background: var(--ev-danger-soft); color: var(--ev-danger-ink); }
.badge.hot, .task-chip.wait { background: var(--ev-primary-soft); color: var(--ev-primary-ink); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--ev-surface-2); border-radius: var(--ev-radius); width: fit-content; max-width: 100%; }
.tabs a, .tabs button { padding: 10px 16px; border: 0; border-radius: var(--ev-radius-sm); background: transparent; font: 600 14px/1.55 var(--ev-font); color: var(--ev-text-2); cursor: pointer; }
.tabs a.on, .tabs button.on { background: var(--ev-surface); color: var(--ev-text); box-shadow: var(--ev-shadow-sm); }
.avatar { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--ev-primary-soft); color: var(--ev-primary-ink); font-weight: 800; font-size: 14px; }
.progress { height: 8px; border-radius: var(--ev-pill); background: var(--ev-surface-3); overflow: hidden; }
.progress span, .progress i { display: block; height: 100%; background: var(--ev-primary); border-radius: inherit; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.steps { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--ev-muted); }
.steps li { display: flex; align-items: center; gap: 8px; }
.steps li + li::before { content: ""; width: 20px; height: 1px; background: var(--ev-border-strong); }
.steps .n { width: 24px; height: 24px; border-radius: var(--ev-pill); display: grid; place-items: center; background: var(--ev-surface-3); color: var(--ev-text-2); font-size: 13px; }
.steps .now { color: var(--ev-text); }
.steps .now .n { background: var(--ev-ink); color: var(--ev-on-ink); }
.steps .done .n { background: var(--ev-success-soft); color: var(--ev-success-ink); }

.stepper { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.stepper-progress { margin-bottom: 20px; }
.stepper-progress .label { display: flex; justify-content: space-between; font-size: 13px; color: var(--ev-muted); font-weight: 600; margin-bottom: 8px; }
.stepper button {
    width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
    font: 600 14px/1.4 var(--ev-font); color: var(--ev-text-2);
    background: transparent; border: 0; border-radius: var(--ev-radius); min-height: 48px; padding: 0 12px 0 8px; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.stepper button:hover { background: var(--ev-surface-2); color: var(--ev-text); }
.stepper .dot {
    flex: none; width: 28px; height: 28px; border-radius: var(--ev-pill); display: grid; place-items: center;
    font-size: 13px; background: var(--ev-surface-3); transition: background .2s ease;
}
.stepper .done .dot { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.stepper .warn .dot { background: var(--ev-warning-soft); color: var(--ev-warning-ink); }
.stepper .active button { background: var(--ev-surface); color: var(--ev-text); box-shadow: var(--ev-shadow-sm); }
.stepper .active .dot { background: var(--ev-ink); color: var(--ev-on-ink); }
.stepper .caption { display: block; }


@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-grid .span-2, .form-grid .wide { grid-column: 1 / -1; }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.field { display: grid; gap: 8px; align-content: start; }
.field label, .field .label { font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--ev-text); }
.field .hint { font-size: 13px; color: var(--ev-muted); }
.input, select.input {
    width: 100%; min-height: 48px; padding: 12px 14px;
    font: 400 16px/1.4 var(--ev-font); color: var(--ev-text);
    background: var(--ev-surface); border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea.input { min-height: 112px; }
.input::placeholder { color: color-mix(in srgb, var(--ev-muted) 75%, transparent); }
.input:hover { border-color: var(--ev-muted); }
.input:focus { outline: none; border-color: var(--ev-primary); box-shadow: var(--ev-ring); }
.input.invalid, .field.bad .input, .field.bad textarea, .field.bad select { border-color: var(--ev-danger); }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 56px; }
.input-suffix .suffix { position: absolute; right: 14px; top: 50%; translate: 0 -50%; color: var(--ev-muted); font-weight: 600; font-size: 14px; }
.field-status { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.field-status.ok { color: var(--ev-success-ink); }
.field-status.bad { color: var(--ev-danger-ink); }

/* Required fields: an asterisk after the label (aria-hidden; the input carries aria-required) and one legend per form. */
.required-mark { color: var(--ev-danger-ink); margin-left: 6px; }
.required-legend { margin: 0 0 16px; font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.required-legend .required-mark { margin: 0 2px 0 0; }
.inline-label { display: block; margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ev-text); }

/* An action's failure, shown right under the button (or the block) that started it. Same look on web and in the app,
   readable in both themes: the soft danger tint behind body text, the icon in the danger colour. */
.action-error {
    display: flex; gap: 10px; align-items: flex-start;
    margin-top: 12px; padding: 12px 14px; border-radius: var(--ev-radius);
    background: var(--ev-danger-soft); color: var(--ev-danger-ink); font-size: 14px; font-weight: 600; text-align: left;
    animation: rise .2s ease;
}
.action-error-icon { flex: none; display: grid; margin-top: 1px; }
.action-error-body { min-width: 0; overflow-wrap: anywhere; }
.action-error-body:has(+ .action-error-close) { flex: 1 1 auto; }
.action-error-close { flex: none; margin: -8px; color: inherit; }
.action-error-body ul { display: grid; gap: 4px; margin: 6px 0 0; padding-left: 18px; }
.action-error-body ul.file-names { margin-top: 8px; font-weight: 400; }
/* In a grid or stack that already spaces its children (the account forms, the app's stacks). */
.auth-form > .action-error, .stack > .action-error, .stack-s > .action-error { margin-top: 0; }
/* On an identity card row, under that row's buttons. */
.id-slot > .action-error { flex: 1 1 100%; margin-top: 2px; }

.subhead { font-size: 16px; line-height: 1.4; font-weight: 700; color: var(--ev-text); margin: 28px 0 16px; }


.segmented { display: inline-flex; gap: 4px; padding: 4px; flex: none; border-radius: var(--ev-radius); background: var(--ev-surface-2); }
.segmented button {
    min-width: 56px; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--ev-radius-sm); background: transparent;
    font: 600 14px/1.3 var(--ev-font); color: var(--ev-text-2); cursor: pointer; transition: background .15s ease, color .15s ease;
}
.segmented button.on, .segmented button[aria-pressed="true"] { background: var(--ev-ink); color: var(--ev-on-ink); }
.segmented button:focus-visible { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.segmented button:disabled { opacity: .5; cursor: not-allowed; }

/* A switch that is saved at once: 48 x 28 in a 48 x 44 target, dark when on. */
.toggle { flex: none; display: inline-grid; place-items: center; width: 48px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.toggle-track { display: flex; align-items: center; width: 48px; height: 28px; padding: 3px; border-radius: var(--ev-pill); background: var(--ev-muted); transition: background .2s ease; }
.toggle-knob { width: 22px; height: 22px; border-radius: var(--ev-pill); background: var(--ev-surface); }
.toggle[aria-checked="true"] .toggle-track { justify-content: flex-end; background: var(--ev-ink); }
.toggle:focus-visible { box-shadow: none; }
.toggle:focus-visible .toggle-track { box-shadow: var(--ev-ring); }

/* The shape of what is being read; shown after a moment, always with one line of text. */
.skel { display: block; max-width: 100%; height: 16px; border-radius: var(--ev-radius-sm); background: var(--ev-surface-3); }
.skel.thin { height: 12px; }
.skel.ctl { height: 40px; border-radius: var(--ev-radius); }
.skel.tile { flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--ev-radius); }
.skel-card { display: grid; gap: 14px; }
.skel-card .skel:nth-child(1) { width: 44%; }
.skel-card .skel.thin:nth-child(3) { width: 82%; }
.skel-card .skel.thin:nth-child(4) { width: 60%; }
.skel-card .skel.thin:nth-child(3):last-child { width: 72%; }
.phone-main .skel-text { margin-bottom: 20px; }
.row.skel-row { flex-wrap: nowrap; }
.row.skel-row .main { flex: 1 1 0; gap: 8px; }
.skel-row .main .skel { width: 52%; }
.skel-row .main .skel.thin { width: 34%; }
.skel-row:nth-child(2) .main .skel { width: 44%; }
.skel-row:nth-child(2) .main .skel.thin { width: 40%; }
.skel-row:nth-child(3) .main .skel { width: 58%; }
.skel-row:nth-child(3) .main .skel.thin { width: 30%; }
.skel-row .skel.ctl { flex: 0 0 auto; width: 96px; }
.skel-contract .skel:nth-child(1) { width: 46%; height: 20px; }
.skel-contract .skel.thin:nth-child(3) { width: 94%; }
.skel-contract .skel.thin:nth-child(4) { width: 98%; }
.skel-contract .skel.thin:nth-child(5) { width: 72%; }
.skel-contract:nth-child(2) .skel:nth-child(1) { width: 34%; }
.skel.sign-shape { height: 120px; }
.skel-cell { display: grid; gap: 8px; }
.onb-id-missing { color: var(--ev-danger-ink); font-weight: 600; }
.filed-list > .card-head { justify-content: flex-start; margin-bottom: 16px; }
.filed-list .row > .who { flex: 1 1 240px; }
.filed-list .row > .main { flex-basis: 240px; }
.filed-list .actions { gap: 8px; }
.filed-list .caption { margin-top: 16px; }
.skel-cell .skel { width: 164px; }
.skel-cell .skel.thin { width: 140px; }
td > .skel { width: 108px; }
/* seven columns have to fit the page */
.t:has(th:nth-child(7)) td > .skel { width: 84px; }
.skel-text { margin: 0 0 12px; }
@keyframes skel { 50% { opacity: .55; } }
@media (prefers-reduced-motion: no-preference) { .skel { animation: skel 1.6s ease-in-out infinite; } }

/* A part of the page that could not be read: says it and tries again, in the place of that part. */
.load-error { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-radius: var(--ev-radius); background: var(--ev-danger-soft); color: var(--ev-danger-ink); font-size: 14px; font-weight: 600; }
.load-error > span { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.load-error svg { flex: none; }

/* Beside the button that was pressed. */
.saved { display: inline-flex; gap: 8px; align-items: center; margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ev-success-ink); }
.saved svg { flex: none; }

/* A question that stops the page: the browser's modal dialog; on the phone and in a narrow window, a sheet at the bottom with its buttons under each other. */
.dlg { width: min(480px, calc(100% - 48px)); max-width: none; padding: 32px; border: 0; border-radius: var(--ev-radius-lg); background: var(--ev-surface); color: var(--ev-text); box-shadow: var(--ev-shadow-md); }
.dlg::backdrop { background: var(--ev-scrim); }
.dlg h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.3; font-weight: 700; }
.dlg p { margin: 0; color: var(--ev-text-2); }
/* Without its script: above the page, not over the rest of it. */
.dlg[open]:not(:modal) { position: fixed; inset: 0; margin: auto; z-index: 60; }
.phone-main .dlg { width: 100%; margin: auto 0 0; padding: 24px 20px calc(24px + var(--m-safe-bottom, env(safe-area-inset-bottom, 0px))); border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; }
.phone-main .dlg .btn { width: 100%; }
@media (max-width: 640px) {
    .dlg { width: 100%; margin: auto 0 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; }
    .dlg .btn { width: 100%; }
}
/* On black a shadow says nothing: what floats gets a line. */
@media (prefers-color-scheme: dark) {
    .dlg, .idr-box { border: 1px solid var(--ev-border-strong); }
}
/* The page was emptied: the box, or the line alone, in the middle of the background at every width; the logo is in it, and nothing is darkened. */
.dlg.lone { width: min(440px, calc(100% - 32px)); margin: auto; padding: 32px; border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); text-align: center; }
.dlg.lone[open] { display: grid; justify-items: center; }
.dlg.lone::backdrop { background: transparent; }
.dlg.lone > .brand { margin-bottom: 24px; }
.dlg.lone h2 { text-wrap: balance; overflow-wrap: anywhere; }
.lone-actions { width: 100%; display: grid; gap: 12px; margin-top: 24px; }
.lone-actions .btn { width: 100%; }
.lone-page { display: grid; place-items: center; padding: 24px 16px; }
.lone-line { display: grid; gap: 24px; justify-items: center; text-align: center; font-weight: 600; }
.lone-line p { margin: 0; }

/* The connection, under the header, full width; the page stays readable. */
.conn { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; min-height: 56px; padding: 8px 24px; background: var(--ev-warning-soft); color: var(--ev-warning-ink); font-size: 14px; line-height: 1.4; font-weight: 600; }
.conn.bad { background: var(--ev-danger-soft); color: var(--ev-danger-ink); }
.conn > svg { flex: none; }
/* The icon stays beside the first words when they need two lines. */
.conn > span { max-width: calc(100% - 36px); }
.conn[hidden], .conn [hidden], .dlg [hidden] { display: none; }
/* Up to 640px, and in a question: the icon beside the words, the buttons under them. */
@media (max-width: 640px) {
    .conn { display: grid; grid-template-columns: auto minmax(0, 1fr); justify-items: start; gap: 8px 12px; padding: 12px 16px; }
    .conn > .btn, .conn > .saved { grid-column: 2; }
    .conn > .btn { width: auto; height: 44px; }
    .conn > span { max-width: 100%; }
}
.dlg > .conn { display: grid; grid-template-columns: auto minmax(0, 1fr); justify-items: start; gap: 8px 12px; margin: -32px -32px 24px; padding: 12px 32px; border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; }
.dlg > .conn > .btn, .dlg > .conn > .saved { grid-column: 2; width: auto; }
@media (max-width: 640px) { .dlg > .conn { margin: -24px -20px 20px; padding: 12px 20px; } }
/* What was typed and not saved: readable and selectable. */
.kept { display: grid; gap: 12px; max-height: 240px; margin: 16px 0 0; padding: 16px; overflow-y: auto; border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius); background: var(--ev-bg); user-select: text; }
.kept dt { font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.kept dd { margin: 0; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.kept dd.muted { color: var(--ev-muted); }
.dlg > .action-error { margin: 12px 0 0; }
@media (pointer: coarse) { .reconnect-keys { display: none; } }
/* The banner's copy refused: the text under it, at the page's width, at most 160 px, then it scrolls. On a phone's width no „cu Ctrl+C”. */
.reconnect-banner-kept { max-width: var(--ev-page-width); margin: 0 auto; padding: 0 var(--ev-page-gutter); }
.reconnect-banner-kept[hidden] { display: none; }
.reconnect-banner-kept > .kept { max-height: 160px; margin: 12px 0 0; }
@media (max-width: 640px) { .conn .reconnect-keys { display: none; } }

/* A button that reads like a link, in the colour of the text it stands in. */
.linkbtn { min-height: 44px; padding: 0; border: 0; background: transparent; font: 600 14px/1.4 var(--ev-font); color: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkbtn:disabled { opacity: .5; cursor: not-allowed; }
.action-error-body.with-action { display: grid; justify-items: start; }
.auth-after { margin-top: 12px; }
.auth-after .callout { margin-top: 0; }
.callout.auth-ended { margin: 0 0 20px; }

.callout { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--ev-radius); font-size: 14px; margin-top: 16px; background: var(--ev-surface-2); color: var(--ev-text-2); }
.callout.warn { background: var(--ev-warning-soft); color: var(--ev-warning-ink); }
.callout.ok { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.callout.bad { background: var(--ev-danger-soft); color: var(--ev-danger-ink); }
/* In a layout that already spaces its children. */
.page > .callout:first-child, .stack > .callout, .stack-s > .callout, .list > .callout { margin-top: 0; }
.callout .ico { flex: none; display: grid; align-content: start; margin-top: 1px; }
.callout ul { margin: 6px 0 0; padding-left: 18px; }
.callout li + li { margin-top: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 14px; color: var(--ev-text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.chip { font: inherit; font-size: 13px; font-weight: 650; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--ev-border-strong); background: var(--ev-surface); color: var(--ev-text-2); cursor: pointer; transition: all .15s ease; }
.chip.on { background: var(--ev-primary); border-color: var(--ev-primary); color: var(--ev-on-primary); }

.mode {
    text-align: left; font: inherit; color: inherit; cursor: pointer;
    padding: 22px; border-radius: var(--ev-radius); border: 1.5px solid var(--ev-border); background: var(--ev-surface);
    transition: all .15s ease;
}
.mode:hover { border-color: var(--ev-border-strong); }
.mode.on { border-color: var(--ev-primary); box-shadow: 0 0 0 4px var(--ev-primary-soft); }
.mode strong { display: block; font-size: 16px; margin-bottom: 6px; }
.mode span { color: var(--ev-muted); font-size: 14px; }
.mode .badge { margin-bottom: 10px; color: var(--ev-primary-ink); background: var(--ev-primary-soft); }

/* A list of documents */
.doc {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--ev-surface-2);
    animation: pop .4s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(4px); } to { opacity: 1; transform: none; } }
.doc .file { flex: none; width: 32px; height: 38px; border-radius: 7px; background: var(--ev-surface); border: 1px solid var(--ev-border); display: grid; place-items: center; color: var(--ev-primary); }
.doc strong { display: block; font-size: 14px; font-weight: 620; line-height: 1.3; }
.doc small { display: block; color: var(--ev-muted); font-size: 13px; margin-top: 2px; line-height: 1.35; }
.auth { display: grid; place-items: start center; padding: 64px 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 32px; }
.auth-card h1 { margin: 8px 0; font-size: 28px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.auth-card > .icon-tile { margin-bottom: 16px; }
.auth-card .auth-intro { margin: 0 0 24px; color: var(--ev-text-2); overflow-wrap: anywhere; }
/* What an invitation offers, above what the person has to do. */
.auth-offer { display: flex; gap: 14px; align-items: center; padding: 16px; margin-bottom: 24px; border-radius: var(--ev-radius); background: var(--ev-surface-2); }
.auth-offer > span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* A square with an icon: what a card is about. */
.icon-tile { width: 48px; height: 48px; flex: 0 0 auto; border-radius: var(--ev-radius); display: grid; place-items: center; background: var(--ev-surface-2); color: var(--ev-text); }
.icon-tile.hot { background: var(--ev-primary-soft); color: var(--ev-primary-ink); }
.icon-tile.ok { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.icon-tile.warn { background: var(--ev-warning-soft); color: var(--ev-warning-ink); }

/* A link inside a sentence; also a button that reads like one. */
.text-link { color: var(--ev-primary-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
button.text-link { padding: 0; border: 0; background: transparent; font-family: inherit; font-size: inherit; line-height: inherit; cursor: pointer; }
.text-link:hover { color: var(--ev-primary-ink); text-decoration-thickness: 2px; }
.text-link:disabled { opacity: .5; cursor: not-allowed; }
/* Underlined only: the text it stands in keeps its colour and weight. */
.text-link.quiet { font: inherit; color: inherit; }

/* „Contul meu”: the sections of the account, on the web and in the app. */
.account-email { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; min-height: 48px; }
.account-email strong, .account-address { overflow-wrap: anywhere; }
.account-pending { margin-top: 0; }
.account-pending > div { min-width: 0; overflow-wrap: anywhere; }
.account-pending p { margin: 4px 0 0; }
.account-pending-actions { margin-top: 16px; }
.account-form { gap: 20px; }
.account-pending-card { gap: 16px; }
.account-form-head p { margin: 0; }
.account-form-head .small { color: var(--ev-text-2); }
.account-form-head .required-legend, .account-sections > .required-legend { margin: 0; }
.account-label { font-weight: 600; }
.card > .name-note { margin: 16px 0 0; }
p.account-address, .account-sections .stack-s > .caption, .account-sections .stack-s > .saved { margin: 0; }
.phone-main .account-sections, .phone-main .notif-settings { gap: 20px; }
.phone-main .notif-settings > .stack { gap: 20px; }
.phone-main .account-sections .btn { width: 100%; padding: 0 12px; }
.phone-main .photo-picker > h2, .phone-main .photo-picker-head > p { margin: 0; }
.phone-main .page-head.m-account-head { margin-bottom: 20px; }
/* The tabs of the account stand closer to the title than a page's content does. */
.page-head:has(+ .account-tabs) { margin-bottom: 24px; }

/* A password with its show and hide button inside the field; a label with a link at the other end of its line. */
.password-field { position: relative; }
.password-field .input { padding-right: 52px; }
.password-toggle { position: absolute; right: 2px; top: 2px; color: var(--ev-muted); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* What to do next, numbered; a short list with an icon per line; names and their values. */
.next-steps { display: grid; gap: 12px; margin: 0 0 24px; padding: 0; list-style: none; counter-reset: next-step; }
.next-steps li { display: flex; gap: 12px; align-items: flex-start; counter-increment: next-step; }
.next-steps li::before { content: counter(next-step); flex: 0 0 auto; width: 24px; height: 24px; border-radius: var(--ev-pill); display: grid; place-items: center; background: var(--ev-surface-2); font-size: 13px; font-weight: 700; }
.point-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; }
.point-list li { display: flex; gap: 12px; align-items: flex-start; }
.point-list svg { flex: 0 0 auto; margin-top: 2px; color: var(--ev-primary-ink); }
.point-list .yes svg { color: var(--ev-success-ink); }
.point-list .no svg { color: var(--ev-muted); }
.detail-list { display: grid; margin: 0; }
.detail-list > div { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 14px 0; }
.detail-list > div + div { border-top: 1px solid var(--ev-border); }
.detail-list dt { flex: 0 0 160px; font-size: 14px; line-height: 1.5; color: var(--ev-muted); }
.detail-list dd { margin: 0; flex: 1 1 220px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }

/* Contract document (ContractDocument.razor): a card with a header bar over the text, which scrolls inside it. */
.contract-doc { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); overflow: hidden; background: var(--ev-surface); box-shadow: var(--ev-shadow-sm); }
.contract-doc-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--ev-border); font-size: 14px; }
.contract-doc-name { display: flex; gap: 10px; align-items: center; min-width: 0; }
.contract-doc-name svg { flex: none; }
.contract-doc-viewer { max-height: 640px; overflow: auto; overscroll-behavior: contain; }
.contract-doc-viewer:focus { outline: none; }
.contract-doc-viewer:focus-visible { box-shadow: inset 0 0 0 2px var(--ev-primary); }
.contract-sheet { padding: 32px 40px; font-size: 16px; line-height: 1.6; overflow-wrap: break-word; }
.contract-sheet .c-title { margin: 0; text-align: center; font-size: 20px; line-height: 1.3; font-weight: 700; }
.contract-sheet .c-center { margin: 0; text-align: center; }
.contract-sheet .c-heading { margin: 24px 0 8px; font-size: 16px; font-weight: 700; break-after: avoid; }
.contract-sheet .c-text, .contract-sheet .c-clause { margin: 8px 0 0; }
.contract-sheet .c-list { margin: 8px 0; padding-left: 20px; }
.contract-sheet .c-closing { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--ev-border); color: var(--ev-text-2); }
@media (max-width: 640px) {
    .contract-doc-bar { padding: 16px; }
    .contract-sheet { padding: 24px 16px; }
}

/* The signature stays dark ink on a light pad in both themes: it goes on the printed contract. */
.pad-wrap { position: relative; }
.pad { display: block; width: 100%; height: 176px; border: 1.5px dashed var(--ev-border-strong); border-radius: var(--ev-radius); background: #fafaf8; touch-action: none; cursor: crosshair; }
.pad-wrap.bad .pad:not([data-drawn]) { border-color: var(--ev-danger); }
.pad-hint { position: absolute; inset: 0; display: grid; place-items: center; padding: 0 20px; text-align: center; font-size: 14px; color: #3a3a37; pointer-events: none; }
.pad[data-drawn] + .pad-hint { visibility: hidden; }

/* Loading screen (LoadingScreen.razor, and the static copies in the host pages shown before Blazor starts).
   Fills the content area under the web header; the mobile host sets its own height in mobile.css. */
.loading-screen { min-height: calc(100vh - var(--ev-header-height) - 200px); display: grid; place-items: center; align-content: center; gap: 14px; padding: 32px 16px; text-align: center; }
.loading-mark { display: block; animation: loading-pulse 1.6s ease-in-out infinite; }
.loading-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--ev-surface-3); border-top-color: var(--ev-primary); animation: loading-spin .8s linear infinite; }
.loading-text { margin: 0; color: var(--ev-muted); font-size: 14px; font-weight: 600; }
@keyframes loading-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .72; transform: scale(.94); } }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .loading-mark { animation: none; }
    .loading-spinner { display: none; }
}

/* Identity document upload (person cards) */
.id-upload { min-width: 0; margin-bottom: 4px; }
.id-upload-head > strong { font-size: 14px; }
.id-upload .id-type-notes { margin: 12px 0; }
.id-upload-intro { margin: 4px 0 12px; font-size: 14px; line-height: 1.5; color: var(--ev-text-2); }
.id-upload .id-back-note { margin: 8px 0 0; }
.id-slot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 12px 0; }
.id-slot.file-row { margin-top: 12px; padding: 12px 16px; }
.id-slot + .id-slot.file-row { margin-top: 8px; }
.id-slot-label { font-size: 14px; font-weight: 600; }
.caption .id-slot-label { font-size: 13px; font-weight: 400; }
.id-slot-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.id-slot-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.id-slot .btn { position: relative; cursor: pointer; }
.id-slot label.btn:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
/* Identity card reading: the "din act" marks. */
label .reading-mark { margin-left: 6px; vertical-align: middle; }
.id-first { margin-top: 16px; }
.id-first .text-link { min-height: 44px; font: 700 14px/1.4 var(--ev-font); text-align: left; }

.id-type-question { display: grid; gap: 16px; }
.id-type-question > .card-title { margin: 0; }
.id-type-back { justify-self: start; display: inline-flex; gap: 6px; align-items: center; min-height: 44px; }
.card-sketch { width: 100%; height: auto; display: block; }
.card-sketch-body { fill: var(--ev-surface-2); stroke: var(--ev-border-strong); stroke-width: 1; }
.card-sketch-photo { fill: var(--ev-surface-3); stroke: var(--ev-border-strong); stroke-width: .6; }
.card-sketch-line { fill: var(--ev-border-strong); }
.card-sketch-band { fill: var(--ev-surface-3); }
.card-sketch-mrz { fill: none; stroke: var(--ev-muted); stroke-width: .5; stroke-linecap: round; stroke-linejoin: round; }
.card-sketch-chip { fill: var(--ev-primary-soft); stroke: var(--ev-primary); stroke-width: .6; }


.id-upload > .id-primary { width: 100%; margin-top: 12px; }
.id-slot-note { flex: 1 1 100%; font-size: 14px; color: var(--ev-text-2); }
.id-slot > .confirm-line { flex: 1 0 100%; }
.id-kind-mismatch { margin-top: 12px; align-items: flex-start; }
.id-kind-mismatch > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.id-upload > .field-status, .id-upload > .hint { margin-top: 10px; }
.id-upload > .hint { font-size: 14px; color: var(--ev-text-2); }
/* Long button labels ("Folosește datele din act", "Nu am actul de identitate la îndemână, completez manual") wrap on a phone instead of widening the page. */
.id-upload .btn, .id-first .btn { white-space: normal; }
.id-upload label.btn { position: relative; cursor: pointer; }
.id-upload label.btn:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }

/* File-first upload (the web): a drop zone on a desktop, two buttons and a photo sheet on a phone. */
.id-drop-wrap { margin-top: 12px; }
.id-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 20px; text-align: center; cursor: pointer;
    color: var(--ev-text); font-size: 14px; background: var(--ev-bg); border: 1.5px dashed var(--ev-border-strong); border-radius: var(--ev-radius);
    transition: border-color .15s ease, background .15s ease;
}
.id-drop:hover, .id-drop[data-dragover] { border-color: var(--ev-primary); background: var(--ev-primary-soft); }
.id-drop:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.id-drop-title { font-size: 16px; color: var(--ev-text); }
.dropzone { display: grid; justify-items: center; gap: 6px; padding: 28px 20px; border: 1.5px dashed var(--ev-border-strong); border-radius: var(--ev-radius); background: var(--ev-bg); text-align: center; font-size: 14px; color: var(--ev-text-2); }
.dropzone strong { font-size: 16px; color: var(--ev-text); }
.id-drop-or { font-size: 14px; color: var(--ev-text-2); }
.id-drop-button { pointer-events: none; }
.id-drop-formats { font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.id-drop-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.id-tips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; font-size: 14px; color: var(--ev-text-2); }
.id-tips li { display: inline-flex; align-items: center; gap: 6px; }
.id-tips li .ico, .id-tips li svg { color: var(--ev-success); }
/* A phone: a photo or a file, side by side. */
.id-upload .id-start { margin-top: 12px; }
.id-start-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.id-start-buttons.single { grid-template-columns: 1fr; }
.id-start-buttons > .btn { width: 100%; padding: 0 8px; }

.id-missing { margin-top: 12px; align-items: flex-start; }
.id-missing > div { display: flex; flex-direction: column; gap: 8px; }
.id-missing-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.id-sheet-layer { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.id-sheet-backdrop { position: absolute; inset: 0; background: var(--ev-scrim); }
.id-sheet {
    position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom)); background: var(--ev-surface); color: var(--ev-text);
    border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; box-shadow: var(--ev-shadow-lg); animation: pop .18s ease-out;
}
.id-sheet-title { font-size: 16px; }
.id-sheet-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.id-sheet-text { margin: 0; font-weight: 600; font-size: 14px; }
.id-sheet .id-tips { margin-top: 0; flex-direction: column; }
.id-sheet-open { width: 100%; min-height: 48px; }
.id-sheet-cancel { width: 100%; }
@media (prefers-reduced-motion: reduce) {
    .id-sheet { animation: none; }
}

.id-sheet-card { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.id-sheet-card figcaption { text-align: center; font-size: 14px; font-weight: 650; color: var(--ev-text-2); }


@media (max-width: 600px) {
    .id-type-switch { display: flex; width: 100%; }
    .id-type-switch button { flex: 1 1 0; }
    .id-slot-body { width: 100%; }
    .id-slot-body .id-primary { flex: 1 1 100%; }
}

/* "Ce ai de făcut" (ClientTasks): what is left, what is done, one card per document, and the other documents. */
.client-tasks { display: grid; gap: 24px; }
.tasks-progress { margin: 0; }
.task-group { margin: 0; }
.task-list + .task-group { margin-top: 8px; }
.task-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; }
.task-chip { flex: none; }
.task-signer { margin: 4px 0 16px; }
.task-file-name { overflow-wrap: anywhere; }
.task-own, .tasks-title-deed { margin: 0; }
.task-own { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
p.task-own { display: block; }
.client-tasks > .callout, .tasks-lawyer { margin-top: 0; }
.other-docs > .required-legend { margin-bottom: 16px; }
.other-docs > .att-picker { margin-top: 16px; }
.other-docs > .empty { margin-top: 20px; padding: 24px; }
.other-docs > .empty p { font-size: 14px; }
.other-list { margin-top: 20px; }
.other-list .other-more { flex: 1 0 100%; min-width: 0; }
.other-list .other-more:empty { display: none; }
.att-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.att-pick .btn { position: relative; cursor: pointer; }
.att-pick label.btn:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
/* The dossier list: "Ce ai de făcut" with the number of documents still waiting on the client. */
/* The count beside the tasks (Batch 14): the „hot” badge's colours, 6.4:1 light and 8.9:1 dark; --ev-primary itself is unchanged. */
.tasks-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px; border-radius: 99px; background: var(--ev-primary-soft); color: var(--ev-primary-ink); font-size: 12px; font-weight: 700; line-height: 1; }
@media (max-width: 600px) {
    .att-pick .btn { flex: 1 1 100%; }
}

/* ---------- Company registration: the start, the wizard, signing, the tasks, after the registration ---------- */

p.caption { margin: 0; }
.upper { text-transform: uppercase; }
.upper::placeholder { text-transform: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.divider { margin: 24px 0; border: 0; border-top: 1px solid var(--ev-border); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.card-head > h2, .card-head > h3, .card-head .who h2 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 700; }
.card-head + .card-sub { margin: 4px 0 16px; }
.card-head > .badge { white-space: normal; }
:is(.card, .card-head) .who { display: flex; gap: 12px; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.who .caption { display: block; }
.callout-title { display: block; margin-bottom: 4px; font-size: 16px; }
.callout-actions { margin-top: 12px; }
.callout ul.plain { margin: 0; padding: 0; list-style: none; }
.field-status.warn { color: var(--ev-warning-ink); }
.bullets { display: grid; gap: 8px; margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.5; color: var(--ev-text-2); }
.card > h2 + .bullets { margin-top: 12px; }
.card > .bullets + .caption { margin-top: 16px; }
.kv { display: grid; gap: 12px; margin: 0; }
.kv dt { font-size: 13px; color: var(--ev-muted); }
.kv dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.kv.two { grid-template-columns: 148px minmax(0, 1fr); gap: 8px 16px; }
.kv.two dt { font-size: 14px; overflow-wrap: anywhere; }
.kv.two dd { font-weight: 400; }
.card-head + .kv { margin-top: 16px; }
.progress + .kv { margin-top: 20px; }
.progress + .caption, .kv + .caption { margin-top: 16px; }
.tick { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 10px 0; font-size: 14px; line-height: 1.5; cursor: pointer; }
.tick input { flex: 0 0 auto; width: 20px; height: 20px; margin: 0; accent-color: var(--ev-ink); cursor: pointer; }
.file-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); background: var(--ev-bg); }
.file-name { display: flex; gap: 10px; align-items: center; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.file-name > svg { flex: none; }
.file-name > span { display: grid; min-width: 0; }
.file-name .caption { font-weight: 400; }
.doc-lines { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.doc-lines > li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.doc-lines > li > svg { flex: none; margin-top: 1px; color: var(--ev-muted); }
.doc-lines strong, .doc-lines .caption { display: block; }
.doc-lines .btn { margin-top: 8px; }
.doc-lines + .caption { margin-top: 16px; }
.card > h2 + .doc-lines { margin-top: 12px; gap: 16px; }
.doc-lines.detailed { gap: 0; }
.doc-lines.detailed > li { gap: 12px; padding: 12px 0; line-height: 1.55; }
.doc-lines.detailed > li + li { border-top: 1px solid var(--ev-border); }
.doc-lines + .divider { margin: 16px 0; }

.timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.timeline > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 20px; font-size: 14px; line-height: 1.45; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: var(--ev-border); }
.timeline > li:last-child::before { display: none; }
.timeline .n { width: 28px; height: 28px; border-radius: var(--ev-pill); display: grid; place-items: center; background: var(--ev-surface-3); font-size: 13px; font-weight: 600; }
.timeline .done .n { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.timeline .now .n { background: var(--ev-ink); color: var(--ev-on-ink); }
.timeline strong, .timeline .caption { display: block; }
.card > h2 + .timeline, .card > h2 + .who { margin-top: 16px; }
.timeline + .caption { margin-top: 16px; }

.option-cards { display: grid; gap: 12px; }
.option-cards.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card > h2 + .option-cards { margin-top: 16px; }
.option-cards + .callout { margin-top: 20px; }
.option-cards + .caption { margin-top: 12px; }
.option-card { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 4px 12px; align-content: start; padding: 16px; border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius); background: var(--ev-surface); font-size: 14px; line-height: 1.5; color: var(--ev-text-2); cursor: pointer; }
.option-card input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ev-ink); cursor: pointer; }
.option-card strong { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 16px; line-height: 1.5; color: var(--ev-text); }
.option-card > span, .option-card > ul { grid-column: 2; }
.option-card:has(input:checked) { border-color: var(--ev-ink); box-shadow: inset 0 0 0 1px var(--ev-ink); }
.option-card:has(input:focus-visible) { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.option-card.large { padding: 20px; }
.option-card.large strong { font-size: 20px; line-height: 1.2; }
.option-card.large > span { margin: 4px 0 12px; }

.question { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 16px 0; border-top: 1px solid var(--ev-border); }
.card > h2 + .question { margin-top: 8px; border-top: 0; }
.question .text { flex: 1 1 220px; display: grid; gap: 2px; font-size: 14px; line-height: 1.5; color: var(--ev-text-2); }
.question .text strong { font-size: 16px; color: var(--ev-text); }
.option-cards + .question { margin-top: 16px; }
.card > .question + h3.subhead { margin-top: 8px; }

.start-paths { align-items: stretch; }
.start-path { display: flex; flex-direction: column; padding: 32px; }
.start-path-icon { width: 48px; height: 48px; margin-bottom: 20px; }
.start-path-text { margin: 4px 0 24px; color: var(--ev-text-2); }
.start-path .timeline { margin: 0 0 28px; }
.start-path-go { display: grid; gap: 12px; justify-items: start; margin-top: auto; }
.start-help { margin-top: 24px; }

/* The end of a step: the way back on the left, the way on on the right. */
.step-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }
.wizard-form > .callout, .wizard-form > .wizard-lock > .callout { margin-top: 0; }
.awaiting-lawyer > .caption { margin: 8px 0 0; }
/* After the registration: the company's accountant, or where the request to one stands. */
.after-accountant > .small { margin: 0 0 16px; }
.after-accountant > .who:has(+ .btn) { margin-bottom: 16px; }
.after-accountant > .load-error { margin-top: 12px; }
/* Holds a step still (the dossier was changed elsewhere) without a box of its own. */
.wizard-lock { display: contents; }
.wizard-lock:disabled :is(.input, .textarea, .select, select, textarea) { background: var(--ev-surface-2); color: var(--ev-text-2); opacity: 1; }
.wizard-lock:disabled .iconbtn { opacity: .4; cursor: default; }
.save-note { display: flex; gap: 8px; align-items: center; }
.save-note svg { flex: none; }
.save-note.waiting { color: var(--ev-warning-ink); font-weight: 600; }
.save-note.bad { color: var(--ev-danger-ink); font-weight: 600; }
.save-problem .action-error-body { display: grid; gap: 4px; flex: 1 1 auto; }
.save-problem-text { font-weight: 400; }
.save-problem-actions { margin-top: 8px; }
.save-problem-actions .btn { width: auto; min-height: 44px; }
.save-problem:focus { outline: none; }
.save-problem:focus-visible { outline: 2px solid var(--ev-danger-ink); outline-offset: 2px; }
.step-action-errors > .action-error + .action-error { margin-top: 12px; }
.left-behind { display: grid; gap: 12px; }
.left-behind dl { display: grid; gap: 8px; margin: 0; }
.left-behind dl > div { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; }
.left-behind dt { flex: 0 0 120px; }
.left-behind dd { flex: 1 1 140px; min-width: 0; margin: 0; color: var(--ev-text); font-weight: 600; overflow-wrap: anywhere; }
.left-behind dd .caption { display: block; font-weight: 400; }
.left-behind dd.not-kept { font-weight: 400; }
:is(.wizard, .client-tasks) .card-sub { margin-bottom: 16px; }
.card .card-sub:has(+ .progress) { margin-bottom: 12px; }
.wizard-form > .required-legend { margin: 0; }
.card > h2 + .form-grid, .card > h2 + .field { margin-top: 20px; }
.apartment-fields { margin-top: 20px; }
.name-fields { display: grid; gap: 20px; }
.name-fields + .callout { margin-top: 24px; }
.card > h3.subhead { margin: 28px 0 16px; font-size: 16px; line-height: 1.4; }
.person-tools { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.tick.director { align-items: center; padding: 0; font-weight: 600; }
.person-card > .field-status.bad { margin-top: 8px; }
.add-tile { width: 100%; border-style: dashed; }
.wizard-form .add-note, .phone-screen .add-note { margin-top: 8px; }
.spouse-form { margin-bottom: 24px; }
.share-rows { margin-top: 20px; }
.share-row { padding: 20px 0; border-top: 1px solid var(--ev-border); }
.share-row .card-head { margin-bottom: 12px; }
.share-colour { flex: none; width: 12px; height: 12px; border-radius: 4px; }
.capital-total { padding-top: 20px; border-top: 1px solid var(--ev-border); }
.capital-total .amount { font-size: 20px; font-weight: 700; }
.share-bar { display: flex; gap: 2px; height: 12px; margin-top: 16px; border-radius: var(--ev-pill); overflow: hidden; background: var(--ev-surface-3); }
.share-bar span { display: block; height: 100%; transition: width .4s ease; }
.share-bar + .field-status { margin-top: 12px; }
.office-use { padding: 0 0 20px; }
.office-use .field-status { margin-top: 8px; }
.office-guidance { display: grid; gap: 16px; margin-top: 12px; }
.office-guidance-item + .office-guidance-item { padding-top: 16px; border-top: 1px solid var(--ev-border); }
.office-guidance h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.activity-add { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 20px; align-items: start; }
.activity-add + .form-actions { margin-top: 16px; }
.activity.main-activity { border-color: var(--ev-ink); }
.activity .main { flex-basis: 200px; }
.activity .actions { flex: 1 1 100%; gap: 4px 16px; }
.activity .tick { align-items: center; padding: 0; }
.activity .iconbtn { margin-left: auto; }
.vat-turnover { margin: 20px 0 8px; }
.review-missing > div { flex: 1 1 auto; min-width: 0; }
.review-missing .callout-title { margin-bottom: 12px; }
.callout .review-missing-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.callout .review-missing-list li + li { margin-top: 0; }
.review-missing-list > li > span { flex: 1 1 240px; }
.review-wrong { color: var(--ev-warning-ink); }

.signature-list { display: flex; flex-wrap: wrap; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.signature-list > li { flex: 1 1 220px; min-width: 0; padding: 16px; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); background: var(--ev-bg); }
.signature-list img { display: block; max-width: 100%; height: 84px; object-fit: contain; object-position: left center; border-radius: var(--ev-radius-sm); background: #fafaf8; }
.signature-list strong { display: block; font-size: 14px; }

@media (max-width: 1040px) { .stepper { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
@media (max-width: 640px) {
    .option-cards.two, .kv.two { grid-template-columns: minmax(0, 1fr); }
    .form-grid.cols-4.apartment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .step-actions > .btn { flex: 1 1 0; }
    .step-actions > span:empty { display: none; }
}

/* ---------- Pages of the client: row icons, choices, facts, timeline, file rows, drop zone ---------- */

.row-icon { flex: 0 0 auto; width: 44px; height: 44px; border-radius: var(--ev-radius); display: grid; place-items: center; background: var(--ev-surface-2); color: var(--ev-text); }
.row-icon.hot { background: var(--ev-primary-soft); color: var(--ev-primary-ink); }
.stack-l { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; min-width: 0; }
.btn.btn-block { width: 100%; }
.split > * { min-width: 0; }
:where(.card) > p.small { margin: 0; }
.text-2 { color: var(--ev-text-2); }
/* A list inside a card: an icon, then what it says. */
.icon-list { display: grid; gap: 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.icon-list > li { display: flex; gap: 12px; }
.icon-list > li > svg { flex: none; margin-top: 2px; }
.icon-list.ticks { gap: 12px; }
.icon-list.ticks > li { gap: 10px; }
.icon-list.ticks > li > svg { color: var(--ev-success-ink); }
.icon-list .text { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
/* What is known about something, label over value (the ANAF card, the roles card). */
.fact-list.stacked { grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 20px 0 0; }
.fact-list.stacked > div { display: grid; gap: 2px; min-width: 0; }
.fact-list.stacked dt { font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.fact-list.stacked dd { margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; overflow-wrap: anywhere; }
.fact-list.stacked dd.none { font-weight: 400; color: var(--ev-muted); }
.fact-list.big { gap: 16px; margin-top: 16px; }
.fact-list.big dt { font-size: 16px; line-height: 1.55; font-weight: 600; color: var(--ev-text); }
.fact-list.big dd { font-weight: 400; color: var(--ev-text-2); }
.card-foot { display: flex; gap: 8px; align-items: center; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--ev-border); font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.card-foot svg { flex: none; }
.inline-link { padding: 0; border: 0; background: transparent; color: var(--ev-text); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* One choice of a question: a radio with a title and a line. */
.choices { display: grid; gap: 12px; }
.choices.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices.fit { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.choice-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-field + .choice-field { margin-top: 24px; }
.choice-field > legend { margin-bottom: 8px; padding: 0; font-size: 14px; line-height: 1.4; font-weight: 600; }
.choice-field > .caption { margin: 8px 0 0; }
.option { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius); cursor: pointer; }
.option.on { padding: 15px; border: 2px solid var(--ev-ink); }
.option:focus-within { box-shadow: var(--ev-ring); }
.option > input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ev-ink); }
.option > span { display: grid; gap: 2px; min-width: 0; }
.tick-line { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; margin-top: 24px; cursor: pointer; }
.tick-line > input { flex: 0 0 auto; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ev-ink); }
/* Where something has got to, step by step. */
.card > .status-steps-title { margin: 24px 0 14px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.status-steps { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.status-steps > li { display: flex; gap: 14px; align-items: flex-start; }
.status-steps .mark { flex: 0 0 auto; width: 32px; height: 32px; border-radius: var(--ev-pill); display: grid; place-items: center; background: var(--ev-surface-2); color: var(--ev-muted); }
.status-steps .done .mark { background: var(--ev-success-soft); color: var(--ev-success-ink); }
.status-steps .now .mark { background: var(--ev-warning-soft); color: var(--ev-warning-ink); }
.status-steps .bad .mark { background: var(--ev-danger-soft); color: var(--ev-danger-ink); }
.status-steps .text { display: grid; gap: 2px; min-width: 0; }
/* Rows: what stands under the first line takes the whole width. */
.row > .row-wide, .row > .action-error { flex: 1 0 100%; min-width: 0; }
.row > .action-error { margin-top: 0; }
.row > .confirm-line { flex: 1 0 100%; }
.confirm-line { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 12px 12px 16px; border-radius: var(--ev-radius); background: var(--ev-surface-2); font-size: 14px; }
.confirm-line > strong { line-height: 1.5; }
.confirm-line > .choice-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-line > .action-error { flex: 1 0 100%; margin-top: 0; }
.file-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.file-rows > li { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding: 8px 8px 8px 12px; border-radius: var(--ev-radius-sm); background: var(--ev-surface-2); }
.file-rows > li > svg { flex: none; }
.file-rows .name { display: grid; flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.file-rows .name strong { font-size: 14px; line-height: 1.5; font-weight: 600; }
.file-rows > li > .action-error, .file-rows > li > .confirm-line { flex: 1 0 100%; margin-top: 0; }
.done-line { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ev-success-ink); }
.done-line svg { flex: none; }
/* Files: a zone that takes a drop or a click on a desktop, two buttons on a phone. */
.file-drop { min-width: 0; }
.file-drop .dropzone { position: relative; cursor: pointer; }
.file-drop .dropzone:hover, .file-drop .dropzone[data-dragover] { border-color: var(--ev-primary); background: var(--ev-primary-soft); }
.file-drop .dropzone:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
.file-drop .dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.file-drop-buttons .btn { flex: 1 1 200px; }
.file-drop > .caption { display: block; margin-top: 8px; }
.file-button { position: relative; overflow: hidden; }
.file-button > input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-button:focus-within { outline: 2px solid var(--ev-primary); outline-offset: 2px; }
/* A link drawn as a tile: where it leads, and what for. */
.link-tile { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius); color: var(--ev-text); }
.link-tile:hover { border-color: var(--ev-muted); color: var(--ev-text); }
.link-tile > svg { flex: none; }
.link-tile > .text { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; }

/* ---------- Notifications ---------- */
/* The bell, its panel, the full list, the toasts, the settings and the phone's permission card. Tokens only: every colour,
   font, radius and shadow comes from tokens.css, so both themes follow (NotificationStylesTests checks this section). */

.notif-bell { position: relative; display: inline-flex; }
.notif-bell-button {
    position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ev-text);
    cursor: pointer; transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.notif-bell-button:hover, .notif-bell-button.open { background: var(--ev-surface-2); color: var(--ev-text); }
.notif-bell-button:focus-visible { outline: none; box-shadow: var(--ev-ring); }
.notif-badge {
    position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
    display: grid; place-items: center; border-radius: var(--ev-pill);
    background: var(--ev-ink); color: var(--ev-on-ink);
    font-size: 12px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
    animation: pop .25s cubic-bezier(.2, .8, .2, 1);
}

/* Above the sticky header (z-index 50), so a tap anywhere outside the panel closes it. */
.notif-backdrop { position: fixed; inset: 0; z-index: 60; }
.notif-panel {
    position: absolute; top: calc(100% + 10px); right: -8px; z-index: 61;
    width: 392px; max-height: min(580px, calc(100vh - var(--ev-header-height) - 32px));
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg);
    box-shadow: var(--ev-shadow-lg); animation: notif-drop .22s cubic-bezier(.2, .8, .2, 1); transform-origin: top right;
}
/* Rendered at the layout root (outside the header): pinned under the header, aligned with the container's right edge. */
.notif-panel.floating { position: fixed; top: calc(var(--ev-header-height) + 8px); right: max(16px, calc((100vw - var(--ev-page-width)) / 2 + var(--ev-page-gutter))); }
.notif-panel:focus { outline: none; }
.notif-panel:focus-visible { box-shadow: var(--ev-shadow-lg), var(--ev-ring); }
.notif-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 10px 18px; }
.notif-panel-title { font-family: var(--ev-font-display); font-size: 16px; font-weight: 720; letter-spacing: -.01em; }
.notif-panel > .action-error { margin: 0 14px 10px; }
.notif-panel-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; display: grid; gap: 2px; align-content: start; }
.notif-panel-loading { padding: 16px; }
.notif-panel-all {
    display: flex; align-items: center; justify-content: center; gap: 6px; padding: 13px 16px;
    border-top: 1px solid var(--ev-border); background: var(--ev-surface-2);
    color: var(--ev-text); font-weight: 620; font-size: 14px;
}
.notif-panel-all:hover { color: var(--ev-primary); }
.notif-panel-all .arrow { transition: transform .2s ease; }
.notif-panel-all:hover .arrow { transform: translateX(3px); }

.notif-item {
    position: relative; width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: start;
    padding: 12px; border: 0; border-radius: var(--ev-radius); background: transparent;
    font: inherit; color: var(--ev-text); text-align: left; cursor: pointer; transition: background .15s ease;
}
.notif-item:hover { background: var(--ev-surface-2); }
.notif-item:focus-visible { outline: none; box-shadow: var(--ev-ring); }
.notif-item.unread { background: color-mix(in srgb, var(--ev-primary-soft) 55%, transparent); }
.notif-item.unread:hover { background: var(--ev-primary-soft); }
.notif-item-icon {
    flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--ev-radius-sm);
    background: var(--ev-surface-2); color: var(--ev-text-2);
}
[data-area="Messages"] .notif-item-icon { background: var(--ev-primary-soft); color: var(--ev-primary); }
[data-area="MonthlyFolder"] .notif-item-icon { background: var(--ev-warning-soft); color: var(--ev-warning); }
[data-area="Onboarding"] .notif-item-icon { background: color-mix(in srgb, var(--ev-accent) 16%, transparent); color: var(--ev-accent); }
[data-area="EFactura"] .notif-item-icon { background: var(--ev-surface-3); color: var(--ev-text); }
.notif-item-body { min-width: 0; display: grid; gap: 3px; }
.notif-item-title { font-size: 14px; font-weight: 540; color: var(--ev-text-2); line-height: 1.3; }
.notif-item.unread .notif-item-title { font-weight: 720; color: var(--ev-text); }
.notif-item-text {
    font-size: 14px; color: var(--ev-muted); line-height: 1.4; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.notif-item-time { font-size: 12px; font-weight: 600; color: var(--ev-muted); }
.notif-item.unread .notif-item-time { color: var(--ev-primary); }
.notif-dot {
    width: 9px; height: 9px; margin-top: 6px; border-radius: 50%;
    background: var(--ev-primary); box-shadow: 0 0 0 4px var(--ev-primary-soft);
}

.notif-empty { display: grid; justify-items: center; gap: 10px; padding: 40px 16px; color: var(--ev-muted); font-size: 14px; text-align: center; }
.notif-empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--ev-surface-2); color: var(--ev-muted); }

/* The full page. */
.notif-list > .page-head + .action-error { margin: 0 0 24px; }
.notif-list > .empty { gap: 12px; padding: 48px 32px; }
.notif-list-more { display: grid; justify-items: start; }
.notif-row { flex-wrap: nowrap; justify-content: flex-start; gap: 16px; align-items: flex-start; }
.notif-row:hover { border-color: var(--ev-border-strong); color: var(--ev-text); }
.notif-row-body { display: grid; gap: 2px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.notif-row-title { font-size: 16px; }
.notif-row.unread .notif-row-title { font-weight: 700; }
.notif-row-badge { flex: 0 0 auto; }

/* Short notices: under the header, beside whatever chat is open (toasts.js says where), never over it and under any dialog. */
.toasts {
    position: fixed; z-index: 29; top: var(--toast-top, 88px); left: var(--toast-left, auto); right: var(--toast-right, 24px);
    width: var(--toast-width, 380px); max-width: calc(100vw - 32px); display: grid; gap: 8px; pointer-events: none;
}
.toasts[data-phone] { z-index: 46; top: var(--toast-top, 72px); left: var(--toast-left, 16px); right: var(--toast-right, 16px); width: auto; }
/* In the app over the floating button the person put at the top (for its 6 s); over the oldest messages of a conversation that fills the screen. */
.toasts[data-over] { z-index: 61; }
.toasts[data-none] { display: none; }
.toast {
    position: relative; display: flex; align-items: flex-start; overflow: hidden; pointer-events: auto;
    background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius);
    box-shadow: var(--ev-shadow-md); color: var(--ev-text); animation: toast-in .3s cubic-bezier(.2, .8, .2, 1);
}
.toast::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ev-primary); }
.toast-open {
    flex: 1 1 0; min-width: 0; min-height: 64px; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; align-items: start;
    padding: 12px 4px 12px 16px; border: 0; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.toast-open:focus-visible { outline: none; box-shadow: var(--ev-ring); }
.toast-body { min-width: 0; display: grid; }
.toast-body > strong { font-size: 14px; line-height: 1.4; font-weight: 600; }
.toast-body > span {
    font-size: 14px; color: var(--ev-muted); line-height: 1.4; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.toast > .iconbtn { flex: none; width: 44px; height: 44px; }

/* Settings: a card per area, a row per kind; the three channels stand beside the text and go under it on a phone. */
.notif-settings > .stack { min-width: 0; }
.notif-card { padding-bottom: 8px; }
.notif-card > h2 { display: flex; gap: 10px; align-items: center; margin: 0 0 16px; }
.notif-card > h2 svg { flex: none; }
.notif-card > ul { margin: 0; padding: 0; list-style: none; }
.notif-pref-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 16px 0; border-top: 1px solid var(--ev-border); }
.notif-pref-single { gap: 8px 16px; }
.notif-pref-text { flex: 1 1 320px; min-width: 0; display: grid; gap: 4px; }
.notif-pref-single .notif-pref-text { flex: 1 1 0; }
.notif-pref-title { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; }
.notif-saved { display: inline-flex; gap: 4px; align-items: center; color: var(--ev-success-ink); }
.notif-saved:empty { position: absolute; }
.notif-channels { flex: 0 1 276px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.notif-channel { display: grid; justify-items: start; align-content: start; }
.notif-always, .notif-unavailable { min-height: 44px; display: flex; align-items: center; }
.notif-always { font-weight: 600; }
.notif-pref-row > .action-error { flex: 1 0 100%; margin: 0; }
.notif-push-ask { display: grid; gap: 12px; }
.notif-push-ask strong, .notif-push-none strong { color: var(--ev-text); }
.notif-push-ask .action-error { margin-top: 0; }
.notif-push-off .btn { padding: 0 12px; }
.notif-push-off .btn-sm { padding: 0 16px; }
.notif-push-off-action { margin-top: 8px; }
/* The lawyer's „Cum ajung la tine” (PhoneLawyerNotificationSettings) and its lock-screen choice. */
.notif-how { gap: 12px; }
.notif-how > h2, .notif-how > p { margin: 0; }
.notif-lawyer .notif-card > h2 { margin-bottom: 8px; }
/* The app's tick (Batch 18 rule 2): a 20 px box in a 44 px row, the label 14/600, the hint indented to the label. */
.notif-lock { display: grid; gap: 2px; }
.notif-lock-row { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; }
.notif-lock .tick { align-items: center; padding: 0; font-size: 14px; font-weight: 600; line-height: 1.5; }
.notif-lock-hint { padding-left: 32px; }
.notif-lock > .action-error { margin: 6px 0 0; }
/* The web's „Pe telefon” card, in the main column (LawyerNotificationSettings). */
.notif-phone { gap: 8px; }
.notif-phone > h2 { display: flex; gap: 10px; align-items: center; margin: 0 0 8px; }
.notif-phone > h2 svg { flex: none; }
.notif-phone-email { margin: 0; overflow-wrap: anywhere; }
.notif-phone-email .text-link { display: inline-flex; align-items: center; min-height: 44px; }
.phone-main #notif-mail-title { margin-bottom: 16px; }
.phone-main .empty-actions { width: 100%; }
.notif-mail-text { margin: 0; color: var(--ev-text-2); overflow-wrap: anywhere; }

/* The phone's permission card. */
.notif-permission-actions { display: grid; gap: 8px; }

@keyframes notif-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
    .notif-panel, .notif-panel.floating {
        position: fixed; top: calc(var(--ev-header-height) + 8px); left: 12px; right: 12px; width: auto;
        max-height: calc(100dvh - var(--ev-header-height) - 24px); transform-origin: top center;
    }
    .notif-permission { flex-direction: column; padding: 18px; }
    .notif-permission-actions .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .notif-badge, .notif-panel, .toast { animation: none; }
}
/* ---------- End of notifications ---------- */

/* ---------- Phone: the app's header, screen and tabs ---------- */

.phone-top { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 8px 0 16px; background: var(--ev-surface); border-bottom: 1px solid var(--ev-border); }
.phone-top .brand { gap: 8px; font-size: 18px; }
.phone-top-back { display: inline-flex; align-items: center; gap: 4px; min-width: 0; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--ev-text); font: 700 16px/1.2 var(--ev-font); cursor: pointer; }
.phone-bell { position: relative; width: 44px; height: 44px; margin-left: auto; display: inline-grid; place-items: center; border-radius: 12px; color: var(--ev-text); }
.phone-bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--ev-pill); display: grid; place-items: center; background: var(--ev-ink); color: var(--ev-on-ink); font-size: 12px; font-weight: 700; line-height: 1; }
.phone-main { padding: 24px 16px 32px; }
.phone-main h1 { margin: 4px 0 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.02em; }
.phone-tabs { height: 72px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-bottom: 8px; background: var(--ev-surface); border-top: 1px solid var(--ev-border); }
.phone-tab { display: grid; justify-items: center; align-content: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ev-muted); }
.phone-tab.on { color: var(--ev-primary-ink); }
.phone-tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: var(--ev-pill); background: var(--ev-primary-soft); color: var(--ev-primary-ink); font-size: 12px; }
/* The other area has unread notifications (STATES Batch 11, areas rule 2). */
.phone-tab-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--ev-primary); vertical-align: middle; }
/* The area beside the logo: mark, wordmark, then the badge 4 px further than the logo's own gap. */
.phone-top-brand { display: inline-flex; align-items: center; gap: 12px; }
.phone-top-brand .badge { letter-spacing: 0; }
/* What is done on the computer: one grey line with the laptop, never a button. */
.desk-line { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--ev-radius); background: var(--ev-surface-2); color: var(--ev-text-2); }
.desk-line > svg { flex: 0 0 auto; }
/* No internet on the phone: the band under the header, from the hour the list was read. */
.conn.phone-offline { justify-content: flex-start; min-height: 0; padding: 10px 16px; }
.conn.phone-offline > .small { font-weight: 600; }

/* ---------- Widths ---------- */

@media (max-width: 960px) {
    .split, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .page { padding-top: 24px; padding-bottom: 48px; }
    .form-grid, .form-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
    /* A basis wider than the screen would push the column out of it. */
    .list-detail-list, .list-detail-detail { flex: 1 1 100%; }
    .btn { width: 100%; }
    .btn-sm { width: auto; }
}

/* ---------- The identity card being sent and read ---------- */

/* A modal dialog over everything: the element itself is the dimmed page. */
.idr { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; box-sizing: border-box; display: none; place-items: center; padding: 24px; background: var(--ev-scrim); font-family: var(--ev-font); font-size: 16px; line-height: 1.5; color: var(--ev-text); -webkit-font-smoothing: antialiased; }
.idr[open] { display: grid; }
.idr::backdrop { background: transparent; }
.idr.folding { background: transparent; transition: background .24s; }
html:has(.idr[open]) { overflow: hidden; }
.idr p, .idr h2, .idr ul, .idr ol, .idr dl, .idr dd { margin: 0; padding: 0; }
.idr ul, .idr ol { list-style: none; }
.idr button:focus-visible, .idr h2:focus-visible { outline: 2px solid var(--ev-ink); outline-offset: 2px; }
.idr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
/* web: a dialog of 480px; phone: a sheet from the bottom, about 58% of the screen (a long result scrolls inside it) */
.idr-box { width: min(480px, 100%); min-height: 528px; max-height: 100%; display: flex; flex-direction: column; overflow: hidden; background: var(--ev-surface); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow-md); }
.idr.phone { padding: 0; align-items: end; justify-items: stretch; }
.idr.phone .idr-box { width: 100%; min-height: 500px; max-height: max(74%, 520px); border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; }
.idr-bar { flex: 0 0 auto; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px 0 24px; }
.idr.phone .idr-bar { padding: 8px 8px 0 20px; }
.idr-who { min-width: 0; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--ev-muted); }
.idr .idr-bar .btn { width: auto; min-height: 44px; height: 44px; font-size: 14px; }
.idr-main { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; gap: 20px; align-content: start; justify-items: stretch; padding: 8px 32px 20px; }
.idr.phone .idr-main { gap: 16px; padding: 4px 20px 16px; }
.idr-stage { display: grid; justify-items: center; padding-bottom: 16px; }
.idr-ringbox { position: relative; width: 160px; height: 160px; }
.idr.phone .idr-ringbox { width: 136px; height: 136px; }
.idr-ring { display: block; width: 100%; height: 100%; }
.idr-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.idr-ring .idr-disc { fill: var(--ev-bg); stroke: none; }
.idr-track { stroke: var(--ev-surface-3); }
.idr-arc { stroke: var(--ev-primary); transform-box: fill-box; transform-origin: center; transform: rotate(-90deg); transition: stroke-dashoffset .3s ease-out; }
.idr-arc.held { stroke: var(--ev-muted); }
.idr-arc.full { stroke: var(--ev-success); }
.idr-arc.part, .idr-arc.bad { stroke: var(--ev-warning); }
.idr-seg { transform-box: fill-box; transform-origin: center; stroke: var(--ev-surface-3); }
.idr-seg.done { stroke: var(--ev-success); }
.idr-seg.now { stroke: var(--ev-primary); }
.idr-card { fill: var(--ev-surface); stroke: var(--ev-border-strong); stroke-width: 1; }
.idr-ink { fill: var(--ev-border-strong); }
.idr-mrz { fill: none; stroke: var(--ev-muted); stroke-width: 2; stroke-dasharray: 2.6 2; }
.idr-chip { fill: var(--ev-accent); }
.idr-scan-line { fill: var(--ev-primary); }
.idr-scan-band { fill: var(--ev-primary); opacity: .12; }
.idr-check { fill: none; stroke: var(--ev-success); stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.idr-check.part { stroke: var(--ev-warning); }
.idr-pill { position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); height: 30px; min-width: 60px; padding: 0 12px; display: inline-grid; place-items: center; border: 1px solid var(--ev-border); border-radius: var(--ev-pill); background: var(--ev-surface); font-size: 14px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.idr-pill.icon { min-width: 36px; width: 36px; height: 36px; bottom: -16px; padding: 0; color: var(--ev-warning-ink); background: var(--ev-warning-soft); border-color: transparent; }
.idr-head { display: grid; gap: 6px; text-align: center; }
.idr-head h2 { font-size: 20px; line-height: 1.3; font-weight: 700; }
.idr-head p { color: var(--ev-text-2); text-wrap: balance; }
.idr-sides { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; font-size: 14px; line-height: 1.5; font-weight: 600; font-variant-numeric: tabular-nums; }
.idr-sides span { display: inline-flex; gap: 6px; align-items: center; }
.idr-sides svg { color: var(--ev-success-ink); }
.idr-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.idr-steps li { position: relative; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 14px; line-height: 1.4; color: var(--ev-muted); }
.idr-steps li + li::before { content: ""; position: absolute; top: 11px; right: calc(50% + 20px); left: calc(-50% + 20px); height: 2px; border-radius: 2px; background: var(--ev-border); }
.idr-steps li.now::before, .idr-steps li.done::before { background: var(--ev-success); }
.idr-steps .n { width: 24px; height: 24px; display: grid; place-items: center; border-radius: var(--ev-pill); background: var(--ev-surface-3); color: var(--ev-text-2); font-size: 13px; line-height: 1; font-weight: 600; }
.idr-steps .now { color: var(--ev-text); font-weight: 600; }
.idr-steps .now .n { background: var(--ev-primary-soft); }
.idr-steps .now .n::before { content: ""; width: 10px; height: 10px; border-radius: var(--ev-pill); background: var(--ev-primary); }
.idr-steps .done { color: var(--ev-text-2); }
.idr-steps .done .n { background: var(--ev-success-soft); color: var(--ev-success-ink); }
/* a result with a list: the ring is small, beside the words */
.idr-main.list { gap: 16px; grid-template-columns: 64px minmax(0, 1fr); align-items: center; }
.idr-main.list .idr-stage { padding: 0; }
.idr .idr-main.list .idr-ringbox { width: 64px; height: 64px; }
.idr-main.list .idr-head { text-align: left; gap: 2px; }
.idr-main.list .idr-head p { font-size: 14px; text-wrap: initial; }
.idr-main.list .idr-rows { grid-column: 1 / -1; }
.idr-rows { display: grid; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); overflow: hidden; }
.idr-rows > div { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; gap: 0 12px; align-items: center; min-height: 37px; padding: 8px 12px; }
.idr-rows > div + div { border-top: 1px solid var(--ev-border); }
.idr-rows dt { font-size: 14px; line-height: 1.4; color: var(--ev-muted); }
.idr-rows dd { min-width: 0; font-size: 14px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.idr-rows dd.faint { font-weight: 400; color: var(--ev-warning-ink); }
.idr-rows .st { display: inline-flex; align-items: center; color: var(--ev-success-ink); }
.idr-rows .todo { padding-top: 5px; padding-bottom: 5px; background: var(--ev-warning-soft); }
.idr-rows .todo dt { color: var(--ev-warning-ink); }
.idr-rows .todo .badge { background: var(--ev-surface); }
.idr.phone .idr-rows > div { grid-template-columns: 116px minmax(0, 1fr) auto; }
.idr-tips { display: grid; gap: 8px; justify-self: center; }
.idr-tips li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--ev-text-2); }
.idr-tips svg { margin-top: 2px; color: var(--ev-success-ink); }
.idr-foot { flex: 0 0 auto; display: grid; align-content: center; min-height: 80px; padding: 0 32px 28px; }
.idr.phone .idr-foot { padding: 0 20px 24px; }
.idr-private { display: flex; gap: 8px; align-items: flex-start; justify-content: center; font-size: 13px; line-height: 1.45; color: var(--ev-muted); }
.idr-private svg { margin-top: 1px; }
.idr-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.idr .idr-actions .btn { flex: 1 1 160px; min-width: 0; width: auto; padding: 0 10px; }
/* after „Continuă, citim în fundal”: the sheet folds into one line on the person's own card, then into a banner there */
.idr-mini { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 8px 8px 16px; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); background: var(--ev-bg); font-size: 14px; line-height: 1.4; }
.id-upload > .idr-mini { margin-top: 12px; }
.id-upload > .idr-banner, .card > .idr-mini, .card > .idr-banner { margin-top: 16px; }
.idr-mini > span { flex: 1 1 0; min-width: 0; }
.idr-mini .idr-ring { flex: 0 0 24px; width: 24px; height: 24px; }
.idr-mini .idr-ring circle { stroke-width: 22; }
.idr-mini .btn-sm { width: auto; min-height: 44px; }
/* a reading that ended badly behind the page: the line is a notice, its way out under the words */
.idr-mini.bad { flex-wrap: wrap; align-items: flex-start; background: var(--ev-warning-soft); border-color: transparent; color: var(--ev-warning-ink); padding: 8px 4px 12px 16px; }
.idr-mini.bad > svg { margin-top: 10px; flex: 0 0 auto; }
.idr-mini.bad > span { padding-top: 10px; flex: 1 1 160px; }
.idr-mini.bad .iconbtn { color: inherit; }
.idr-mini.bad .acts { flex: 1 1 100%; padding-left: 36px; }
/* „Continuă” waits for a card */
.idr-wait { display: flex; flex-wrap: wrap; gap: 0 12px; align-items: center; font-size: 14px; line-height: 1.4; color: var(--ev-text-2); }
.idr-wait .linkbtn { color: var(--ev-text); }
.step-action-zone > .idr-wait { justify-content: flex-end; margin-top: 8px; }
@media (max-width: 640px) {
    .step-action-zone > .idr-wait { margin-top: -16px; }
    .step-action-zone > .idr-wait, .form-actions + .idr-wait { display: grid; justify-content: start; justify-items: start; }
    .step-action-zone > .idr-wait .linkbtn, .form-actions + .idr-wait .linkbtn { min-height: 44px; }
}
.form-actions + .idr-wait { margin-top: 8px; }
.phone-footer > .idr-wait { margin-bottom: -8px; }
.idr-banner { display: grid; grid-template-columns: 24px minmax(0, 1fr) 44px; gap: 0 12px; align-items: start; padding: 8px 4px 16px 16px; border-radius: var(--ev-radius); background: var(--ev-success-soft); color: var(--ev-success-ink); font-size: 14px; line-height: 1.5; }
.idr-banner > svg { margin-top: 10px; }
.idr-banner .tx { padding-top: 8px; display: grid; gap: 4px; }
.idr-banner strong { font-size: 16px; line-height: 1.5; }
.idr-banner .acts { margin-top: 8px; }
.idr-banner .btn-sm { width: auto; min-height: 44px; }
.idr-banner .iconbtn { color: inherit; }
.idr-diff { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: center; font-size: 14px; line-height: 1.4; color: var(--ev-warning-ink); }
.idr-diff button { min-height: 44px; padding: 0; border: 0; background: transparent; font: 600 14px/1.4 var(--ev-font); color: var(--ev-text); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (max-width: 640px) {
    .idr.web { padding: 0; align-items: end; justify-items: stretch; }
    .idr.web .idr-box { width: 100%; min-height: 500px; max-height: max(74%, 520px); border-radius: var(--ev-radius-lg) var(--ev-radius-lg) 0 0; }
    .idr.web .idr-main { padding: 4px 20px 16px; } .idr.web .idr-foot { padding: 0 20px 24px; }
    .idr.web .idr-ringbox { width: 136px; height: 136px; }
}
/* Motion. Opens 200ms, folds to the card 240ms · percent 300ms per update · indeterminate turn 1.6s · light over the card 2.6s each way · now-dot 1.8s · done: ring closes 500ms, then the tick 350ms, then the list 200ms. */
@keyframes idr-in { from { opacity: 0; transform: translateY(16px); } }
@keyframes idr-fill { from { stroke-dashoffset: 502.7; } }
@keyframes idr-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes idr-scan { from { transform: translateY(-9px); } to { transform: translateY(53px); } }
@keyframes idr-dot { 50% { transform: scale(.65); opacity: .6; } }
@keyframes idr-close { from { stroke-dashoffset: 380; } to { stroke-dashoffset: 0; } }
@keyframes idr-tick { from { stroke-dashoffset: 120; } to { stroke-dashoffset: 0; } }
@keyframes idr-list { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
    .idr .idr-box { animation: idr-in .2s ease-out; }
    .idr .idr-arc.fill { animation: idr-fill 1.2s ease-out; }
    .idr .idr-arc.spin, .idr-mini .idr-arc.spin { animation: idr-spin 1.6s linear infinite; }
    .idr .idr-scan { animation: idr-scan 2.6s ease-in-out infinite alternate; }
    .idr .idr-steps .now .n::before { animation: idr-dot 1.8s ease-in-out infinite; }
    .idr .idr-arc.full, .idr .idr-arc.part { animation: idr-close .5s ease-out both; }
    .idr .idr-check { animation: idr-tick .35s .45s ease-out both; }
    .idr .idr-rows { animation: idr-list .2s .8s ease-out both; }
}
/* Reduced motion: nothing turns or slides; the ring shows one segment per step (done, now, next) and only the words change. */
.idr-segments { display: none; }
@media (prefers-reduced-motion: reduce) {
    .idr-arc { transition: none; }
    .idr-segments { display: inline; }
    .idr-smooth, .idr-scan { display: none; }
}

/* The browser's own connection dropped while the picture is sent: the words waiting in the sheet replace it. */
.idr-lost { display: none; flex: 1 1 auto; }
.idr-lost .idr-main { width: 100%; }
.idr[data-offline] .idr-lost { display: flex; }
.idr[data-offline] .idr-box > .idr-main, .idr[data-offline] .idr-foot { display: none; }
.idr-inputs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
