/* ─────────────────────────────────────────────────────────────────────────────
   Manage Event (/manage-event/{code}) — workspace layout (2026-09-25 redesign)

   Header card (code, name, status, actions, stage stepper) sits above a grid:
     desktop 1200+     NOW      | SIDEBAR        (sidebar spans both rows)
                       ACTIVITY |
     under 1200        NOW → SIDEBAR → ACTIVITY  (money stays near the top)

   Flat: three surfaces (.me-card ×2 + .me-side), each one level deep —
   sections inside are separated by hairline dividers, never boxed.
   Page tokens (--me-border, --me-divider, --me-radius) are set on .me-page
   in ManageEvent.razor's own style block.
   ───────────────────────────────────────────────────────────────────────────── */

/* ═══ Header card ══════════════════════════════════════════════════════════
   back | #CODE (centered pill) | status + actions
   name + client contact (centered)
   tinted fact strip: date · time · guests · lanes
   stage track (ManageEvent.razor's own style block) */

.mh-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
}
.mh-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}
.mh-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}
/* History | Modify — one joined pill; Rollback — small round amber icon (developer);
   Next stage — the only solid button. */
.mh-tools {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--me-border);
    border-radius: 999px;
    overflow: hidden;
}
.mh-tools a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.mh-tools a + a { border-left: 1px solid var(--me-border); }
.mh-tools a:hover {
    background: rgba(var(--brand-primary-rgb, 3, 102, 214), 0.06);
    color: var(--brand-primary);
}
.mh-tools i { font-size: 0.85rem; }

.mh-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--me-border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.mh-icon-btn.warn { color: #b45309; border-color: rgba(180, 83, 9, 0.35); }
.mh-icon-btn.warn:hover { background: rgba(217, 119, 6, 0.1); border-color: #b45309; }
[data-theme="dark"] .mh-icon-btn.warn { color: #f0a752; border-color: rgba(240, 167, 82, 0.4); }

.mh-next {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 32px;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
}
.mh-next:hover { filter: brightness(0.94); }

.mh-code {
    padding: 0.3rem 1.1rem;
    border-radius: 999px;
    background: rgba(111, 66, 193, 0.09);
    border: 1px solid rgba(111, 66, 193, 0.22);
    color: var(--brand-purple, #6f42c1);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1.2;
    white-space: nowrap;
}
[data-theme="dark"] .mh-code {
    background: rgba(160, 120, 230, 0.14);
    border-color: rgba(160, 120, 230, 0.35);
    color: #c0a6f0;
}

.mh-main {
    text-align: center;
    margin-top: 0.85rem;
}
.mh-name {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--text-heading);
}
.mh-client {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    margin-top: 0.4rem;
    font-size: 0.86rem;
}
.mh-client > * {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.mh-client-name { font-weight: 600; color: var(--text-secondary); }
.mh-client a { color: var(--brand-primary); text-decoration: none; }
.mh-client a:hover { text-decoration: underline; }
.mh-client i { font-size: 0.8rem; opacity: 0.75; }

.mh-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
    border-radius: var(--me-radius, 0.75rem);
    background: rgba(var(--brand-primary-rgb, 3, 102, 214), 0.045);
    border: 1px solid rgba(var(--brand-primary-rgb, 3, 102, 214), 0.14);
}
.mh-fact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.7rem 0.5rem;
    text-align: center;
    min-width: 0;
}
.mh-fact + .mh-fact { border-left: 1px solid rgba(var(--brand-primary-rgb, 3, 102, 214), 0.12); }
.mh-fact-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.mh-fact-label i { color: var(--brand-primary); font-size: 0.75rem; }
.mh-fact-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
    font-variant-numeric: tabular-nums;
}
.mh-fact-value small { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }
.mh-fact-value.muted { color: var(--text-muted); font-weight: 600; }

.mh-waves {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.mh-waves i { margin-right: 0.3rem; color: var(--brand-primary); }

@media (max-width: 1199.98px) {
    .mh-top {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "code code"
            "left right";
        row-gap: 0.75rem;
    }
    .mh-code { grid-area: code; justify-self: center; }
    .mh-left { grid-area: left; }
    .mh-right { grid-area: right; }
}

@media (max-width: 767.98px) {
    .mh-top {
        grid-template-columns: 1fr;
        grid-template-areas:
            "left"
            "code"
            "right";
    }
    .mh-right { justify-content: center; }
    .mh-name { font-size: 1.25rem; }
    .mh-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .mh-fact:nth-child(3) { border-left: 0; }
    .mh-fact:nth-child(n+3) { border-top: 1px solid rgba(var(--brand-primary-rgb, 3, 102, 214), 0.12); }
}

.me-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "now side"
        "activity side";
    gap: 1rem;
    align-items: start;
}
.me-now { grid-area: now; }
.me-activity { grid-area: activity; }
.me-side { grid-area: side; }

.me-card,
.me-side {
    background: var(--surface-card, #fff);
    border: 1px solid var(--me-border, rgba(0, 0, 0, 0.1));
    border-radius: var(--me-radius, 0.75rem);
    min-width: 0;
}
.me-card {
    padding: 1.25rem 1.5rem 1.5rem;
}
.me-side {
    padding: 0 1.25rem;
}

/* ═══ Card head ════════════════════════════════════════════════════════════ */

.me-card-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-bottom: 1rem;
}
.me-card-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text-heading);
}
.me-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.me-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--brand-primary);
    cursor: pointer;
}
.me-link:hover { text-decoration: underline; }

