
/* ==================== Announcement Banners (persistent top strip) ==================== */
.ann-banner-strip {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

/* ── Banner card ── */
.ann-banner-item {
    display: flex;
    align-items: stretch;
    border-radius: 14px;
    background: var(--ann-banner-bg, linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #f0fdf4 100%));
    border: 2px solid var(--ann-banner-border, rgba(30, 99, 50, 0.2));
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--ann-banner-color, #1E6332) 12%, transparent);
}
.ann-banner-item:hover {
    box-shadow: 0 6px 24px color-mix(in srgb, var(--ann-banner-color, #1E6332) 22%, transparent);
    border-color: var(--ann-banner-color, #1E6332);
    transform: translateY(-1px);
}
/* Animated shimmer border */
.ann-banner-item::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        transparent 40%,
        color-mix(in srgb, var(--ann-banner-color, #1E6332) 40%, transparent) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 250% 100%;
    animation: annBannerShimmer 4s ease-in-out infinite;
    pointer-events: none;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    padding: 2px;
    opacity: 0.6;
}
@keyframes annBannerShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.ann-banner-item:hover::after {
    opacity: 0;
}

/* Left colored accent bar */
.ann-banner-accent {
    width: 6px;
    flex-shrink: 0;
    background: linear-gradient(to bottom, var(--ann-banner-color, #1E6332), color-mix(in srgb, var(--ann-banner-color, #1E6332) 70%, #000));
    border-radius: 14px 0 0 14px;
}

/* Main content: horizontal layout — icon | body | meta+chevron */
.ann-banner-content {
    flex: 1;
    min-width: 0;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Icon circle with glow ring */
.ann-banner-megaphone {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ann-banner-color, #1E6332);
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
    box-shadow:
        0 2px 8px color-mix(in srgb, var(--ann-banner-color, #1E6332) 30%, transparent),
        0 0 0 4px color-mix(in srgb, var(--ann-banner-color, #1E6332) 10%, transparent);
}

/* Body: title line + preview underneath */
.ann-banner-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Top row inside body: title + category + priority */
.ann-banner-top {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ann-banner-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Category chip */
.ann-banner-cat {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    border: 1px solid;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

/* Priority badge */
.ann-banner-pri {
    font-size: 0.58rem;
    font-weight: 800;
    padding: 2.5px 9px;
    border-radius: 6px;
    flex-shrink: 0;
    white-space: nowrap;
}
.ann-banner-pri.urgent {
    color: #fff;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    animation: annBannerPulse 2s ease-in-out infinite;
}
.ann-banner-pri.important {
    color: #92400e;
    background: linear-gradient(135deg, #fde68a, #fcd34d);
}
@keyframes annBannerPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Preview text below title */
.ann-banner-preview {
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    line-height: 1.3;
}

/* Right side: meta + ack + chevron */
.ann-banner-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ann-banner-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    white-space: nowrap;
}

/* Ack action chip */
.ann-banner-ack {
    font-size: 0.6rem;
    font-weight: 700;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all 0.15s;
}
.ann-banner-item:hover .ann-banner-ack {
    background: #ccfbf1;
}

/* Chevron */
.ann-banner-chevron {
    font-size: 12px;
    color: #b0b0b0;
    transition: transform 0.2s, color 0.2s;
}
.ann-banner-item:hover .ann-banner-chevron {
    color: var(--ann-banner-color, #1E6332);
    transform: translateX(3px);
}

/* ==================== Announcement Board ==================== */
/* ====== Global Announcements Board — Premium ====== */
/* Inline Announcement Trigger (inside welcome bar) */
.ann-inline-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 99, 50, 0.08), rgba(30, 99, 50, 0.03));
    border: 1.5px solid rgba(30, 99, 50, 0.18);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    animation: annTriggerPulse 2.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(30, 99, 50, 0.15);
}
@keyframes annTriggerPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(30, 99, 50, 0.15); }
    50% { box-shadow: 0 0 0 6px rgba(30, 99, 50, 0); }
}
.ann-inline-trigger:hover {
    background: linear-gradient(135deg, rgba(30, 99, 50, 0.12), rgba(30, 99, 50, 0.06));
    border-color: rgba(30, 99, 50, 0.3);
    animation: none;
}
.ann-inline-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(145deg, #1E6332, #28804a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.ann-inline-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4a4540;
}
.ann-inline-chevron {
    color: #8a8580;
    font-size: 0.65rem;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ann-popover-anchor.expanded .ann-inline-chevron { transform: rotate(180deg); }

.ann-board-badge {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.3;
}
.ann-board-badge.amber {
    background: linear-gradient(135deg, #d97706, #f59e0b);
}

/* Popover Anchor */
.ann-popover-anchor {
    position: relative;
}

/* Floating Popover */
.ann-popover {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 580px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(30, 99, 50, 0.12);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ann-popover-arrow {
    position: absolute;
    top: -7px;
    right: 48px;
    transform: rotate(45deg);
    width: 14px;
    height: 14px;
    background: #fff;
    border-left: 1px solid rgba(30, 99, 50, 0.12);
    border-top: 1px solid rgba(30, 99, 50, 0.12);
    z-index: 1;
}
.ann-popover-scroll {
    overscroll-behavior: contain;
}
.ann-popover-scroll::-webkit-scrollbar { width: 4px; }
.ann-popover-scroll::-webkit-scrollbar-track { background: transparent; }
.ann-popover-scroll::-webkit-scrollbar-thumb { background: #d5d0c8; border-radius: 2px; }

/* Compact cards inside popover */
.ann-popover .ann-card {
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-bottom: 6px;
}
.ann-popover .ann-card:hover {
    transform: none;
}
.ann-popover .ann-feed {
    padding: 10px;
}
.ann-popover .ann-section-action {
    padding: 0 10px;
}
.ann-popover .ann-section-label {
    padding: 10px 10px 4px;
}

/* Sections */
.ann-section { padding: 0; }

.ann-section-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.7rem 1.75rem;
    color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 50%, #fef8f8 100%);
    border-bottom: 1px solid #fecaca;
    position: relative;
}

.ann-section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #dc2626, #ef4444);
}

.ann-section-label i { font-size: 0.68rem; }

/* Feed */
.ann-feed {
    max-height: 650px;
    overflow-y: auto;
    padding: 0.65rem;
}

.ann-feed::-webkit-scrollbar { width: 5px; }
.ann-feed::-webkit-scrollbar-track { background: transparent; }
.ann-feed::-webkit-scrollbar-thumb { background: #d5d0c8; border-radius: 3px; }
.ann-feed::-webkit-scrollbar-thumb:hover { background: #1E6332; }

/* ── Individual Card — Premium Design ── */
.ann-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.ann-card:last-child { margin-bottom: 0; }

.ann-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    border-color: color-mix(in srgb, var(--ann-cat-color, #1E6332) 35%, transparent);
}

/* Category color accent — left bar + subtle top gradient */
.ann-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--ann-cat-color, #1E6332), color-mix(in srgb, var(--ann-cat-color, #1E6332) 60%, #000));
    border-radius: 16px 0 0 16px;
    transition: width 0.2s ease;
}

.ann-card:hover::before {
    width: 5px;
}

.ann-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--ann-cat-color, #1E6332) 0%, color-mix(in srgb, var(--ann-cat-color, #1E6332) 40%, transparent) 50%, transparent 80%);
    opacity: 0.5;
}

/* Unseen highlight */
.ann-card.ann-unseen {
    background: linear-gradient(135deg, #f8fffe 0%, #f0fdf4 40%, #f6fef8 100%);
    border-color: rgba(30, 99, 50, 0.15);
    box-shadow: 0 2px 12px rgba(30, 99, 50, 0.06), inset 0 0 0 1px rgba(30, 99, 50, 0.04);
}

.ann-card.ann-unseen:hover {
    box-shadow: 0 8px 30px rgba(30, 99, 50, 0.12), inset 0 0 0 1px rgba(30, 99, 50, 0.06);
}

/* Urgent card */
.ann-card.ann-urgent {
    border-color: rgba(220, 38, 38, 0.15);
    background: linear-gradient(135deg, #fff 0%, #fef8f8 40%, #fff5f5 100%);
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.06);
}

.ann-card.ann-urgent::before {
    width: 5px;
    background: linear-gradient(to bottom, #dc2626, #b91c1c);
    animation: annUrgentPulse 2s ease-in-out infinite;
}

.ann-card.ann-urgent::after {
    background: linear-gradient(90deg, #dc2626 0%, rgba(220, 38, 38, 0.3) 40%, transparent 70%);
    opacity: 0.25;
}

@keyframes annUrgentPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Staggered entrance animation */
.ann-card { animation: annCardSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both; }
.ann-card:nth-child(1) { animation-delay: 0ms; }
.ann-card:nth-child(2) { animation-delay: 60ms; }
.ann-card:nth-child(3) { animation-delay: 120ms; }
.ann-card:nth-child(4) { animation-delay: 180ms; }
.ann-card:nth-child(5) { animation-delay: 240ms; }
.ann-card:nth-child(6) { animation-delay: 300ms; }

@keyframes annCardSlideIn {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Card Layout ── */
.ann-card-layout {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

/* Category icon circle */
.ann-card-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--ann-cat-color, #1E6332) 15%, transparent);
    position: relative;
}

.ann-card:hover .ann-card-cat-icon {
    transform: scale(1.1) rotate(-3deg);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--ann-cat-color, #1E6332) 25%, transparent);
}

.ann-card-body {
    flex: 1;
    min-width: 0;
}

/* Top meta row */
.ann-card-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.ann-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.63rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 6px;
    color: var(--ann-cat-color, #1E6332);
    background: var(--ann-cat-bg, #f0fdf4);
    border: 1px solid color-mix(in srgb, var(--ann-cat-color, #1E6332) 18%, transparent);
}

.ann-cat-chip i {
    font-size: 0.6rem;
}

.ann-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2.5px 8px;
    border-radius: 6px;
    letter-spacing: 0.05em;
}

.ann-priority-badge i { font-size: 0.58rem; }

.ann-priority-badge.priority-important {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.18);
    box-shadow: 0 1px 4px rgba(180, 83, 9, 0.1);
}

.ann-priority-badge.priority-urgent {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.18);
    animation: annUrgentPulse 2s ease-in-out infinite;
    box-shadow: 0 1px 4px rgba(220, 38, 38, 0.1);
}

.ann-new-badge {
    font-size: 0.54rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2.5px 7px;
    border-radius: 6px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    letter-spacing: 0.05em;
    box-shadow: 0 1px 4px rgba(22, 163, 74, 0.15);
}

.ann-card-time {
    font-size: 0.7rem;
    color: #aaa5a0;
    margin-left: auto;
    font-weight: 500;
}

/* Title */
.ann-card-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1a1a1a;
    margin-bottom: 0.25rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

/* Content preview */
.ann-card-content {
    font-size: 0.84rem;
    color: #555;
    line-height: 1.6;
    word-break: break-word;
}

/* Inline media thumbnail on card */
.ann-card-media-thumb {
    margin-top: 0.6rem;
    border-radius: 10px;
    overflow: hidden;
    max-height: 160px;
    position: relative;
}

.ann-card-media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-height: 160px;
}

.ann-card-media-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

/* Rich content styles */
.ann-rich-content h1 { font-size: 1.15rem; font-weight: 700; margin: 0.3em 0; }
.ann-rich-content h2 { font-size: 1.05rem; font-weight: 700; margin: 0.3em 0; }
.ann-rich-content h3 { font-size: 0.95rem; font-weight: 700; margin: 0.3em 0; }
.ann-rich-content p { margin: 0 0 0.4em; }
.ann-rich-content img { max-width: 100%; border-radius: 10px; margin: 6px 0; }
.ann-rich-content video, .ann-rich-content iframe { max-width: 100%; border-radius: 10px; margin: 6px 0; }
.ann-rich-content a { color: #1E6332; text-decoration: underline; }
.ann-rich-content hr { border: none; border-top: 1px solid #e5e1da; margin: 0.6em 0; }
.ann-rich-content ul, .ann-rich-content ol { margin: 0 0 0.4em; padding-left: 1.3em; }
.ann-rich-content blockquote { border-left: 3px solid #1E6332; margin: 0.4em 0; padding: 0.3em 0.6em; background: #f0fdf4; border-radius: 0 8px 8px 0; }

/* Attachment chips */
.ann-card-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 0.55rem;
}

.ann-att-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: #f8f9fa;
    color: #3d3a37;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ann-att-chip:hover {
    background: #e8f5ee;
    border-color: #1E6332;
    color: #1E6332;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(30, 99, 50, 0.12);
}

.ann-att-chip i {
    font-size: 0.72rem;
    flex-shrink: 0;
}

.ann-card-content.ann-collapsed {
    max-height: 3.5em;
    overflow: hidden;
    position: relative;
}

.ann-card-content.ann-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(transparent, #fff);
}

.ann-card.ann-unseen .ann-card-content.ann-collapsed::after {
    background: linear-gradient(transparent, #f6fef8);
}

.ann-read-more {
    font-size: 0.74rem;
    color: #1E6332;
    font-weight: 700;
    cursor: pointer;
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ann-read-more:hover { text-decoration: underline; }

/* Footer: author + ack + open */
.ann-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid #f0ece6;
    gap: 0.5rem;
}

.ann-card-footer-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.ann-card-author {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.74rem;
    color: #8a8580;
    font-weight: 500;
}

.ann-card-author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(145deg, #C08B3E, #9a6b2e);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.52rem;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(192, 139, 62, 0.3);
}

.ann-card-att-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: #aaa5a0;
    font-weight: 500;
}

.ann-card-att-count i { font-size: 0.64rem; }

/* Open detail link */
.ann-card-open-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1E6332;
    opacity: 0;
    transition: opacity 0.25s, transform 0.25s;
    transform: translateX(-6px);
}

.ann-card:hover .ann-card-open-link {
    opacity: 1;
    transform: translateX(0);
}

.ann-card-open-link i {
    font-size: 0.62rem;
    transition: transform 0.2s;
}

.ann-card:hover .ann-card-open-link i {
    transform: translateX(2px);
}

/* Ack button on cards */
.ann-ack-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.95rem;
    border-radius: 9px;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid #1E6332;
    background: #fff;
    color: #1E6332;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.ann-ack-btn:hover {
    background: linear-gradient(135deg, #1E6332, #2a8745);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.3);
    border-color: transparent;
}

.ann-ack-btn:active { transform: translateY(0); }

.ann-ack-btn.ann-acked {
    border-color: #c8e6d0;
    color: #16a34a;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    cursor: default;
    pointer-events: none;
}

.ann-ack-btn.ann-acked i { color: #16a34a; }

.ann-ack-required-tag {
    font-size: 0.62rem;
    font-weight: 700;
    color: #dc2626;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Announcement Detail Modal — Premium ── */
.ann-detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ann-detail-overlay.active { opacity: 1; }

.ann-detail-modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 740px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 24px 80px rgba(0, 0, 0, 0.3),
        0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(28px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ann-detail-overlay.active .ann-detail-modal {
    transform: translateY(0) scale(1);
}

/* Modal header with category gradient */
.ann-detail-header {
    position: relative;
    padding: 32px 36px 24px;
    color: #fff;
    overflow: hidden;
    flex-shrink: 0;
}

.ann-detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(255,255,255,0.1) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 15%, rgba(255,255,255,0.06) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.ann-detail-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.15) 50%, transparent 95%);
}

.ann-detail-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    font-size: 0.88rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 1;
}

.ann-detail-close:hover {
    background: rgba(255,255,255,0.25);
    transform: rotate(90deg);
}

.ann-detail-header-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    position: relative;
}

.ann-detail-cat-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 14px;
    border-radius: 9px;
    background: rgba(255,255,255,0.16);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.12);
}

.ann-detail-cat-badge i { font-size: 0.78rem; }

.ann-detail-pri-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 7px;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.1);
}

.ann-detail-pri-badge i { font-size: 0.7rem; }

.ann-detail-title {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    position: relative;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ann-detail-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    font-size: 0.82rem;
    opacity: 0.9;
    position: relative;
}

.ann-detail-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.64rem;
}

.ann-detail-time {
    margin-left: auto;
    font-size: 0.76rem;
    opacity: 0.7;
    font-weight: 500;
}

/* Modal body */
.ann-detail-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 32px 36px;
}

.ann-detail-body::-webkit-scrollbar { width: 5px; }
.ann-detail-body::-webkit-scrollbar-track { background: transparent; }
.ann-detail-body::-webkit-scrollbar-thumb { background: #d5d0c8; border-radius: 3px; }

/* Rich content in modal — full-size rendering */
.ann-detail-content { }

.ann-detail-content h1 { font-size: 1.5rem; font-weight: 800; margin: 0.5em 0 0.3em; color: #1a1a1a; letter-spacing: -0.02em; }
.ann-detail-content h2 { font-size: 1.25rem; font-weight: 700; margin: 0.5em 0 0.3em; color: #1a1a1a; }
.ann-detail-content h3 { font-size: 1.1rem; font-weight: 700; margin: 0.5em 0 0.3em; color: #1a1a1a; }
.ann-detail-content p { margin: 0 0 0.7em; font-size: 0.94rem; line-height: 1.75; color: #3d3a37; }
.ann-detail-content img { max-width: 100%; max-height: 420px; object-fit: contain; border-radius: 14px; margin: 14px 0; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08); }
.ann-detail-content video, .ann-detail-content iframe { max-width: 100%; max-height: 420px; border-radius: 14px; margin: 14px 0; }
.ann-detail-content a { color: #1E6332; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ann-detail-content hr { border: none; border-top: 2px solid #eae6e0; margin: 1.2em 0; }
.ann-detail-content ul, .ann-detail-content ol { margin: 0 0 0.7em; padding-left: 1.5em; font-size: 0.94rem; line-height: 1.75; }
.ann-detail-content blockquote { border-left: 4px solid #1E6332; margin: 0.6em 0; padding: 0.6em 1.2em; background: linear-gradient(135deg, #f0fdf4, #f8fffe); border-radius: 0 12px 12px 0; font-style: italic; }

/* Attachments in modal */
.ann-detail-attachments {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eae6e0;
}

.ann-detail-att-label {
    font-size: 0.74rem;
    font-weight: 800;
    color: #8a8580;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ann-detail-att-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 10px;
}

.ann-detail-att-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #faf9f7;
    border: 1px solid #e5e1da;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ann-detail-att-item:hover {
    background: linear-gradient(135deg, #f0fdf4, #f8fffe);
    border-color: #1E6332;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.1);
}

.ann-detail-att-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.ann-detail-att-icon.pdf   { background: linear-gradient(135deg, #fef2f2, #fecaca); color: #dc2626; }
.ann-detail-att-icon.image { background: linear-gradient(135deg, #f0fdf4, #bbf7d0); color: #22c55e; }
.ann-detail-att-icon.video { background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: #3b82f6; }
.ann-detail-att-icon.doc   { background: linear-gradient(135deg, #eff6ff, #bfdbfe); color: #2563eb; }
.ann-detail-att-icon.other { background: linear-gradient(135deg, #f3f4f6, #e5e7eb); color: #6b7280; }

.ann-detail-att-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: #1a1a1a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.ann-detail-att-size {
    font-size: 0.68rem;
    color: #b0a8a0;
    flex-shrink: 0;
    font-weight: 500;
}

/* Modal footer */
.ann-detail-footer {
    padding: 18px 36px;
    border-top: 1px solid #eae6e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: linear-gradient(135deg, #faf9f7, #f5f4f2);
    flex-shrink: 0;
}

.ann-detail-ack-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ann-detail-ack-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 28px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(145deg, #1E6332 0%, #28804a 50%, #1E6332 100%);
    background-size: 200% 200%;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(30, 99, 50, 0.35);
}

.ann-detail-ack-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(30, 99, 50, 0.45);
    background-position: 100% 0;
}

.ann-detail-ack-btn.acked {
    background: linear-gradient(135deg, #d1e7dd, #bbf7d0);
    color: #1E6332;
    box-shadow: none;
    pointer-events: none;
}

.ann-detail-ack-label {
    font-size: 0.74rem;
    color: #dc2626;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Empty state */
.ann-empty {
    padding: 3.5rem 2rem;
    text-align: center;
}

.ann-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0fdf4, #dcfce7);
    color: #1E6332;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 16px rgba(30, 99, 50, 0.12);
}

.ann-empty-title {
    font-weight: 800;
    font-size: 0.96rem;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.ann-empty-text {
    font-size: 0.8rem;
    color: #8a8580;
}

/* Mobile detail modal */
@media (max-width: 768px) {
    .ann-detail-overlay {
        padding: 0 !important;
        align-items: stretch !important;


/* ==================== MANDATORY ACK MODAL OVERLAY ==================== */
.ann-ack-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    padding: 24px;
}

.ann-ack-overlay.active {
    opacity: 1;
}

.ann-ack-modal {
    background: #fff;
    border: 2px solid #1E6332;
    border-radius: 14px;
    width: fit-content;
    min-width: 480px;
    max-width: 80vw;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 24px 80px rgba(0, 0, 0, 0.35),
        0 8px 32px rgba(0, 0, 0, 0.15);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.ann-ack-overlay.active .ann-ack-modal {
    transform: translateY(0) scale(1);
}

.ann-ack-modal-header {
    background: linear-gradient(145deg, #1E6332 0%, #28804a 40%, #1a5a2c 100%);
    color: #fff;
    padding: 10px 16px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ann-ack-modal-header h3 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ann-ack-modal-body {
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 0;
}

.ann-ack-modal-body::-webkit-scrollbar { width: 5px; }
.ann-ack-modal-body::-webkit-scrollbar-track { background: transparent; }
.ann-ack-modal-body::-webkit-scrollbar-thumb { background: #d5d0c8; border-radius: 3px; }

.ann-ack-modal-card {
    border: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header meta elements are inline in the header bar */

.ann-ack-modal-card.acked {
    opacity: 0.45;
    border-color: rgba(30, 99, 50, 0.15);
    background: linear-gradient(135deg, #f0fdf4, #f8fffe);
    transform: scale(0.97);
}

.ann-ack-modal-card.acked::after {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 16px;
    right: 18px;
    font-size: 1.4rem;
    color: #1E6332;
    opacity: 0.6;
}

.ann-ack-modal-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-left: auto;
    font-weight: 500;
}

.ann-ack-modal-content {
    font-size: 0.93rem;
    color: #4a4540;
    line-height: 1.6;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 20px;
    margin-bottom: 0;
    flex: 1;
    min-height: 0;
}

.ann-ack-modal-content img,
.ann-ack-modal-content video,
.ann-ack-modal-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.ann-ack-modal-content::-webkit-scrollbar {
    width: 4px;
}

.ann-ack-modal-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ann-ack-modal-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #1E6332 0%, #28804a 50%, #1E6332 100%);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(30, 99, 50, 0.35);
    z-index: 10201;
}

.ann-ack-modal-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(30, 99, 50, 0.45);
}

.ann-ack-modal-btn:active {
    transform: translateY(0);
}

.ann-ack-modal-btn.acked {
    background: linear-gradient(135deg, #d1e7dd, #bbf7d0);
    color: #1E6332;
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

.ann-ack-modal-btn i {
    font-size: 0.92rem;
}

/* Mobile ack modal */
@media (max-width: 768px) {
    .ann-ack-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .ann-ack-modal {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        max-height: 85vh;
        border-radius: 24px 24px 0 0;
    }

    .ann-ack-modal-header {
        padding: 8px 12px;
    }

    .ann-ack-modal-header h3 {
        font-size: 0.82rem;
    }

    .ann-ack-modal-body {
        padding: 0;
        gap: 0;
    }

    .ann-ack-modal-card {
        padding: 0;
    }

    .ann-ack-modal-btn {
        margin: 0 12px 10px auto;
        padding: 10px 20px;
        font-size: 0.82rem;
    }
}
    }
    .ann-detail-modal {
        max-width: 100% !important;
        width: 100% !important;
        max-height: 100dvh !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }
    .ann-detail-header {
        padding: 18px 16px 14px !important;
        min-height: auto !important;
    }
    .ann-detail-header::before,
    .ann-detail-header::after {
        display: none !important;
    }
    .ann-detail-close {
        top: 12px !important;
        right: 12px !important;
        width: 34px !important;
        height: 34px !important;
        font-size: 1rem !important;
    }
    .ann-detail-header-top {
        gap: 6px !important;
        margin-bottom: 6px !important;
    }
    .ann-detail-cat-badge {
        font-size: 0.65rem !important;
        padding: 3px 8px !important;
    }
    .ann-detail-pri-badge {
        font-size: 0.6rem !important;
        padding: 2px 7px !important;
    }
    .ann-detail-title {
        font-size: 1.05rem !important;
        margin: 4px 0 !important;
        padding-right: 36px !important;
    }
    .ann-detail-author-row {
        font-size: 0.75rem !important;
        gap: 6px !important;
        margin-top: 4px !important;
    }
    .ann-detail-body {
        padding: 16px !important;
        flex: 1 !important;
        min-height: 0 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
    }
    .ann-detail-content p {
        font-size: 0.85rem !important;
        line-height: 1.65 !important;
    }
    .ann-detail-content h1 { font-size: 1.2rem !important; }
    .ann-detail-content h2 { font-size: 1.05rem !important; }
    .ann-detail-content h3 { font-size: 0.95rem !important; }
    .ann-detail-content img {
        max-height: 260px !important;
        border-radius: 10px !important;
    }
    .ann-detail-attachments {
        margin-top: 12px !important;
    }
    .ann-detail-att-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    .ann-detail-att-item {
        padding: 10px 12px !important;
    }
    .ann-detail-footer {
        padding: 12px 16px !important;
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
    .ann-detail-ack-btn {
        padding: 10px 20px !important;
        font-size: 0.8rem !important;
