/* ==========================================================================
   Solfreaks (Pvt) Ltd — Experience Letter Verification
   Brand: blue-to-azure gradient with a gold accent, taken from the SF letterhead
   ========================================================================== */

:root {
    --ink:        #141b2d;
    --ink-mid:    #3d4759;
    --ink-soft:   #6b7686;
    --line:       #e5e9f0;
    --line-soft:  #eef1f6;
    --bg:         #f4f6fb;
    --panel:      #ffffff;

    /* Sampled from the SF letterhead so the page matches the printed document */
    --brand-1:    #386fb2;   /* deep letterhead blue  */
    --brand-2:    #53a3d9;   /* light letterhead blue */
    --brand:      #2c6098;   /* darkened for text contrast on white */
    --brand-deep: #1e4a79;
    --brand-grad: linear-gradient(100deg, #386fb2 0%, #53a3d9 100%);
    --accent-1:   #eeb157;   /* letterhead gold   */
    --accent-2:   #f7dc4a;   /* letterhead yellow */
    --accent-grad: linear-gradient(100deg, var(--accent-1), var(--accent-2));

    --good:     #0d7a4d;
    --good-bg:  #e9f7f0;
    --good-line:#b9e3ce;
    --warn:     #94620a;
    --warn-bg:  #fdf5e4;
    --warn-line:#f0dcae;
    --bad:      #b02a20;
    --bad-bg:   #fdeeec;
    --bad-line: #f2c7c2;

    --radius:    14px;
    --radius-sm: 9px;
    --shadow:    0 1px 2px rgba(20, 27, 45, .04), 0 8px 24px rgba(20, 27, 45, .06);
    --shadow-lg: 0 10px 34px rgba(30, 74, 121, .16);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: "Poppins", "Montserrat", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.015em; }

.wrap { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 20px; }
.page-admin .wrap { max-width: 1140px; }

a { color: var(--brand); text-underline-offset: 2px; }
a:hover { color: var(--brand-1); }

/* --------------------------------------------------------------------------
   Public header
   -------------------------------------------------------------------------- */

/* White bar with the letterhead's angled blue/gold bars at the right edge */
.site-header {
    position: relative;
    background: var(--panel);
    border-top: 3px solid transparent;
    border-image: var(--brand-grad) 1;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 3px rgba(20, 27, 45, .05);
    margin-bottom: 36px;
    overflow: hidden;
}
/* Skewed accent bars echoing the printed letterhead corner */
.site-header::before,
.site-header::after {
    content: "";
    position: absolute;
    top: -12px;
    height: calc(100% + 24px);
    transform: skewX(-24deg);
    pointer-events: none;
}
.site-header::before { right: 74px; width: 90px; background: var(--brand-grad); opacity: .9; }
.site-header::after  { right: -18px; width: 78px; background: var(--accent-grad); }

.site-header-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 0;
}
.site-logo { height: 46px; width: auto; max-width: 230px; flex: 0 0 auto; display: block; }