/* ═══ Activity ═════════════════════════════════════════════════════════════ */

.me-search {
    margin-left: auto;
    width: min(260px, 100%);
    min-height: 36px;
    padding: 0.3rem 0.85rem;
    border: 1px solid var(--me-border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.82rem;
}
.me-search:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.me-composer {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--me-divider);
}
.me-composer textarea {
    resize: vertical;
    min-height: 64px;
    font-size: 0.88rem;
    border-radius: 0.6rem;
}
.me-composer-actions {
    display: flex;
    justify-content: flex-end;
}

/* Segmented switch: internal note | client communication */
.me-seg {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px;
    border-radius: 999px;
    background: var(--me-divider);
    gap: 2px;
    flex-wrap: wrap;
}
.me-seg button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}
.me-seg button.on {
    background: var(--surface-card, #fff);
    color: var(--text-heading);
}

/* Optional "was this a conversation with the client?" line under the note box */
.me-contact {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.me-contact-q {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
}
.me-contact-clear {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-primary);
    cursor: pointer;
}
.me-contact-clear i { font-size: 0.7rem; }
.me-contact-clear:hover { text-decoration: underline; }
.me-contact-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.fu-method.sm {
    min-height: 32px;
    padding: 0 0.8rem;
    font-size: 0.8rem;
}
.me-composer-actions { align-items: center; gap: 0.75rem; }

.me-chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}
.me-chip-sep {
    width: 1px;
    height: 22px;
    background: var(--me-border);
    margin: 0 0.25rem;
}

/* Timeline: a dot per note on a thin rail (no accent bars). Dot color = note type:
   inbound green, outbound blue, internal amber, system grey. */
