/*
 * Flux office · the first page (App\Filament\Pages\Dashboard): "Azi" for people of the factory and its office,
 * "Comenzile mele" for a customer or reseller login. Loaded after fx-dashboard.css and before fx-calm.css.
 * Built on fx-tokens.css (every colour, corner, depth and timing) and the primitives of fx-motion.css / fx-motion.js.
 *
 * The idea: only what this person acts on. One main button (the page header's, in the factory's colour), one flat
 * row of four figures, short groups of rows with one action each, the hall as a small table. No cards to read, no
 * colour that is not a status. Flat white surfaces with a hairline (the calm look).
 *
 * Layout: a computer and a tablet on its side (>= 1024px) put the queue in the main column and "Hala acum" in a
 * narrow column on its right, the stage strip above both. Below that, one column: queue, strip, hall (the main
 * button is in the page header, above them).
 *
 * Motion, only on a change. First show, once a tab session (data-fx-scene="home"): the strip and the panels fade
 * in, the rows arrive one after another, the figures count up. Every minute: a figure that changed counts from old
 * to new and glows, a row that left lets the others glide up, a new one slides in. "încă N" unfolds a group's other
 * rows in place while the groups under it glide down (public/js/fx-dashboard.js). A pressed row or button gives.
 * People who asked their system for less motion get the final state at once.
 */

.fx-home-grid > .fi-grid { overflow: visible; }

.fx-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--fx-gap);
    align-items: start;
    color: var(--fx-ink);
}
.fx-home-strip { order: 2; }
.fx-home-queue { order: 1; }
.fx-home-hall { order: 3; }
/* Someone with a single thing here (only the hall, only the queue) gets it at a comfortable reading width. */
.fx-home-today:not(.has-hall) .fx-home-queue { max-width: 60rem; }
.fx-home-today:not(.has-queue) .fx-home-hall { max-width: 34rem; }
@media (min-width: 1024px) {
    .fx-home-today.has-hall.has-queue {
        grid-template-columns: minmax(0, 1fr) clamp(18rem, 30%, 22.5rem);
        grid-template-areas: 'strip strip' 'queue hall';
    }
    .fx-home-today.has-hall.has-queue .fx-home-strip { grid-area: strip; }
    .fx-home-today.has-hall.has-queue .fx-home-queue { grid-area: queue; }
    .fx-home-today.has-hall.has-queue .fx-home-hall { grid-area: hall; }
    .fx-home-strip { order: 0; }
}

/* ================================================================================= The stage strip */
/* One flat row on the page itself: a dot in the stage's colour, its name, its number. Each opens its tab of Comenzi. */
.fx-home-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--fx-s-1);
    margin: 0;
}
.fx-home-stage {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: var(--fx-s-2);
    row-gap: 2px;
    min-height: var(--fx-tap);
    padding: var(--fx-s-2) var(--fx-s-3);
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-2);
    text-decoration: none;
}
.fx-home-dot {
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: var(--fx-r-pill);
    background: var(--fx-home-c, var(--fx-line-2));
}
.fx-home-stage-label { font-size: var(--fx-fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-home-stage-n {
    grid-column: 2;
    font-size: var(--fx-fs-20);
    font-weight: var(--fx-fw-strong);
    line-height: var(--fx-lh-tight);
    letter-spacing: var(--fx-track-num);
    color: var(--fx-ink);
}
.fx-home-stage.is-zero .fx-home-dot { background: var(--fx-line-2); }
.fx-home-stage.is-zero .fx-home-stage-n { color: var(--fx-ink-3); font-weight: var(--fx-fw-regular); }
.fx-home-stage:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-offset) * -1); }
@media (hover: hover) and (pointer: fine) {
    .fx-home-stage { transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
    .fx-home-stage:hover { background: var(--fx-canvas-deep); color: var(--fx-ink); }
}
@media (min-width: 640px) {
    .fx-home-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fx-s-1) var(--fx-s-5); margin-inline: calc(var(--fx-s-3) * -1); }
    .fx-home-stage { display: inline-flex; align-items: baseline; gap: var(--fx-s-2); min-height: 36px; padding-block: var(--fx-s-1); }
    .fx-home-stage .fx-home-dot { align-self: center; transform: translateY(-1px); }
    .fx-home-stage-label { font-size: var(--fx-fs-14); }
    .fx-home-stage-n { font-size: var(--fx-fs-18); }
    /* a small arrow between two stages: an order goes from one to the next */
    .fx-home-stage + .fx-home-stage { position: relative; }
    .fx-home-stage + .fx-home-stage::before {
        content: '';
        position: absolute;
        left: calc(var(--fx-s-5) / -2 - 4px);
        top: 50%;
        width: 6px;
        height: 6px;
        border: solid var(--fx-line-2);
        border-width: 1.5px 1.5px 0 0;
        transform: translateY(-50%) rotate(45deg);
        pointer-events: none;
    }
}

