:root {
    --bg: #f5f6fa;
    --surface: #ffffff;
    --text: #1c2033;
    --muted: #6b7280;
    --line: #e5e7ef;
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --ok-bg: #e8f7ee;
    --ok-text: #166534;
    --error-bg: #fdecec;
    --error-text: #991b1b;
    --info-bg: #eef2ff;
    --info-text: #3730a3;
    --radius: 12px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 32px 0 56px;
}

.container {
    width: min(960px, calc(100% - 40px));
    margin: 0 auto;
}

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
code { background: #eef0f6; padding: 1px 5px; border-radius: 4px; font-size: 0.9em; }
h1 { font-size: 1.7rem; margin: 0 0 8px; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
h3 { margin: 0 0 4px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

/* header / footer */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; gap: 16px; }
.brand { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a:not(.btn) { text-decoration: none; color: var(--text); }
.site-footer { border-top: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 0.85rem; background: var(--surface); }

/* cards & layout */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 20px;
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-top: 28px; }
.feature-grid .card { margin-bottom: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-2 .card { margin-bottom: 20px; }

.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.plan-price { font-size: 1.2rem; font-weight: 600; margin: 0 0 14px; }

/* hero */
.hero { text-align: center; padding: 48px 0 8px; }
.hero h1 { font-size: 2.1rem; max-width: 640px; margin: 0 auto 10px; }
.lede { color: var(--muted); max-width: 560px; margin: 0 auto 22px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* forms */
label { display: block; margin-bottom: 14px; font-weight: 500; font-size: 0.93rem; }
input[type="text"], input[type="email"], input[type="password"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    font: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfbfe;
}
input:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }

.auth-card { max-width: 440px; margin: 40px auto; }
.auth-card h1 { text-align: center; margin-bottom: 20px; }

/* buttons */
.btn {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--primary); }
.btn-lg { padding: 12px 24px; font-size: 1.02rem; }
.btn-block { display: block; width: 100%; }
.inline-form { display: inline; margin: 0; }

/* flashes */
.flash { padding: 11px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 0.95rem; }
.flash-success { background: var(--ok-bg); color: var(--ok-text); }
.flash-error { background: var(--error-bg); color: var(--error-text); }
.flash-info { background: var(--info-bg); color: var(--info-text); }

/* status */
.status-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; background: #eef0f6; color: var(--muted); }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.status-active { border-color: #bfe5cb; }
.status-inactive { border-color: var(--line); }
.status-card form { margin-top: 12px; }
.status-card p { margin: 4px 0; }

/* definition list */
.deflist div { display: flex; gap: 10px; margin-bottom: 8px; }
.deflist dt { width: 130px; color: var(--muted); flex-shrink: 0; }
.deflist dd { margin: 0; }
