/* ==========================================================================
   RA EduTech — announcement ticker, brand logo, compact professional dashboard
   Loaded last (after ra-theme.css). Certificate / marksheet documents are
   excluded from every text rule so printed documents do not change.
   ========================================================================== */

/* ---------- Announcement ticker (top of page) ---------- */
.ra-ticker {
    background: #0b1730;
    border-bottom: 1px solid rgba(217, 192, 138, .28);
    color: rgba(255, 255, 255, .88);
    font-size: .78rem;
    line-height: 1;
    position: relative;
    z-index: 1031;
}
.ra-ticker[hidden] { display: none !important; }
.ra-ticker-inner {
    display: flex; align-items: stretch;
    margin: 0 auto;
    height: 34px;
}
.ra-ticker-label {
    flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
    padding: 0 12px 0 4px; margin-right: 10px;
    font-weight: 600; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
    color: #e1c98f; border-right: 1px solid rgba(255, 255, 255, .12);
    white-space: nowrap;
}
.ra-ticker-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #e1c98f;
    box-shadow: 0 0 0 0 rgba(225, 201, 143, .6);
    animation: raTickPulse 2s infinite;
}
@keyframes raTickPulse { 0% { box-shadow: 0 0 0 0 rgba(225,201,143,.55); } 70% { box-shadow: 0 0 0 7px rgba(225,201,143,0); } 100% { box-shadow: 0 0 0 0 rgba(225,201,143,0); } }
.ra-ticker-viewport {
    flex: 1 1 auto; position: relative; overflow: hidden; display: flex; align-items: center;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
            mask-image: linear-gradient(90deg, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
    cursor: default;
}
.ra-ticker-track {
    display: inline-flex; align-items: center; white-space: nowrap;
    will-change: transform;
}
.ra-ticker-item { display: inline-flex; align-items: center; padding: 0 4px; font-weight: 450; letter-spacing: .01em; }
.ra-ticker-sep { display: inline-block; width: 5px; height: 5px; margin: 0 22px; background: #a8802f; transform: rotate(45deg); flex: 0 0 auto; }
.ra-ticker.is-static .ra-ticker-track { transition: opacity .35s ease; }
@media (max-width: 575px) {
    .ra-ticker-inner { padding: 0 6px; height: 32px; }
    .ra-ticker-label { padding: 0 8px 0 2px; margin-right: 6px; font-size: .62rem; }
    .ra-ticker { font-size: .74rem; }
}
@media print { .ra-ticker { display: none !important; } }

/* ---------- Brand logo in the navbar ---------- */
html body .navbar-brand .ra-nav-logo {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
    background: #fff; box-shadow: 0 0 0 2px rgba(225, 201, 143, .55), 0 4px 12px rgba(0, 0, 0, .25);
}
html body .navbar-brand .display-serif { font-size: 1.12rem !important; line-height: 1.15; }
html body .navbar-brand small { font-size: .58rem !important; }
@media (max-width: 575px) { html body .navbar-brand .ra-nav-logo { width: 38px; height: 38px; } }

/* ---------- Admin sidebar brand block ---------- */
.ra-side-brand {
    display: flex; align-items: center; gap: 10px; text-align: left;
    padding: 4px 4px 14px; margin-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ra-side-brand img { width: 40px; height: 40px; border-radius: 50%; background: #fff; flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(225, 201, 143, .45); }
.ra-side-brand strong { display: block; color: #fff; font-size: .9rem; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
.ra-side-brand small { display: block; color: #d9c08a; font-size: .62rem !important; letter-spacing: .1em; text-transform: uppercase; margin-top: 2px; }

/* ==========================================================================
   Compact, professional dashboards (admin + institute)
   ========================================================================== */
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar { width: 236px; padding-top: 18px; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar .nav-link {
    font-size: .78rem !important; padding: .5rem .95rem !important; gap: 10px; line-height: 1.3;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar .nav-link .fa-ico { font-size: .88rem !important; margin-right: .35rem !important; opacity: .85; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar .badge { font-size: .6rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar hr { margin: .6rem 0; opacity: .12; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .sidebar h6 { font-size: .8rem !important; }

html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content { padding: 20px 24px 28px; }

/* Page titles */
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(.admin-tab-content, .inst-tab-content) > h3:first-child {
    font-size: 1.08rem !important; margin-bottom: .95rem !important; padding-bottom: .7rem;
    border-bottom: 1px solid var(--t-line, #dde2ea); display: flex; align-items: center;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(.admin-tab-content, .inst-tab-content) > h3:first-child + p.text-muted { margin-top: -.55rem; }

/* General text (documents excluded) */
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(h3):not(:is(.certificate-container, .marksheet-container) *) { font-size: 1rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(h4):not(:is(.certificate-container, .marksheet-container) *) { font-size: .9rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(h5, .card-title):not(:is(.certificate-container, .marksheet-container) *) { font-size: .84rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) h6:not(:is(.certificate-container, .marksheet-container) *) { font-size: .76rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(p, li):not(:is(.certificate-container, .marksheet-container) *) { font-size: .76rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) :is(small, .small):not(:is(.certificate-container, .marksheet-container) *) { font-size: .68rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .form-text { font-size: .66rem !important; }

/* Controls */
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .btn { font-size: .74rem !important; padding: .38rem .8rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .btn-sm { font-size: .68rem !important; padding: .24rem .55rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .btn-lg { font-size: .82rem !important; padding: .5rem 1rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content :is(.form-control, .form-select, .input-group-text) { font-size: .76rem !important; padding: .38rem .62rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content :is(.form-control-sm, .form-select-sm) { font-size: .7rem !important; padding: .26rem .5rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content :is(.form-label, label) { font-size: .7rem !important; font-weight: 600 !important; color: #3b4658; margin-bottom: .25rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .badge { font-size: .62rem !important; padding: .34em .6em; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .alert { font-size: .74rem !important; padding: .6rem .85rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .nav-tabs .nav-link,
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .nav-pills .nav-link { font-size: .74rem !important; padding: .42rem .8rem; }

/* Tables */
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .table:not(:is(.certificate-container, .marksheet-container) *),
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .table:not(:is(.certificate-container, .marksheet-container) *) :is(td, th) { font-size: .74rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .table:not(:is(.certificate-container, .marksheet-container) *) thead th {
    font-size: .64rem !important; text-transform: uppercase !important; letter-spacing: .06em !important;
    color: #5b6577 !important; background: #f6f7f9 !important; padding-top: .55rem !important; padding-bottom: .55rem !important; white-space: nowrap;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .table:not(:is(.certificate-container, .marksheet-container) *) > :not(caption) > * > * { padding: .5rem .6rem; }

/* Cards */
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .card { border-radius: 10px !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .card.p-4 { padding: 1rem 1.1rem !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .card-body { padding: .95rem 1.05rem; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .main-content .row.g-4 { --bs-gutter-x: .9rem; --bs-gutter-y: .9rem; }

/* KPI / stat cards */
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card {
    --kpi: var(--t-navy, #1b3a6b);
    position: relative; overflow: hidden;
    border: 1px solid var(--t-line, #dde2ea) !important; border-radius: 10px !important;
    padding: .9rem 1rem .9rem 1.15rem !important; background: #fff !important;
    box-shadow: 0 1px 2px rgba(15, 30, 54, .05) !important;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; right: auto; width: 3px; height: auto;
    background: var(--kpi) !important; transform: none !important; opacity: 1; border-radius: 0;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:hover { border-color: #c5cedb !important; box-shadow: 0 6px 18px rgba(15, 30, 54, .08) !important; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:has(.text-success) { --kpi: var(--t-ok, #1f7a4d); }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:has(.text-danger)  { --kpi: var(--t-bad, #b42318); }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:has(.text-info)    { --kpi: #1f6f8b; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:has(.bg-warning)   { --kpi: var(--t-gold, #a8802f); }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:has(#cardTotalMark) { --kpi: #4b3f8f; }

html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card h6 {
    font-size: .64rem !important; font-weight: 600 !important; text-transform: uppercase !important;
    letter-spacing: .07em !important; color: #6b7587 !important; margin-bottom: .35rem !important;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card h2 {
    font-size: 1.42rem !important; font-weight: 700 !important; line-height: 1.1; letter-spacing: -.015em;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card small { font-size: .64rem !important; display: block; margin-top: 3px; }
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card .fs-1 {
    font-size: 1.05rem !important; width: 40px; height: 40px; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 10px !important;
    background: color-mix(in srgb, var(--kpi) 10%, #fff) !important; color: var(--kpi) !important;
    transform: none !important;
}
html body :is(#adminDashboardSection, #instituteDashboardSection) .dashboard-card:hover .fs-1 { transform: none !important; }

/* ---------- Announcements admin panel ---------- */
.ra-ann-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--t-line, #dde2ea); border-radius: 8px; background: #fff; margin-bottom: 8px; }
.ra-ann-row.is-off { background: #f8f9fb; }
.ra-ann-row.is-off .ra-ann-text { color: #8a93a3; text-decoration: line-through; }
.ra-ann-num { flex: 0 0 22px; height: 22px; border-radius: 6px; background: #eef1f6; color: #3b4658; font-weight: 700; font-size: .66rem; display: inline-flex; align-items: center; justify-content: center; margin-top: 2px; }
.ra-ann-body { flex: 1 1 auto; min-width: 0; }
.ra-ann-text { font-size: .78rem; color: var(--t-text, #172033); word-break: break-word; }
.ra-ann-acts { flex: 0 0 auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ra-ann-acts .form-switch { margin: 0 6px 0 0; padding-left: 2.3em; min-height: 0; }
.ra-ann-preview { background: #0b1730; border-radius: 8px; overflow: hidden; }
.ra-ticker-seq { display: inline-flex; align-items: center; flex: 0 0 auto; }

/* ---- Candidate identity-size photo (student registration) ---- */
.ra-stu-photo-row{display:flex;gap:16px;align-items:flex-start;background:#fff;border:1px dashed #c7d2e3;border-radius:10px;padding:12px 14px}
.ra-stu-photo-frame{flex:0 0 auto;width:84px;height:108px;border:1px solid #cbd5e1;border-radius:6px;background:#f8fafc;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.68rem;line-height:1.25;color:#94a3b8;overflow:hidden}
.ra-stu-photo-frame.has-photo{border-color:#1e3a8a;background:#fff}
.ra-stu-photo-frame img{width:100%;height:100%;object-fit:cover;display:block}
.ra-stu-thumb{width:34px;height:44px;object-fit:cover;border-radius:4px;border:1px solid #dbe3ef;flex:0 0 auto;background:#f1f5f9}
.ra-stu-thumb-empty{display:inline-flex;align-items:center;justify-content:center;color:#94a3b8;font-size:.75rem}
@media (max-width:575px){.ra-stu-photo-row{flex-direction:column}}

/* ---- Institute declaration ---- */
.ra-decl-status{display:inline-flex;align-items:center;gap:6px;font-weight:600;font-size:.78rem;padding:.3rem .7rem;border-radius:999px}
.ra-decl-status.s-await{background:#fef3c7;color:#92400e}
.ra-decl-status.s-review{background:#dbeafe;color:#1e40af}
.ra-decl-status.s-ok{background:#dcfce7;color:#166534}
.ra-decl-status.s-rej{background:#fee2e2;color:#991b1b}
.ra-decl-steps{counter-reset:dstep;list-style:none;padding:0;margin:0;display:grid;gap:10px}
.ra-decl-steps li{counter-increment:dstep;position:relative;padding-left:40px;font-size:.86rem;color:#334155;min-height:28px}
.ra-decl-steps li::before{content:counter(dstep);position:absolute;left:0;top:0;width:28px;height:28px;border-radius:50%;background:#152b52;color:#fff;font-weight:700;font-size:.8rem;display:flex;align-items:center;justify-content:center}
.ra-decl-steps li.done::before{content:"\2713";background:#16a34a}
.ra-decl-drop{border:2px dashed #c7d2e3;border-radius:12px;padding:22px;text-align:center;background:#f8fafc;transition:border-color .15s,background .15s}
.ra-decl-drop.drag{border-color:#1e3a8a;background:#eef2ff}
.ra-decl-preview{border:1px solid #e2e8f0;border-radius:10px;max-height:520px;overflow:auto;background:#eef1f6;padding:14px}

.ra-decl-meta dt{font-weight:500;color:#64748b;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em}
.ra-decl-meta dd{font-weight:600;color:#0f172a;margin-bottom:.6rem}

/* the printable declaration document (A4, two fixed pages) */
.ra-decl-pages{width:794px}
.ra-decl-doc{width:794px;height:1122px;overflow:hidden;margin:0 0 14px;background:#fff;color:#111827;font-size:13px;line-height:1.5;padding:40px 54px 0;box-sizing:border-box;position:relative;box-shadow:0 1px 4px rgba(15,23,42,.12)}
.ra-decl-pages .ra-decl-doc:last-child{margin-bottom:0}
html body .ra-decl-doc, html body .ra-decl-doc *{font-family:"Times New Roman",Times,"Liberation Serif",Georgia,serif !important}
html body .ra-decl-doc .dd-sans, html body .ra-decl-doc .dd-sans *{font-family:Arial,Helvetica,"Liberation Sans",sans-serif !important}
html body .ra-decl-doc .dd-mono{font-family:"Courier New","Liberation Mono",monospace !important}
.ra-decl-doc .dd-top{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:2px solid #152b52;padding-bottom:9px;margin-bottom:12px}
.ra-decl-doc .dd-top .org{font-size:10.5px;color:#334155;line-height:1.45}
.ra-decl-doc .dd-top .org b{font-size:13px;color:#152b52;display:block}
.ra-decl-doc .dd-top .ref{font-size:10px;text-align:right;color:#334155;line-height:1.55}
.ra-decl-doc .dd-top .ref b{color:#111827}
.ra-decl-doc .dd-title{font-size:21px !important;font-weight:700;text-align:center;letter-spacing:.08em;margin:8px 0 2px;color:#111827;line-height:1.25}
.ra-decl-doc .dd-sub{text-align:center;font-size:11.5px;color:#475569;margin-bottom:12px;font-style:italic}
.ra-decl-doc .dd-to{margin-bottom:8px;font-size:12.6px}
.ra-decl-doc table.dd-inst{width:100%;border-collapse:collapse;margin:6px 0 12px;font-size:12.4px}
.ra-decl-doc table.dd-inst td{border:1px solid #94a3b8;padding:4px 8px;vertical-align:top}
.ra-decl-doc table.dd-inst td.k{width:31%;background:#f1f5f9;font-weight:700}
.ra-decl-doc .dd-p{text-align:justify;margin:0 0 8px}
.ra-decl-doc .dd-cl{display:flex;gap:8px;margin-bottom:7px;text-align:justify}
.ra-decl-doc .dd-cl .n{flex:0 0 20px;font-weight:700}
.ra-decl-doc .dd-cl b{color:#0f172a}
.ra-decl-doc .dd-pagesign{position:absolute;left:54px;right:54px;bottom:62px;display:flex;justify-content:flex-end;gap:18px;font-size:10px;color:#475569}
.ra-decl-doc .dd-pagesign span{border-top:1px solid #64748b;padding-top:3px;min-width:180px;text-align:center}
.ra-decl-doc .dd-sign{display:flex;justify-content:space-between;align-items:flex-end;margin-top:30px;gap:20px}
.ra-decl-doc .dd-sign .left{font-size:12.6px;line-height:2.1}
.ra-decl-doc .dd-seal{width:128px;height:128px;border:1.5px dashed #64748b;border-radius:50%;display:flex;align-items:center;justify-content:center;text-align:center;font-size:10.5px;color:#64748b}
.ra-decl-doc .dd-sigbox{text-align:center;min-width:230px;font-size:12.4px;line-height:1.8}
.ra-decl-doc .dd-sigbox .line{border-top:1px solid #111827;margin-top:58px;padding-top:4px;font-weight:700}
.ra-decl-doc .dd-office{margin-top:26px;border:1px solid #94a3b8;padding:8px 10px;font-size:10.5px;color:#334155;line-height:1.7}
.ra-decl-doc .dd-office b{display:block;color:#152b52;letter-spacing:.05em}
.ra-decl-doc .dd-foot{position:absolute;left:54px;right:54px;bottom:22px;border-top:1px solid #cbd5e1;padding-top:6px;font-size:9.5px;color:#64748b;display:flex;justify-content:space-between;gap:10px}
html body .ra-decl-meta dt{font-size:.72rem !important;font-weight:600}
html body .ra-decl-meta dd{font-size:.95rem !important}
.ra-decl-pdf .ra-decl-doc{box-shadow:none !important;margin:0 !important;height:1114px !important}
