/*
 * Student Portal additions
 * (extends main style.css)
 */

/* Login shell — inherits from style.css? Define here for student login */
.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    background:
        radial-gradient(800px 600px at 0% 0%, rgba(37, 99, 235, 0.10), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(124, 58, 237, 0.08), transparent 60%),
        var(--bg-1);
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 38px 32px;
    box-shadow: var(--shadow-lg);
}
.login-brand { text-align: center; margin-bottom: 24px; }
.login-brand .brand-mark {
    margin: 0 auto 14px;
    width: 56px; height: 56px;
    border-radius: 14px;
    background: var(--grad-primary);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: 1.5rem;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.36);
}
.login-brand h1 { font-size: 1.4rem; margin-bottom: 6px; color: var(--text); }
.login-sub { color: var(--text-muted); font-size: 0.9rem; }
.login-help {
    margin-top: 18px;
    padding: 12px 14px;
    background: var(--accent-soft);
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    font-size: 0.84rem;
    color: var(--accent-hover);
    text-align: center;
}
.login-help a { color: var(--accent); font-weight: 600; }

/* Welcome strip */
.welcome-strip {
    background: var(--grad-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    margin: 28px 0;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.welcome-strip h2 { color: #fff; margin-bottom: 4px; font-size: 1.4rem; }
.welcome-strip p { color: rgba(255,255,255,0.92); margin: 0; }
.welcome-strip .phone-tag {
    background: rgba(255,255,255,0.18);
    padding: 8px 14px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Record card */
.record-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease;
}
.record-card:hover { box-shadow: var(--shadow-md); }
.record-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.record-head h3 { font-size: 1.12rem; margin-bottom: 4px; }
.record-head .id-tag {
    font-family: monospace;
    background: var(--bg-2);
    color: var(--text-muted);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
}
.record-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.record-meta .item {
    background: var(--bg-1);
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.record-meta .lbl { font-size: 0.72rem; color: var(--text-muted); display: block; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.record-meta .val { font-weight: 700; color: var(--text); font-size: 0.95rem; word-break: break-word; }
.record-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px dashed var(--border);
}

/* ====== PRINTABLE DOCUMENTS ====== */
.print-page {
    background: #f3f4f6;
    min-height: 100vh;
    padding: 40px 20px;
}
.print-toolbar {
    max-width: 800px;
    margin: 0 auto 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.print-toolbar .btn { padding: 9px 18px; }

/* ====== FEE VOUCHER ====== */
.voucher-sheet {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    color: #111;
    font-family: var(--font-body);
}
.voucher-copy {
    border: 2px solid #1e40af;
    padding: 18px;
    margin-bottom: 14px;
    page-break-inside: avoid;
}
.voucher-copy:last-child { margin-bottom: 0; }
.voucher-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #1e40af;
    padding-bottom: 10px;
    margin-bottom: 14px;
    gap: 12px;
}
.voucher-head .left h2 {
    font-size: 1.3rem;
    color: #1e40af;
    margin-bottom: 2px;
    font-family: var(--font-display);
}
.voucher-head .left p {
    font-size: 0.78rem;
    color: #444;
    margin: 0;
}
.voucher-head .right {
    text-align: right;
}
.voucher-head .copy-tag {
    display: inline-block;
    background: #1e40af;
    color: #fff;
    padding: 4px 12px;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.voucher-head .voucher-no {
    font-size: 0.78rem;
    font-family: monospace;
    color: #666;
}
.voucher-rows {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    margin-bottom: 10px;
}
.voucher-rows td {
    padding: 5px 8px;
    border-bottom: 1px dotted #ccc;
    color: #111;
}
.voucher-rows td:first-child {
    color: #666;
    width: 38%;
    font-weight: 500;
}
.voucher-rows td:nth-child(2) { font-weight: 600; }
.voucher-amount {
    background: #eff6ff;
    border: 1px solid #93c5fd;
    padding: 10px 12px;
    margin: 10px 0;
    text-align: center;
    border-radius: 4px;
}
.voucher-amount .lbl { font-size: 0.72rem; color: #555; text-transform: uppercase; letter-spacing: 0.05em; }
.voucher-amount .amt { font-size: 1.4rem; font-weight: 800; color: #1e40af; font-family: var(--font-display); }
.voucher-words { font-size: 0.78rem; color: #555; font-style: italic; margin-top: 4px; }
.voucher-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 14px;
    font-size: 0.74rem;
    color: #555;
}
.voucher-foot .sig {
    border-top: 1px solid #555;
    padding-top: 4px;
    text-align: center;
    min-width: 130px;
}

/* ====== DEGREE / COMPLETION CERTIFICATE ====== */
.degree-sheet {
    background: #fff;
    max-width: 880px;
    margin: 0 auto;
    padding: 50px 60px;
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
    color: #111;
    border: 12px double #1e40af;
    position: relative;
    text-align: center;
    font-family: 'Manrope', serif;
}
.degree-corner {
    position: absolute;
    width: 60px; height: 60px;
    border: 3px solid #f97316;
}
.degree-corner.tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; }
.degree-corner.tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; }
.degree-corner.bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; }
.degree-corner.br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; }

.degree-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px; height: 70px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
    box-shadow: 0 6px 20px rgba(30,64,175,0.3);
}
.degree-org {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: #1e40af;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.degree-tag {
    font-size: 0.78rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 26px;
}
.degree-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: #111;
    margin: 14px 0;
    letter-spacing: 0.06em;
}
.degree-sub { font-size: 0.92rem; color: #555; margin-bottom: 24px; }
.degree-name {
    font-family: 'Sora', cursive;
    font-size: 2.4rem;
    color: #1e40af;
    font-style: italic;
    font-weight: 700;
    margin: 20px 0 14px;
    border-bottom: 2px solid #1e40af;
    display: inline-block;
    padding: 0 30px 6px;
}
.degree-body { font-size: 1rem; color: #333; line-height: 1.7; max-width: 600px; margin: 0 auto 28px; }
.degree-body strong { color: #111; }
.degree-foot {
    display: flex;
    justify-content: space-between;
    margin-top: 48px;
    gap: 30px;
}
.degree-sig {
    flex: 1;
    text-align: center;
    font-size: 0.86rem;
    color: #555;
}
.degree-sig .line {
    border-top: 1px solid #444;
    padding-top: 6px;
    margin-bottom: 4px;
}
.degree-sig strong { color: #111; font-size: 0.92rem; }
.degree-cert-no {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px dashed #ccc;
    font-size: 0.74rem;
    color: #666;
    font-family: monospace;
}
.degree-stamp {
    position: absolute;
    bottom: 90px;
    right: 90px;
    width: 110px;
    height: 110px;
    border: 3px solid #10b981;
    border-radius: 50%;
    color: #10b981;
    font-family: var(--font-display);
    font-size: 0.74rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.2;
    transform: rotate(-12deg);
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* ====== INTERNSHIP COMPLETION LETTER ====== */
.letter-sheet {
    background: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 60px;
    box-shadow: var(--shadow-lg);
    color: #111;
    font-family: 'Manrope', serif;
    line-height: 1.7;
    min-height: 1100px;
    position: relative;
}
.letter-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 4px double #1e40af;
    padding-bottom: 18px;
    margin-bottom: 30px;
    gap: 20px;
}
.letter-head .lh-left { display: flex; align-items: center; gap: 14px; }
.letter-head .lh-logo {
    width: 60px; height: 60px;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(30,64,175,0.3);
}
.letter-head .lh-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: #1e40af;
    font-weight: 700;
    line-height: 1.1;
}
.letter-head .lh-tag { font-size: 0.78rem; color: #666; }
.letter-head .lh-right { text-align: right; font-size: 0.82rem; color: #555; }
.letter-head .lh-right p { margin: 2px 0; color: #555; }

.letter-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 26px;
    font-size: 0.86rem;
    color: #555;
}
.letter-meta .ref { font-family: monospace; }

.letter-title {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: #1e40af;
    text-decoration: underline;
    text-underline-offset: 6px;
    margin: 10px 0 26px;
    letter-spacing: 0.05em;
}

.letter-body p {
    margin-bottom: 16px;
    color: #222;
    text-align: justify;
}
.letter-body strong { color: #111; }

.letter-grade-box {
    display: inline-block;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
    padding: 4px 14px;
    border-radius: 6px;
    font-weight: 700;
    font-family: var(--font-display);
}

.letter-foot {
    margin-top: 60px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}
.letter-sig {
    text-align: center;
    font-size: 0.86rem;
    color: #555;
    flex: 1;
}
.letter-sig .line {
    border-top: 1px solid #444;
    padding-top: 6px;
    margin-top: 50px;
    margin-bottom: 4px;
}
.letter-sig strong { color: #111; }

.letter-verify {
    margin-top: 30px;
    padding: 14px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    font-size: 0.78rem;
    color: #555;
    border-radius: 4px;
}
.letter-verify code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
    color: #1e40af;
    font-weight: 700;
    border: 1px solid #cbd5e1;
}

/* ====== PRINT STYLES ====== */
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff !important; }
    .navbar, .footer, .whatsapp-float, .print-toolbar, .alert { display: none !important; }
    .print-page { background: #fff !important; padding: 0; }
    .voucher-sheet, .degree-sheet, .letter-sheet {
        box-shadow: none !important;
        max-width: 100% !important;
        margin: 0 !important;
        page-break-inside: avoid;
    }
    .degree-sheet { border: 8px double #1e40af !important; padding: 32px 40px !important; }
    .voucher-copy { page-break-inside: avoid; }
}

/* ====== Mobile responsive for student ====== */
@media (max-width: 720px) {
    .voucher-sheet, .degree-sheet, .letter-sheet { padding: 24px 18px; }
    .degree-name { font-size: 1.6rem; padding: 0 14px 4px; }
    .degree-title { font-size: 1.6rem; }
    .degree-foot, .letter-foot { flex-direction: column; gap: 30px; }
    .degree-stamp { display: none; }
    .voucher-head, .letter-head { flex-direction: column; align-items: flex-start; }
    .letter-head .lh-right { text-align: left; }
    .welcome-strip { padding: 22px; }
    .welcome-strip h2 { font-size: 1.2rem; }
    .record-meta { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .record-meta { grid-template-columns: 1fr; }
    .record-actions .btn { flex: 1; min-width: 100%; }
}

/* ====== LETTER ENHANCEMENTS ====== */
.letter-details {
    margin: 18px 0 26px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}
.letter-details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}
.letter-details td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    color: #222;
}
.letter-details td:last-child { border-right: 0; }
.letter-details tr:last-child td { border-bottom: 0; }
.letter-details .lbl {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    width: 22%;
    white-space: nowrap;
}
.letter-details .val { font-weight: 500; }

.letter-title-sub {
    text-align: center;
    font-family: var(--font-display);
    font-size: 1.05rem;
    color: #1e40af;
    margin: 20px 0 18px;
    letter-spacing: 0.08em;
    font-weight: 700;
    border-top: 1px solid #cbd5e1;
    border-bottom: 1px solid #cbd5e1;
    padding: 8px 0;
}

/* Footer with stamp center */
.letter-foot {
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
}
.letter-sig {
    text-align: center;
    font-size: 0.86rem;
    color: #555;
}
.letter-sig .sig-name {
    margin-top: 50px;
    margin-bottom: 6px;
    font-family: monospace;
    color: #999;
}
.letter-sig strong { color: #111; }

.letter-stamp-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}
.stamp-box {
    width: 130px;
    height: 130px;
    border: 2px dashed #cbd5e1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #94a3b8;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    background: #fafbfc;
}
.stamp-text { line-height: 1.4; }

@media print {
    .stamp-box { border-style: dashed; background: transparent; }
}

@media (max-width: 720px) {
    .letter-details td { padding: 6px 8px; font-size: 0.78rem; }
    .letter-details .lbl { width: 32%; }
    .letter-foot { grid-template-columns: 1fr; gap: 30px; }
    .stamp-box { width: 110px; height: 110px; }
}

/* ====== PROFILE PAGE ====== */
.profile-header {
    display: flex;
    gap: 24px;
    align-items: center;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
}
.profile-photo {
    width: 110px;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    flex-shrink: 0;
}
.profile-photo-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 4px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.6rem;
    font-weight: 800;
    color: #fff;
    font-family: var(--font-display);
    flex-shrink: 0;
}
.profile-name h2 { color: #fff; margin-bottom: 4px; font-size: 1.6rem; }
.profile-name p { color: rgba(255,255,255,0.92); margin: 0; }
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.pf-item {
    background: var(--bg-1);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.pf-item.full { grid-column: 1 / -1; }
.pf-item .lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.pf-item .val {
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-word;
}
.profile-record {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}
.profile-record:last-child { margin-bottom: 0; }
.profile-record-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed var(--border);
    flex-wrap: wrap;
    gap: 8px;
}
.profile-record-head h4 { margin: 0; font-size: 1rem; }

/* ====== DEGREE PHOTO ====== */
.degree-photo {
    position: absolute;
    top: 70px;
    right: 70px;
    width: 90px;
    height: 110px;
    object-fit: cover;
    border: 3px solid #1e40af;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

@media (max-width: 720px) {
    .profile-header { padding: 20px; gap: 16px; }
    .profile-photo, .profile-photo-placeholder { width: 90px; height: 110px; font-size: 2rem; }
    .profile-photo-placeholder { height: 90px; }
    .profile-name h2 { font-size: 1.3rem; }
    .profile-grid { grid-template-columns: 1fr; }
    .degree-photo { position: static; margin: 14px auto; display: block; }
}

/* ====== DEGREE DETAILS TABLE ====== */
.degree-details {
    margin: 16px auto 18px;
    max-width: 640px;
    font-size: 0.82rem;
}
.degree-details table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}
.degree-details td {
    padding: 6px 10px;
    border-bottom: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    color: #222;
    text-align: left;
}
.degree-details td:last-child { border-right: 0; }
.degree-details tr:last-child td { border-bottom: 0; }
.degree-details .lbl {
    background: #f1f5f9;
    color: #1e40af;
    font-size: 0.74rem;
    font-weight: 700;
    width: 22%;
    white-space: nowrap;
}
.degree-details .val { font-weight: 500; }

@media (max-width: 720px) {
    .degree-details table, .degree-details thead, .degree-details tbody, .degree-details tr, .degree-details td { font-size: 0.74rem; }
    .degree-details td { padding: 4px 6px; }
}

@media print {
    .degree-photo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
