body {
    min-height: 100svh;
}

/* ── Header ─────────────────────────────────────────────── */
.admin-header {
    width: 100svw;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 28px;
    background: #ffffff;
    color: #101b69;
    border-bottom: 1px solid #eef0f7;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.admin-header-left h1 {
    margin: 0;
    font-size: var(--fontsize-20);
    font-weight: 700;
    color: #101b69;
    white-space: nowrap;
}

.admin-header-left p {
    margin: 4px 0 0;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.admin-header-right {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.scan-wrapper {
    padding: 20px 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 0 auto;
    max-width: 500px;
    box-sizing: border-box;
    width: 90svw;
}

.btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-size: var(--fontsize-16);
    font-weight: 500;
    cursor: pointer;
    transition: var(--apple-animation);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    padding: 10px;
    border-radius: 50%;
    aspect-ratio: 1/1;
    width: 35px;
    position: fixed;
    bottom: 25px;
    right: 20px;
    display: flex;
    justify-content: center;
    align-items: center;

    background: #004aad;
    color: white;
}

.btn-primary svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    aspect-ratio: 1/1;
    width: 20px !important;
    height: 20px !important;
}

.btn-primary:hover {
    background: #004aad;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: transparent;
    color: #dc2626;
    border: 1px solid #dc2626;
}

.btn-danger:hover {
    background: #fee2e2;
}

.btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-full {
    box-sizing: border-box;
    width: 100%;
    justify-content: center;
    margin-top: 18px;
}

.btn-primary-wide {
    display: inline-flex;
    justify-content: center;
    background: #032c93;
    color: white;
    text-decoration: none;
    margin-top: 22px;
    width: 100%;
    box-sizing: border-box;
}

.btn-primary-wide:hover {
    background: #021f6b;
}

/* ── Table card ── */

.table-header {
    width: 100svw;
    padding: 20px 30px;
    box-sizing: border-box;
    background-color: #101b69;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.table-header h1 {
    margin: 0;
    font-size: var(--fontsize-18);
    font-weight: 700;
    color: white;
    line-height: 1.05;
}

.table-card {
    min-width: 100svw;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    transform: scaleY(-1);
}

.table-card table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: var(--fontsize-16);
    transform: scaleY(-1);
}

.table-card thead th {
    color: #032c93;
    background-color: white;
    padding: 11px 14px;
    text-align: left;
    font-size: var(--fontsize-14);
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

.table-card tbody tr {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.table-card tbody tr:last-child {
    border-bottom: none;
}

.table-card tbody tr:hover {
    background: #f9fafb;
}

.table-card td {
    padding: 11px 14px;
    vertical-align: middle;
    white-space: nowrap;
}

.td-no {
    padding: 11px 5px 11px 20px !important;
    font-size: 13px;
    width: 40px;
}

.td-matrix {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 13px;
    color: #032c93;
}

.td-time {
    font-size: 12px;
    white-space: nowrap;
}

.empty-state {
    transform: scaleY(-1);
    padding: 5rem 1rem;
    text-align: center;
    color: white;
}

.empty-state svg {
    margin-bottom: 12px;
    opacity: 0.35;
}

.empty-state p {
    font-size: 15px;
}

.empty-state small {
    font-size: 13px;
}


/* ── Form card (profile setup) ── */
.form-card {
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 1.75rem;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

.form-card h2 {
    font-size: 19px;
    font-weight: 700;
    color: #004aad;
    margin-bottom: 6px;
}

.form-sub {
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.input-group {
    margin-bottom: 14px;
}

.input-group label {
    display: block;
    font-size: var(--fontsize-14);
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: var(--fontsize-14);
    box-sizing: border-box;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: #004aad;
}

.form-note {
    margin-top: 14px;
    font-size: var(--fontsize-14);
    color: #16a34a;
    text-align: center;
    display: none;
}


.field-label {
    font-size: var(--fontsize-18) !important;
    text-align: left !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.field-desc {
    font-size: var(--fontsize-16) !important;
    font-style: italic;
    text-align: left !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding-bottom: 10px !important;
}

.form-card-wide {
    max-width: 560px;
}

.section-title {
    font-size: var(--fontsize-16);
    font-weight: 700;
    color: #032c93;
    margin: 22px 0 6px;
}

.hint {
    font-weight: 400;
    color: #9ca3af;
    font-size: var(--fontsize-14);
}

/* ── Guide box (shown when link is missing/wrong) ── */
.guide-box {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 10px;
    padding: 14px 16px;
    margin: 4px 0 18px;
    font-size: var(--fontsize-14);
    color: #7c2d12;
    line-height: 1.55;
}

.guide-box strong {
    color: #9a3412;
}

.guide-box ol {
    margin: 8px 0 0;
    padding-left: 20px;
}

.guide-box li {
    margin-bottom: 4px;
}

.guide-box code {
    background: #ffedd5;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: var(--fontsize-14);
}

.kbd {
    display: inline-block;
    background: #ffedd5;
    border: 1px solid #fdba74;
    border-radius: 4px;
    padding: 0 6px;
    font-weight: 600;
}

/* ── Field mapping rows ── */
.field-map-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.field-map-row .entry-id {
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 12px;
    color: #6b7280;
    flex-shrink: 0;
}

.field-map-row .test-value {
    font-size: var(--fontsize-14);
    color: #032c93;
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.field-map-row select {
    flex-shrink: 0;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: var(--fontsize-14);
    background: white;
}

/* ── Result section ── */
.result-url {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin: 8px 0 12px;
    word-break: break-all;
    font-size: 12px;
    color: #374151;
    max-height: 140px;
    overflow-y: auto;
}

.qr-preview {
    margin-top: 22px;
    text-align: center;
}

.qr-preview img {
    width: 220px;
    height: 220px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    background: white;
}

.qr-preview a {
    margin-top: 14px;
}

/* ── College dropdown — matches the styling of the other .input-group inputs ── */

.input-group select {
    /* Remove native OS/browser chrome so we can style it ourselves */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    /* Match your text inputs — adjust these to your actual input values */
    width: 100%;
    padding: 12px 40px 12px 14px;
    /* extra right padding for the arrow */
    font-size: var(--fontsize-16);
    font-family: var(--Poppins);
    font-weight: 500;
    color: #1a1a1a;
    background-color: #fff;
    border: 1.5px solid #d8dce3;
    border-radius: 10px;
    box-sizing: border-box;

    /* Custom dropdown arrow (a simple SVG chevron), positioned on the right */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 18px;

    transition: border-color 0.15s ease;
    cursor: pointer;
}

/* Same focus treatment as your text inputs (blue border, e.g. name/matric) */
.input-group select:focus {
    outline: none;
    border-color: #004aad;
    /* swap for your actual --primary/theme-color if different */
}

/* Dim the placeholder option like a placeholder, not a real choice */
.input-group select option[value=""] {
    color: #9aa1ac;
}

/* Locked KK12-only state on the register flow (select is disabled via JS) */
.input-group select:disabled {
    background-color: #f5f6f8;
    color: #667085;
    cursor: not-allowed;
    opacity: 1;
    /* prevent the washed-out native "disabled" look */
}

.custom-detail-row {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 12px 0px 20px;
    margin: 8px 0;
    border-radius: 0 0 10px 10px;
    box-sizing: border-box;
}

.custom-detail-field {
    flex: 1;
}

.custom-detail-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.custom-detail-field .hint {
    font-weight: 400;
    color: #888;
}

.custom-detail-field input {
    padding: 0 15px;
    font-size: var(--fontsize-14);
    box-sizing: border-box;
    width: 100%;
}