:root {
    /* Matches public/css/register.css so both public-facing pages share one brand identity */
    --primary:        #2f7d4d; /* deep green */
    --primary-dark:   #205c3b; /* darker green */
    --primary-light:  #eaf8ee; /* light green tint */
    --primary-xlight: #f7fff9; /* very light */
    --accent:         #7ccf8a; /* soft leaf green accent */
    --accent-dark:    #5bb46d; /* darker green accent */
    --gold:           #d7b054;
    --bg:             #f5faf6; /* soft greenish background */

    /* ICP track page tokens */
    --ink:    #1f2937;
    --muted:  #6b7280;
    --line:   #e3ece6;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16,40,26,.04), 0 8px 24px rgba(32,92,59,.08);
}

* { box-sizing: border-box; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ── Header ── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 20;
}
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 19px;
}
.logo-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1.1;
    letter-spacing: .5px;
}
.logo-sub {
    font-size: 10.5px;
    color: #7b877f;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.btn-apply {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    background: var(--primary-light);
    padding: 8px 16px;
    border-radius: 999px;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.btn-apply:hover { background: var(--primary); color: #fff; }

/* ── Hero ── */
.hero-search {
    position: relative;
    overflow: hidden;
    /* Same brand gradient as register.php's .page-banner */
    background: linear-gradient(135deg, #2f7d4d 0%, #2f7d4d 55%, #7ccf8a 100%);
    color: #fff;
    text-align: center;
    padding: 34px 0 88px;
}
.hero-search::before,
.hero-search::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    pointer-events: none;
}
.hero-search::before { width: 260px; height: 260px; top: -100px; right: -70px; }
.hero-search::after  { width: 180px; height: 180px; bottom: -80px; left: -50px; }
.hero-search .container { position: relative; z-index: 1; }
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    margin-bottom: 12px;
}
.hero-search h1 {
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -.2px;
    margin: 0 0 6px;
}
.hero-search p {
    font-size: 13.5px;
    opacity: .9;
    margin: 0 auto;
    max-width: 500px;
}

/* ── Main (overlaps the hero) ── */
.track-main {
    position: relative;
    z-index: 2;
    margin-top: -56px;
    padding-bottom: 32px;
}

/* ── Search + verify cards ── */
.search-box-wrap,
.verify-box-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}
.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
}
.search-box-wrap .form-control {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-color: #d1d5db;
    border-radius: 0 10px 10px 0;
    padding: 12px 14px;
}
.search-box-wrap .form-control::placeholder {
    font-weight: 500;
    letter-spacing: .5px;
    color: #a3aaa6;
}
.search-box-wrap .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47,125,77,.18);
}
.search-box-wrap .form-control.is-invalid { border-color: #ef4444; }
.search-box-wrap .input-group-text {
    background: var(--primary-xlight);
    border-color: #d1d5db;
    color: var(--primary-dark);
    font-size: 18px;
    border-radius: 10px 0 0 10px;
    padding: 0 16px;
}
.btn-search {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14.5px;
    padding: 12px 20px;
    transition: background .2s;
}
.btn-search:hover:not(:disabled) { background: var(--primary-dark); color: #fff; }
.btn-search:disabled { opacity: .8; }
.btn-link-scan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    background: none;
    border: 1px dashed #c7dccd;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    border-radius: 10px;
    transition: background .2s;
}
.btn-link-scan:hover { background: var(--primary-xlight); }

/* ── QR Scanner panel ── */
.scanner-panel {
    margin-top: 16px;
    background: var(--primary-xlight);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}
.scanner-head { text-align: center; margin-bottom: 12px; }
.scanner-head strong { display: block; font-size: 15px; color: var(--primary-dark); }
.scanner-head span { font-size: 12.5px; color: var(--muted); }
.scanner-video {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;          /* square viewfinder */
    margin: 0 auto 12px;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}
.scanner-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;            /* crop the camera feed to the square */
    display: block;
    background: #000;
}
.scan-guide {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 64%; height: 64%;
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 12px;
    pointer-events: none;
}
.scan-corner { position: absolute; width: 22px; height: 22px; border: 3px solid var(--accent); }
.scan-corner.tl { top: -6px;    left: -6px;  border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.scan-corner.tr { top: -6px;    right: -6px; border-left: 0;  border-bottom: 0; border-top-right-radius: 10px; }
.scan-corner.bl { bottom: -6px; left: -6px;  border-right: 0; border-top: 0;    border-bottom-left-radius: 10px; }
.scan-corner.br { bottom: -6px; right: -6px; border-left: 0;  border-top: 0;    border-bottom-right-radius: 10px; }
.scan-line {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    box-shadow: 0 0 8px var(--accent);
    animation: scanLineMove 2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes scanLineMove { 0% { top: 0%; } 50% { top: 100%; } 100% { top: 0%; } }
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(47,125,77,.25); }
    50%      { box-shadow: 0 0 18px rgba(47,125,77,.55); }
}
.scanner-status {
    text-align: center;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    font-size: 13px;
    color: #374151;
}
.scanner-tip { text-align: center; font-size: 11.5px; color: var(--muted); margin-bottom: 12px; }
.scanner-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.btn-scan-start {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
}
.btn-scan-start:hover:not(:disabled) { background: var(--primary-dark); }
.btn-scan-start:disabled { animation: pulseGlow 1.5s ease-in-out infinite; }
.btn-scan-cancel {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
}