.me-feed .note-item {
    position: relative;
    margin: 0;
    padding: 0 0 1.1rem 1.6rem;
    border-left: 0;
}
.me-feed .note-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #9ca3af;
    box-shadow: 0 0 0 3px var(--surface-card, #fff);
    z-index: 1;
}
.me-feed .note-item::after {
    content: '';
    position: absolute;
    left: 4.5px;
    top: 0.9rem;
    bottom: -0.45rem;
    width: 2px;
    background: var(--me-divider);
}
.me-feed .note-item:last-of-type { padding-bottom: 0; }
.me-feed .note-item:last-of-type::after { display: none; }
.me-feed .note-inbound::before  { background: #22c55e; }
.me-feed .note-outbound::before { background: #0d6efd; }
.me-feed .note-internal::before { background: #f59e0b; }
.me-feed .note-system::before   { background: #9ca3af; }
.me-feed .note-item > div:last-child {
    font-size: 0.88rem;
    color: var(--text-primary);
    white-space: pre-wrap;
}
.me-empty {
    padding: 1.25rem 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ═══ Follow-up logger (Follow-Up stage, NOW panel) ═══════════════════════ */

.fu-log {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--me-divider);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.fu-log-head { display: flex; flex-direction: column; gap: 0.15rem; }
.fu-log-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-heading);
}
.fu-log-sub { font-size: 0.8rem; color: var(--text-muted); }

.fu-field { display: flex; flex-direction: column; gap: 0.45rem; }
.fu-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin: 0;
}
.fu-optional { font-weight: 500; color: var(--text-muted); }
.fu-field textarea {
    resize: vertical;
    min-height: 64px;
    font-size: 0.88rem;
    border-radius: 0.6rem;
}

.fu-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.fu-method {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 38px;
    padding: 0 1rem;
    border: 1px solid var(--me-border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.fu-method:hover { border-color: var(--brand-primary); color: var(--text-heading); }
.fu-method.on {
    border-color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb, 3, 102, 214), 0.08);
    color: var(--brand-primary);
}

/* Outcome cards: icon + label + what it does. Tone shows on hover/selected. */
.fu-outcomes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}
.fu-outcome {
    --fu-tone: 108, 117, 125;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--me-border);
    border-radius: var(--me-radius, 0.75rem);
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.fu-outcome > i {
    font-size: 1.1rem;
    line-height: 1.2;
    color: rgb(var(--fu-tone));
}
.fu-outcome-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.fu-outcome-text strong { font-size: 0.86rem; color: var(--text-heading); }
.fu-outcome-text span { font-size: 0.74rem; color: var(--text-muted); }
.fu-outcome:hover { border-color: rgba(var(--fu-tone), 0.55); }
.fu-outcome.on {
    border-color: rgb(var(--fu-tone));
    background: rgba(var(--fu-tone), 0.08);
}
.fu-green { --fu-tone: 25, 135, 84; }
.fu-amber { --fu-tone: 217, 119, 6; }
.fu-red   { --fu-tone: 220, 53, 69; }
.fu-grey  { --fu-tone: 108, 117, 125; }

.fu-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
}
.fu-actions .btn { min-height: 40px; padding: 0 1.25rem; }
.fu-actions .me-link { margin-left: auto; }
.fu-missing { font-size: 0.78rem; color: var(--text-muted); }

