/* AutoReceipt shared UI styles (used by the browser and the MAUI host). Prefix: ar- */

:root {
    --ar-gap: 16px;
    --ar-bottom-nav-height: 64px;
    --ar-radius: 10px;
}

/* ---------- layout ---------- */

.ar-appbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ar-brand {
    font-weight: 600;
    letter-spacing: .2px;
}

.ar-drawer {
    border-right: 1px solid var(--mud-palette-lines-default);
}

.ar-navmenu {
    padding-top: 12px;
}

.ar-navmenu .mud-nav-link {
    min-height: 44px;
}

.ar-page {
    padding-top: 24px;
    padding-bottom: 32px;
}

.ar-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px var(--ar-gap);
    margin-bottom: 20px;
}

.ar-page-title h1 {
    font-weight: 600;
}

.ar-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* ---------- bottom navigation (phones) ---------- */

.ar-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1200;
    height: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(var(--ar-nav-columns, 5), 1fr);
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .06);
}

.ar-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    color: var(--mud-palette-text-secondary);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
}

.ar-bottom-nav-item.active {
    color: var(--mud-palette-primary);
}

.ar-bottom-nav-item.active .mud-icon-root {
    background: color-mix(in srgb, var(--mud-palette-primary) 14%, transparent);
    border-radius: 16px;
    padding: 2px 16px;
    box-sizing: content-box;
}

@media (max-width: 599.98px) {
    .ar-main {
        padding-bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
    }

    .ar-page {
        padding-top: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .ar-page-actions {
        width: 100%;
    }

    .ar-page-actions > .mud-button-root,
    .ar-page-actions > .ar-upload {
        flex: 1 1 auto;
        min-height: 44px;
    }

    .mud-snackbar-location-bottom-center {
        bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 8px) !important;
    }

    /* Large tap targets on phones */
    .ar-cards .mud-button-root,
    .ar-card-actions .mud-button-root {
        min-height: 44px;
    }
}

/* ---------- filters ---------- */

.ar-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px var(--ar-gap);
    padding: 12px 16px;
    margin-bottom: 16px;
}

.ar-filters-plain {
    padding: 0;
    border: 0;
}

.ar-filter {
    flex: 0 1 220px;
    min-width: 160px;
}

/* ---------- rows, cards, lists ---------- */

.ar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: 32px;
    flex-wrap: wrap;
}

.ar-row + .ar-row {
    border-top: 1px dashed var(--mud-palette-lines-default);
}

.ar-card .ar-row {
    padding: 4px 0;
}

.ar-row-actions .ar-row-buttons {
    display: inline-flex;
    gap: 4px;
}

.ar-amount,
.ar-num {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.ar-nowrap {
    white-space: nowrap;
}

.ar-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
}

.ar-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ar-card-content {
    flex: 1 1 auto;
    padding-top: 0;
}

.ar-card-title {
    font-weight: 600;
}

.ar-card-actions {
    padding: 8px 16px 16px;
}

.ar-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ar-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.ar-list-card {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ar-clickable {
    cursor: pointer;
}

/* Invoice number in the list: a real link for keyboards and screen readers, styled like the row text. */
.ar-invoice-link {
    color: inherit;
    text-decoration: none;
}

.ar-invoice-link:hover,
.ar-invoice-link:focus-visible {
    text-decoration: underline;
}

.ar-card-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    margin-left: -8px;
}

.ar-overdue {
    border-left: 3px solid var(--mud-palette-error) !important;
}

.ar-chips {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ar-chip {
    margin: 0 !important;
    font-weight: 500;
}

.ar-group + .ar-group {
    margin-top: 12px;
}

.ar-group-title {
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: capitalize;
}

.ar-plain-list {
    margin: 4px 0 0;
    padding-left: 18px;
}

.ar-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 6px 16px;
    margin: 0;
}

.ar-facts dt {
    color: var(--mud-palette-text-secondary);
}

.ar-facts dd {
    margin: 0;
}

.ar-line-row {
    align-items: flex-start;
    padding: 6px 0;
}

/* The eRačun timeline of an invoice: one step per line, the icon on the left, text that wraps on a phone. */
.ar-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ar-timeline-step {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 4px 0;
}

.ar-timeline-icon {
    flex: 0 0 auto;
    margin-top: 2px;
}

.ar-timeline-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ar-line-amount {
    white-space: nowrap;
}

.ar-total {
    font-size: 1.1rem;
}

.ar-lines-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

@media (min-width: 960px) {
    .ar-sticky {
        position: sticky;
        top: 80px;
    }
}

/* ---------- empty states & skeletons ---------- */

.ar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 40px 16px;
    color: var(--mud-palette-text-secondary);
}

.ar-empty-icon {
    font-size: 48px !important;
    opacity: .55;
    margin-bottom: 4px;
}

