/* ── Owner panel ───────────────────────────────────────────────────────────
   Everything here sits on dashboard.css: the rail, the head, the facts
   strip, the tables and the pills are the merchant dashboard's own. What
   follows is only what the owner's view adds - a badge on the wordmark,
   two-column regions, the fee sweep's report, key/value lists. */

.own-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    border: 1px solid var(--line-strong);
    font-style: normal;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-2);
    vertical-align: 2px;
}

/* The foot's account block is a link back to the dashboard here, and a
   link must not wear the browser's blue and underline over the rail's
   own type. The second line reads as the action it is. */
a.rail__account, a.rail__account:visited { color: inherit; text-decoration: none; }
a.rail__account .rail__who b { color: var(--ink); }
a.rail__account .rail__who span { color: var(--ink-2); font-weight: 600; }
a.rail__account .rail__who span::before { content: "\2190\00a0"; }
a.rail__account:hover .rail__who span { color: var(--ink); }

.own-denied { padding: 60px 0; max-width: 60ch; }
.own-denied code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.92em; }

.own-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 0 40px;
}
@media (max-width: 1100px) { .own-grid { grid-template-columns: minmax(0, 1fr); } }

.own-back { color: var(--ink-3); cursor: pointer; }
.own-back:hover { color: var(--ink); }

/* Skeletons: what a region looks like while its first answer is on the
   way. A bar the height of the type it stands in, with a slow sheen; the
   sheen is off for anyone who asked for less motion, and the bar stays. */
.sk {
    display: inline-block;
    height: 1em;
    width: 8ch;
    border-radius: 4px;
    background: color-mix(in srgb, var(--ink) 9%, transparent);
    vertical-align: middle;
    position: relative;
    overflow: hidden;
}
.sk::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 55%, transparent), transparent);
}
@media (prefers-reduced-motion: no-preference) {
    .sk::after { animation: sk-sheen 1.6s ease-in-out infinite; }
}
@keyframes sk-sheen { to { transform: translateX(100%); } }
.sk--num { width: 6ch; height: 0.9em; }
.sk--big { width: 7ch; height: 0.85em; border-radius: 6px; }
.sk--line { width: 100%; height: 12px; }
.sk--short { width: 40%; height: 12px; }
.sk--pill { width: 64px; height: 20px; border-radius: 999px; }
.sk--chart { display: block; width: 100%; height: 180px; border-radius: 8px; }
.sk--kv { width: 60%; height: 12px; }
.dash-table tr.sk-row td { padding: 14px 12px 14px 0; }
.dash-table tr.sk-row td .sk + .sk { margin-left: 12px; }
.own-attention__row.sk-row::before { background: var(--line); }
.own-attention__row.sk-row .sk { flex: 1; }
.own-kv__row.sk-row span:first-child .sk { width: 70%; }

/* The search, at the top of the rail on every page. */
.own-search { display: flex; align-items: center; gap: 6px; margin: 0 6px 14px; padding: 0 8px 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.own-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 12.5px; color: var(--ink); padding: 8px 0; outline: none; }
.own-search input::placeholder { color: var(--ink-3); }
.own-search:focus-within { border-color: var(--ink); box-shadow: var(--focus-ring); }
.own-search kbd { font: 600 10px var(--font-sans, inherit); color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.own-search__go { border: 0; background: transparent; color: var(--ink-3); font: 700 16px/1 var(--font-sans, inherit); padding: 4px 2px; cursor: pointer; }
.own-search__go:hover { color: var(--ink); }
.own-break { word-break: break-all; font-size: 20px; }

/* The merchants page's own filter box keeps the dashboard's search look. */
.own-filter input { width: 240px; }

/* A table that can be wider than a phone scrolls in its own box, and a
   number column never wraps inside it. */
.own-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -2px; padding: 0 2px; }
.own-scroll .dash-table { min-width: 560px; }
.own-scroll .dash-table td.num, .own-scroll .dash-table td.chain { white-space: nowrap; }