/* Lettered mark shown until a logo file is installed */
.brand-mark {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 11px;
    background: var(--brand-grad);
    color: #fff;
    font-size: 21px; font-weight: 700;
    box-shadow: 0 4px 12px rgba(56, 111, 178, .32);
}
.brand { font-size: 18px; font-weight: 700; line-height: 1.3; }
.brand-sub {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.site-footer {
    margin-top: 52px;
    padding: 26px 0 30px;
    border-top: 3px solid transparent;
    border-image: var(--accent-grad) 1;
    background: var(--panel);
    color: var(--ink-soft);
    font-size: 13.5px;
    text-align: center;
}
.site-footer a { color: var(--brand); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-address { margin-bottom: 6px; }
.footer-contacts { margin-bottom: 10px; font-weight: 500; }
.footer-legal { color: var(--ink-soft); font-size: 12.5px; }
.site-footer .sep { margin: 0 9px; opacity: .5; }

/* --------------------------------------------------------------------------
   Verdict banner
   -------------------------------------------------------------------------- */

.verdict {
    position: relative;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 26px 28px;
    border-radius: var(--radius);
    border: 1px solid;
    background: var(--panel);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    overflow: hidden;
}
.verdict::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
}
.verdict h1 { margin: 0 0 5px; font-size: 23px; font-weight: 700; }
.verdict p  { margin: 0 0 6px; color: var(--ink-mid); }
.verdict p:last-child { margin-bottom: 0; }

.verdict-icon {
    flex: 0 0 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 25px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.verdict-valid   { border-color: var(--good-line); background: linear-gradient(180deg, var(--good-bg), #fff 70%); }
.verdict-valid::before   { background: var(--good); }
.verdict-valid   .verdict-icon { background: var(--good); box-shadow: 0 4px 14px rgba(13, 122, 77, .3); }
.verdict-valid   h1 { color: #0a4a2f; }

.verdict-revoked { border-color: var(--warn-line); background: linear-gradient(180deg, var(--warn-bg), #fff 70%); }
.verdict-revoked::before { background: var(--warn); }
.verdict-revoked .verdict-icon { background: var(--warn); box-shadow: 0 4px 14px rgba(148, 98, 10, .3); }
.verdict-revoked h1 { color: #5b3c04; }

.verdict-invalid { border-color: var(--bad-line); background: linear-gradient(180deg, var(--bad-bg), #fff 70%); }
.verdict-invalid::before { background: var(--bad); }
.verdict-invalid .verdict-icon { background: var(--bad); box-shadow: 0 4px 14px rgba(176, 42, 32, .3); }
.verdict-invalid h1 { color: #6d1712; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px;
    margin-bottom: 22px;
    box-shadow: var(--shadow);
}
.card > h1:first-child, .card > h2:first-child { margin-top: 0; }
.card h1 { font-size: 24px; margin-bottom: 8px; }
.card h2 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ink-soft);
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
}
.lede  { color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.note  { color: var(--ink-soft); font-size: 14px; line-height: 1.65; }

/* --------------------------------------------------------------------------
   Record detail
   -------------------------------------------------------------------------- */

.record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 32px;
    margin: 0;
}
.record-grid > div { min-width: 0; }
.record-grid dt {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-soft);
    margin-bottom: 3px;
}
.record-grid dd {
    margin: 0;
    font-weight: 600;
    font-size: 15.5px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

/* Details on the left, photo in its own column on the right */
.record-body { display: flex; align-items: flex-start; gap: 30px; }
.record-main { flex: 1 1 auto; min-width: 0; }

.record-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--good);
    margin-bottom: 4px;
}
/* Beats the generic `.card h2` section-heading styling */
.card h2.record-name {
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    font-size: 27px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.record-intro { margin: 0 0 24px; color: var(--ink-soft); font-size: 14.5px; }

/* Green tick beside every field that matched the record */
.record-grid.verified dd {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.record-grid.verified dd::before {
    content: "";
    flex: 0 0 auto;
    width: 16px; height: 16px;
    margin-top: 3px;
    background: no-repeat center/contain
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='10' r='9' fill='%230d7a4d'/%3E%3Cpath d='M5.6 10.3l2.9 2.9 5.9-6' fill='none' stroke='%23fff' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.record-photo { flex: 0 0 auto; text-align: center; position: relative; }
/* Verified seal tucked into the corner of the photo */
.record-photo.verified img { position: relative; }
.record-photo.verified::before {
    content: "";
    position: absolute;
    right: -9px;
    top: 118px;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--good) no-repeat center/17px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.4l3.4 3.4 7.4-7.4' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    box-shadow: 0 3px 10px rgba(13, 122, 77, .35);
    z-index: 2;
}
.record-photo img {
    display: block;
    width: 124px;
    height: 155px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 5px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.record-photo-caption {
    display: block;
    margin-top: 7px;
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--ink-soft);
}
.record::after { content: ""; display: block; clear: both; }

.remarks { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.remarks h3 {
    margin: 0 0 6px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--ink-soft);
}
.remarks p { margin: 0; color: var(--ink-mid); }

.checked-at {
    margin: 24px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
    font-size: 13px;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */

.form { margin-top: 20px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field .hint, .hint { font-weight: 400; color: var(--ink-soft); font-size: 13.5px; }

input[type=text], input[type=password], input[type=date],
input[type=search], select, textarea {
    width: 100%;
    padding: 11px 13px;
    font: inherit;
    font-size: 15px;
    color: inherit;
    background: #fff;
    border: 1px solid #cfd6e2;
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #a7b0be; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(56, 111, 178, .18);
}
textarea { min-height: 96px; resize: vertical; }
input[type=file] { font: inherit; font-size: 14px; max-width: 100%; }

.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 20px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid #cfd6e2;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    background: #fff;
    color: var(--ink);
    transition: background .15s, box-shadow .15s, filter .15s;
}
.btn:hover { background: #f3f6fb; color: var(--ink); }
.btn-primary {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 12px rgba(56, 111, 178, .3);
}
.btn-primary:hover { filter: brightness(1.09); color: #fff; }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #8f1e17; color: #fff; }
.btn-sm { padding: 6px 13px; font-size: 13.5px; }

.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    border: 1px solid;
    font-size: 15px;
}
.alert-error   { background: var(--bad-bg);  border-color: var(--bad-line);  color: #6d1712; }
.alert-success { background: var(--good-bg); border-color: var(--good-line); color: #0a4a2f; }
.alert ul { margin: 6px 0 0; padding-left: 20px; }

.login-brand { margin-bottom: 16px; }
.login-brand .site-logo { height: 48px; }

/* --------------------------------------------------------------------------
   Admin
   -------------------------------------------------------------------------- */

.admin-bar {
    background: var(--brand-deep);
    background-image: var(--brand-grad);
    color: #fff;
    padding: 13px 0;
    margin-bottom: 28px;
    box-shadow: 0 4px 18px rgba(30, 74, 121, .22);
}
.admin-bar .wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.admin-bar a {
    color: rgba(255, 255, 255, .8);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    padding-bottom: 3px;
}
.admin-bar a:hover { color: #fff; }
.admin-bar a.active { color: #fff; box-shadow: inset 0 -2px 0 var(--accent-2); }
.admin-bar .admin-brand {
    font-weight: 700; color: #fff; margin-right: 6px;
    display: flex; align-items: center; gap: 9px; font-size: 15px;
}
.admin-bar .admin-brand img.admin-logo {
    height: 30px; width: auto;
    background: #fff; border-radius: 7px; padding: 3px;
}
.admin-bar .admin-brand .brand-mark {
    width: 27px; height: 27px; font-size: 14px; border-radius: 7px;
    background: rgba(255, 255, 255, .2); box-shadow: none;
}
.admin-bar .spacer { margin-left: auto; }
.admin-bar .who { color: rgba(255, 255, 255, .72); font-size: 14px; }

.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 25px; }
.page-head .spacer { margin-left: auto; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.stat::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--brand-grad); }
.stat .n { font-size: 27px; font-weight: 700; line-height: 1.15; }
.stat .k { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }

.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow);
}
table.data { width: 100%; border-collapse: collapse; min-width: 780px; }
table.data th, table.data td {
    padding: 13px 15px; text-align: left;
    border-bottom: 1px solid var(--line-soft); vertical-align: middle;
}
table.data th {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .07em;
    color: var(--ink-soft); background: #fafbfe;
    white-space: nowrap;
}
table.data tbody tr:hover { background: #fafbfe; }
table.data tr:last-child td { border-bottom: 0; }

.pill {
    display: inline-block; padding: 3px 11px;
    border-radius: 999px; font-size: 12px; font-weight: 600;
    text-transform: capitalize; white-space: nowrap;
}
.pill-active, .pill-valid       { background: var(--good-bg); color: var(--good); }
.pill-revoked, .pill-notfound   { background: var(--bad-bg);  color: var(--bad); }

/* Filter bar above the letters table */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}
.toolbar .toolbar-search {
    position: relative;
    flex: 1 1 280px;
    min-width: 0;
}
/* Magnifier sits inside the field, so the placeholder never collides with it */
.toolbar .toolbar-search::before {
    content: "";
    position: absolute;
    left: 13px; top: 50%;
    width: 15px; height: 15px;
    margin-top: -7.5px;
    pointer-events: none;
    background: no-repeat center/contain
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.6-3.6'/%3E%3C/svg%3E");
}
.toolbar input[type=search] {
    width: 100%;
    height: 42px;
    padding-left: 37px;
    max-width: none;
}
.toolbar select {
    height: 42px;
    width: auto;
    min-width: 170px;
    flex: 0 0 auto;
    padding-right: 34px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7686' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 15px;
}
.toolbar .btn { height: 42px; flex: 0 0 auto; }

.pager { display: flex; gap: 10px; margin-top: 18px; align-items: center; font-size: 14px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { display: inline; }
/* Row actions stay side by side rather than stacking */
table.data .actions { flex-wrap: nowrap; justify-content: flex-end; }

.emp-cell { display: flex; align-items: center; gap: 12px; }
.emp-cell > div { min-width: 0; }
.emp-cell strong { display: block; }
.emp-meta { font-size: 12.5px; color: var(--ink-soft); white-space: nowrap; }
.thumb-sm {
    width: 38px; height: 46px; object-fit: cover;
    border: 1px solid var(--line); border-radius: 6px; flex: 0 0 auto; background: #fff;
}

.photo-current { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.photo-current img {
    width: 96px; height: 120px; object-fit: cover;
    border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; background: #fff;
}
.photo-remove { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 14px; }
.photo-remove input { width: auto; }

/* --------------------------------------------------------------------------
   QR print sheet
   -------------------------------------------------------------------------- */

.qr-sheet { text-align: center; }
.qr-sheet img {
    width: 224px; height: 224px;
    image-rendering: pixelated;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 6px; background: #fff;
}
.qr-sheet .qr-caption { font-size: 14px; color: var(--ink-mid); margin-top: 12px; }
.qr-url {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere;
}
.card ol { padding-left: 20px; }
.card ol li { margin-bottom: 7px; }

/* --------------------------------------------------------------------------
   Setup / diagnostics checklist
   -------------------------------------------------------------------------- */

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: 15px;
}
.checklist li:last-child { border-bottom: 0; }
.checklist-mark {
    flex: 0 0 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 700; line-height: 1;
}
.checklist li.ok   .checklist-mark { background: var(--good); }
.checklist li.warn .checklist-mark { background: var(--warn); }
.checklist li.bad  .checklist-mark { background: var(--bad); }
.checklist li.bad  { color: #6d1712; }
.checklist-detail {
    display: block;
    margin-top: 3px;
    font-size: 13.5px;
    color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
    .record-grid, .field-row { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card { padding: 20px; }
    .verdict { padding: 20px; gap: 14px; }
    .verdict h1 { font-size: 20px; }
    .record-body { flex-direction: column-reverse; gap: 20px; }
    .record-photo { align-self: center; }
    .site-header::before, .site-header::after { display: none; }
}

@media print {
    body { background: #fff; }
    .site-header, .site-footer, .admin-bar, .page-head, .no-print { display: none !important; }
    .card, .verdict { border: 1px solid #ccc; box-shadow: none; }
}