.ar-empty-title {
    color: var(--mud-palette-text-primary);
    font-weight: 600;
}

.ar-empty-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ---------- outbox, plans ---------- */

.ar-outbox {
    display: flex;
    flex-direction: column;
}

.ar-outbox-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 0;
}

.ar-outbox-item + .ar-outbox-item {
    border-top: 1px dashed var(--mud-palette-lines-default);
}

.ar-outbox-text {
    min-width: 0;
    flex: 1 1 240px;
}

.ar-outbox-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ar-plan-files {
    margin: 0 0 8px;
    padding-left: 22px;
}

.ar-plan-files li {
    padding: 2px 0;
}

.ar-plan-files li > span {
    margin-right: 8px;
}

.ar-plan-type {
    color: var(--mud-palette-text-secondary);
    font-size: .8rem;
}

.draft-fields {
    display: grid;
    gap: .75rem;
}

.draft-recipients {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.draft-fields textarea {
    line-height: 1.55;
    resize: vertical;
}

.draft-attachments {
    margin-block: 1.25rem;
}

.draft-attachments ul {
    margin: .5rem 0 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
}

.draft-attachments li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    min-height: 2.75rem;
    padding: .25rem .65rem;
}

.draft-attachments li + li {
    border-top: 1px solid var(--mud-palette-lines-default);
}

.draft-attachments li span {
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .draft-recipients {
        grid-template-columns: minmax(0, 1fr);
        gap: .75rem;
    }
}

.ar-match-option {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
    border-radius: 8px;
}

.ar-match-exact {
    background: color-mix(in srgb, var(--mud-palette-success) 8%, transparent);
}

.ar-match-meta {
    font-variant-numeric: tabular-nums;
    padding-right: 8px;
}

/* ---------- PDF ---------- */

.ar-pdf {
    width: 100%;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
    background: var(--mud-palette-background-gray);
}

.ar-pdf-skeleton {
    border-radius: var(--ar-radius);
}

/* ---------- pairing ---------- */

.ar-pairing-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 16px;
    background: var(--mud-palette-background);
}

.ar-pairing-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.ar-pairing-card {
    width: 100%;
    max-width: 440px;
    padding: 24px;
}

.ar-business-card {
    max-width: 520px;
}

.ar-business-review {
    max-width: 720px;
}

.ar-business-wrap {
    overflow-wrap: anywhere;
}

/* "Prijava s Googleom": Google's own look for its button (white, a thin border, the coloured G), in light and dark. */
.mud-button-root.ar-login-google {
    background: #fff;
    color: #1f1f1f;
    border: 1px solid #747775;
    text-transform: none;
    font-weight: 500;
    min-height: 44px;
    gap: 10px;
}

.mud-button-root.ar-login-google:hover {
    background: #f6f8fa;
}

.ar-google-mark {
    display: inline-flex;
    width: 18px;
    height: 18px;
}

.ar-login-or {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

.ar-login-or::before,
.ar-login-or::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--mud-palette-lines-default);
}

/* The operator's configuration check on /odobrenja (review U2). */
.ar-business-health-problems {
    margin: 0;
    padding-left: 1.25rem;
}

.ar-business-account-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.ar-pair-code input {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 1.4rem;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.ar-pairing-code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: .18em;
    padding: 12px 16px;
    border-radius: var(--ar-radius);
    background: color-mix(in srgb, var(--mud-palette-primary) 10%, transparent);
    color: var(--mud-palette-primary);
    text-align: center;
}