/* ================================================================================= Panels and their heads */
.fx-home-queue, .fx-home-hall, .fx-home-side {
    min-width: 0;
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
}
.fx-home-head {
    display: flex;
    align-items: center;
    gap: var(--fx-s-2);
    min-height: 52px;
    padding: var(--fx-s-2) var(--fx-pad-panel);
}
.fx-home-head h2 {
    margin: 0;
    font-size: var(--fx-fs-16);
    font-weight: var(--fx-fw-semibold);
    letter-spacing: -0.01em;
    color: var(--fx-ink);
}
.fx-home-total {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 var(--fx-s-2);
    border-radius: var(--fx-r-pill);
    background: var(--fx-canvas-deep);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-12);
    font-weight: var(--fx-fw-semibold);
}
.fx-home-link {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    min-height: 32px;
    margin-left: auto;
    padding: 0 var(--fx-s-1) 0 var(--fx-s-2);
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-medium);
    text-decoration: none;
    white-space: nowrap;
}
.fx-home-link:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 1px; }
.fx-home-go {
    width: 1rem;
    height: 1rem;
    flex: none;
    color: var(--fx-ink-3);
    transition: transform var(--fx-dur-2) var(--fx-ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .fx-home-link:hover { background: var(--fx-hover); color: var(--fx-ink); }
    .fx-home-link:hover .fx-home-go, .fx-home-row:hover .fx-home-go { transform: translateX(2px); color: var(--fx-ink-2); }
}

/* ================================================================================= The queue: groups and rows */
.fx-home-groups { padding-bottom: var(--fx-s-2); }
/* the hairline above a group belongs to its title, so it glides with it */
.fx-home-gh {
    display: flex;
    align-items: center;
    gap: var(--fx-s-2);
    height: 38px;
    padding: var(--fx-s-2) var(--fx-pad-panel) 0;
    border-top: 1px solid var(--fx-line);
    color: var(--fx-ink-2);
}
.fx-home-gh-ico { width: 1rem; height: 1rem; flex: none; color: var(--fx-ink-3); }
.fx-home-gh h3 { margin: 0; font-size: var(--fx-fs-13); font-weight: var(--fx-fw-semibold); color: var(--fx-ink-2); }
.fx-home-gh-n { font-size: var(--fx-fs-13); color: var(--fx-ink-3); }
.fx-home-more {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 28px;
    margin-left: auto;
    margin-right: calc(var(--fx-s-2) * -1);
    padding: 0 var(--fx-s-1) 0 var(--fx-s-2);
    border-radius: var(--fx-r-ctl);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-medium);
    white-space: nowrap;
}
.fx-home-more:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: 1px; }
.fx-home-more-chev { width: 1rem; height: 1rem; color: var(--fx-ink-3); transition: transform var(--fx-dur-3) var(--fx-ease-move); }
.fx-home-more-hide { display: none; }
.fx-home-group.is-fx-open .fx-home-more-show { display: none; }
.fx-home-group.is-fx-open .fx-home-more-hide { display: inline; }
.fx-home-group.is-fx-open .fx-home-more-chev { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) { .fx-home-more:hover { background: var(--fx-hover); color: var(--fx-ink); } }
@media (pointer: coarse) { .fx-home-more { height: 36px; } }

