/* ============ ID Verification AZONIPS — minimal black & white system ============ */
:root {
    --ink: #111111;
    --ink-soft: #444444;
    --ink-mute: #888888;
    --line: #e5e5e5;
    --paper: #ffffff;
    --paper-soft: #f7f7f7;
    --ok: #15803d;
    --ok-bg: #f0fdf4;
    --bad: #b91c1c;
    --bad-bg: #fef2f2;
    --warn: #a16207;
    --warn-bg: #fefce8;
    --radius: 10px;
    --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 560px; margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.muted { color: var(--ink-mute); }
.small { font-size: 13px; }

/* ---------- header / nav ---------- */
.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.site-header .inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.brand {
    font-weight: 800; font-size: 16px; letter-spacing: -0.02em;
    text-decoration: none; display: flex; align-items: center; gap: 10px;
}
.brand .mark {
    width: 28px; height: 28px; border-radius: 7px; background: var(--ink);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 800;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { text-decoration: none; font-size: 14px; color: var(--ink-soft); }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font: inherit; font-size: 14px; font-weight: 600;
    padding: 10px 18px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--ink); background: var(--ink); color: #fff;
    text-decoration: none; transition: opacity .15s ease;
}
.btn:hover { opacity: .85; }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--paper-soft); opacity: 1; }
.btn-danger { background: var(--bad); border-color: var(--bad); }
.btn-success { background: var(--ok); border-color: var(--ok); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }

/* ---------- forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 12px; color: var(--ink-mute); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="tel"], input[type="file"], select, textarea {
    width: 100%; font: inherit; font-size: 14px;
    padding: 10px 12px; border: 1px solid #d4d4d4; border-radius: 8px;
    background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink);
}
.error-text { color: var(--bad); font-size: 12.5px; margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ---------- cards / panels ---------- */
.panel {
    border: 1px solid var(--line); border-radius: var(--radius);
    background: var(--paper); padding: 24px;
}
.panel + .panel { margin-top: 20px; }
.panel h2 { font-size: 16px; margin-bottom: 16px; }