.ar-tabs .mud-tabs-tabbar {
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

/* Tab labels in sentence case like the buttons ("eRačun", not "ERAČUN": the e-prefix and č/ć/đ read badly in capitals). */
.mud-tab {
    text-transform: none;
    letter-spacing: normal;
}

/* ---------- Postavke: the overview of sections (cards on a computer, a list on a phone) ---------- */

/* The sections are chosen in the overview or the drop-down, so the tabs' own strip (which scrolled) is not shown. */
.ar-settings-tabs > .mud-tabs-tabbar {
    display: none;
}

.ar-settings-hub {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ar-settings-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 16px;
    text-align: left;
    font: inherit;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ar-settings-card:hover {
    border-color: var(--mud-palette-primary);
    box-shadow: 0 1px 4px color-mix(in srgb, var(--mud-palette-primary) 18%, transparent);
}

.ar-settings-card:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.ar-settings-card-icon {
    flex: none;
    margin-top: 2px;
    color: var(--mud-palette-primary);
}

.ar-settings-card-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ar-settings-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.ar-settings-card-description {
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
}

.ar-settings-card-state {
    margin-top: 4px;
    font-size: .8125rem;
    color: var(--mud-palette-success-darken);
    overflow-wrap: anywhere;
}

.ar-settings-card-warn {
    color: var(--mud-palette-warning-darken);
}

.ar-settings-card-chevron {
    flex: none;
    align-self: center;
    color: var(--mud-palette-text-secondary);
}

/* A computer shows cards (no arrow); a phone shows one list of rows, like the phone's own settings. */
.ar-settings-hub:not(.ar-settings-hub-phone) .ar-settings-card-chevron {
    display: none;
}

.ar-settings-hub-phone {
    grid-template-columns: 1fr;
    gap: 0;
    overflow: hidden;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
}

.ar-settings-hub-phone .ar-settings-card {
    align-items: center;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
    border-radius: 0;
}

.ar-settings-hub-phone .ar-settings-card:last-child {
    border-bottom: 0;
}

.ar-settings-hub-phone .ar-settings-card:hover {
    box-shadow: none;
}

/* The list clips what is outside its rows, so the focus ring is drawn inside the row. */
.ar-settings-hub-phone .ar-settings-card:focus-visible {
    outline-offset: -3px;
}

/* The section's top takes focus when it opens; the heading under it shows where the user is, no ring needed. */
.ar-settings-section-top:focus {
    outline: none;
}

.ar-settings-back {
    margin-left: -8px;
}

.ar-settings-switch {
    min-width: 220px;
}

/* ---------- Godina (yearly overview: limit, bracket, PO-SD) ---------- */

.ar-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ar-annual {
    display: flex;
    flex-direction: column;
    gap: var(--ar-gap);
    max-width: 960px;
}

.ar-annual-card {
    padding: 16px;
}

.ar-annual-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.ar-annual-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
    background: var(--mud-palette-surface);
    min-width: 0;
}

.ar-annual-tile-label,
.ar-annual-tile-caption {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

.ar-annual-tile-value {
    font-size: 1.375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ar-meter {
    --ar-meter-fill: var(--mud-palette-primary);
    margin-top: 8px;
}

.ar-meter-warning {
    --ar-meter-fill: var(--mud-palette-warning);
}

.ar-meter-error {
    --ar-meter-fill: var(--mud-palette-error);
}

.ar-meter-bar {
    display: block;
    width: 100%;
    height: 28px;
}

.ar-meter-scale,
.ar-meter-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

.ar-meter-legend {
    justify-content: flex-start;
    margin-top: 4px;
    color: var(--mud-palette-text-primary);
}

.ar-meter-key::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: -1px;
    background: var(--ar-meter-fill);
}

.ar-meter-key-open::before {
    background: repeating-linear-gradient(45deg, var(--ar-meter-fill) 0 3px, transparent 3px 6px);
    opacity: .7;
}

.ar-ladder {
    display: flex;
    gap: 4px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.ar-ladder-step {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
}

.ar-ladder-current {
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}

.ar-ladder-projected {
    border-style: dashed;
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}

.ar-ladder-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 6px;
    font-size: .8125rem;
}

.ar-ladder-key::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: -1px;
    border: 2px solid var(--mud-palette-primary);
}

.ar-ladder-key-current::before {
    background: var(--mud-palette-primary);
}

.ar-ladder-key-projected::before {
    border-style: dashed;
}

.ar-posd-head {
    align-items: flex-start;
    margin-bottom: 8px;
}

.ar-posd-table {
    display: flex;
    flex-direction: column;
}

.ar-posd-row {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto minmax(0, .9fr);
    gap: 4px 12px;
    align-items: baseline;
    padding: 8px 0;
    border-bottom: 1px dashed var(--mud-palette-lines-default);
}

.ar-posd-header {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-secondary);
    border-bottom-style: solid;
}

.ar-posd-field {
    font-weight: 600;
}

