/* iVamp console design system.
   Extracted from the original admin layout so the admin and customer account areas share one
   sharp, dark look. Linked by _AdminLayout and _AccountLayout only (the public site keeps site.css). */

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #0f1115;
    color: #e6e6e6;
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* ── Layout shell ─────────────────────────────────────────────── */
.app-sidebar { width: 220px; flex-shrink: 0; background: #1a1d24; border-right: 1px solid #2a2e37; padding: 1.5rem 1rem; }
.app-sidebar h3 { color: #0892d0; margin: 0 0 0.75rem; }
.app-sidebar a { display: block; color: #e6e6e6; text-decoration: none; font-weight: 600; padding: 0.5rem 0.25rem; border-bottom: 1px solid #2a2e37; }
.app-sidebar a:hover { color: #8ecae6; }
.app-content { flex: 1; min-width: 0; }

header { background: #1a1d24; padding: 1rem 1.5rem; border-bottom: 1px solid #2a2e37; display: flex; justify-content: space-between; align-items: center; }
header a { color: #e6e6e6; text-decoration: none; font-weight: 600; }
main { max-width: 1000px; margin: 0 auto; padding: 1.5rem; }
/* Admin pages that show a table get more room, so wide lists fit without a sideways scroll bar.
   Form-only pages keep the narrower 1000px column so inputs don't stretch. */
main.admin-main:has(table) { max-width: 1440px; }

/* ── Cards & headings ─────────────────────────────────────────── */
.card { background: #1a1d24; border: 1px solid #2a2e37; border-radius: 8px; padding: 1.25rem; margin-bottom: 1.25rem; }
h1, h2 { margin-top: 0; }
.row { display: flex; gap: 1rem; flex-wrap: wrap; }
.row > .card { flex: 1; min-width: 260px; }

/* ── Tables ───────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid #2a2e37; }
th { color: #999; font-weight: 600; }
/* Clickable sort headings: keep the label and its ▲/▼ arrow on one line. */
th a.sort-link { white-space: nowrap; }

/* ── Badges ───────────────────────────────────────────────────── */
.badge { padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.8rem; white-space: nowrap; }
.badge-paid { background: #1f4d2c; color: #7ee2a0; }
.badge-pendingpayment { background: #4d3e1f; color: #f0c75e; }
.badge-failed { background: #4d1f1f; color: #f08080; }
.badge-refunded { background: #33363f; color: #bbb; }

/* ── Forms ────────────────────────────────────────────────────── */
input, button, select, textarea { font-size: 0.95rem; padding: 0.45rem 0.6rem; border-radius: 4px; border: 1px solid #2a2e37; background: #0f1115; color: #e6e6e6; width: 100%; }
textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.78rem; resize: vertical; }
label { display: block; margin: 0.6rem 0 0.25rem; font-size: 0.85rem; color: #aaa; }
select option { color: #e6e6e6; background: #0f1115; }

/* ── Buttons ──────────────────────────────────────────────────── */
button { cursor: pointer; background: #3a6ea5; border-color: #3a6ea5; color: #fff; width: auto; }
button:hover { background: #4a7eb5; }
button.danger { background: #a53a3a; border-color: #a53a3a; }
button.danger:hover { background: #c24a4a; }
.btn, a.button { display: inline-block; cursor: pointer; background: #3a6ea5; border: 1px solid #3a6ea5; color: #fff; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 4px; text-decoration: none; width: auto; }
.btn:hover, a.button:hover { background: #4a7eb5; color: #fff; }

/* ── Lists ────────────────────────────────────────────────────── */
ul { margin: 0.25rem 0 0.75rem 1.25rem; padding: 0; }

/* ── Alerts & inline validation ───────────────────────────────── */
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; word-break: break-word; }
.alert-info { background: #1f3a4d; color: #8ecae6; }
.alert-error { background: #4d1f1f; color: #f08080; }
.error, .field-validation-error, .validation-summary-errors { color: #f08080; font-size: 0.85rem; }
div.error { margin-bottom: 1rem; }

/* ── Bits & pieces ────────────────────────────────────────────── */
code { background: #0f1115; padding: 0.1rem 0.3rem; border-radius: 3px; }
.muted { color: #888; font-size: 0.85rem; }
.actions { display: flex; gap: 0.5rem; margin-top: 1rem; flex-wrap: wrap; }
.actions button { flex: 1; }
a.link { color: #8ecae6; }
.licence-key { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0f1115; border: 1px solid #2a2e37; border-radius: 4px; padding: 0.3rem 0.5rem; display: inline-block; color: #8ecae6; letter-spacing: 0.5px; }
.price { font-size: 1.3rem; font-weight: 700; color: #8ecae6; margin: 0.5rem 0; }

@font-face {
    font-family: 'IvampRegular';
    src: url("../fonts/Ivamp-Regular.ttf");
}

/* ===== iVamp refresh: IvampRegular font sitewide (admin) ===== */
body, input, select, textarea, button, table, .card, th, td, label {
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ── Row action cells: keep Edit/Changelog/etc. on one line ── */
.table-wrap { overflow-x: auto; }
td.row-actions { white-space: nowrap; text-align: left; }
td.row-actions > * { display: inline-block; vertical-align: middle; margin: 0 0 0 0.4rem; }
td.row-actions > *:first-child { margin-left: 0; }
td.row-actions a.link { text-decoration: none; }
td.row-actions button, td.row-actions .btn { padding: 0.15rem 0.55rem; font-size: 0.8rem; margin-top: 0; }
th.actions-col { text-align: left; }

/* ── Compact feature-matrix editor (Editions -> Features) ── */
table.matrix-compact th,
table.matrix-compact td { padding: 0.25rem 0.4rem; font-size: 0.75rem; vertical-align: middle; }
table.matrix-compact select,
table.matrix-compact input { font-size: 0.72rem; padding: 0.15rem 0.3rem; }
table.matrix-compact label { font-size: 0.62rem; margin: 0; }


/* ===== Headings keep the iVamp display face; running text uses the crisp sans above ===== */
h1, h2, h3, .brand {
    font-family: IvampRegular, "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
