/* RM-041 step 4: the console's Domains > Top-ups page, in AM Dark Navy. */

.domain-topups {
    --accent: var(--am-blue);
    --accent-tint: var(--am-blue-tint);
    --accent-border: var(--am-blue-soft-hover);
}

.domain-topups__body { padding: var(--content-gap-top) var(--gutter) 40px; display: flex; flex-direction: column; gap: 16px; }
.domain-topups__muted { color: var(--text-muted); font-size: var(--font-size-base); }

.domain-topups__figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
/* The figures are the shared soft .overview-tile (module-tiles.css, 17 Nov 2026). */
.domain-topups__figure { min-width: 0; }
.domain-topups__warn { color: var(--status-danger); font-weight: 600; }

.domain-topups__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.domain-topups__chips { display: flex; gap: 8px; flex-wrap: wrap; }
.domain-topups__chips .am-chip { border-radius: var(--radius-chip); }
.domain-topups__actions { display: flex; gap: 8px; }

.domain-topups__table-wrap {
    width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-default); border-radius: 5px; background: var(--surface-panel);
}
.domain-topups__table { width: 100%; min-width: 760px; border-collapse: collapse; font-size: var(--font-size-base); }
.domain-topups__table th {
    padding: 10px 14px; text-align: left; font-size: var(--font-size-tiny); font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--text-muted); border-bottom: 1px solid var(--border-subtle); background: var(--surface-subtle);
}
.domain-topups__table td { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); vertical-align: top; }
.domain-topups__table tr:last-child td { border-bottom: 0; }
.domain-topups__table small { display: block; margin-top: 2px; font-size: var(--font-size-small); color: var(--text-muted); }
.domain-topups__money { text-align: right; font-variant-numeric: tabular-nums; }
.domain-topups__row-actions { text-align: right; white-space: nowrap; }
.domain-topups__row-actions .am-btn + .am-btn { margin-left: 6px; }

.domain-topups__pill { display: inline-block; padding: 2px 8px; border-radius: var(--radius-chip); font-size: var(--font-size-small); font-weight: 600; }
.domain-topups__pill--warning { background: var(--status-warning-tint); color: var(--status-warning); }
.domain-topups__pill--danger  { background: var(--status-danger-tint); color: var(--status-danger); }
.domain-topups__pill--success { background: var(--status-success-tint); color: var(--status-success); }
.domain-topups__pill--neutral { background: var(--status-neutral-tint); color: var(--status-neutral); }

.domain-topups__empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px;
    border: 1px dashed var(--border-default); border-radius: 5px; color: var(--text-muted); font-size: var(--font-size-base);
}
.domain-topups__empty .icon { color: var(--status-success); }

@media (max-width: 1000px) {
    .domain-topups__figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .domain-topups__body { padding-left: 12px; padding-right: 12px; }
    .domain-topups__figures { grid-template-columns: minmax(0, 1fr); }
    .domain-topups__actions { width: 100%; }
    .domain-topups__actions .am-btn { flex: 1; justify-content: center; }
}

/* RM-041 step 5: Domains > Pricing (console and agency) */
.domain-pricing__card { border: 1px solid var(--border-default); border-radius: 5px; background: var(--surface-panel); padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.domain-pricing__card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.domain-pricing__card-head h2 { margin: 0; font-size: var(--font-size-base); font-weight: 600; color: var(--text-primary); }
.domain-pricing__settings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.domain-pricing__settings--two { grid-template-columns: repeat(2, minmax(0, 260px)); }
/* Settings fields are the AM notched field (kudio-field.css). The money box
   inside keeps its $ or % beside the number, on the field's one line. */
.domain-pricing__field { display: block; min-width: 0; }
.kudio-field .domain-pricing__money { display: flex; align-items: center; gap: 4px; height: 28px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: var(--font-size-base); color: var(--text-secondary); white-space: nowrap; }
.kudio-field .domain-pricing__money .kudio-field__control { height: 28px; font-weight: 600; }
/* A price inside a table row: the column heading names it, so the box has the
   AM outline (tiny corner, 2px accent on focus) without a notch. */
.domain-pricing__table .domain-pricing__money { display: inline-flex; align-items: center; gap: 4px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-tiny); background: var(--surface-panel); font-size: var(--font-size-base); color: var(--text-secondary); white-space: nowrap; }
.domain-pricing__table .domain-pricing__money:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); outline: none; }
.domain-pricing__money input { flex: 1; min-width: 0; width: 100%; height: 100%; border: 0; outline: none; background: transparent; font: inherit; font-weight: 600; color: var(--text-primary); }
.domain-pricing__money input:disabled { color: var(--text-muted); }
.domain-pricing__table .domain-pricing__money { height: 32px; max-width: 120px; margin-left: auto; }
.domain-pricing__table .domain-pricing__money input::placeholder { color: var(--text-muted); font-weight: 500; }
.domain-pricing__card-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
/* The AM list search (form-field__control invoice-search); only its width here. */
.domain-pricing__search { flex: 0 1 300px; width: auto; min-width: 220px; }
.domain-pricing__table td .domain-topups__pill { margin-left: 6px; }
.domain-pricing__hidden td { opacity: .55; }
.domain-pricing__editing td { background: var(--accent-tint); }
.domain-pricing__hide { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: var(--font-size-small); color: var(--text-secondary); }
.domain-pricing__hide input { accent-color: var(--accent); }
.domain-pricing__loss { color: var(--status-danger); font-weight: 600; }
.inline-notice--warning { background: var(--status-warning-tint); color: var(--status-warning); border-radius: 5px; }
@media (max-width: 1000px) { .domain-pricing__settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .domain-pricing__settings, .domain-pricing__settings--two { grid-template-columns: minmax(0, 1fr); }
    .domain-pricing__search { min-width: 0; width: 100%; }
    .domain-pricing__card-actions .am-btn { flex: 1; justify-content: center; }
}
/* Domains and Email Hosting tabs on the Pricing page: the AM record tabs. */
.domain-pricing__static { font-weight: 600; color: var(--text-primary); }
.domain-pricing__table td small { display: block; margin-top: 2px; font-size: var(--font-size-small); color: var(--text-muted); }