.ar-posd-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ar-posd-note,
.ar-posd-source {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

.ar-posd-actions {
    margin-top: 12px;
}

.ar-annual-sources {
    padding: 0 4px;
    color: var(--mud-palette-text-secondary);
}

.ar-annual-source {
    color: inherit;
}

@media (max-width: 599.98px) {
    .ar-annual-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ar-annual-tile-value {
        font-size: 1.125rem;
    }

    .ar-posd-row {
        grid-template-columns: 44px minmax(0, 1fr) auto;
    }

    .ar-posd-row .ar-posd-source {
        grid-column: 2 / 4;
    }

    .ar-posd-header .ar-posd-source {
        display: none;
    }

    .ar-posd-actions .mud-button-root,
    .ar-annual-warning-action,
    .ar-annual-notice-action,
    .ar-annual-source {
        min-height: 44px;
    }

    .ar-annual-source {
        display: inline-flex;
        align-items: center;
    }
}

/* ---------- Pregled prihoda (Godina: figures, by month, by client) ----------
   Series colours come from ChartPalette (--ar-series-*, set by MainLayout for the light or dark theme); text always wears
   the text colours, gridlines are hairlines one step off the surface. */

.ar-insights {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-insight-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.ar-insight-tile {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--mud-palette-background);
}

.ar-insight-tile-label,
.ar-insight-tile-caption {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

/* Proportional figures: a standalone value is not a column. */
.ar-insight-tile-value {
    font-size: 1.25rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.ar-insight-delta {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.ar-insights-section {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ar-insights-heading {
    font-weight: 600;
}

.ar-chart {
    margin: 0;
    min-width: 0;
}

.ar-chart-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 12px;
    margin-bottom: 4px;
}

.ar-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: .8125rem;
    color: var(--mud-palette-text-primary);
}

/* The legend mirrors the marks: a small rounded square per series. */
.ar-chart-key::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 3px;
    vertical-align: -1px;
    background: var(--ar-key);
}

.ar-chart-note {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

.ar-chart-toggle {
    margin-left: auto;
}

.ar-chart-body {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
}

.ar-chart-yaxis {
    position: relative;
    font-size: 11px;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

.ar-chart-yaxis span {
    position: absolute;
    right: 6px;
    transform: translateY(-50%);
    line-height: 1;
    white-space: nowrap;
}

.ar-chart-plot {
    position: relative;
    min-width: 0;
}

.ar-chart-svg {
    display: block;
    overflow: visible;
}

.ar-chart-grid {
    stroke: var(--mud-palette-lines-default);
    stroke-width: 1;
    shape-rendering: crispEdges;
}

.ar-chart-baseline {
    stroke: var(--ar-chart-axis);
    stroke-width: 1;
    shape-rendering: crispEdges;
}

/* The bars, the hover band and the hit targets carry their fill inline (style or fill attribute), never from here: SVG paints
   black by default, so a stale cached stylesheet would otherwise cover the chart in black. */

.ar-chart-value {
    font-size: 11px;
    font-weight: 600;
    fill: var(--mud-palette-text-primary);
}

.ar-chart-xlabel {
    font-size: 11px;
    fill: var(--mud-palette-text-secondary);
}

.ar-chart-xlabel-number {
    display: none;
}

/* A whole month is the hit target, larger than its bars. */
.ar-chart-hit {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ar-chart-hit:focus-visible {
    stroke: var(--mud-palette-primary);
    stroke-width: 2;
}

.ar-chart-tooltip {
    position: absolute;
    top: 0;
    z-index: 2;
    max-width: calc(50% - 8px);
    padding: 6px 10px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 8px;
    background: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
    font-size: .8125rem;
    line-height: 1.35;
    pointer-events: none;
}

.ar-chart-tooltip-title {
    color: var(--mud-palette-text-secondary);
}

.ar-chart-tooltip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
}

.ar-chart-tooltip-row b {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ar-chart-tooltip-name,
.ar-chart-tooltip-detail {
    color: var(--mud-palette-text-secondary);
}

.ar-chart-tooltip-detail {
    display: block;
}

/* Tooltip rows key their series with a short stroke, not a box. */
.ar-chart-line-key {
    display: inline-block;
    width: 12px;
    height: 3px;
    border-radius: 2px;
    background: var(--ar-key);
}

.ar-chart-table .ar-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mud-simple-table.ar-chart-table table tbody tr th {
    font-weight: 400;
}

.mud-simple-table.ar-chart-table table tfoot tr th,
.mud-simple-table.ar-chart-table table tfoot tr td {
    font-weight: 600;
}

.ar-chart-table-note {
    display: block;
    font-size: .75rem;
    color: var(--mud-palette-text-secondary);
}

.ar-client-rows {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ar-client-row {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr) auto;
    grid-template-areas: "name bar figures";
    align-items: center;
    gap: 4px 12px;
    padding: 6px 8px;
    border-radius: 8px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.ar-client-row.is-active {
    background: var(--mud-palette-action-default-hover);
}

.ar-client-row:focus-visible {
    box-shadow: inset 0 0 0 2px var(--mud-palette-primary);
}

.ar-client-name {
    grid-area: name;
    min-width: 0;
    font-size: .875rem;
    overflow-wrap: anywhere;
}

.ar-client-figures {
    grid-area: figures;
    font-size: .875rem;
    text-align: right;
    white-space: nowrap;
}

.ar-client-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.ar-client-share {
    margin-left: 6px;
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

.ar-client-bar {
    grid-area: bar;
    position: relative;
    min-width: 0;
}

.ar-client-bar > svg {
    display: block;
}

.ar-client-tooltip {
    top: auto;
    bottom: calc(100% + 6px);
}

@media (max-width: 599.98px) {
    .ar-insight-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ar-insight-tile-value {
        font-size: 1.0625rem;
    }

    .ar-chart-xlabel-name {
        display: none;
    }

    .ar-chart-xlabel-number {
        display: inline;
    }

    .ar-chart-toggle {
        min-height: 44px;
    }

    /* Half the plot is ~140 px on a 390 px phone: a value and its year still fit on one line. */
    .ar-chart-tooltip {
        padding: 5px 8px;
        font-size: .75rem;
    }

    .ar-chart-tooltip-row {
        column-gap: 5px;
    }

    /* The bar drops under the name where the list is narrow. */
    .ar-client-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "name figures" "bar bar";
    }
}

/* ---- Obveze (obligations calendar) ---- */

.ar-obligations {
    max-width: 960px;
}

.ar-obligation-main {
    min-width: 0;
    flex: 1 1 240px;
}

.ar-obligation-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    text-align: right;
}

.ar-obligation-amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ar-year-grid-wrap {
    overflow-x: auto;
    margin-bottom: 16px;
}

.ar-year-grid {
    border-collapse: collapse;
    width: 100%;
    min-width: 640px;
}

.ar-year-grid th,
.ar-year-grid td {
    border-bottom: 1px solid var(--mud-palette-lines-default);
    padding: 2px 4px;
    text-align: center;
    font-weight: 400;
}

.ar-year-grid thead th {
    color: var(--mud-palette-text-secondary);
    font-size: 0.8125rem;
}

.ar-year-grid .ar-year-grid-row-head {
    text-align: left;
    white-space: nowrap;
    padding-right: 12px;
}

.ar-pay-fields {
    margin: 8px 0;
}

.ar-pay-field {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    min-height: 40px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ar-pay-field dt {
    color: var(--mud-palette-text-secondary);
}

.ar-pay-field dd {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}

.ar-pay-barcode {
    background: #fff;
    padding: 12px;
    max-width: 420px;
    margin-top: 12px;
}

.ar-pay-barcode svg {
    width: 100%;
    height: auto;
}

@media (max-width: 599.98px) {
    .ar-pay-field {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 4px 0;
    }

    .ar-obligation-side {
        align-items: flex-start;
        text-align: left;
    }

    .ar-obligation-actions .mud-button-root,
    .ar-pay-copy,
    .ar-unassigned-row .mud-button-root {
        min-height: 44px;
        min-width: 44px;
    }
}

/* ---------- phase UX1: to-do list, next-step card, "Više", sticky save bar ---------- */

.ar-todo {
    margin-bottom: 24px;
    max-width: 760px;
}

.ar-todo-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.ar-todo-heading {
    font-weight: 600;
}

.ar-todo-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ar-todo-item {
    padding: 16px;
    border-left: 4px solid var(--mud-palette-info);
}

.ar-todo-item.ar-todo-error,
.ar-todo-item.ar-todo-blocking {
    border-left-color: var(--mud-palette-error);
}

.ar-todo-item.ar-todo-deadline {
    border-left-color: var(--mud-palette-warning);
}

.ar-todo-item.ar-todo-advice,
.ar-todo-item.ar-todo-info {
    border-left-color: var(--mud-palette-lines-default);
}

.ar-todo-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ar-todo-icon {
    flex: 0 0 auto;
    margin-top: 2px;
}

.ar-todo-text {
    min-width: 0;
    flex: 1 1 auto;
}

.ar-todo-title {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    font-weight: 600;
}

.ar-todo-due {
    white-space: nowrap;
    color: var(--mud-palette-warning);
    font-weight: 600;
}

.ar-todo-detail {
    margin-top: 4px;
    white-space: pre-line;
    color: var(--mud-palette-text-secondary);
}

.ar-todo-actions,
.ar-next-step-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
}

.ar-todo-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
}

.ar-todo-footer {
    display: block;
    margin-top: 8px;
}

/* ---------- phase N1: "Novo" on Pregled, the bell, Postavke → Obavijesti ---------- */

.ar-news {
    margin-bottom: 24px;
    max-width: 760px;
}

.ar-news-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 4px;
}

.ar-news-heading {
    font-weight: 600;
}

.ar-news-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ar-news-item:last-child {
    border-bottom: none;
}

.ar-news-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: var(--mud-palette-text-secondary);
}

.ar-news-text {
    min-width: 0;
    flex: 1 1 auto;
}

.ar-news-unread .ar-news-title {
    font-weight: 600;
}

.ar-news-body {
    color: var(--mud-palette-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ar-news-meta {
    font-size: 0.75rem;
    color: var(--mud-palette-text-secondary);
}

.ar-news-item > .mud-button-root {
    flex: 0 0 auto;
}

.ar-bell-badge {
    margin-right: 4px;
}

.ar-notify-help-steps {
    margin: 0;
    padding-left: 20px;
}

.ar-notify-help-steps > li + li {
    margin-top: 6px;
}

.ar-notify-help-anchor:focus {
    outline: none;
}

/* "Ne smetaj od … do …": side by side while there is room, one under the other on a narrow phone. */
.ar-notify-times > * {
    flex: 1 1 140px;
    min-width: 140px;
}

.ar-next-step {
    max-width: 760px;
    border-left: 4px solid var(--mud-palette-primary);
}

/* "Više": a disclosure, not a popover; the panel opens under the toggle. */
.ar-more {
    position: relative;
    display: inline-block;
}

.ar-more-panel {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    min-width: 240px;
    max-width: min(360px, calc(100vw - 24px));
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 4px 0;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    box-shadow: var(--mud-elevation-4);
}

.ar-more-panel[hidden] {
    display: none;
}

.ar-more-panel > .mud-button-root {
    justify-content: flex-start;
    border-radius: 0;
    min-height: 40px;
}

.ar-more-disabled {
    padding: 8px 16px;
    color: var(--mud-palette-text-secondary);
    font-size: 0.875rem;
}

/* While "Više" is open: a click anywhere else lands on this layer and closes it. */
.ar-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: transparent;
}

/* In a table: MudTable's container scrolls (overflow auto) and would clip the open panel, so it does not while one is open;
   in the last column (and at the end of a row) the panel opens towards the left, inside the page. */
.mud-table-container:has(.ar-more-panel:not([hidden])) {
    overflow: visible;
}

td .ar-more-panel,
.ar-row .ar-more-panel {
    left: auto;
    right: 0;
}

/* Settings: the bar appears only with unsaved changes (UX audit §8.2); on phones above the bottom bar. */
.ar-sticky-save {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 16px;
    padding: 8px 16px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    box-shadow: var(--mud-elevation-4);
}

.ar-sticky-save-buttons {
    display: flex;
    gap: 8px;
}

/* Invoice numbers never wrap ("17-01-01", UX audit §9.3). */
[data-invoice] .ar-number,
.ar-invoice-number,
.ar-table td.ar-number,
.ar-page-title h1 {
    overflow-wrap: normal;
}

.ar-invoice-number,
.ar-number {
    white-space: nowrap;
}

@media (max-width: 599.98px) {
    .ar-todo-actions .mud-button-root,
    .ar-next-step-actions .mud-button-root,
    .ar-sticky-save .mud-button-root,
    .ar-more-panel > .mud-button-root,
    .ar-doc-actions .mud-button-root,
    .ar-payment-actions .mud-button-root,
    .ar-eracun .mud-button-root,
    .ar-eracun-pdf-pending .mud-button-root,
    .ar-send-eracun .mud-button-root,
    .ar-news-item > .mud-button-root,
    .ar-news-header .mud-button-root,
    .ar-notify-question .mud-button-root,
    .ar-notify-test,
    .ar-notify-refresh {
        min-height: 44px;
        min-width: 44px;
    }

    .ar-todo-actions > .ar-todo-primary,
    .ar-next-step-actions > .mud-button-filled {
        flex: 1 1 100%;
    }

    .ar-sticky-save {
        bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
    }

    /* "Više" opens as a sheet above the bottom bar, the width of the screen: a panel under a toggle at the end of a row
       (a payment or document card, "Kasnije") would run past the right edge of a 360 px screen. */
    div.ar-more > .ar-more-panel {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
        min-width: 0;
        max-width: none;
        max-height: 60vh;
        overflow-y: auto;
        z-index: 1250;
    }

    .ar-more-backdrop {
        z-index: 1249;
        background: rgba(0, 0, 0, .32);
    }
}

/* Novi račun: the client list and "Novi klijent" side by side; on a narrow screen the button goes under the list. */
.ar-client-pick {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px 12px;
}

/* The flex item is MudSelect's outer element: its Class ("ar-client") goes on an inner one. */
.ar-client-pick > .mud-select {
    flex: 1 1 240px;
    min-width: 0;
}

.ar-client-pick > .ar-client-new {
    flex: 0 0 auto;
    margin-top: 10px;
}

/* Client editor: what "Zalijepi podatke" found. */
.ar-client-paste-list {
    margin: 4px 0 4px 20px;
    padding: 0;
    overflow-wrap: anywhere;
}

.ar-client-overwrite-list {
    margin: 8px 0 8px 20px;
    padding: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 599.98px) {
    .ar-client-pick > .ar-client-new {
        margin-top: 0;
        min-height: 44px;
    }

    .ar-client-dialog .ar-client-lookup .mud-button-root,
    .ar-client-dialog .ar-client-paste-area .mud-button-root {
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mud-skeleton,
    .mud-progress-linear {
        animation: none !important;
    }
}

/* ---------- phase UX3: the setup wizard "Postavljanje" (one step per screen, sticky Natrag / Dalje) ---------- */

.ar-wizard {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 720px;
    margin: 0 auto;
}

.ar-wizard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 36px;
}

.ar-wizard-progress-text {
    color: var(--mud-palette-text-secondary);
    font-variant-numeric: tabular-nums;
}

.ar-wizard-progress {
    margin-bottom: 8px;
}

.ar-wizard-step {
    padding: 20px 24px 24px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
}

.ar-wizard-heading {
    margin: 0 0 12px;
    font-weight: 600;
}

/* The heading takes focus with every step; the page shows where the user is, so a click draws no ring (a keyboard does). */
.ar-wizard-heading:focus {
    outline: none;
}

.ar-wizard-heading:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 4px;
    border-radius: 4px;
}

.ar-wizard-checklist {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ar-wizard-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
}

.ar-wizard-check-done {
    border-color: color-mix(in srgb, var(--mud-palette-success) 45%, transparent);
}

.ar-wizard-check-icon {
    flex: none;
    margin-top: 2px;
}

.ar-wizard-check-text {
    flex: 1;
    min-width: 0;
}

.ar-wizard-howto {
    margin: 0 0 16px;
    padding-left: 22px;
}

.ar-wizard-howto li + li {
    margin-top: 4px;
}

.ar-wizard-summary {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ar-wizard-summary-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 0;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.ar-wizard-summary-item:last-child {
    border-bottom: 0;
}

.ar-wizard-summary-icon {
    flex: none;
}

.ar-wizard-summary-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.ar-wizard-summary-state {
    font-size: .875rem;
    color: var(--mud-palette-text-secondary);
    overflow-wrap: anywhere;
}

.ar-wizard-summary-item[data-state="done"] .ar-wizard-summary-state {
    color: var(--mud-palette-success-darken);
}

.ar-wizard-summary-link {
    flex: none;
    padding: 8px 4px;
}

/* Natrag / Preskoči / Dalje stay at the bottom of the window while the step scrolls. */
.ar-wizard-actions {
    position: sticky;
    bottom: 12px;
    z-index: 30;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--mud-default-borderradius);
    box-shadow: var(--mud-elevation-4);
}

.ar-wizard-actions-spacer {
    flex: 1 1 auto;
}

/* While the wizard is shown, a snackbar (e.g. after a step's save) sits above the action bar instead of covering
   Natrag / Preskoči / Dalje: the bar is about 54 px high, 12 px above the window's edge. */
body:has(.ar-wizard-actions) .mud-snackbar-location-bottom-center {
    bottom: 80px !important;
}

/* Phone (390 px): a step fills the screen between the app bar and the actions; the actions sit above the bottom bar. */
@media (max-width: 599.98px) {
    .ar-wizard-step {
        min-height: calc(100vh - 64px - var(--ar-bottom-nav-height) - env(safe-area-inset-bottom) - 150px);
        min-height: calc(100dvh - 64px - var(--ar-bottom-nav-height) - env(safe-area-inset-bottom) - 150px);
        padding: 16px;
        border: 0;
        border-radius: 0;
        margin: 0 -12px;
    }

    .ar-wizard-actions {
        bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 8px);
        flex-wrap: nowrap;
    }

    /* The bar (44 px buttons, about 62 px high) sits 8 px above the bottom bar; snackbars go above it. */
    body:has(.ar-wizard-actions) .mud-snackbar-location-bottom-center {
        bottom: calc(var(--ar-bottom-nav-height) + env(safe-area-inset-bottom) + 80px) !important;
    }

    .ar-wizard-actions .mud-button-root,
    .ar-wizard-check .mud-button-root,
    .ar-wizard-restore .mud-button-root,
    .ar-wizard-close {
        min-height: 44px;
    }

    .ar-wizard-next,
    .ar-wizard-finish {
        flex: 1 1 auto;
    }

    .ar-wizard-check {
        padding: 12px;
    }
}

/* ---------- Tema: the theme picker (the wizard's first step, Postavke → Tema) ---------- */

.ar-theme-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 560px;
}

