/* Announcements: admin form (dark admin portal) + student inbox, red number and pop-up (announcements.js) */
.ann-panel { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 20px; margin-bottom: 20px; color: #e2e8f0; }
.ann-panel h3 { font-size: 18px; font-weight: 800; color: #fff; margin: 0; }
.ann-sub { font-size: 12px; color: #94a3b8; margin: 6px 0 16px; max-width: 720px; }
.ann-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ann-wide { grid-column: 1 / -1; }
.ann-f { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ann-f > span { font-size: 11px; font-weight: 800; letter-spacing: .03em; color: #cbd5e1; }
.ann-f input[type=text], .ann-f input[type=date], .ann-f select, .ann-f textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(15,23,42,.6); color: #fff; font: inherit; font-size: 14px; }
.ann-f select option { color: #0f172a; background: #fff; }
.ann-f textarea { resize: vertical; min-height: 120px; }
.ann-f input:focus, .ann-f select:focus, .ann-f textarea:focus { outline: 2px solid #38bdf8; outline-offset: 1px; }
.ann-check { flex-direction: row; align-items: center; gap: 10px; align-self: end; padding-bottom: 8px; }
.ann-check > span { font-size: 13px; font-weight: 600; color: #e2e8f0; letter-spacing: 0; }
.ann-hint { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.35); font-size: 12px; color: #bae6fd; }
.ann-err { display: none; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(239,68,68,.15); border: 1px solid rgba(248,113,113,.5); color: #fecaca; font-size: 12px; font-weight: 700; }
.ann-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ann-btn { padding: 10px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.ann-btn:hover { background: rgba(255,255,255,.2); }
.ann-btn:disabled { opacity: .6; cursor: wait; }
.ann-btn-primary { background: #0284c7; border-color: #0284c7; color: #fff; } .ann-btn-primary:hover { background: #0369a1; }
.ann-btn-danger { background: rgba(239,68,68,.2); border-color: rgba(248,113,113,.5); color: #fecaca; } .ann-btn-danger:hover { background: rgba(239,68,68,.4); }
.ann-btn-sm { padding: 7px 12px; font-size: 12px; }
.ann-empty { padding: 16px; border: 1px dashed #cbd5e1; border-radius: 14px; font-size: 13px; color: #94a3b8; }
.ann-empty b { display: block; color: inherit; margin-bottom: 2px; }
.ann-row { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.1); }
.ann-row:first-child { border-top: 0; }
.ann-row-main { min-width: 0; flex: 1; }
.ann-row-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: #fff; font-size: 14px; }
.ann-meta { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.ann-snippet { font-size: 13px; color: #cbd5e1; margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-row-act { display: flex; gap: 8px; flex-shrink: 0; }
.ann-chip { font-style: normal; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(148,163,184,.25); color: #e2e8f0; }
.ann-chip-pin { background: #fef3c7; color: #92400e; } .ann-chip-imp { background: #fee2e2; color: #991b1b; } .ann-chip-new { background: #dc2626; color: #fff; }

/* student inbox (light portal) */
.ann-s-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ann-s-head h3 { font-size: 18px; font-weight: 800; color: #0f172a; margin: 0; }
.ann-s-head p { font-size: 12px; color: #64748b; margin: 4px 0 0; }
#annStudentBox .ann-btn { background: #f1f5f9; color: #0f172a; border-color: #e2e8f0; } #annStudentBox .ann-btn:hover { background: #e2e8f0; }
#annStudentBox .ann-empty { background: #f8fafc; border-color: #cbd5e1; color: #475569; }
.ann-red { color: #dc2626; }
.ann-card { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; margin-bottom: 10px; overflow: hidden; }
.ann-card.unread { border-color: #fca5a5; box-shadow: 0 0 0 1px #fecaca inset; background: #fffafa; }
.ann-card.imp { border-left: 4px solid #dc2626; }
.ann-card-h { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; background: none; border: 0; cursor: pointer; font: inherit; color: #0f172a; }
.ann-dot { width: 10px; height: 10px; border-radius: 50%; background: #dc2626; flex: 0 0 10px; margin-top: 6px; }
.ann-card-t { flex: 1; min-width: 0; display: block; }
.ann-card-t b { display: block; font-size: 14px; overflow-wrap: anywhere; }
.ann-card-t small { display: block; font-size: 11px; color: #64748b; margin-top: 2px; }
.ann-card-t em { display: block; font-style: normal; font-size: 12px; color: #475569; margin-top: 4px; overflow-wrap: anywhere; }
.ann-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
#annStudentBox .ann-chip { background: #e2e8f0; color: #334155; } #annStudentBox .ann-chip-pin { background: #fef3c7; color: #92400e; } #annStudentBox .ann-chip-imp { background: #fee2e2; color: #991b1b; } #annStudentBox .ann-chip-new { background: #dc2626; color: #fff; }
.ann-card-b { display: none; padding: 0 14px 14px 34px; }
.ann-card.open .ann-card-b { display: block; }
.ann-msg { font-size: 13px; line-height: 1.6; color: #1e293b; white-space: pre-wrap; overflow-wrap: anywhere; }
.ann-by { font-size: 12px; font-weight: 700; color: #475569; margin-top: 10px; }

/* red number on the tab and the portal button */
.ann-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; vertical-align: middle; box-shadow: 0 0 0 2px #fff; animation: annPulse 2s ease-in-out 3; }
@keyframes annPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }

/* pop-up */
.ann-pop { position: fixed; top: 16px; right: 16px; z-index: 100001; display: flex; align-items: center; gap: 12px; max-width: min(420px, calc(100vw - 32px)); padding: 14px 40px 14px 14px; border-radius: 16px; background: #0f172a; color: #fff; box-shadow: 0 20px 45px rgba(2,6,23,.45); border-left: 5px solid #dc2626; transform: translateY(-130%); opacity: 0; transition: transform .35s ease, opacity .35s ease; pointer-events: none; }
.ann-pop.show { transform: none; opacity: 1; pointer-events: auto; }
.ann-pop-ic { font-size: 26px; }
.ann-pop-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.ann-pop-t strong { font-size: 13px; } .ann-pop-t span { font-size: 13px; color: #e2e8f0; overflow-wrap: anywhere; } .ann-pop-t small { font-size: 11px; color: #94a3b8; }
.ann-pop-x { position: absolute; top: 6px; right: 8px; background: none; border: 0; color: #94a3b8; font-size: 14px; cursor: pointer; }
.ann-pop .ann-btn { white-space: nowrap; }
@media (max-width: 640px) { .ann-grid { grid-template-columns: 1fr; } .ann-row { flex-direction: column; } .ann-pop { left: 16px; right: 16px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .ann-badge { animation: none; } .ann-pop { transition: none; } }

/* ---------- Announcement Management Centre: student cards (types, details, priority, acknowledgement) ---------- */
.ann-type { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #0b1f3a; background: #f5b400; border-radius: 99px; padding: 2px 10px; margin-bottom: 4px; }
.ann-card.urgent { border-left: 5px solid #ef4444 !important; } .ann-chip-urg { background: #fee2e2 !important; color: #991b1b !important; }
.ann-chip-ack { background: #fef3c7 !important; color: #92400e !important; } .ann-chip-read { background: #e2e8f0; color: #475569; }
.ann-det { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 8px; margin: 12px 0 0; }
.ann-det div { background: rgba(11,31,58,.06); border-radius: 12px; padding: 8px 11px; } .ann-det dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: #64748b; font-weight: 800; } .ann-det dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; }
.ann-join, .ann-att a { display: inline-flex; margin: 10px 8px 0 0; background: linear-gradient(90deg, #f5b400, #ffd24d); color: #0b1f3a !important; font-weight: 800; font-size: 13px; padding: 8px 15px; border-radius: 11px; text-decoration: none; } .ann-att a { background: rgba(11,31,58,.08); }
.ann-acked { margin-top: 12px; color: #047857; font-weight: 800; font-size: 13px; } .ann-hist { margin: 22px 0 8px; font-size: 14px; color: #64748b; } .ann-card.old { opacity: .78; }

/* ======================= Student Portal > Announcements (navy / gold / white) ======================= */
#annStudentBox { color: var(--bv-text, #0f172a); }
.ann2-hero { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; background: linear-gradient(135deg, #0b1f3a, #12305a); border: 1px solid rgba(245,180,0,.4); border-radius: 20px; padding: 20px 22px; margin-bottom: 14px; position: relative; overflow: hidden; }
.ann2-hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(245,180,0,.3), transparent 70%); pointer-events: none; }
.ann2-kick { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: #f5b400; font-weight: 800; } .ann2-hero h3 { margin: 2px 0 0; font-size: 24px; font-weight: 800; color: #fff; } .ann2-hero p { margin: 4px 0 0; color: #cbd5e1; font-size: 13px; max-width: 520px; }
.ann2-btn { border: 1px solid #cbd5e1; background: var(--bv-surface, #fff); color: var(--bv-text, #0b1f3a); border-radius: 12px; padding: 9px 16px; font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; position: relative; z-index: 1; }
.ann2-btn.gold { background: linear-gradient(90deg, #f5b400, #ffd24d); color: #0b1f3a; border-color: transparent; } .ann2-btn:hover { filter: brightness(1.05); }
.ann2-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: 10px; margin-bottom: 14px; }
.ann2-stats div { background: var(--bv-surface, #fff); border: 1px solid var(--bv-line, #e2e8f0); border-radius: 14px; padding: 11px 14px; border-top: 3px solid #0b1f3a; }
.ann2-stats b { display: block; font-size: 24px; color: #0b1f3a; line-height: 1.1; } .ann2-stats span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 800; }
.ann2-stats .hot { border-top-color: #ef4444; } .ann2-stats .hot b { color: #dc2626; } .ann2-stats .warn { border-top-color: #f5b400; } .ann2-stats .warn b { color: #b45309; }
.ann2-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ann2-search { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; border: 1px solid #cbd5e1; border-radius: 14px; padding: 0 13px; background: var(--bv-surface, #fff); } .ann2-search:focus-within { outline: 2px solid #f5b400; border-color: #f5b400; }
.ann2-search input { flex: 1; border: 0; background: transparent; padding: 11px 0; font-size: 14px; color: inherit; outline: none; min-width: 0; user-select: text; }
.ann2-sel { border: 1px solid #cbd5e1; border-radius: 14px; padding: 10px 12px; font-size: 13px; font-weight: 700; background: var(--bv-surface, #fff); color: inherit; }
.ann2-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; -webkit-overflow-scrolling: touch; }
.ann2-fchip { flex: none; border: 1px solid #cbd5e1; background: var(--bv-surface, #fff); color: inherit; border-radius: 999px; padding: 6px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.ann2-fchip i { font-style: normal; background: #e2e8f0; color: #0b1f3a; border-radius: 99px; padding: 0 7px; margin-left: 3px; font-size: 11px; } .ann2-fchip.on { background: #0b1f3a; border-color: #0b1f3a; color: #f5b400; } .ann2-fchip.on i { background: #f5b400; }
.ann2-grp { margin: 18px 0 8px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: #64748b; font-weight: 800; display: flex; align-items: center; gap: 10px; } .ann2-grp::after { content: ""; flex: 1; height: 1px; background: var(--bv-line, #e2e8f0); }
.ann2-card { background: var(--bv-surface, #fff); border: 1px solid var(--bv-line, #e2e8f0); border-left: 4px solid #cbd5e1; border-radius: 16px; margin-bottom: 10px; box-shadow: 0 2px 10px rgba(11,31,58,.05); transition: box-shadow .15s, transform .15s; }
.ann2-card:hover { box-shadow: 0 8px 24px rgba(11,31,58,.1); } .ann2-card.unread { border-left-color: #f5b400; background: linear-gradient(90deg, rgba(245,180,0,.07), transparent 40%), var(--bv-surface, #fff); }
.ann2-card.imp { border-left-color: #f5b400; } .ann2-card.urgent { border-left-color: #ef4444; } .ann2-card.old { opacity: .8; }
.ann2-h { width: 100%; display: flex; gap: 13px; align-items: flex-start; text-align: left; background: transparent; border: 0; padding: 14px 16px; cursor: pointer; color: inherit; font-family: inherit; }
.ann2-av { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; background: #0b1f3a; border: 1px solid rgba(245,180,0,.5); } .ann2-av.cls { background: linear-gradient(135deg, #f5b400, #ffd24d); border-color: transparent; } .ann2-av.red { background: #fee2e2; border-color: #fca5a5; }
.ann2-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.ann2-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: #64748b; font-weight: 600; } .ann2-type { color: #0b1f3a; background: rgba(245,180,0,.22); padding: 1px 9px; border-radius: 99px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; } .ann2-where { color: #475569; }
.ann2-title { font-size: 16px; line-height: 1.3; color: var(--bv-text, #0b1f3a); } .ann2-prev { font-size: 13px; color: #64748b; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ann2-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ann2-chip { font-style: normal; font-size: 10.5px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: #e2e8f0; color: #475569; white-space: nowrap; }
.ann2-chip.new { background: #fef3c7; color: #92400e; } .ann2-chip.red { background: #fee2e2; color: #991b1b; } .ann2-chip.gold { background: #fde68a; color: #78350f; } .ann2-chip.amber { background: #ffedd5; color: #9a3412; } .ann2-chip.pin { background: #e0e7ff; color: #3730a3; }
.ann2-chev { font-size: 18px; color: #94a3b8; transition: transform .2s; line-height: 1; } .ann2-card.open .ann2-chev { transform: rotate(180deg); }
.ann2-body { display: none; padding: 0 16px 16px 73px; } .ann2-card.open .ann2-body { display: block; }
.ann2-msg { white-space: pre-wrap; font-size: 14px; line-height: 1.65; }
.ann2-det { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 8px; margin: 12px 0 0; } .ann2-det div { background: rgba(11,31,58,.05); border-radius: 12px; padding: 9px 12px; border: 1px solid rgba(11,31,58,.06); }
.ann2-det dt { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 800; } .ann2-det dd { margin: 2px 0 0; font-size: 13.5px; font-weight: 700; }
.ann2-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .ann2-join, .ann2-att { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; padding: 9px 15px; border-radius: 12px; text-decoration: none; }
.ann2-join { background: linear-gradient(90deg, #f5b400, #ffd24d); color: #0b1f3a !important; } .ann2-att { background: rgba(11,31,58,.07); color: inherit !important; }
.ann2-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--bv-line, #e2e8f0); }
.ann2-by { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: #64748b; } .ann2-by i { font-style: normal; width: 34px; height: 34px; border-radius: 50%; background: #0b1f3a; color: #f5b400; display: grid; place-items: center; font-size: 12px; font-weight: 800; } .ann2-by b { color: var(--bv-text, #0b1f3a); } .ann2-by small { display: block; font-size: 11px; }
.ann2-acked { color: #047857; font-weight: 800; font-size: 13px; }
.ann2-histbtn { width: 100%; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; background: rgba(11,31,58,.05); border: 1px dashed #94a3b8; border-radius: 14px; padding: 11px 14px; font-weight: 800; font-size: 13px; cursor: pointer; color: inherit; font-family: inherit; } .ann2-histbtn i { font-style: normal; background: #0b1f3a; color: #f5b400; border-radius: 99px; padding: 0 8px; font-size: 11px; } .ann2-histbtn span { margin-left: auto; color: #64748b; font-size: 12px; }
.ann2-empty { text-align: center; padding: 46px 18px; border: 1px dashed #cbd5e1; border-radius: 18px; } .ann2-empty > span { font-size: 38px; display: block; } .ann2-empty b { display: block; font-size: 17px; margin-top: 6px; color: var(--bv-text, #0b1f3a); } .ann2-empty p { margin: 4px 0 12px; color: #64748b; font-size: 13px; }
.ann2-skel i { display: block; height: 78px; border-radius: 16px; margin-bottom: 10px; background: linear-gradient(90deg, #e2e8f0, #f1f5f9, #e2e8f0); background-size: 200% 100%; animation: ann2sk 1.2s infinite; } @keyframes ann2sk { to { background-position: -200% 0; } }
@media (max-width: 620px) { .ann2-hero { padding: 16px; } .ann2-hero h3 { font-size: 20px; } .ann2-h { padding: 12px; gap: 10px; } .ann2-av { width: 38px; height: 38px; font-size: 17px; } .ann2-body { padding: 0 12px 14px; } .ann2-side { align-items: flex-end; } .ann2-side .ann2-chip:not(.new):not(.read):not(.red):not(.gold) { display: none; } }