.fx-home-rows { margin: 0; padding: 0; list-style: none; }
/* Rows behind "încă N" are folded, not removed: they keep their place in the list, so they unfold from it. */
.fx-home-rows > .is-extra { height: 0; overflow: hidden; visibility: hidden; }
.fx-home-group.is-fx-open .fx-home-rows > .is-extra { height: auto; overflow: visible; visibility: visible; }

.fx-home-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'id act' 'why act';
    align-items: center;
    column-gap: var(--fx-s-3);
    row-gap: 1px;
    min-height: 56px;
    padding: var(--fx-s-2) var(--fx-pad-panel);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    text-decoration: none;
}
.fx-home-row:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-offset) * -1); }
.fx-home-id { grid-area: id; display: flex; align-items: center; gap: var(--fx-s-1); min-width: 0; }
.fx-home-num { font-weight: var(--fx-fw-semibold); font-variant-numeric: tabular-nums; letter-spacing: var(--fx-track-num); white-space: nowrap; }
.fx-home-mark { width: 0.875rem; height: 0.875rem; flex: none; }
.fx-home-mark.is-urgent { color: var(--fx-st-urgent); }
.fx-home-mark.is-remark { color: var(--fx-st-remark); }
.fx-home-mark.is-late { color: var(--fx-warn-fill); }
.fx-home-mark.is-overdue { color: var(--fx-bad-fill); }
.fx-home-who { display: none; min-width: 0; color: var(--fx-ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-home-why { grid-area: why; display: flex; align-items: baseline; gap: var(--fx-s-2); min-width: 0; color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-home-why-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-home-when { flex: none; white-space: nowrap; }
.fx-home-when::before { content: '·'; margin-right: var(--fx-s-2); }
.fx-home-when.is-soon { color: var(--fx-warn); }
.fx-home-act, .fx-home-row > .fx-home-go { grid-area: act; }
.fx-home-act {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 var(--fx-s-3);
    border-radius: var(--fx-r-ctl);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 1px var(--fx-line-2);
    color: var(--fx-ink);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    white-space: nowrap;
    transition: background-color var(--fx-dur-2) var(--fx-ease-out), box-shadow var(--fx-dur-2) var(--fx-ease-out);
}
.fx-home-row-all { grid-template-areas: 'id act'; min-height: var(--fx-tap); color: var(--fx-ink-2); font-size: var(--fx-fs-13); font-weight: var(--fx-fw-medium); }
@media (hover: hover) and (pointer: fine) {
    .fx-home-row { transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
    .fx-home-row:hover { background: var(--fx-hover); }
    .fx-home-row:hover .fx-home-act { background: var(--fx-canvas-deep); box-shadow: inset 0 0 0 1px var(--fx-ink-3); }
}
/* On a phone the customer's name sits beside the number and the reason may take two lines; from a tablet up a
   row is one line. */
@media (max-width: 767.98px) {
    .fx-home-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'id who act' 'why why act'; }
    .fx-home-who { display: block; grid-area: who; }
    .fx-home-why { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; line-height: var(--fx-lh-snug); }
    .fx-home-why-text { white-space: normal; }
    .fx-home-when::before { margin-inline: var(--fx-s-1); }
}
@media (max-width: 639.98px) {
    .fx-home-stage { padding-inline: var(--fx-s-1); column-gap: 6px; }
    .fx-home-stage-label { font-size: var(--fx-fs-12); }
}
@media (min-width: 768px) {
    .fx-home-row {
        grid-template-columns: 6.25rem minmax(7rem, 13rem) minmax(0, 1fr) auto;
        grid-template-areas: 'id who why act';
        min-height: 41px;
        padding-block: var(--fx-s-1);
    }
    .fx-home-who { display: block; grid-area: who; }
    .fx-home-act { height: 28px; padding: 0 10px; }
    .fx-home-row-all { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'id act'; min-height: 36px; }
}
@media (min-width: 768px) and (pointer: coarse) { .fx-home-row { min-height: var(--fx-tap); } .fx-home-act { height: 32px; } }

/* Nothing waits: one calm line and a tick that draws itself. */
.fx-home-clear {
    display: flex;
    align-items: center;
    gap: var(--fx-s-3);
    padding: var(--fx-s-2) var(--fx-pad-panel) var(--fx-s-6);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-14);
}
.fx-home-clear p { margin: 0; }
.fx-home-tick { width: 1.75rem; height: 1.75rem; flex: none; stroke: var(--fx-ok-fill); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fx-home-orders > .fx-home-clear { padding: var(--fx-s-5) var(--fx-pad-panel); background: var(--fx-surface); border-radius: var(--fx-r-panel); box-shadow: var(--fx-shadow-1); max-width: 34rem; }

/* ================================================================================= Hala acum */
.fx-home-hall { padding-bottom: var(--fx-s-2); }
.fx-home-table { width: 100%; border-collapse: collapse; font-size: var(--fx-fs-14); }
.fx-home-table th, .fx-home-table td { padding: 0 var(--fx-s-2); height: 38px; text-align: left; border-top: 1px solid var(--fx-line); }
.fx-home-table thead th { height: 30px; padding-bottom: var(--fx-s-1); border-top: 0; vertical-align: bottom; color: var(--fx-ink-3); font-size: var(--fx-fs-12); font-weight: var(--fx-fw-regular); line-height: var(--fx-lh-snug); }
.fx-home-table thead th.is-num { white-space: normal; min-width: 4.25rem; }
.fx-home-table tr > :first-child { padding-left: var(--fx-pad-panel); }
.fx-home-table tr > :last-child { padding-right: var(--fx-pad-panel); }
.fx-home-table tbody th { padding-block: var(--fx-s-1); font-weight: var(--fx-fw-medium); color: var(--fx-ink); line-height: var(--fx-lh-snug); }
.fx-home-table .is-num { width: 1%; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fx-home-table td.is-num b { font-weight: var(--fx-fw-semibold); color: var(--fx-ink); }
.fx-home-table td.is-ready b { color: var(--fx-st-ready-text); }
.fx-home-table td.is-zero b { font-weight: var(--fx-fw-regular); color: var(--fx-ink-3); }
.fx-home-line { color: inherit; text-decoration: none; border-radius: var(--fx-r-xs); }
.fx-home-line:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-home-line:hover { text-decoration: underline; text-underline-offset: 3px; } }
@media (pointer: coarse) { .fx-home-table th, .fx-home-table td { height: var(--fx-tap); } .fx-home-table thead th { height: 32px; } }

/* ================================================================================= Comenzile mele */
.fx-home-mine.has-side { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .fx-home-mine.has-side { grid-template-columns: minmax(0, 1fr) clamp(18rem, 30%, 23rem); } }
.fx-home-orders { min-width: 0; }
.fx-home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
    gap: var(--fx-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}
.fx-home-cards.is-one { grid-template-columns: minmax(0, 34rem); }
.fx-home-card {
    display: flex;
    flex-direction: column;
    gap: var(--fx-s-5);
    height: 100%;
    padding: var(--fx-pad-panel);
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
    color: var(--fx-ink);
    text-decoration: none;
    transition: box-shadow var(--fx-dur-2) var(--fx-ease-out);
}
.fx-home-card:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) { .fx-home-card:hover { box-shadow: var(--fx-shadow-2); } }
.fx-home-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fx-s-3); }
.fx-home-card-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fx-home-card-num { font-size: var(--fx-fs-18); font-weight: var(--fx-fw-strong); letter-spacing: var(--fx-track-num); font-variant-numeric: tabular-nums; }
.fx-home-card-ref { color: var(--fx-ink-2); font-size: var(--fx-fs-14); overflow-wrap: anywhere; }
.fx-home-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    height: 26px;
    padding: 0 10px 0 8px;
    border-radius: var(--fx-r-pill);
    background: var(--fx-home-bg);
    color: var(--fx-home-t);
    font-size: var(--fx-fs-13);
    font-weight: var(--fx-fw-semibold);
    white-space: nowrap;
}

