/* ==========================================================================
   ICIT Chirawa - Pink-Themed A4 Portrait Admit Card Layout, PDF & Print CSS
   ========================================================================== */

.admit-cards-stage {
    display: flex;
    flex-direction: column;
    gap: 28px;
    align-items: center;
}

.admit-card-wrapper {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
}

/* 198mm x 278mm fits cleanly inside A4 (210mm x 297mm) with 6mm margins on all sides */
.admit-sheet {
    position: relative;
    width: 198mm;
    min-height: 276mm;
    margin: 0 auto;
    background: #ffffff;
    color: #1f2937;
    padding: 6.5mm;
    border: 2.5px solid #ad1457;
    box-shadow: 0 14px 36px rgba(173, 20, 87, 0.16);
    overflow: hidden;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.admit-watermark {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-30deg);
    font-size: 34pt;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: rgba(173, 20, 87, 0.045);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.admit-inner-frame {
    position: relative;
    z-index: 1;
    border: 1px solid #f48fb1;
    padding: 12px 14px;
    min-height: 260mm;
    display: flex;
    flex-direction: column;
}

/* Header */
.admit-header {
    display: table;
    width: 100%;
    table-layout: fixed;
    padding-bottom: 10px;
    border-bottom: 2px solid #ad1457;
}

.admit-logo-box {
    display: table-cell;
    width: 74px;
    height: 74px;
    vertical-align: middle;
    text-align: center;
}

.admit-logo-img {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
    display: inline-block;
}

.admit-logo-muted {
    opacity: 0.85;
}

.admit-head-center {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
    padding: 0 10px;
}

.admit-inst-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 13.8pt;
    font-weight: 700;
    color: #ad1457;
    line-height: 1.22;
    letter-spacing: 0.01em;
}

.admit-inst-meta {
    font-size: 8pt;
    color: #4b3f46;
    margin-top: 3px;
    line-height: 1.35;
}

.admit-badge-row {
    margin: 7px 0 5px;
}

.admit-ribbon {
    display: inline-block;
    background: linear-gradient(90deg, #ad1457, #d81b60);
    color: #ffffff;
    font-size: 9.2pt;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 3.5px 18px;
    border-radius: 4px;
}

.admit-exam-title {
    font-size: 10pt;
    font-weight: 800;
    color: #1f2937;
    text-transform: uppercase;
    line-height: 1.25;
}

.admit-session-line {
    font-size: 8.5pt;
    font-weight: 600;
    color: #880e4f;
    margin-top: 2px;
}

/* Candidate Particulars + Photo (table layout renders identically in browser, print & html2canvas) */
.admit-candidate-section {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-top: 12px;
}

.admit-details-wrap {
    display: table-cell;
    vertical-align: top;
    padding-right: 12px;
}

.admit-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
}

.admit-info-table th,
.admit-info-table td {
    border: 1px solid #f3c6d7;
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
}

.admit-info-table th {
    background: #fce4ec;
    color: #880e4f;
    font-weight: 700;
    width: 22%;
    white-space: nowrap;
}

.admit-info-table td {
    color: #1f2937;
    background: rgba(255, 255, 255, 0.92);
}

.val-strong {
    font-weight: 700;
    color: #ad1457;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 9.2pt;
}

.val-name {
    font-weight: 800;
    font-size: 10pt;
    color: #880e4f;
    letter-spacing: 0.02em;
}

.batch-pill {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 7px;
    font-size: 7.8pt;
    font-weight: 600;
    background: #fce4ec;
    color: #880e4f;
    border: 1px solid #f8bbd0;
    border-radius: 4px;
}

/* Photo Box */
.admit-photo-col {
    display: table-cell;
    width: 126px;
    vertical-align: top;
    text-align: center;
}

.admit-photo-frame {
    width: 122px;
    height: 142px;
    border: 1.5px solid #ad1457;
    background: #fff5f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
    margin: 0 auto 7px;
}

.admit-photo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.admit-photo-placeholder {
    font-size: 9pt;
    font-weight: 700;
    color: #c2185b;
}

.admit-candidate-sign {
    width: 122px;
    margin: 0 auto;
    border: 1px solid #f48fb1;
    text-align: center;
    font-size: 7.3pt;
    font-weight: 600;
    color: #880e4f;
    padding: 2px 4px 3px;
    background: #ffffff;
}

.sign-space {
    height: 20px;
}

/* Venue Strip */
.admit-venue-box {
    margin-top: 11px;
    background: #fff5f8;
    border: 1.5px solid #ad1457;
    border-left: 5px solid #d81b60;
    padding: 7px 11px;
    font-size: 9pt;
    line-height: 1.4;
}

.venue-label {
    display: inline;
    font-weight: 800;
    color: #ad1457;
    margin-right: 6px;
}

.venue-value {
    display: inline;
    font-weight: 600;
    color: #1f2937;
}