/* Domains overview on the console (RM-041 / RM-067). */
.overview-heading { margin: 22px 0 10px; font-size: var(--font-size-base); font-weight: 600; color: var(--am-blue); }
.overview-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.overview-heading-row .overview-heading { margin: 0; }
.overview-window { display: inline-flex; gap: 6px; }
.overview-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.overview-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--border-default); border-radius: var(--radius-medium); background: var(--surface-panel); }
.overview-tile__label { display: inline-flex; align-items: center; gap: 7px; font-size: var(--font-size-small); font-weight: 500; color: var(--text-muted); }
.overview-tile__label .icon { color: var(--am-blue); opacity: 0.6; }
.overview-tile__value { font-size: 24px; font-weight: 600; line-height: 1.2; color: var(--am-blue); overflow-wrap: anywhere; }
.overview-tile__sub { font-size: var(--font-size-small); color: var(--text-muted); }
.overview-tile--success .overview-tile__value { color: var(--status-success); }
.overview-tile--warning { background: var(--status-warning-tint); border-color: var(--status-warning-tint); }
.domains-overview .domain-topups__table td small { display: block; margin-top: 2px; font-size: var(--font-size-small); color: var(--text-muted); }
.domains-overview .overview-short { color: var(--status-warning) !important; font-weight: 600; }

/* The overview breathes away from the page edges (Leone, 17 Oct). */
.page-surface.domains-overview { padding: 8px 32px 40px; }
@media (max-width: 720px) { .page-surface.domains-overview { padding: 4px 16px 32px; } }

/* Purchases waiting on the registrar (RM-041 step 11). */
.overview-help { margin: -4px 0 10px; }
.domains-overview .overview-check { max-width: 320px; font-size: var(--font-size-small); line-height: 1.45; }
.domains-overview .overview-check--charge { color: var(--status-success); }
.domains-overview .overview-check--release { color: var(--status-warning); }
.domains-overview .overview-check--unsure, .domains-overview .overview-check--wait { color: var(--text-muted); }

/* Overview tables lined up (Leone, 17 Oct): number headers sit over their
   numbers, the name column leads, and the actions never wrap. */
.domains-overview .domain-topups__table { width: 100%; border-collapse: collapse; }
.domains-overview .domain-topups__table th,
.domains-overview .domain-topups__table td { padding: 12px 16px; vertical-align: top; }
.domains-overview .domain-topups__table th.domain-topups__money,
.domains-overview .domain-topups__table td.domain-topups__money { text-align: right; white-space: nowrap; }
.domains-overview .domain-topups__table th:first-child,
.domains-overview .domain-topups__table td:first-child { width: 22%; }
.domains-overview .domain-topups__table td small { display: block; margin-top: 3px; }
.domains-overview .domain-topups__row-actions { width: 1%; white-space: nowrap; text-align: right; }
.domains-overview .domain-topups__row-actions .am-btn + .am-btn { margin-left: 6px; }
.domains-overview .overview-check { min-width: 220px; max-width: 360px; }

/* The Pricing tabs line up with the page content, not the page edge (Leone, 17 Oct). */
.domain-pricing .record-tabs.pricing-tabs { margin: 0 var(--gutter); padding: 0; }
@media (max-width: 720px) { .domain-pricing .record-tabs.pricing-tabs { margin: 0 16px; } }

/* Pricing, Top-ups and the overview scroll (Leone, 17 Oct): .page-surface is the screen's height with
   overflow hidden, and these pages are taller than the screen. */
.page-surface.domain-topups { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.page-surface.domain-topups > * { flex-shrink: 0; }

/* Pricing tables read left to right: every header and cell aligned left, console and agencies (Leone, 18 Oct). */
.domain-pricing__table th, .domain-pricing__table td,
.domain-pricing__table th.domain-topups__money, .domain-pricing__table td.domain-topups__money { text-align: left; }
.domain-pricing__table .domain-pricing__money { margin-left: 0; }
.domain-pricing__table td.domain-topups__row-actions { text-align: right; }

/* The Stripe column on Top-ups (Leone, 18 Oct). */
.domain-topups__stripe small { display: block; margin-top: 3px; font-size: var(--font-size-small); color: var(--text-muted); }
