/* LYNK Checkout — minimal stylesheet */
:root {
    --bg:          #f5f6f8;
    --surface:     #ffffff;
    --border:      #e1e4e8;
    --text:        #1f2328;
    --muted:       #656d76;
    --primary:     #1f6feb;
    --primary-fg:  #ffffff;
    --danger:      #cf222e;
    --ok-bg:       #dafbe1;
    --ok-fg:       #116329;
    --err-bg:      #ffebe9;
    --err-fg:      #82061e;
    --radius:      8px;
    --shadow:      0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

body.centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.topbar .brand { font-weight: 600; }
.topbar nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 1.25rem;
    padding: .25rem .5rem;
    border-radius: 4px;
}
.topbar nav a:hover { background: var(--bg); color: var(--text); }
.topbar nav a.active { color: var(--primary); }

.container { max-width: 720px; margin: 2rem auto; padding: 0 1rem; }
h1 { margin: 0 0 .25rem; font-size: 1.5rem; }
h2 { margin: 2rem 0 .75rem; font-size: 1.15rem; }

.muted { color: var(--muted); }
.muted.small { font-size: .85em; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}
.card.narrow { width: 100%; max-width: 380px; }

label {
    display: block;
    font-weight: 500;
    margin: .75rem 0 .35rem;
}

input[type=text], input[type=password], select {
    width: 100%;
    padding: .55rem .7rem;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
}
input:focus, select:focus { outline: 2px solid var(--primary); outline-offset: -1px; }

.row-inline { display: flex; gap: .5rem; align-items: stretch; }
.row-inline select { flex: 1; }

.btn {
    display: inline-block;
    padding: .55rem 1rem;
    font: inherit;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}
.btn:hover:not(:disabled) { background: var(--bg); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
    margin-top: 1rem;
    width: 100%;
    font-weight: 500;
}
.btn-primary:hover:not(:disabled) { background: #1a5fcf; }
.btn-ghost { padding: .55rem .8rem; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-sm { padding: .25rem .55rem; font-size: .85em; }

.flash {
    padding: .65rem .9rem;
    border-radius: 6px;
    margin: .75rem 0;
    border: 1px solid transparent;
}
.flash-error, .flash-err { background: var(--err-bg); color: var(--err-fg); border-color: #ffaba8; }
.flash-ok                { background: var(--ok-bg);  color: var(--ok-fg);  border-color: #aceebb; }

.result {
    padding: .9rem 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
}
.result.hidden { display: none; }
.result-ok  { background: var(--ok-bg);  color: var(--ok-fg);  border: 1px solid #aceebb; }
.result-err { background: var(--err-bg); color: var(--err-fg); border: 1px solid #ffaba8; }

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table th, .table td {
    text-align: left;
    padding: .55rem .75rem;
    border-bottom: 1px solid var(--border);
    font-size: .92em;
}
.table th { background: var(--bg); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }

code, pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9em;
}
pre {
    background: #0d1117;
    color: #e6edf3;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
}

details > summary { cursor: pointer; padding: .25rem 0; }
details[open] > summary { margin-bottom: .5rem; }

.inline { display: inline; }
