:root {
    --bg: #f4f6fa;
    --card: #ffffff;
    --text: #1c2333;
    --muted: #6b7488;
    --primary: #2b59ff;
    --primary-dark: #1f43c4;
    --border: #dde2ec;
    --ok-bg: #e6f6ec; --ok-text: #14683a;
    --err-bg: #fdeaea; --err-text: #9b1c1c;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}
a { color: var(--primary); }
main { margin: 0 auto; padding: 24px 16px 48px; }
main.narrow { max-width: 420px; }
main.wide { max-width: 1000px; }
h1 { font-size: 1.5rem; margin: 0 0 16px; }
h2 { font-size: 1.1rem; margin: 0 0 8px; }
.logo { text-align: center; font-weight: 700; font-size: 1.4rem; margin: 24px 0; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}
form.card label { display: block; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
form.card label small { font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password] {
    display: block; width: 100%; margin-top: 6px;
    padding: 10px 12px; font-size: 1rem;
    border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn {
    display: block; width: 100%;
    padding: 11px 16px; font-size: 1rem; font-weight: 600;
    color: #fff; background: var(--primary);
    border: 0; border-radius: 8px; cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.muted { color: var(--muted); font-size: .92rem; }
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .95rem; }
.alert.success { background: var(--ok-bg); color: var(--ok-text); }
.alert.error { background: var(--err-bg); color: var(--err-text); }

.topbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--border);
}
.topbar .brand { font-weight: 700; text-decoration: none; color: var(--text); }
.topbar nav { display: flex; align-items: center; gap: 16px; }
.topbar .who { color: var(--muted); font-size: .92rem; }
form.inline { display: inline; margin: 0; }
button.link { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; }
button.link:hover { text-decoration: underline; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid .card { margin: 0; }
dl { margin: 0; }
dt { font-size: .8rem; color: var(--muted); margin-top: 8px; }
dd { margin: 0; }

/* --- sprzedaż --- */
h2.section { margin: 24px 0 12px; }
h3 { margin: 0 0 4px; font-size: 1.05rem; }
.price { font-weight: 700; font-size: 1.2rem; margin: 0 0 8px; }
.plan label { display: block; margin: 12px 0; font-weight: 600; font-size: .92rem; }
.suffix { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.suffix input { margin-top: 0; }
.btn:disabled { background: #b8c0d4; cursor: not-allowed; }
.btn.small { display: inline-block; width: auto; padding: 7px 14px; font-size: .9rem; text-decoration: none; }
.btn.secondary { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn.secondary:hover { background: #eef2ff; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
form.billing { margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; background: #eceff6; color: #444; }
.badge.active { background: var(--ok-bg); color: var(--ok-text); }
.badge.past_due, .badge.provisioning_failed, .badge.suspended { background: var(--err-bg); color: var(--err-text); }
.badge.paid { background: #fff4d6; color: #7a5600; }
.badge.cancelled { background: #eceff6; color: #888; }
@media (max-width: 640px) { table { display: block; overflow-x: auto; } }
