:root {
    --ink: #1a1d29;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f7f7fb;
    --surface: #ffffff;
    --brand: #ff6a00;
    --brand-dark: #e05e00;
    --accent: #1a1d29;
    --success: #178a4c;
    --success-bg: #e7f7ee;
    --error: #b3261e;
    --error-bg: #fdecea;
    --radius: 12px;
    font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header__row { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.25rem; color: var(--ink); }
.brand span { color: var(--brand); }
.brand small { font-weight: 500; color: var(--muted); font-size: .7rem; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 16px; }
.site-nav a { color: var(--ink); font-weight: 600; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; color: #fff; }
.btn--small { padding: 8px 16px; font-size: .9rem; }
.btn--outline { background: transparent; color: var(--ink); border: 2px solid var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--danger { background: var(--error); }
.btn--danger:hover { background: #8f1d17; }
.btn--muted { background: var(--muted); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=tel],
input[type=number], input[type=url], textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
}
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 18px; }
.hint { color: var(--muted); font-size: .82rem; margin-top: 4px; }
.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 520px;
    margin: 40px auto;
}
.form-card h1 { text-align: center; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 8px; margin: 16px 0; font-weight: 600; }
.alert--error { background: var(--error-bg); color: var(--error); }
.alert--success { background: var(--success-bg); color: var(--success); }

/* Badges */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge--draft { background: #eee; color: #555; }
.badge--pending_payment_confirmation { background: #fff4de; color: #9a6700; }
.badge--pending_approval { background: #e6f0ff; color: #1b4fbb; }
.badge--live { background: var(--success-bg); color: var(--success); }
.badge--rejected, .badge--inactive { background: var(--error-bg); color: var(--error); }

/* Landing */
.hero { padding: 64px 0 40px; text-align: center; }
.hero h1 { font-size: 2.4rem; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 auto 24px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.section { padding: 48px 0; }
.section h2 { text-align: center; font-size: 1.8rem; margin-bottom: 32px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.pricing-box { text-align: center; max-width: 380px; margin: 0 auto; }
.pricing-box .price { font-size: 2.4rem; font-weight: 800; margin: 8px 0; }
.pricing-box .price small { font-size: 1rem; color: var(--muted); font-weight: 500; }
.pricing-list { list-style: none; padding: 0; margin: 20px 0; text-align: left; }
.pricing-list li { padding: 6px 0; }
.pricing-list li:before { content: "✓ "; color: var(--success); font-weight: 700; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin: 24px 0; }
.stat-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-box .stat-value { font-size: 1.8rem; font-weight: 800; }
.stat-box .stat-label { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }

/* Builder steps */
.builder-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.builder-steps a, .builder-steps span {
    padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700;
    background: #eee; color: #555;
}
.builder-steps .is-active { background: var(--brand); color: #fff; }
.builder-steps .is-done { background: var(--success-bg); color: var(--success); }
.repeatable-item { border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 12px; background: #fafafa; }
.theme-options { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-swatch { border: 2px solid var(--border); border-radius: 10px; padding: 10px 16px; cursor: pointer; font-weight: 700; }
.theme-swatch input { margin-right: 8px; }

/* Tables (admin) */
table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
th, td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: .92rem; }
th { background: #fafafa; text-transform: uppercase; font-size: .72rem; letter-spacing: .04em; color: var(--muted); }
tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.table-actions form { display: inline; }

/* Admin shell */
.admin-body { background: var(--bg); }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--ink); color: #fff; padding: 24px 16px; flex-shrink: 0; }
.admin-sidebar .brand { color: #fff; display: block; margin-bottom: 24px; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a { color: #cbd0e0; padding: 10px 12px; border-radius: 8px; font-weight: 600; }
.admin-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.admin-content { flex: 1; padding: 28px; max-width: 100%; overflow-x: auto; }
@media (max-width: 780px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
}

/* Live card */
.live-card { max-width: 480px; margin: 0 auto; padding: 24px 20px 60px; }
.live-card__hero { text-align: center; padding: 32px 20px; border-radius: 20px; margin-bottom: 20px; }
.live-card__photo { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 4px solid rgba(255,255,255,.6); }
.live-card__logo { width: 56px; height: 56px; object-fit: contain; margin: 0 auto 10px; }
.live-card__name { font-size: 1.4rem; font-weight: 800; margin-bottom: 2px; }
.live-card__title { opacity: .9; margin-bottom: 0; }
.live-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.live-card__actions .btn { width: 100%; }
.link-btn {
    display: flex; align-items: center; gap: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 16px; margin-bottom: 10px; font-weight: 700; color: var(--ink);
}
.link-btn:hover { border-color: var(--brand); text-decoration: none; }
.link-btn .icon { font-size: 1.2rem; }
.service-item { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.service-item .price { font-weight: 700; color: var(--brand-dark); }
.section-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 0 10px; font-weight: 700; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gallery-grid img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; }
.qr-box { text-align: center; margin: 24px 0; }
.qr-box img { margin: 0 auto; border-radius: 12px; border: 1px solid var(--border); padding: 10px; background: #fff; }

/* Theme presets applied via body[data-theme] on live card page */
.theme-classic { background: linear-gradient(135deg,#1a1d29,#34384a); color: #fff; }
.theme-orange { background: linear-gradient(135deg,#ff6a00,#ff9248); color: #fff; }
.theme-navy { background: linear-gradient(135deg,#0b1f3a,#123a66); color: #fff; }
.theme-emerald { background: linear-gradient(135deg,#0b3d2e,#178a4c); color: #fff; }
.theme-mono { background: #111; color: #fff; }

.inactive-page { max-width: 480px; margin: 80px auto; text-align: center; padding: 0 20px; }

/* Footer */
.site-footer { padding: 28px 0; color: var(--muted); font-size: .85rem; text-align: center; }

@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .form-card { margin: 20px auto; padding: 20px; }
}