.fu-giveup {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.6rem;
    padding-top: 0.9rem;
    border-top: 1px dashed var(--me-border);
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.fu-giveup-note { flex-basis: 100%; font-size: 0.75rem; color: var(--text-muted); }

/* ═══ Declined / Cancelled outcome (NOW panel) ═══════════════════════════ */

.me-outcome {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    border-radius: var(--me-radius, 0.75rem);
}
.me-outcome--red {
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
}
.me-outcome-head {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
}
.me-outcome-head > i {
    font-size: 1.35rem;
    line-height: 1.1;
    color: #dc3545;
}
.me-outcome-head strong {
    display: block;
    font-size: 1rem;
    color: var(--text-heading);
}
.me-outcome-head span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.me-outcome-facts {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.6rem 1.25rem;
}
.me-outcome-facts dt {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.me-outcome-facts dd {
    margin: 0.1rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
}
.me-outcome-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(220, 53, 69, 0.15);
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.me-outcome-foot span { flex: 1 1 260px; }
.me-outcome-foot .btn { border-radius: 999px; min-height: 36px; }

.me-sub-title {
    margin: 1.5rem 0 0.4rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
}
.me-rows { display: flex; flex-direction: column; }
.me-row {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--me-divider);
}
.me-row:last-child { border-bottom: 0; }
.me-row-top { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.me-row-date { font-size: 0.78rem; color: var(--text-muted); }
.me-row-body { margin-top: 0.3rem; font-size: 0.86rem; color: var(--text-primary); white-space: pre-wrap; }

/* ═══ Sidebar ══════════════════════════════════════════════════════════════ */

.me-side-sec {
    padding: 1.1rem 0;
    border-top: 1px solid var(--me-divider);
}
.me-side-sec:first-child { border-top: 0; }

.me-side-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.me-side-title .status-chip { letter-spacing: 0.03em; }

/* Event facts */
.me-facts {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.me-facts > div {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.75rem;
    font-size: 0.86rem;
}
.me-facts dt {
    font-weight: 500;
    color: var(--text-muted);
}
.me-facts dd {
    margin: 0;
    color: var(--text-heading);
    min-width: 0;
    overflow-wrap: anywhere;
}
.me-fact-line {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
a.me-fact-line {
    display: block;
    color: var(--brand-primary);
    text-decoration: none;
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
a.me-fact-line i { margin-right: 0.35rem; }
a.me-fact-line:hover { text-decoration: underline; }

/* Money */
.me-money {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.me-money-paid {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    color: var(--text-heading);
}
.me-money-of {
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.me-bar {
    height: 6px;
    margin: 0.6rem 0 0.75rem;
    border-radius: 999px;
    background: var(--me-divider);
    overflow: hidden;
}
.me-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--brand-primary);
}
.me-bar.full > span { background: #198754; }
.me-money-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
}
.me-money-row strong {
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-heading);
}

.me-disclose {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}
.me-disclose:hover { color: var(--text-heading); }
.me-payments { margin-top: 0.35rem; }
.me-payments .deposit-line:last-child { border-bottom: 0; }

.me-side-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}
.me-side-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    min-height: 30px;
    padding: 0 0.75rem;
    font-size: 0.78rem;
}
.me-side-actions .btn i { margin: 0 !important; font-size: 0.85rem; }
.me-side-actions .btn .clover-btn-icon { width: 13px; height: 13px; }

/* Package */
.me-opt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}
.me-opt-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 30px;
    padding: 0 0.75rem;
    border: 1px solid var(--me-border);
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.me-opt-tabs button.on {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}
.me-opt-tabs .bi-check-circle-fill { color: #198754; }

.me-opt-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid var(--me-divider);
}
.me-opt-head--sub { margin-top: 1rem; }
.me-opt-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-heading);
}
.me-opt-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.me-opt-total {
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-heading);
    white-space: nowrap;
}
.me-line {
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    gap: 0.5rem;
    padding: 0.35rem 0;
    font-size: 0.82rem;
    align-items: baseline;
}
.me-line-qty {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.me-line-name {
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.me-line-amt {
    font-variant-numeric: tabular-nums;
    color: var(--text-heading);
    font-weight: 600;
}
.me-opt-foot {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--me-divider);
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Documents — one row per document, round icon actions on the right */
.me-lang {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--brand-purple, #6f42c1);
}
.me-doc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.4rem 0;
}
.me-doc + .me-doc { border-top: 1px solid var(--me-divider); }
.me-doc-name {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-heading);
}
.me-doc-name i { color: var(--text-muted); }
.me-doc-acts { display: flex; gap: 0.35rem; }
.me-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--me-border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.me-icon-btn:hover:not(:disabled) {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(var(--brand-primary-rgb, 3, 102, 214), 0.06);
}
.me-icon-btn.wa:hover:not(:disabled) {
    border-color: #198754;
    color: #198754;
    background: rgba(25, 135, 84, 0.06);
}
.me-icon-btn:disabled { opacity: 0.5; cursor: wait; }
.me-icon-btn .spinner-border-sm { width: 0.9rem; height: 0.9rem; border-width: 0.15em; }

/* Clover block moved in from the Confirmed tab: same slight tinted card, tighter */
.me-side .confirmed-action-card {
    padding: 0.75rem 0.85rem;
    gap: 0.6rem;
}
.me-side .confirmed-action-icon { font-size: 1.1rem; }

/* Cancel */
.me-side-danger {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}
.me-danger-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    border: 0;
    background: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: #dc3545;
    cursor: pointer;
}
.me-danger-link:hover { text-decoration: underline; }
.me-side-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══ Breakpoints: tablet 768–1199, mobile under 768 ═══════════════════════ */

@media (max-width: 1199.98px) {
    .fu-outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .me-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas:
            "now"
            "side"
            "activity";
    }
}

@media (max-width: 767.98px) {
    .me-layout { gap: 0.75rem; }
    .me-card { padding: 1rem 1rem 1.25rem; }
    .me-side { padding: 0 1rem; }
    .me-search { width: 100%; margin-left: 0; }
    .me-seg { align-self: stretch; }
    .me-seg button { flex: 1 1 auto; justify-content: center; }
    .me-chip-sep { display: none; }
}
