:root {
    --bg: #f4f7fa;
    --surface: #ffffff;
    --text: #1a2530;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #0f766e;
    --primary-dark: #0b5a54;
    --accent: #2563eb;
    --green: #15803d;
    --green-bg: #dcfce7;
    --orange: #b45309;
    --orange-bg: #fef3c7;
    --red: #b91c1c;
    --red-bg: #fee2e2;
    --gray-bg: #e5e7eb;
}

* { 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;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; }
.brand { font-weight: 800; font-size: 1.3rem; color: var(--primary-dark); text-decoration: none; }
.nav a { margin-left: 18px; text-decoration: none; color: var(--text); font-weight: 500; }
.nav a:hover { color: var(--primary); }

main.container { padding: 32px 20px 60px; min-height: 70vh; }

.footer { border-top: 1px solid var(--border); padding: 20px 0; color: var(--muted); font-size: 0.9rem; margin-top: 40px; }

.hero { text-align: center; padding: 60px 0 30px; }
.hero h1 { font-size: 2.4rem; max-width: 780px; margin: 0 auto 16px; }
.hero-sub { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; }

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
}
.btn:hover { background: var(--primary-dark); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #7f1414; }
.btn-disabled { pointer-events: none; opacity: 0.5; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 50px 0; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; }
.feature-card h3 { margin-top: 0; }

.pricing { margin: 60px 0; text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 30px; max-width: 700px; margin-left: auto; margin-right: auto; }
.pricing-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 30px; text-align: left; }
.pricing-card-highlight { border: 2px solid var(--primary); }
.pricing-card .price { font-size: 1.8rem; font-weight: 800; margin: 4px 0 18px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 22px; }
.pricing-card li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.pricing-card li.muted { color: var(--muted); }

.auth-box { max-width: 420px; margin: 20px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; }
.auth-box h1 { margin-top: 0; font-size: 1.5rem; }
label { display: block; margin-bottom: 16px; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], input[type=url] {
    display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: 8px; font-size: 1rem;
}
.checkbox-label { display: flex; align-items: center; gap: 8px; }
.checkbox-label input { width: auto; }

.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; flex-wrap: wrap; gap: 10px; }

.table-wrap { overflow-x: auto; margin-top: 16px; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 10px; overflow: hidden; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.table th { background: #eef2f5; font-size: 0.82rem; text-transform: uppercase; color: var(--muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 700; }
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-gray { background: var(--gray-bg); color: var(--muted); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0 30px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; }
.stat-card span { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.stat-card strong { font-size: 1.2rem; }

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin: 20px 0 40px; }
.check-list { list-style: none; padding: 0; }
.check-list li { padding: 5px 0; }
.check-list li.ok { color: var(--green); }
.check-list li.ko { color: var(--red); }

.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 600; }
.flash-success { background: var(--green-bg); color: var(--green); }
.flash-error { background: var(--red-bg); color: var(--red); }

.muted { color: var(--muted); }
.small { font-size: 0.82rem; }

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1720;
        --surface: #17212b;
        --text: #e6edf3;
        --muted: #93a3b3;
        --border: #26333f;
        --gray-bg: #26333f;
    }
    .table th { background: #1d2831; }
}