/* The track: four steps on one line; the line fills to where the order is. */
.fx-home-track { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fx-home-track-line {
    position: absolute;
    top: 8px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    border-radius: var(--fx-r-pill);
    background: var(--fx-line);
    overflow: hidden;
}
.fx-home-track-line i { display: block; width: 100%; height: 100%; background: var(--fx-ink-2); }
.fx-home-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: var(--fx-s-2); min-width: 0; color: var(--fx-ink-3); font-size: var(--fx-fs-12); text-align: center; line-height: var(--fx-lh-snug); }
.fx-home-node {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: var(--fx-r-pill);
    background: var(--fx-surface);
    box-shadow: inset 0 0 0 2px var(--fx-line-2);
}
.fx-home-step.is-done .fx-home-node { background: var(--fx-ink-2); box-shadow: none; color: var(--fx-surface); }
.fx-home-node-tick { width: 0.75rem; height: 0.75rem; }
.fx-home-step.is-now { color: var(--fx-ink); font-weight: var(--fx-fw-semibold); }
.fx-home-step.is-now:not(.is-done) .fx-home-node { box-shadow: inset 0 0 0 2px var(--fx-home-c), inset 0 0 0 5px var(--fx-surface); background: var(--fx-home-c); }

.fx-home-card-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--fx-s-4); margin-top: auto; padding-top: var(--fx-s-4); border-top: 1px solid var(--fx-line); font-size: var(--fx-fs-14); line-height: var(--fx-lh-snug); }
.fx-home-card-line { min-width: 0; color: var(--fx-ink-2); }
.fx-home-card-money { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: none; margin-left: auto; color: var(--fx-ink-3); font-size: var(--fx-fs-13); white-space: nowrap; }
.fx-home-card-money b { color: var(--fx-ink); font-size: var(--fx-fs-14); font-weight: var(--fx-fw-semibold); font-variant-numeric: tabular-nums; }
.fx-home-card-money .is-owed { color: var(--fx-ink-2); }

