:root{
  --primary:#0f4c81;--primary-dark:#08345c;--accent:#f26522;--ink:#172033;--muted:#64748b;--paper:#ffffff;--soft:#f5f7fb;--line:#e2e8f0;--success:#16a34a;--danger:#dc2626;--yellow:#ffd54a;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,Arial,Helvetica,sans-serif;background:#f4f7fb;color:var(--ink)}
a{color:var(--primary);text-decoration:none}
img{max-width:100%;display:block}
.mini-topbar{background:#0b1f35;color:#e5edf8;padding:8px 28px;display:flex;justify-content:space-between;gap:16px;font-size:13px;border-bottom:3px solid var(--accent)}
.topbar{background:#fff;color:#102a43;padding:14px 28px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:40;box-shadow:0 12px 35px rgba(15,23,42,.08)}
.brand a{display:flex;align-items:center;gap:12px;font-weight:950;color:#102a43;font-size:22px;letter-spacing:-.02em}
.brand img{width:68px;height:48px;object-fit:contain}
.topbar nav{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.topbar nav a{font-weight:850;text-transform:capitalize;color:#263b53;padding:10px 12px;border-radius:12px;font-size:14px}
.topbar nav a:hover{background:#f1f5f9;color:var(--primary)}
.nav-login{background:var(--accent)!important;color:#fff!important;border-radius:999px!important;padding:10px 18px!important}
.container{max-width:1180px;margin:26px auto;padding:0 18px;min-height:60vh}
.card{background:rgba(255,255,255,.97);border-radius:22px;padding:24px;margin-bottom:18px;box-shadow:0 16px 36px rgba(16,42,67,.09);border:1px solid rgba(226,232,240,.9)}
.card h1,.card h2,.card h3{margin-top:0}.muted{color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:18px}.grid.two{grid-template-columns:repeat(2,1fr)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;background:linear-gradient(135deg,var(--accent),#ff8a3d);color:#fff!important;padding:11px 17px;border-radius:999px;text-decoration:none;border:0;cursor:pointer;font-weight:900;box-shadow:0 10px 22px rgba(242,101,34,.24)}
.btn.secondary{background:linear-gradient(135deg,#102a43,#1e3a5f)}.btn.outline{background:#fff;color:var(--primary)!important;border:1px solid #bcd2ee;box-shadow:none}.btn.danger{background:linear-gradient(135deg,#b91c1c,#ef4444)}.btn.small{padding:9px 14px;font-size:13px}.btn.full{width:100%;border-radius:12px}
input,select,textarea{width:100%;padding:12px 13px;border:1px solid #d9e2ec;border-radius:12px;margin:6px 0 14px;background:#fff;outline:none}input:focus,select:focus,textarea:focus{border-color:#89b8f5;box-shadow:0 0 0 4px rgba(19,99,223,.08)}textarea{min-height:92px}label{font-weight:800;font-size:14px}table{width:100%;border-collapse:collapse;background:#fff;border-radius:14px;overflow:hidden}th,td{padding:12px;border-bottom:1px solid #e6edf5;text-align:left;vertical-align:top}th{background:#eff6ff;color:#0c4a6e;font-size:13px;text-transform:uppercase;letter-spacing:.03em}.badge{background:#e3f2fd;color:#0b5cad;padding:5px 10px;border-radius:999px;font-weight:900;font-size:12px}.badge.green{background:#dcfce7;color:#166534}.badge.orange{background:#fff1e8;color:#b64a12}.notice{padding:13px 15px;border-radius:12px;background:#eef8ff;border:1px solid #b6e0fe;margin:10px 0}.error{background:#fff0f0;border-color:#ffb3b3}.success{background:#ecfdf5;border-color:#bbf7d0}hr{border:0;border-top:1px solid #e2e8f0;margin:20px 0}.admin-list{display:flex;gap:10px;flex-wrap:wrap}.upload-preview{max-width:180px;max-height:92px;object-fit:contain;border:1px dashed #cbd5e1;border-radius:14px;padding:8px;background:#fff}.empty-state{text-align:center;padding:42px;color:#64748b}

/* PencilBox-inspired public homepage */
.pb-hero{display:grid;grid-template-columns:1.1fr .9fr;gap:30px;align-items:stretch;background:linear-gradient(120deg,#0c2f52 0%,#0f4c81 56%,#1669ad 100%);border-radius:28px;overflow:hidden;padding:44px;position:relative;box-shadow:0 26px 55px rgba(12,47,82,.22)}
.pb-hero:before{content:"";position:absolute;right:-80px;top:-120px;width:330px;height:330px;background:rgba(255,255,255,.09);border-radius:50%}.pb-hero:after{content:"";position:absolute;left:-70px;bottom:-80px;width:260px;height:260px;background:rgba(242,101,34,.20);border-radius:50%}.pb-hero-left,.pb-apply-card{position:relative;z-index:1}.pb-hero-left{display:flex;flex-direction:column;justify-content:center;color:#fff;min-height:450px}.pb-tagline,.section-title span,.pb-section-head span{display:inline-block;background:rgba(255,213,74,.14);color:#ffd54a;font-weight:950;border-radius:999px;padding:7px 13px;font-size:13px;text-transform:uppercase;letter-spacing:.06em}.pb-hero h1{font-size:54px;line-height:1.05;margin:16px 0 14px;letter-spacing:-.045em;max-width:760px}.pb-hero p{font-size:18px;line-height:1.75;color:#dceafd;max-width:660px}.hero-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:22px}.pb-mini-features{display:flex;gap:10px;flex-wrap:wrap;margin-top:28px}.pb-mini-features span{background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.18);padding:8px 12px;border-radius:999px;font-weight:800;color:#fff}.pb-apply-card{background:#fff;border-radius:24px;padding:24px;box-shadow:0 24px 50px rgba(0,0,0,.18);align-self:center}.pb-apply-card h2{font-size:28px;margin:6px 0;color:#102a43}.pb-apply-card p{color:#64748b;margin:0 0 16px}.pb-banner-img{height:165px;width:100%;object-fit:cover;border-radius:18px;margin-bottom:14px;background:#e2e8f0}.pb-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:0;margin:24px 0;background:#fff;border-radius:22px;box-shadow:0 18px 45px rgba(15,23,42,.08);overflow:hidden;border:1px solid #e2e8f0}.pb-stats div{text-align:center;padding:26px 16px;border-right:1px solid #e2e8f0}.pb-stats div:last-child{border-right:0}.pb-stats strong{display:block;font-size:34px;color:var(--accent);line-height:1}.pb-stats span{display:block;margin-top:9px;color:#0f2e4d;font-weight:900}.pb-strip-slider{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;margin:34px 0}.pb-strip-slider article{display:grid;grid-template-columns:90px 1fr;gap:14px;align-items:center;background:#fff;border-radius:18px;padding:14px;border:1px solid #e2e8f0;box-shadow:0 12px 28px rgba(15,23,42,.06)}.pb-strip-slider img{width:90px;height:90px;object-fit:cover;border-radius:14px}.pb-strip-slider h3{margin:0 0 6px}.pb-strip-slider p{margin:0;color:#64748b;font-size:14px}.section-block{margin:50px 0}.pb-section-head{text-align:center;max-width:780px;margin:0 auto 26px}.pb-section-head h2{font-size:38px;letter-spacing:-.035em;margin:12px 0}.pb-section-head p{font-size:17px;color:#64748b;line-height:1.65}.pb-category-tabs{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:0 0 24px}.pb-category-tabs span{background:#fff;border:1px solid #dbe7f3;border-radius:999px;padding:10px 16px;font-weight:900;color:#2f455f}.pb-category-tabs span:first-child{background:var(--primary);color:#fff}.course-grid{grid-template-columns:repeat(auto-fit,minmax(265px,1fr))}.pb-course-card{background:#fff;border:1px solid #e2e8f0;border-radius:20px;overflow:hidden;box-shadow:0 16px 35px rgba(15,23,42,.08);transition:.2s}.pb-course-card:hover{transform:translateY(-4px);box-shadow:0 22px 45px rgba(15,23,42,.12)}.course-img-wrap{height:185px;background:linear-gradient(135deg,#e0f2fe,#fff7ed)}.course-img-wrap img{width:100%;height:100%;object-fit:cover}.pb-image-placeholder{height:100%;display:grid;place-items:center;font-weight:950;color:var(--primary);font-size:28px}.course-body{padding:20px}.course-body h3{margin:12px 0 8px;color:#102a43}.course-body p{color:#64748b;line-height:1.55}.pb-course-info{list-style:none;margin:14px 0;padding:0;color:#475569}.pb-course-info li{padding:4px 0;border-bottom:1px dashed #e2e8f0}.workshop-grid{grid-template-columns:repeat(auto-fit,minmax(310px,1fr))}.pb-workshop-card{display:grid;grid-template-columns:125px 1fr;gap:16px;background:#fff;border-radius:22px;padding:16px;border:1px solid #e2e8f0;box-shadow:0 16px 32px rgba(15,23,42,.08);border-top:5px solid var(--accent)}.pb-workshop-card img{width:125px;height:125px;border-radius:16px;object-fit:cover;background:#e2e8f0}.pb-workshop-card h3{margin:9px 0}.pb-workshop-card p{color:#64748b;line-height:1.5}.pb-workshop-card ul{padding-left:18px;color:#475569}.pb-about{display:grid;grid-template-columns:1.2fr .8fr;gap:22px;align-items:center;background:#fff;border-radius:26px;padding:34px;border:1px solid #e2e8f0;box-shadow:0 18px 42px rgba(15,23,42,.07)}.pb-about h2{font-size:36px;letter-spacing:-.035em;margin:14px 0}.pb-about p{font-size:17px;color:#52606d;line-height:1.75}.pb-notice-card{background:linear-gradient(135deg,#fff7ed,#eff6ff);border:1px solid #fed7aa;border-radius:22px;padding:26px}.partner-strip{display:flex;gap:28px;align-items:center;justify-content:center;flex-wrap:wrap;background:#fff;border-radius:22px;padding:24px;border:1px solid #e2e8f0}.partner-strip img{max-height:64px;max-width:160px;object-fit:contain}.review-grid{grid-template-columns:repeat(auto-fit,minmax(230px,1fr))}.pb-review-card{background:#fff;border-radius:20px;padding:22px;border:1px solid #e2e8f0;box-shadow:0 14px 32px rgba(15,23,42,.08)}.pb-review-card img{width:62px;height:62px;border-radius:50%;object-fit:cover;margin-bottom:12px;border:3px solid #fff;box-shadow:0 6px 16px rgba(15,23,42,.12)}.pb-review-card p{color:#334155;line-height:1.65}.pb-review-card h3{margin:12px 0 2px;color:#102a43}.pb-review-card span{color:#64748b;font-size:13px}

.footer{background:#07192c;color:#cbd5e1;margin-top:48px;padding:42px 24px;border-top:4px solid var(--accent)}.footer a{color:#fff}.footer-grid{max-width:1180px;margin:0 auto;display:grid;grid-template-columns:2fr 1.4fr 1.6fr;gap:24px;text-align:left}.footer h3{color:#fff;margin-top:0}.footer-copy{text-align:center;margin-top:24px;color:#94a3b8}.login-wrap{min-height:58vh;display:grid;place-items:center}.login-card{max-width:500px;width:100%}

/* A4 result/document layout */
.template-preview{height:170px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;display:flex;align-items:center;justify-content:center;overflow:hidden}.template-preview img{width:100%;height:100%;object-fit:cover}.search-result-actions{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.sheet-wrap{display:flex;justify-content:center}.a4-sheet{width:210mm;min-height:297mm;background:#fff;color:#111827;margin:20px auto;padding:14mm 16mm;position:relative;box-shadow:0 20px 55px rgba(15,23,42,.16);border:1px solid #e5e7eb;overflow:hidden}.a4-sheet.a4-landscape{width:297mm;min-height:210mm}.sheet-bg{position:absolute;inset:0;z-index:0;background-size:cover;background-position:center;opacity:.9}.sheet-watermark{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:0;pointer-events:none}.sheet-watermark img{max-width:340px;max-height:340px;opacity:.075;object-fit:contain}.sheet-watermark .text-watermark{font-size:56px;line-height:1.1;font-weight:900;color:rgba(15,76,129,.08);text-align:center;transform:rotate(-22deg)}.sheet-content{position:relative;z-index:1}.sheet-border{position:absolute;inset:9mm;border:2px solid var(--primary);z-index:0;border-radius:6px}.sheet-header{text-align:center;margin-bottom:10mm}.sheet-logo{width:82px;height:82px;object-fit:contain;margin:0 auto 5px}.sheet-header h1{margin:0;font-size:29px;letter-spacing:.02em;color:#0f172a;text-transform:uppercase}.sheet-header p{margin:3px 0;color:#374151;font-size:13px}.doc-title{text-align:center;border:2px solid var(--primary);display:table;margin:10px auto 18px;padding:7px 28px;border-radius:999px;font-size:22px;text-transform:uppercase;letter-spacing:.08em;background:#fff;font-weight:900;color:var(--primary)}.student-info{display:grid;grid-template-columns:1fr 1fr;gap:8px 18px;margin:16px 0}.student-info div{border-bottom:1px dotted #94a3b8;padding:6px 0}.student-info strong{display:inline-block;min-width:120px;color:#0f172a}.marks-table{margin-top:12px;border:1px solid #cbd5e1}.marks-table th{background:#0f4c81;color:#fff;text-align:center}.marks-table td{text-align:center;border:1px solid #cbd5e1;padding:9px}.summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}.summary-grid div{border:1px solid #cbd5e1;padding:9px;text-align:center;background:#f8fafc}.summary-grid strong{display:block;color:#0f172a}.signature-row{display:flex;justify-content:space-between;margin-top:26mm;gap:18px}.signature-row div{text-align:center;min-width:170px;border-top:1px solid #111827;padding-top:7px;font-weight:800}.qr-box{position:absolute;right:16mm;bottom:13mm;text-align:center;font-size:10px;color:#475569;z-index:2}.qr-box img{width:84px;height:84px}.certificate-body{text-align:center;font-size:18px;line-height:1.9;margin:24px auto;max-width:680px}.admit-box{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:20px 0}.admit-box div{border:1px solid #cbd5e1;padding:10px;background:#f8fafc}.verify-card{max-width:960px;margin:auto;background:#fff;border-radius:26px;border:1px solid #e2e8f0;box-shadow:0 24px 55px rgba(16,42,67,.13);overflow:hidden}.verify-top{background:linear-gradient(135deg,#0f4c81,#08345c);padding:28px;color:#fff;text-align:center}.verify-body{padding:26px}.verify-status{display:inline-flex;align-items:center;gap:8px;background:#dcfce7;color:#166534;border-radius:999px;padding:8px 14px;font-weight:900}.hidden-print-note{font-size:12px;color:#64748b;margin-top:8px}

@page{size:A4;margin:0}
@media(max-width:980px){.pb-hero{grid-template-columns:1fr;padding:30px}.pb-hero-left{min-height:auto}.pb-hero h1{font-size:38px}.pb-stats{grid-template-columns:repeat(2,1fr)}.pb-stats div:nth-child(2){border-right:0}.pb-about{grid-template-columns:1fr}.a4-sheet,.a4-sheet.a4-landscape{width:100%;min-height:auto;padding:24px}.student-info,.summary-grid{grid-template-columns:1fr}.sheet-border{display:none}.qr-box{position:static;margin-top:20px}.signature-row{margin-top:40px}.grid.two{grid-template-columns:1fr}}
@media(max-width:760px){.mini-topbar{display:none}.topbar{align-items:flex-start;gap:12px;flex-direction:column}.topbar nav{display:flex;flex-wrap:wrap;gap:8px}.topbar nav a{padding:8px 9px}.container{margin-top:14px}.pb-hero{border-radius:22px}.pb-hero h1{font-size:32px}.pb-stats{grid-template-columns:1fr}.pb-stats div{border-right:0;border-bottom:1px solid #e2e8f0}.pb-workshop-card{grid-template-columns:1fr}.pb-workshop-card img{width:100%;height:170px}.footer-grid{grid-template-columns:1fr}.pb-category-tabs{justify-content:flex-start}}
@media print{body{background:#fff}.mini-topbar,.topbar,.footer,.no-print,.hidden-print-note{display:none!important}.container{max-width:none;margin:0;padding:0}.a4-sheet{box-shadow:none;margin:0;width:210mm!important;min-height:297mm!important;border:0;page-break-after:always}.a4-sheet.a4-landscape{width:297mm!important;min-height:210mm!important}.card{box-shadow:none;border:0}.sheet-wrap{display:block}}