/* In the wizard the picker spans the step, like the other steps' fields and the restore box under it. */
.ar-theme-picker.ar-wizard-theme {
    max-width: none;
}

.ar-theme-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* MudBlazor centres the content of every <button>; the options start at the left. */
.ar-theme-option {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    font: inherit;
    text-align: left;
    color: var(--mud-palette-text-primary);
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    -webkit-tap-highlight-color: transparent;
}

.ar-theme-option:hover {
    border-color: var(--mud-palette-primary);
}

/* The chosen option: a 2 px primary edge (border plus an inner ring, so nothing moves) and a filled check mark. */
.ar-theme-option-checked {
    border-color: var(--mud-palette-primary);
    box-shadow: inset 0 0 0 1px var(--mud-palette-primary);
}

.ar-theme-option:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.ar-theme-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px 10px 12px;
}

.ar-theme-option-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.ar-theme-option-mark {
    flex: none;
    color: var(--mud-palette-text-secondary);
}

.ar-theme-option-checked .ar-theme-option-mark {
    color: var(--mud-palette-primary);
}

.ar-theme-device {
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
}

.ar-theme-device-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ar-theme-device-hint {
    font-size: .8125rem;
    color: var(--mud-palette-text-secondary);
}

/* The picture of the app in one palette: its colours come from AppTheme (--ar-mock-*), not from the page's theme. */
.ar-theme-mock {
    display: flex;
    flex-direction: column;
    height: 104px;
    overflow: hidden;
    background: var(--ar-mock-page);
    border: 1px solid var(--ar-mock-lines);
    border-radius: 8px;
}