.fx-home-foot { display: flex; flex-wrap: wrap; gap: var(--fx-s-1) var(--fx-s-4); margin: var(--fx-s-3) 0 0 calc(var(--fx-s-2) * -1); }
.fx-home-foot .fx-home-link { margin-left: 0; }

/* Offers that wait for the customer's answer */
.fx-home-side { padding-bottom: var(--fx-s-2); }
.fx-home-side .fx-home-rows > li { border-top: 1px solid var(--fx-line); }
.fx-home-offer { display: flex; align-items: center; gap: var(--fx-s-3); min-height: 56px; padding-block: var(--fx-s-2); }
.fx-home-offer-main { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.fx-home-offer-main .fx-home-when { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-home-offer-main .fx-home-when::before { content: none; }
.fx-home-offer-main .fx-home-when.is-soon { color: var(--fx-warn); }
.fx-home-offer-total { font-weight: var(--fx-fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-home-side > .fx-home-link { margin: var(--fx-s-1) var(--fx-pad-panel) 0 calc(var(--fx-pad-panel) - var(--fx-s-2)); }

/* ================================================================================= Primii pași */
/* What a new factory still has to set up, above "Te așteaptă" and on the Setări hub (first-steps.blade.php). One row
   a step: a ring that becomes a green tick, a sentence, one quiet button. The step to do next is in dark text. */
.fx-first {
    order: 0;
    min-width: 0;
    background: var(--fx-surface);
    border-radius: var(--fx-r-panel);
    box-shadow: var(--fx-shadow-1);
    padding-bottom: var(--fx-s-2);
}
.fx-home-today:not(.has-hall) .fx-first { max-width: 60rem; }
@media (min-width: 1024px) {
    .fx-home-today.has-hall.has-queue.has-first { grid-template-areas: 'strip strip' 'first hall' 'queue hall'; }
    .fx-home-today.has-hall.has-queue.has-first .fx-first { grid-area: first; }
}
.fx-first-count { color: var(--fx-ink-3); font-size: var(--fx-fs-13); font-variant-numeric: tabular-nums; border-radius: var(--fx-r-xs); }
.fx-first-bar { height: 3px; margin: 0 var(--fx-pad-panel) var(--fx-s-1); border-radius: var(--fx-r-pill); background: var(--fx-canvas-deep); overflow: hidden; }
.fx-first-bar i { display: block; height: 100%; border-radius: inherit; background: var(--fx-ok-fill); transition: width var(--fx-dur-4) var(--fx-ease-move); }
.fx-first-rows { margin: 0; padding: 0; list-style: none; }
.fx-first-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: var(--fx-s-3);
    min-height: var(--fx-tap);
    padding: var(--fx-s-2) var(--fx-pad-panel);
    color: var(--fx-ink-2);
    font-size: var(--fx-fs-14);
    line-height: var(--fx-lh-snug);
}
.fx-first-row + .fx-first-row { border-top: 1px solid var(--fx-line); }
.fx-first-mark { width: 1.375rem; height: 1.375rem; flex: none; }
span.fx-first-mark { border-radius: var(--fx-r-pill); box-shadow: inset 0 0 0 1.5px var(--fx-line-2); }
svg.fx-first-mark { stroke: var(--fx-ok-fill); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fx-first-text { display: grid; gap: 1px; min-width: 0; }
.fx-first-text small { color: var(--fx-ink-3); font-size: var(--fx-fs-13); }
.fx-first-row.is-next { color: var(--fx-ink); font-weight: var(--fx-fw-medium); }
.fx-first-row.is-next small { font-weight: var(--fx-fw-regular); }
.fx-first-row.is-next span.fx-first-mark { box-shadow: inset 0 0 0 1.5px var(--fx-ink-2); }
.fx-first-row.is-done { color: var(--fx-ink-3); }
/* the queue's row button is placed by a named area; here it simply follows the sentence */
.fx-first-row .fx-home-act { grid-area: auto; text-decoration: none; }
.fx-first-row .fx-home-act:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: var(--fx-focus-offset); }
@media (hover: hover) and (pointer: fine) {
    .fx-first-row .fx-home-act:hover { background: var(--fx-canvas-deep); box-shadow: inset 0 0 0 1px var(--fx-ink-3); }
}
@media (pointer: coarse) { .fx-first-row .fx-home-act { height: 36px; } }
@media (max-width: 479.98px) {
    /* the button goes under its sentence, so neither is squeezed */
    .fx-first-row { grid-template-columns: auto minmax(0, 1fr); row-gap: var(--fx-s-2); }
    .fx-first-row .fx-home-act { grid-column: 2; justify-self: start; }
}

/* "Ce mai lipsește" on the Setări hub: each sentence opens the place that fixes it. */
.fx-first-gaps { margin: 0; padding: 0 0 var(--fx-s-2); list-style: none; }
.fx-first-gaps > li { border-top: 1px solid var(--fx-line); }
.fx-first-gap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--fx-s-3);
    min-height: var(--fx-tap);
    padding: var(--fx-s-2) var(--fx-pad-panel);
    color: var(--fx-ink);
    font-size: var(--fx-fs-14);
    line-height: var(--fx-lh-snug);
    text-decoration: none;
}
a.fx-first-gap:focus-visible { outline: var(--fx-focus-width) solid var(--fx-focus-color); outline-offset: calc(var(--fx-focus-offset) * -1); }
@media (hover: hover) and (pointer: fine) {
    a.fx-first-gap { transition: background-color var(--fx-dur-2) var(--fx-ease-out); }
    a.fx-first-gap:hover { background: var(--fx-hover); }
    a.fx-first-gap:hover .fx-home-go { transform: translateX(2px); color: var(--fx-ink-2); }
}

/* ================================================================================= The page's main button */
/* On a phone the one main button takes the width and the thumb's height, right under the title. */
@media (max-width: 639.98px) {
    .fi-header:has(.fx-home-main) { flex-direction: column; align-items: stretch; }
    .fi-header:has(.fx-home-main) .fi-header-actions-ctn, .fi-header:has(.fx-home-main) .fi-ac { width: 100%; }
    .fi-btn.fx-home-main { width: 100%; min-height: var(--fx-tap-main); }
}