/* The page-top search shows only while the rail is icons (861-1100px). */
.own-search--page { display: none; margin: 14px 0 6px; max-width: 520px; }
@media (max-width: 1100px) and (min-width: 861px) {
    .own-search--page { display: flex; }
    .rail .own-search { display: none; }
}
@media (max-width: 860px) {
    /* The strip has room for the wordmark, the theme, the account and the
       menu on one row - not for the badge as well. */
    .own-badge { display: none; }
    .rail__links .own-search { margin: 0 0 10px; }
    /* the foot is the avatar alone on the strip; it still goes home */
    .dash-head__actions { justify-content: flex-start; }
    .dash-head__actions .dash-chips { width: 100%; }
    .own-chart canvas { max-height: 220px; }
    .own-events__row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; }
    .own-events__row time { font-size: 11px; }
    .own-addresses__row { grid-template-columns: 52px minmax(0, 1fr); }
    .own-kv__row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .own-kv__row span:first-child { font-size: 11.5px; }
    .own-plan { padding: 12px 14px; }
    .own-log { max-height: 320px; font-size: 11px; }
    .own-break { font-size: 17px; }
    .own-denied { padding: 32px 0; }
}

/* Six facts on the overview, so each has room for its direction. */
.dash-facts--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1250px) { .dash-facts--six { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-facts--six > div:nth-child(4) { border-left: 0; padding-left: 0; } }
@media (max-width: 640px) { .dash-facts--six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-facts--six > div:nth-child(odd) { border-left: 0; padding-left: 0; } .dash-facts--six > div:nth-child(4) { border-left: 1px solid var(--line); padding-left: 24px; } }
.own-delta { font-weight: 700; font-size: 12px; }
.own-delta.up { color: var(--ok); } .own-delta.down { color: var(--danger); } .own-delta.flat { color: var(--ink-3); }
.dash-facts em.up { color: var(--ok); } .dash-facts em.down { color: var(--danger); }

/* The month's chart, and its legend. */
.own-chart { margin: 0 0 32px; }
.own-chart__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.own-chart__head b { color: var(--ink); }
.own-legend { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 10px; flex-wrap: wrap; }
.own-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px; }
.own-legend__in { background: var(--ink-3); } .own-legend__out { background: var(--ink); } .own-legend__fee { background: var(--ok); }
.own-grid--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .own-grid--even { grid-template-columns: minmax(0, 1fr); } }

/* Attention: a stripe per item, coloured by what it costs to ignore. */
.own-attention__row::before { content: ""; width: 4px; height: 26px; border-radius: 2px; background: var(--line-strong); flex: none; align-self: center; }
.own-attention__row.is-bad::before { background: var(--danger); }
.own-attention__row.is-warn::before { background: var(--warn); }
.own-attention__row.is-info::before { background: var(--info); }
.own-attention__row a { margin-left: auto; white-space: nowrap; }

