:root {
    --bg: #0f172a;
    --panel: #ffffff;
    --ink: #1e293b;
    --muted: #64748b;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --accent: #0891b2;
    --provider: #0d9488;
    --seeker: #7c3aed;
    --ok-bg: #dcfce7; --ok-ink: #166534; --ok-bd: #86efac;
    --err-bg: #fee2e2; --err-ink: #991b1b; --err-bd: #fca5a5;
    --info-bg: #e0f2fe; --info-ink: #075985; --info-bd: #7dd3fc;
    --line: #e2e8f0;
    --radius: 12px;
    --shadow: 0 10px 30px rgba(2, 6, 23, .08);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 240px, #f8fafc 100%);
    line-height: 1.55;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ---- */
.site-header {
    background: linear-gradient(120deg, var(--bg) 0%, #1e3a8a 100%);
    color: #fff;
}
.site-header .bar {
    max-width: 1000px; margin: 0 auto; padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .globe {
    width: 40px; height: 40px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #38bdf8, #2563eb 60%, #1e3a8a);
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
    flex: none;
}
.brand h1 { font-size: 1.35rem; margin: 0; color: #fff; letter-spacing: .3px; }
.brand a { color: #fff; }
.brand a:hover { text-decoration: none; }
nav.top a {
    color: #dbeafe; margin-left: 18px; font-size: .95rem;
}
nav.top a:hover { color: #fff; }
nav.top .pill {
    background: rgba(255,255,255,.14); padding: 7px 14px; border-radius: 999px;
}

/* ---- Layout ---- */
.container { max-width: 1000px; margin: 28px auto; padding: 0 20px; }
.narrow { max-width: 520px; }

.card {
    background: var(--panel); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 26px; margin-bottom: 22px;
}
.card h2 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .grid2 { grid-template-columns: 1fr; } }

/* ---- Hero ---- */
.hero { text-align: center; padding: 20px 0 6px; }
.hero h2 { font-size: 2rem; margin: .2em 0; }
.hero p.lede { color: var(--muted); font-size: 1.15rem; max-width: 640px; margin: 0 auto 18px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 22px; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr; } }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.step .n { display: inline-flex; width: 30px; height: 30px; border-radius: 50%;
    background: var(--brand); color: #fff; align-items: center; justify-content: center;
    font-weight: 700; margin-bottom: 8px; }

/* ---- Forms ---- */
label { display: block; margin: 14px 0 5px; font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%; padding: 11px 12px; border: 1px solid #cbd5e1;
    border-radius: 8px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
textarea { min-height: 96px; resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; margin-top: 4px; }

.btn {
    display: inline-block; padding: 11px 20px; border: none; border-radius: 8px;
    background: var(--brand); color: #fff; font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn.secondary { background: #e2e8f0; color: var(--ink); }
.btn.secondary:hover { background: #cbd5e1; }
.btn.danger { background: #ef4444; }
.btn.danger:hover { background: #dc2626; }
.btn.block { display: block; width: 100%; text-align: center; }

/* ---- Flash messages ---- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash.success { background: var(--ok-bg); color: var(--ok-ink); border-color: var(--ok-bd); }
.flash.error   { background: var(--err-bg); color: var(--err-ink); border-color: var(--err-bd); }
.flash.info    { background: var(--info-bg); color: var(--info-ink); border-color: var(--info-bd); }
.flash code { word-break: break-all; }

/* ---- Badges & listings ---- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge.provider { background: #ccfbf1; color: #0f766e; }
.badge.seeker   { background: #ede9fe; color: #6d28d9; }
.badge.cat      { background: #e2e8f0; color: #334155; }
.badge.ok       { background: #dcfce7; color: #166534; }
.badge.warn     { background: #fee2e2; color: #991b1b; }
.badge.admin    { background: #dbeafe; color: #1e40af; }

.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-actions .btn { padding: 6px 12px; font-size: .85rem; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stat { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 14px; text-align: center; }
.stat .num { font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.stat .lbl { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table-scroll { overflow-x: auto; }

.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.thumb { position: relative; display: inline-block; line-height: 0; }
.thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f1f5f9; }
.thumb form { position: absolute; top: -6px; right: -6px; margin: 0; line-height: 1; }
.thumb-x { width: 22px; height: 22px; border: none; border-radius: 50%; background: #ef4444; color: #fff;
    font-size: 15px; line-height: 20px; cursor: pointer; padding: 0; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.thumb-x:hover { background: #dc2626; }

.listing { border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
.listing h4 { margin: 8px 0 6px; }
.listing .meta { color: var(--muted); font-size: .85rem; }
.listing p.desc { margin: 8px 0; white-space: pre-line; }

.match { border-left: 4px solid var(--accent); background: #f8fafc; }
.match .contact { font-size: .9rem; margin-top: 6px; }

.empty { color: var(--muted); text-align: center; padding: 26px; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.inline-form { display: inline; }

footer.site-footer { text-align: center; color: var(--muted); padding: 30px 20px; font-size: .9rem; }