.ar-theme-mock-bar {
    display: flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    background: var(--ar-mock-bar);
    border-bottom: 1px solid var(--ar-mock-lines);
}

.ar-theme-mock-logo {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--ar-mock-primary);
}

.ar-theme-mock-page {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    padding: 10px;
}

.ar-theme-mock-card {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 10px;
    background: var(--ar-mock-surface);
    border: 1px solid var(--ar-mock-lines);
    border-radius: 6px;
}

.ar-theme-mock-line {
    display: block;
    height: 6px;
    border-radius: 3px;
    background: var(--ar-mock-text);
}

.ar-theme-mock-muted {
    background: var(--ar-mock-muted);
}

.ar-theme-mock-w40 {
    width: 40%;
}

.ar-theme-mock-w50 {
    width: 50%;
}

.ar-theme-mock-w70 {
    width: 70%;
}

.ar-theme-mock-button {
    align-self: flex-end;
    width: 38%;
    height: 12px;
    border-radius: 4px;
    background: var(--ar-mock-primary);
}

@media (max-width: 599.98px) {
    .ar-theme-mock {
        height: 92px;
    }
}

/* ------------------------------------------------------------------ Postavke → Obrt → Izgled računa */

.ar-logo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* The logo on a white "paper" in both themes: it is printed on white. */
.ar-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 176px;
    height: 80px;
    padding: 8px;
    background: #fff;
    border: 1px dashed var(--mud-palette-lines-default);
    border-radius: var(--ar-radius);
}