/* Payout legs, under an opened row. */
.dash-table tbody tr.own-open td { border-bottom-color: transparent; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.dash-table tbody tr.own-detail td { padding: 0 0 14px; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.own-legs { margin: 0 0 0 20px; border-left: 2px solid var(--line-strong); }
.own-leg { display: grid; grid-template-columns: 150px 200px minmax(0, 1fr) 100px 110px; gap: 12px; padding: 8px 14px; font-size: 12.5px; align-items: center; border-bottom: 1px dashed var(--line); color: var(--ink-2); }
.own-leg:last-child { border-bottom: 0; }
.own-leg b { color: var(--ink); font-weight: 600; }
.own-leg .is-bad { color: var(--danger); }
@media (max-width: 900px) { .own-leg { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Age in flight: red past what the chain usually takes. */
.own-age b { display: block; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.own-age.is-stuck b { color: var(--danger); }

/* Thirty ticks, one a day, as the status page draws them. */
.own-ticks { display: inline-flex; gap: 2px; }
.own-ticks i { width: 5px; height: 14px; border-radius: 1px; background: var(--ok); opacity: 0.85; }
.own-ticks i.p { background: var(--warn); } .own-ticks i.d { background: var(--danger); } .own-ticks i.n { background: var(--line-strong); }

/* The log tail. */
.own-log { font-family: var(--font-mono, ui-monospace, 'SF Mono', Menlo, Consolas, monospace); font-size: 11.5px; line-height: 1.55; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 12px 14px; color: var(--ink-2); overflow: auto; max-height: 460px; white-space: pre-wrap; word-break: break-word; margin-top: 12px; }
.own-log .e { color: var(--danger); } .own-log .w { color: var(--warn); } .own-log .t { color: var(--ink-3); }
.own-log .line + .line { margin-top: 3px; }

/* Search results: grouped, the term marked. */
.own-results__group { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); padding: 18px 0 6px; border-bottom: 1px solid var(--line); }
.own-results__row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 150px 130px; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: center; font-size: 13px; color: var(--ink-2); }
.own-results__row mark { background: var(--warn-bg); color: inherit; padding: 0 2px; border-radius: 2px; }
.own-results__row .own-mono { max-width: 100%; }
@media (max-width: 900px) { .own-results__row { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* A hash or address: monospace, cut to fit, whole on hover. */
.own-mono {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 12px;
    color: var(--ink-2);
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}
.own-mono a { color: inherit; text-decoration: none; }
.own-mono a:hover { color: var(--ink); text-decoration: underline; }

.own-sub { display: block; font-size: 11.5px; color: var(--ink-3); }
.own-link { color: var(--ink); font-weight: 600; cursor: pointer; }
.own-link:hover { text-decoration: underline; }

/* The facts strip's small note beside a label. */
.dash-facts em { font-style: normal; color: var(--ink-3); }
.dash-facts em.is-bad { color: var(--danger); }
.dash-facts em.is-ok { color: var(--ok); }

/* Attention: a list of things worth a look, each a line. */
.own-attention { margin-top: 4px; }
.own-attention__row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-2);
}
.own-attention__row b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.own-attention__row .status-pill { flex: none; }
.own-attention__row a { color: var(--ink); cursor: pointer; }

/* The sweep's report: what would go, what would not, and why. */
.own-plan {
    margin: 0 0 32px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    font-size: 13px;
}
.own-plan h3 { margin: 0 0 8px; font-size: var(--text-sm); font-weight: 700; color: var(--ink); }
.own-plan h3 + h3 { margin-top: 16px; }
.own-plan ul { margin: 0; padding: 0; list-style: none; }
.own-plan li { padding: 6px 0; border-top: 1px solid var(--line); color: var(--ink-2); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.own-plan li b { color: var(--ink); font-variant-numeric: tabular-nums; }
.own-plan li .why { color: var(--ink-3); }
.own-plan__note { color: var(--ink-3); margin: 0 0 8px; }

/* Family → address, one per line. */
.own-addresses { margin-top: 4px; }
.own-addresses__row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    align-items: baseline;
}
.own-addresses__row b { color: var(--ink); font-weight: 700; letter-spacing: 0.04em; font-size: 11.5px; }
.own-addresses__row .own-mono { max-width: 100%; }
.own-addresses__row .unset { color: var(--ink-3); }

/* Key / value, for the server page. */
.own-kv { margin-top: 4px; }
.own-kv__row {
    display: grid;
    grid-template-columns: minmax(140px, 0.6fr) minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.own-kv__row span:first-child { color: var(--ink-3); }
.own-kv__row span:last-child { color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-all; }
.own-kv__row .is-ok { color: var(--ok); }
.own-kv__row .is-bad { color: var(--danger); }
.own-kv__row .is-off { color: var(--ink-3); }

/* Chain events, one per line, as the status page has them. */
.own-events__row {
    display: grid;
    grid-template-columns: 150px 70px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-2);
}
.own-events__row time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.own-events__row b { color: var(--ink); }

/* Chain status dot, borrowed from the status page. */
.own-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; background: var(--line-strong); vertical-align: 1px; }
.own-dot--up { background: var(--ok); }
.own-dot--degraded { background: var(--warn); }
.own-dot--down { background: var(--danger); }

.btn-small.is-busy { opacity: 0.6; pointer-events: none; }