/* ── Step 2 text ── */
.verify-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.verify-sub   { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }

/* ── Empty state: how it works ── */
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 14px;
}
.how-item {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
}
.how-num {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.how-item strong { display: block; font-size: 13px; color: var(--ink); line-height: 1.3; }
.how-item small  { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }

/* ── Notices ── */
.notice-teal {
    background: var(--primary-xlight);
    border: 1px solid #d5eadc;
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: #1f4d33;
}
.notice-teal li { margin-bottom: 2px; }
.notice-privacy { margin-top: 8px; font-size: 11.5px; color: var(--muted); }

/* ── Cards ── */
.form-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.form-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--line);
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-dark);
}
.form-card-header > i {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.form-card-body { padding: 18px; }

/* ── Status Banner (colors are set per-status by track.js) ── */
.status-banner {
    border: 1px solid;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
}
.status-top { display: flex; align-items: center; gap: 14px; }
.status-icon-wrap {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.status-icon-wrap .bi { font-size: 25px; color: #fff; }
.status-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .9px;
    color: var(--muted);
    font-weight: 700;
}
.status-value { font-size: 22px; font-weight: 800; line-height: 1.2; }
.status-meta {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed rgba(0,0,0,.14);
}
.status-ref { font-size: 13px; font-weight: 700; color: #374151; letter-spacing: .5px; font-family: monospace; word-break: break-all; }
.status-meta-val { font-size: 12.5px; font-weight: 600; color: #374151; }

/* ── Detail Fields (also used inside the resubmit modal) ── */
.detail-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #9ca3af; font-weight: 600; margin-bottom: 2px; }
.detail-value { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* ── Timeline ── */
.timeline { padding: 16px 20px 2px; }
.timeline-item { display: flex; gap: 16px; padding-bottom: 22px; position: relative; }
.timeline-item:not(.last)::before {
    content: '';
    position: absolute;
    left: 9px; top: 22px; bottom: 0;
    width: 2px;
    background: var(--line);
}
.timeline-dot {
    width: 20px; height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px currentColor;
}
.dot-pending     { background: #f59e0b; color: #f59e0b; }
.dot-preapproved { background: #3b82f6; color: #3b82f6; }
.dot-approved    { background: #10b981; color: #10b981; }
.dot-rejected    { background: #ef4444; color: #ef4444; }
.dot-returned    { background: #f97316; color: #f97316; }
.timeline-content { flex: 1; min-width: 0; }
.timeline-date { font-size: 11.5px; color: var(--muted); }
.timeline-by   { font-size: 12px; color: #374151; font-weight: 600; margin-bottom: 5px; }
.timeline-note {
    font-size: 13px;
    color: #4b5563;
    background: #f8faf9;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.6;
}

/* ── Status Badges ── */
.status-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px; }
.badge-pending     { background: #fef3c7; color: #92400e; }
.badge-preapproved { background: #dbeafe; color: #1e40af; }
.badge-approved    { background: #d1fae5; color: #065f46; }
.badge-rejected    { background: #fee2e2; color: #991b1b; }
.badge-returned    { background: #fff7ed; color: #7c2d12; }

/* ── What's Next ── */
.whats-next-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.whats-next-item:last-child { margin-bottom: 0; }
.wn-num {
    width: 26px; height: 26px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.whats-next-item p { font-size: 13px; color: #374151; margin: 0; line-height: 1.6; }

/* ── Financial total row ── */
.fin-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 20px;
    background: var(--primary-xlight);
    border-top: 1px solid var(--line);
}
.fin-total span   { font-size: 13px; font-weight: 600; color: var(--muted); }
.fin-total strong { font-size: 17px; font-weight: 800; color: var(--primary-dark); }

/* ── QR card ── */
.qr-inner { display: flex; align-items: center; gap: 18px; }
.qr-img {
    width: 120px; height: 120px;
    border-radius: 10px;
    border: 1px solid var(--line);
    padding: 6px;
    background: #fff;
    flex-shrink: 0;
}
.qr-title { font-size: 14px; font-weight: 700; color: var(--primary-dark); margin-bottom: 2px; }
.qr-note  { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.qr-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Soft buttons / links ── */
.btn-soft {
    background: var(--primary-xlight);
    border: 1px solid #cfe3d6;
    color: var(--primary-dark);
    font-size: 12.5px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    transition: background .2s;
}
.btn-soft:hover { background: var(--primary-light); }
.link-register { font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; }
.link-register:hover { color: var(--primary-dark); text-decoration: underline; }

/* ── Footer ── */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.7);
    font-size: 12px;
    padding: 18px 0;
    margin-top: auto;
    text-align: center;
}
.site-footer strong { color: #fff; }
.site-footer .small-print { font-size: 11px; opacity: .8; }

/* ── Mobile ── */
@media (max-width: 576px) {
    .site-header { padding: 10px 0; }
    .logo-icon { width: 36px; height: 36px; font-size: 17px; border-radius: 10px; }
    .btn-apply { padding: 7px 14px; }
    .hero-search { padding: 22px 0 72px; }
    .hero-search::before, .hero-search::after { display: none; }
    .hero-pill { font-size: 10px; padding: 3px 10px; margin-bottom: 8px; }
    .hero-search h1 { font-size: 21px; }
    .hero-search p  { font-size: 12.5px; }
    .track-main { margin-top: -48px; }
    .search-box-wrap, .verify-box-wrap { padding: 16px; }

    .how-grid { grid-template-columns: 1fr; gap: 8px; }
    .how-item { padding: 10px 12px; align-items: center; }
    .how-item small { display: none; }

    .status-banner { padding: 16px; }
    .status-value { font-size: 19px; }
    .status-meta { grid-template-columns: 1fr 1fr; }
    .status-meta > div:first-child { grid-column: 1 / -1; }

    .qr-inner { flex-direction: column; text-align: center; }
    .qr-actions { justify-content: center; }
    .form-card-body { padding: 16px 14px; }
    .timeline { padding: 14px 14px 2px; }
}

/* ── Resubmit ── */
.btn-resubmit {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    padding: 11px 24px;
    cursor: pointer;
    transition: background .2s;
    display: inline-flex;
    align-items: center;
}
.btn-resubmit:hover { 
    background: #dc2626; 
}
.resubmit-note {
    font-size: 12px;
    color: #6b7280;
}

/* ── Resubmit Modal ── */
.modal-header-red { 
    background: #ef4444; 
    color: #fff; 
    padding: 14px 20px; 
}
.modal-header-red .modal-title { 
    font-size: 15px; 
    font-weight: 700; 
}
.resubmit-info-box { 
    background: #fff5f5; 
    border: 1px solid #fca5a5; 
    border-left: 4px solid #ef4444; 
    border-radius: 6px; 
    padding: 12px 14px; 
    font-size: 12.5px; 
    color: #7f1d1d; 
    margin-bottom: 16px; 
}
.resubmit-info-box .detail-row { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 4px; 
    font-size: 12.5px; 
}
.resubmit-info-box .detail-row:last-child { 
    margin-bottom: 0; 
}
.resubmit-info-box .ri-label { 
    color: #9ca3af; 
    font-weight: 600; 
    min-width: 110px; 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: .5px; 
    padding-top: 1px; 
}
.resubmit-info-box .ri-val { 
    color: #1f2937; 
    font-weight: 600; 
}

.modal-file-drop { 
    border: 2px dashed #fca5a5; 
    border-radius: 8px; 
    padding: 18px 12px; 
    text-align: center; cursor: pointer; position: relative; transition: all .2s; background: #fff; }
.modal-file-drop:hover { 
    border-color: #ef4444; 
    background: #fff5f5; 
}
.modal-file-drop input[type="file"] { 
    position: absolute; 
    inset: 0; 
    opacity: 0; 
    cursor: pointer; 
    width: 100%; 
    height: 100%; 
}
.modal-file-drop .drop-icon { 
    font-size: 22px; 
    color: #ef4444; 
    margin-bottom: 4px; 
}
.modal-file-drop .drop-title { 
    font-size: 12px; 
    font-weight: 600; 
    color: #374151; 
}
.modal-file-drop .drop-sub { 
    font-size: 11px; 
    color: #9ca3af; 
}
.modal-file-drop .drop-badge { 
    display: none; 
    background: #fee2e2; 
    color: #991b1b; 
    font-size: 11px; 
    font-weight: 600; 
    padding: 2px 8px; 
    border-radius: 20px; 
    margin-top: 5px; 
}
.modal-file-drop.selected { 
    border-color: #ef4444; 
    background: #fff5f5; 
}
.modal-file-drop.selected .drop-badge { 
    display: inline-block; 
}
.modal-file-drop.file-error-state { 
    border-color: #ef4444; 
    background: #fff5f5; 
}
.modal-file-error { 
    font-size: 11.5px; 
    color: #ef4444; 
    margin-top: 4px; 
    display: none; 
}
.modal-file-error.show { 
    display: block; 
}

.btn-submit-resubmit { 
    background: #ef4444; 
    color: #fff; 
    border: none; 
    border-radius: 6px; 
    font-weight: 700; 
    font-size: 14px; 
    padding: 11px 0; 
    width: 100%; 
    transition: background .2s; 
}
.btn-submit-resubmit:hover { 
    background: #dc2626; 
    color: #fff; 
}
.btn-submit-resubmit:disabled { 
    background: #9ca3af; 
    cursor: not-allowed; 
}

.retained-badge { 
    background: #d1fae5; 
    color: #065f46; 
    font-size: 11px; 
    font-weight: 700; 
    padding: 2px 8px; 
    border-radius: 20px; 
}

.required {
    color: #ef4444;
}

/* ── Resubmit Modal — Applicant Info ── */
.rs-info-row { display: flex; align-items: center; justify-content: space-between; }
.rs-info-label { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: .5px; }
.rs-info-value { font-size: 13.5px; font-weight: 700; color: #1f2937; margin-top: 4px; }
.rs-info-ref { color: #ef4444; }
.rs-info-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.rs-optional-tag { margin-left: auto; font-size: 10px; font-weight: 600; color: #9ca3af; text-transform: none; letter-spacing: 0; }

/* ── Resubmit Modal — Photo Capture ── */
.rs-photo-wrap { border: 2px dashed #fca5a5; border-radius: 10px; background: #fff5f5; padding: 16px; position: relative; }
.rs-photo-placeholder { width: 140px; height: 160px; background: #e5e7eb; border-radius: 6px; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; color: #9ca3af; }
.rs-photo-placeholder i { font-size: 36px; }
.rs-photo-preview { width: 140px; height: 160px; object-fit: cover; border-radius: 6px; border: 2px solid #fca5a5; display: none; margin: 0 auto 10px; cursor: pointer; }
.rs-photo-btn-row { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.rs-btn-photo { font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 6px; border: none; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: background .15s; }
.rs-btn-capture, .rs-btn-snap { background: #ef4444; color: #fff; }
.rs-btn-capture:hover, .rs-btn-snap:hover { background: #dc2626; }
.rs-btn-upload, .rs-btn-cancel-cam { background: #e5e7eb; color: #374151; }
.rs-btn-upload:hover, .rs-btn-cancel-cam:hover { background: #d1d5db; }
.rs-btn-retake { background: #7f1d1d; color: #fff; }
.rs-btn-retake:hover { background: #6c1717; }
#rsPhotoFileInput { display: none; }
.rs-camera-wrap { display: none; margin-bottom: 10px; }
#rsCameraStream { width: 100%; max-width: 220px; height: 180px; object-fit: cover; border-radius: 6px; border: 2px solid #ef4444; display: block; margin: 0 auto 8px; }
.rs-photo-error { font-size: 11.5px; color: #ef4444; margin-top: 8px; display: none; }
.rs-photo-error.show { display: block; }
.rs-photo-hint { font-size: 11px; color: #9ca3af; margin-top: 8px; }
.rs-divider { margin: 18px 0; border-color: #e3ece6; }
.rs-gcash-hint { font-size: 11.5px; color: #9ca3af; padding-bottom: 8px; }
/* ── Step 2: Email Verification Box ── */
.verify-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-xlight);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: .5px;
    margin-bottom: 14px;
}
.verify-box-wrap .form-control {
    border-color: #d1d5db;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
}
.verify-box-wrap .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(47,125,77,.18);
}
.verify-box-wrap .form-control.is-invalid { border-color: #ef4444; }
.verify-box-wrap .input-group-text {
    background: var(--primary-xlight);
    border-color: #d1d5db;
    color: var(--primary-dark);
    font-size: 16px;
    border-radius: 8px 0 0 8px;
    padding: 0 14px;
}
.btn-verify {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    padding: 12px 28px;
    transition: background .2s;
    white-space: nowrap;
    width: 100%;
}
.btn-verify:hover { background: var(--primary-dark); color: #fff; }
.btn-change-ref {
    font-size: 12px;
    color: var(--primary-dark);
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}
.btn-change-ref:hover { color: var(--primary); }

/* Financial records table */
.fin-track-table { width:100%;border-collapse:collapse; }
.fin-track-table th { padding:9px 16px;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#6b7280;background:#f9fafb;text-align:left;border-bottom:1px solid #e5e7eb; }
.fin-track-table td { padding:12px 16px;font-size:13px;border-bottom:1px solid #f3f4f6;vertical-align:top; }
.fin-track-table tr:last-child td { border-bottom:none; }
.fin-amount { font-weight:700;color:var(--primary);font-size:13.5px; }
.fin-empty { padding:28px;text-align:center;color:#9ca3af;font-size:13px; }
.fin-empty i { font-size:28px;display:block;margin-bottom:8px;opacity:0.35; }

/* ── Amber notice (status reset) ── */
.notice-amber {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 12px 14px;
    font-size: 12.5px;
    color: #78350f;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* ── Resubmit modal section labels ── */
.resubmit-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #9ca3af;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
}

/* ═══════════════════════════════════════════════════════════════════
   BILINGUAL TEXT — Filipino first, English translation in italics on a
   new line, wrapped in parentheses (same look as register.php's em.en).
   Markup: Filipino text<span class="en-translation">English</span>
   ═══════════════════════════════════════════════════════════════════ */
span.en-translation,
small.en-translation {
    display: block;
    font-style: italic;
    font-weight: 400;
    font-size: max(10.5px, .85em);   /* scales with its parent, never below 10.5px */
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;            /* labels are UPPERCASE; translation stays normal case */
    color: inherit;                  /* readable on green / red / white backgrounds alike */
    opacity: .78;
    margin-top: 1px;
}
span.en-translation::before,
small.en-translation::before { content: "("; }
span.en-translation::after,
small.en-translation::after  { content: ")"; }

/* tiny tags and badges: keep the translation on the same line */
.rs-optional-tag .en-translation,
.retained-badge  .en-translation { display: inline; margin: 0 0 0 3px; }

/* big hero title: fixed, smaller translation size */
.hero-search h1 .en-translation { font-size: 14px; font-weight: 500; opacity: .9; margin-top: 4px; }

/* elements that were flex rows: let the translation drop below the Filipino text */
.hero-pill { display: inline-block; text-align: center; border-radius: 14px; padding: 6px 14px; line-height: 1.35; max-width: 100%; }
.btn-search,
.btn-link-scan { display: block; text-align: center; }
.btn-link-scan > i { margin-right: 8px; }
.rs-btn-photo { display: inline-block; text-align: center; }
.rs-btn-photo > i { margin-right: 5px; }

/* card headers: icon chip | Filipino title | optional tag, with the translation under the title */
.form-card-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 10px;
    row-gap: 0;                      /* the old flex `gap` also set the row gap */
    align-items: center;
}
.form-card-header > i                { grid-column: 1; grid-row: 1; }
.form-card-header > .rs-optional-tag { grid-column: 3; grid-row: 1; }
.form-card-header > .en-translation  { grid-column: 2; grid-row: 2; margin-top: 0; }
.en-translation {
    display: block;
    color: #6b7280;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.5;
    margin-top: 2px;
}

.en-translation-inline {
    color: #6b7280;
    font-size: 11px;
    font-weight: 400;
}

/* phones: keep the header compact (the Apply button shows Filipino only) */
@media (max-width: 576px) {
    .btn-apply { white-space: nowrap; }
    .btn-apply .en-translation { display: none; }
}