.ar-logo-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ar-logo-empty {
    color: #5b6670;
    font-size: 0.8125rem;
}

.ar-logo-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 200px;
    min-width: 0;
}

.ar-logo-name {
    overflow-wrap: anywhere;
}

.ar-accent-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ar-accent-swatch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.ar-accent-swatch:focus-visible {
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}

.ar-accent-swatch-selected {
    border-color: var(--mud-palette-surface);
    box-shadow: 0 0 0 2px var(--mud-palette-text-primary);
}

.ar-accent-hex {
    max-width: 260px;
}

@media (max-width: 599.98px) {
    .ar-logo-preview {
        width: 100%;
        height: 96px;
    }

    /* Large tap targets on the phone. */
    .ar-accent-swatch {
        width: 44px;
        height: 44px;
    }

    .ar-logo-actions .mud-button-root {
        min-height: 44px;
    }

    .ar-accent-hex {
        max-width: none;
    }
}

/* ---- Documents IN: the drop zone, the address for documents, "Treba provjeriti" ---- */
.ar-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 16px;
    text-align: center;
    border-style: dashed !important;
    cursor: pointer;
}

.ar-dropzone-over {
    border-color: var(--mud-palette-primary) !important;
    background-color: var(--mud-palette-primary-hover);
}

/* The native input covers the whole box, so a drop and a click both reach it. */
.ar-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.ar-inbound-address {
    font-size: 0.95rem;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: var(--mud-palette-background-gray);
    overflow-wrap: anywhere;
    user-select: all;
}

.ar-inbound-forwarding-code {
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    user-select: all;
}

.ar-inbound-forwarding-text {
    max-height: 240px;
    overflow: auto;
    white-space: pre-wrap;
    font-size: 0.8rem;
}

.ar-inbound-log {
    padding: 4px 0;
    border-bottom: 1px solid var(--mud-palette-divider);
}

.ar-review-reason {
    color: var(--mud-palette-warning-darken);
}

/* Prijavljeni uređaji and the backup sign-in (Postavke → Uređaji, the account page). */
.ar-totp-qr {
    display: block;
    width: 200px;
    height: 200px;
    background: #fff;
    border-radius: var(--ar-radius);
}

.ar-totp-secret {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-weight: 600;
    overflow-wrap: anywhere;
    user-select: all;
}