.venue-rooms-tag {
    display: inline-block;
    margin-left: 8px;
    background: #fff8e1;
    color: #880e4f;
    border: 1px solid #f48fb1;
    padding: 1px 7px;
    border-radius: 4px;
    font-size: 7.8pt;
    font-weight: 700;
}

/* Schedule Table */
.admit-schedule-section {
    margin-top: 12px;
    flex: 1;
}

.section-heading {
    font-size: 8.8pt;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(90deg, #ad1457, #d81b60);
    padding: 5px 10px;
    letter-spacing: 0.06em;
}

.admit-schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.6pt;
}

.admit-schedule-table th,
.admit-schedule-table td {
    border: 1px solid #f3c6d7;
    padding: 6.5px 7px;
    vertical-align: middle;
}

.admit-schedule-table thead th {
    background: #fce4ec;
    color: #880e4f;
    font-weight: 700;
    text-align: center;
    font-size: 8.2pt;
}

.admit-schedule-table tbody tr:nth-child(even) {
    background: #fff9fb;
}

.text-center {
    text-align: center;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
}

.subj-type {
    font-size: 7.6pt;
    color: #6b5560;
    margin-left: 4px;
}

.sub-day {
    font-size: 7.4pt;
    color: #880e4f;
}

.empty-schedule {
    padding: 16px 10px !important;
    color: #6b5560;
    font-style: italic;
}

.admit-pattern-bar {
    margin-top: 10px;
    background: #fff5f8;
    border: 1px solid #f48fb1;
    border-left: 4px solid #ad1457;
    padding: 6px 10px;
    font-size: 8.3pt;
    color: #1f2937;
    line-height: 1.4;
}

.pattern-label {
    font-weight: 800;
    color: #ad1457;
    margin-right: 6px;
}

.pattern-items strong {
    color: #880e4f;
}

/* Bottom Grid: Instructions + Barcode + Signatures */
.admit-bottom-grid {
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1.5px dashed #f48fb1;
    display: table;
    width: 100%;
    table-layout: fixed;
}

.admit-instructions {
    display: table-cell;
    width: 67%;
    vertical-align: bottom;
    padding-right: 14px;
    font-size: 7.8pt;
    color: #1f2937;
}

.inst-title {
    font-weight: 800;
    color: #ad1457;
    margin-bottom: 4px;
    font-size: 8.1pt;
    letter-spacing: 0.03em;
}

.admit-instructions ol {
    margin: 0 0 9px;
    padding-left: 16px;
    line-height: 1.4;
}

.admit-instructions li + li {
    margin-top: 2px;
}

.admit-verify-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 5px;
}

.barcode-svg {
    height: 28px;
    width: 136px;
    display: block;
}

.verify-meta {
    font-size: 7.3pt;
    color: #5c5058;
    line-height: 1.35;
}

.admit-signatures {
    display: table-cell;
    width: 33%;
    vertical-align: bottom;
    text-align: right;
}

.sign-box {
    width: 175px;
    margin-left: auto;
    text-align: center;
}

.sign-img-wrap {
    height: 46px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: 4px;
}

.admit-sign-img {
    max-height: 44px;
    max-width: 145px;
    object-fit: contain;
}

.sign-line {
    border-top: 1.5px solid #ad1457;
    padding-top: 4px;
    font-size: 8.4pt;
    font-weight: 700;
    color: #880e4f;
}

.sign-sub {
    font-size: 7.6pt;
    color: #5c5058;
    font-weight: 600;
}

.admit-card-footer {
    margin-top: 9px;
    padding-top: 6px;
    border-top: 1px solid #f3c6d7;
    text-align: center;
    font-size: 7.8pt;
    font-weight: 600;
    color: #5c5058;
}

/* ==========================================================================
   OFFSCREEN PDF EXPORT CLONE (exact A4 single-page proportions)
   ========================================================================== */
.pdf-export-host {
    position: fixed;
    left: -20000px;
    top: 0;
    width: 198mm;
    background: #ffffff;
    z-index: -1;
}

.pdf-export-host .admit-sheet {
    width: 198mm !important;
    min-height: 278mm !important;
    max-width: 198mm !important;
    margin: 0 !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    page-break-after: always;
}

.pdf-export-host .admit-sheet:last-child {
    page-break-after: auto;
}

/* ==========================================================================
   PRINT RULES (A4 Portrait, clean borderless portal chrome removal)
   ========================================================================== */
@page {
    size: A4 portrait;
    margin: 6mm;
}

@media print {
    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .no-print {
        display: none !important;
    }

    .portal-container,
    .main-wrap {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .admit-card-wrapper {
        overflow: visible !important;
        padding: 0 !important;
        page-break-after: always;
    }

    .admit-card-wrapper:last-child {
        page-break-after: auto;
    }

    .admit-sheet {
        box-shadow: none !important;
        margin: 0 auto !important;
        width: 100% !important;
        min-height: 278mm !important;
        page-break-inside: avoid !important;
    }
}