/* ---------- alerts ---------- */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; border: 1px solid; }
.alert-success { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.alert-error { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: #fff; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-mute); background: var(--paper-soft); }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafafa; }

/* ---------- badges ---------- */
.badge {
    display: inline-block; font-size: 12px; font-weight: 600;
    padding: 3px 10px; border-radius: 99px; border: 1px solid;
}
.badge-active, .badge-approved, .badge-valid { color: var(--ok); background: var(--ok-bg); border-color: #bbf7d0; }
.badge-revoked, .badge-rejected { color: var(--bad); background: var(--bad-bg); border-color: #fecaca; }
.badge-expired, .badge-pending { color: var(--warn); background: var(--warn-bg); border-color: #fde68a; }

/* ---------- admin shell ---------- */
.admin-shell { display: flex; min-height: 100vh; }
.admin-side {
    width: 230px; flex-shrink: 0; border-right: 1px solid var(--line);
    padding: 20px 14px; display: flex; flex-direction: column; gap: 4px;
    background: var(--paper-soft);
}
.admin-side .brand { margin: 4px 8px 22px; }
.admin-side a.side-link {
    display: block; padding: 9px 12px; border-radius: 8px;
    font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink-soft);
}
.admin-side a.side-link:hover { background: #eee; color: var(--ink); }
.admin-side a.side-link.active { background: var(--ink); color: #fff; }
.admin-side .side-footer { margin-top: auto; padding: 8px; font-size: 12.5px; color: var(--ink-mute); }
.admin-main { flex: 1; padding: 32px 36px; min-width: 0; }
.admin-main .page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.admin-main .page-head h1 { font-size: 22px; }
@media (max-width: 800px) {
    .admin-shell { flex-direction: column; }
    .admin-side { width: 100%; flex-direction: row; flex-wrap: wrap; align-items: center; border-right: none; border-bottom: 1px solid var(--line); }
    .admin-side .brand { margin: 0 12px 0 0; }
    .admin-side .side-footer { margin: 0 0 0 auto; }
    .admin-main { padding: 20px; }
}

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat {
    border: 1px solid var(--line); border-radius: var(--radius);
    padding: 16px 18px; background: #fff;
}
.stat .n { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.stat .l { font-size: 12.5px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .05em; }

/* ---------- filter bar ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a {
    text-decoration: none; font-size: 14px; font-weight: 600;
    padding: 7px 16px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink-soft);
}
.tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- pagination ---------- */
.pagination-wrap { margin-top: 18px; font-size: 14px; }
.pagination-wrap nav { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- landing ---------- */
.hero { padding: 110px 0 90px; text-align: center; }
.hero h1 { font-size: clamp(32px, 5.5vw, 54px); max-width: 750px; margin: 0 auto 20px; }
.hero p { font-size: 18px; color: var(--ink-soft); max-width: 560px; margin: 0 auto 36px; }
.hero .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 40px 0 90px; }
.feature { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; text-align: left; }
.feature .ico {
    width: 38px; height: 38px; border-radius: 9px; background: var(--ink); color: #fff;
    display: flex; align-items: center; justify-content: center; margin-bottom: 14px; font-size: 17px;
}
.feature h3 { font-size: 15.5px; margin-bottom: 6px; }
.feature p { font-size: 14px; color: var(--ink-soft); }
.site-footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 13px; color: var(--ink-mute); }
.site-footer .inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-mute); }

/* ---------- verify page ---------- */
.verify-wrap { max-width: 460px; margin: 0 auto; padding: 48px 20px 60px; text-align: center; }
.verdict-icon { width: 108px; height: 108px; margin: 0 auto 18px; position: relative; }
.verdict-icon svg { width: 100%; height: 100%; }
.verdict-title { font-size: 30px; font-weight: 800; letter-spacing: .02em; margin-bottom: 6px; }
.verdict-sub { font-size: 14px; margin-bottom: 30px; }
.verdict-valid .verdict-title { color: var(--ok); }
.verdict-bad .verdict-title { color: var(--bad); }

.vcard {
    border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
    text-align: center; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.06);
}
.vcard-top { padding: 26px 24px 8px; }
.vcard .holder-photo {
    width: 130px; height: 130px; border-radius: 14px; object-fit: cover;
    margin: 0 auto 16px; border: 1.5pt solid #1b2a5b;
}
.vcard .inst-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 18px; }
.vcard .inst-row img { width: 34px; height: 34px; object-fit: contain; border-radius: 7px; border: 1px solid var(--line); }
.vcard .inst-row span { font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.vcard .holder-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.vcard .holder-fonction { font-size: 14.5px; color: var(--ink-soft); margin-top: 2px; }
.vcard-fields { border-top: 1px solid var(--line); margin-top: 22px; }
.vcard-fields .row { display: flex; justify-content: space-between; padding: 11px 22px; border-bottom: 1px solid var(--line); font-size: 14px; }
.vcard-fields .row:last-child { border-bottom: none; }
.vcard-fields .k { color: var(--ink-mute); }
.vcard-fields .v { font-weight: 600; }

/* checkmark / cross draw animation */
.draw-circle { stroke-dasharray: 314; stroke-dashoffset: 314; animation: draw .55s ease-out forwards; }
.draw-tick { stroke-dasharray: 90; stroke-dashoffset: 90; animation: draw .4s ease-out .5s forwards; }
.draw-x1, .draw-x2 { stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .3s ease-out .5s forwards; }
.draw-x2 { animation-delay: .72s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .5, 1) both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---------- admin ID detail ---------- */
.detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.qr-box { text-align: center; }
.qr-box img { width: 240px; height: 240px; margin: 0 auto 12px; }
.kv { font-size: 14px; }
.kv .row { display: flex; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv .row:last-child { border-bottom: none; }
.kv .k { width: 160px; flex-shrink: 0; color: var(--ink-mute); }
.kv .v { font-weight: 600; }
.photo-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.photo-lg { width: 140px; height: 140px; border-radius: 12px; object-fit: cover; border: 1.5pt solid #1b2a5b; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--paper-soft); }
.auth-card { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 34px; }
.auth-card .brand { justify-content: center; margin-bottom: 26px; }
.auth-card h1 { font-size: 19px; text-align: center; margin-bottom: 22px; }

/* ---------- print ---------- */
@media print {
    .no-print, .admin-side, .page-head .actions { display: none !important; }
    .admin-main { padding: 0; }
    .panel { border: none; padding: 0; }
    body { background: #fff; }
}
