:root {
    --primary: #5538ee;
    --primary-2: #9418f5;
    --ink: #121a2d;
    --muted: #6c7482;
    --surface: #fff;
    --bg: #f7f8fc;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: radial-gradient(circle at 50% 0, #fff 0, var(--bg) 55%);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.container { max-width: 920px; }
.brand-icon {
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    font-size: 30px;
    background: linear-gradient(135deg, #6549f6, #a510f4);
    box-shadow: 0 9px 20px rgba(85, 56, 238, .22);
}

h1 { font-size: clamp(1.8rem, 5vw, 2.35rem); }
.stepper { display: flex; align-items: center; justify-content: center; max-width: 780px; }
.step { display: flex; align-items: center; gap: 10px; color: #a2a7b1; }
.step span {
    display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px;
    border-radius: 11px; background: #f0f1f5; font-weight: 700;
}
.step small { width: 84px; line-height: 1.25; }
.step.active { color: var(--ink); }
.step.active span { color: #fff; background: var(--primary); box-shadow: 0 7px 15px rgba(85, 56, 238, .2); }
.step.done span { color: #087d66; background: #d6f7e9; }
.step-line { flex: 1; min-width: 25px; height: 3px; margin: 0 10px; background: #e1e3e9; }
.step-line.done { background: #20bd97; }

#kycForm { max-width: 800px; }
.form-card {
    padding: clamp(1.25rem, 5vw, 2.5rem);
    border: 1px solid #ececf2;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(30, 38, 65, .07);
}
.form-card h2 { margin-bottom: 1.5rem; font-size: 1.2rem; }
.form-card h3 { margin: 0 0 .9rem; font-size: .95rem; font-weight: 700; }
.form-label { font-size: .85rem; font-weight: 500; }
.form-control, .form-select {
    min-height: 50px; border-color: #dfe2e8; border-radius: 9px; background-color: #fafbfc;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 .2rem rgba(85, 56, 238, .12); }
.step-panel.was-validated .form-control:invalid,
.step-panel.was-validated .form-select:invalid {
    border-color: #dc3545;
    background-color: #fff7f7;
    box-shadow: 0 0 0 .18rem rgba(220, 53, 69, .1);
}
.step-panel.was-validated .form-control:invalid:focus,
.step-panel.was-validated .form-select:invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 .22rem rgba(220, 53, 69, .18);
}
.step-panel.was-validated .form-control:invalid ~ .invalid-feedback,
.step-panel.was-validated .form-select:invalid ~ .invalid-feedback {
    display: block;
}
.step-panel.was-validated .upload-box:has(input:invalid),
.video-recorder.invalid {
    border-color: #dc3545;
    background: #fff7f7;
    box-shadow: 0 0 0 .18rem rgba(220, 53, 69, .1);
}
.btn { min-height: 50px; border-radius: 13px; font-weight: 600; }
.btn-primary { border: 0; background: linear-gradient(100deg, var(--primary), var(--primary-2)); }
.btn-primary:hover { filter: brightness(.94); }
.upload-box {
    position: relative; display: grid; min-height: 160px; place-items: center; align-content: center;
    padding: 2rem; text-align: center; border: 1px dashed #ced2da; border-radius: 14px; background: #fafbfc;
}
.upload-box span { color: #bdc2cb; font-size: 2.5rem; }
.upload-box p { margin: .5rem 0 0; color: var(--muted); }
.upload-box small { color: #a0a6b1; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-box.has-file { border-color: #19aa85; background: #f3fffb; }
.video-recorder {
    position: relative;
    overflow: hidden;
    padding: 1rem;
    text-align: center;
    border: 1px dashed #ced2da;
    border-radius: 14px;
    background: #fafbfc;
}
.video-recorder video {
    display: none;
    width: 100%;
    max-height: 420px;
    border-radius: 10px;
    background: #111;
    object-fit: contain;
}
.video-recorder video.visible { display: block; }
.video-placeholder {
    display: grid;
    min-height: 190px;
    place-items: center;
    align-content: center;
    color: var(--muted);
}
.video-placeholder span { margin-bottom: .75rem; color: #e94b58; font-size: 2rem; }
.recording-status { margin: .8rem 0; color: var(--muted); font-size: .86rem; }
.recording-status.is-recording { color: #c92434; font-weight: 700; }
.recording-status.is-recorded { color: #087d66; font-weight: 700; }
.video-actions { display: flex; justify-content: center; gap: .75rem; }
.video-actions .btn { min-height: 44px; }
.recorded-video-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.agreement, .checklist { padding: 1.25rem; border: 1px solid #dfe3f3; border-radius: 14px; background: #f5f7ff; }
.checklist li { margin: .55rem 0; color: #198b73; }
.admin-shell { max-width: 1180px; }
.table-card { overflow: hidden; border: 1px solid #e8eaf0; border-radius: 18px; background: #fff; box-shadow: 0 12px 35px rgba(30,38,65,.06); }
.status { display: inline-block; padding: .3rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.status-pending { color: #916000; background: #fff3cd; }
.status-approved { color: #08745f; background: #d7f7eb; }
.status-rejected { color: #a72833; background: #fce0e3; }
.document-group { padding: 1.25rem 0; border-top: 1px solid #eceef3; }
.document-group:first-of-type { padding-top: 0; border-top: 0; }
.document-group:last-child { padding-bottom: 0; }
.document-card {
    display: flex;
    min-height: 105px;
    align-items: center;
    gap: .85rem;
    padding: .85rem;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid #e3e5ec;
    border-radius: 12px;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.document-card:hover {
    color: var(--primary);
    border-color: #b9aeff;
    box-shadow: 0 8px 22px rgba(85, 56, 238, .09);
    transform: translateY(-1px);
}
.document-card img {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    border-radius: 8px;
    background: #f3f4f7;
    object-fit: cover;
}
.document-card > span:last-child { min-width: 0; }
.document-card strong, .document-card small { display: block; }
.document-card small { overflow: hidden; margin-top: .3rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.document-icon {
    display: grid;
    width: 58px;
    height: 68px;
    flex: 0 0 58px;
    place-items: center;
    color: var(--primary);
    border-radius: 8px;
    background: #f0edff;
    font-size: 1.7rem;
}
.admin-video { width: 100%; max-height: 420px; border-radius: 12px; background: #111; }
.empty-media {
    display: grid;
    min-height: 170px;
    place-items: center;
    padding: 1rem;
    color: var(--muted);
    text-align: center;
    border: 1px dashed #d5d8e0;
    border-radius: 12px;
    background: #fafbfc;
}
.activity-log {
    position: relative;
    max-height: 340px;
    overflow-y: auto;
    padding-right: .35rem;
}
.activity-item {
    position: relative;
    display: grid;
    grid-template-columns: 13px 1fr;
    gap: .75rem;
    padding: 0 0 1.2rem;
}
.activity-item:not(:last-child)::before {
    position: absolute;
    top: 11px;
    bottom: 0;
    left: 5px;
    width: 2px;
    content: "";
    background: #e7e9ef;
}
.activity-item:last-child { padding-bottom: 0; }
.activity-dot {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: .3rem;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #8c93a1;
    box-shadow: 0 0 0 2px #e7e9ef;
}
.activity-item strong { display: block; font-size: .9rem; }
.activity-item p { margin: .2rem 0; color: var(--muted); font-size: .82rem; line-height: 1.35; }
.activity-item small { color: #9ba1ac; font-size: .72rem; }
.activity-approved .activity-dot { background: #17a47f; box-shadow: 0 0 0 2px #ccefe4; }
.activity-rejected .activity-dot { background: #dc3545; box-shadow: 0 0 0 2px #f8d1d5; }
.activity-pending .activity-dot { background: #e3a008; box-shadow: 0 0 0 2px #f9e9b8; }
.activity-created .activity-dot { background: var(--primary); box-shadow: 0 0 0 2px #dcd6ff; }

@media (max-width: 700px) {
    .step small { display: none; }
    .step-line { margin: 0 5px; }
    .step span { width: 36px; height: 36px; flex-basis: 36px; }
    .form-card { border-radius: 18px; }
    #nextBtn, #submitBtn { padding-inline: 1.5rem !important; }
}
