/* teacher/announcements + shared bulletin board */
.announce-shell { display: flex; flex-direction: column; gap: 0.75rem; min-height: min(75vh, 680px); }
.announce-toolbar {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    padding: 0.25rem 0.15rem;
}
.announce-title { margin: 0; font-size: 1.05rem; font-weight: 800; color: #0f172a; }
.announce-sub { margin: 0.2rem 0 0; font-size: 0.75rem; color: #64748b; font-weight: 600; }
.announce-btn {
    border: none; border-radius: 0.65rem; padding: 0.55rem 0.9rem;
    font-size: 0.78rem; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem;
}
.announce-btn--primary { background: #7eb8ad; color: #fff; box-shadow: 0 4px 14px rgba(126, 184, 173, 0.22); }
.announce-btn--primary:hover { background: #6aa89c; }
.announce-board-wrap { flex: 1; min-height: 0; }

.announce-ai-box {
    background: linear-gradient(135deg, rgba(245, 243, 255, 0.9), rgba(250, 245, 255, 0.85));
    border: 1px solid rgba(233, 213, 255, 0.6); border-radius: 0.85rem; padding: 0.65rem;
    backdrop-filter: blur(6px);
}

/* —— Bulletin board (pastel / buzlu) —— */
.bulletin-board {
    height: 100%;
    min-height: 28rem;
    border-radius: 1.1rem;
    overflow: hidden;
    border: 2px solid rgba(180, 155, 110, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25), 0 12px 28px rgba(45, 55, 65, 0.08);
    display: flex;
    flex-direction: column;
}
.bb-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem; font-weight: 700;
}
.bb-theme-badge { display: inline-flex; align-items: center; gap: 0.35rem; }
.bb-count { opacity: 0.85; }

.bb-surface {
    position: relative;
    flex: 1;
    min-height: 24rem;
    overflow: auto;
    padding: 1rem 0.75rem 1.25rem;
}

/* Theme: cork default */
.bb-theme-cork .bb-surface {
    background:
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.12), transparent 40%),
        linear-gradient(145deg, #d4c4a8 0%, #c9b896 45%, #b8a078 100%);
    background-size: 120px 120px, 100% 100%;
}

/* Summer beach — pastel */
.bb-theme-summer .bb-surface {
    background:
        linear-gradient(180deg, #b8dff0 0%, #a8d4ea 28%, #f5e6b8 28%, #e8d49a 55%, #dcc48a 100%);
}
.bb-theme-summer .bb-toolbar { background: rgba(255, 255, 255, 0.22); }

/* 10 November — soft slate */
.bb-theme-ataturk .bb-surface {
    background: linear-gradient(180deg, #4a5568 0%, #64748b 55%, #94a3b8 100%);
}
.bb-theme-ataturk .bb-toolbar { background: rgba(255, 255, 255, 0.12); }
.bb-theme-ataturk .bb-note { border-color: #cbd5e1; }

/* Other national / academic themes — muted pastels */
.bb-theme-april23 .bb-surface { background: linear-gradient(135deg, #fce7f3, #fef9c3, #dbeafe); }
.bb-theme-may19 .bb-surface { background: linear-gradient(135deg, #f5a8a8, #e8a0a0); }
.bb-theme-zafer .bb-surface { background: linear-gradient(135deg, #e8a0a0, #d4a0a0); }
.bb-theme-cumhuriyet .bb-surface { background: linear-gradient(135deg, #f0a8a8 0%, #a8b8e0 100%); }
.bb-theme-newyear .bb-surface { background: linear-gradient(135deg, #c4b5fd, #a5b4fc, #c4b5fd); }
.bb-theme-school .bb-surface { background: linear-gradient(135deg, #ecfdf5, #d1fae5, #fef9c3); }
.bb-theme-exam .bb-surface { background: linear-gradient(135deg, #e8eaff, #ddd6fe, #fef3c7); }
.bb-theme-academic .bb-surface { background: linear-gradient(135deg, #f0fdf4, #ecfccb, #fef9c3); }

.bb-hero {
    position: relative; max-width: 9rem; margin: 0 auto 0.75rem; z-index: 2;
    border: 3px solid #fff; border-radius: 0.35rem; box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    transform: rotate(-2deg);
}
.bb-hero img { display: block; width: 100%; border-radius: 0.2rem; }
.bb-hero-caption {
    display: block; text-align: center; font-size: 0.62rem; font-weight: 800;
    color: #fff; background: rgba(0,0,0,0.55); padding: 0.2rem; letter-spacing: 0.04em;
}

.bb-decor-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.bb-decor {
    position: absolute;
    transform: rotate(var(--bb-decor-rot, 0deg));
    opacity: 0.85;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    user-select: none;
}

.bb-notes-grid {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 1rem;
    align-items: start;
}

.bb-note {
    position: relative;
    margin: 0.35rem 0.15rem;
    padding: 1.15rem 0.85rem 0.75rem;
    border-radius: 0.35rem 0.55rem 0.45rem 0.4rem;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.55) 0%, transparent 42%),
        linear-gradient(180deg, #fffdf5 0%, #fff7d6 55%, #fdecc8 100%);
    border: 1px solid rgba(214, 184, 120, 0.55);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.7) inset,
        0 10px 22px rgba(45, 35, 20, 0.18),
        0 2px 4px rgba(45, 35, 20, 0.08);
    transform: rotate(var(--bb-rot, 0deg));
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: visible;
}
.bb-note:hover {
    transform: rotate(0deg) translateY(-3px) scale(1.02);
    box-shadow:
        0 1px 0 rgba(255,255,255,0.8) inset,
        0 16px 28px rgba(45, 35, 20, 0.22);
    z-index: 4;
}
.bb-note.bb-tone-1 {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.5) 0%, transparent 40%),
        linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 60%, #bae6fd 100%);
    border-color: rgba(125, 211, 252, 0.65);
}
.bb-note.bb-tone-2 {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.5) 0%, transparent 40%),
        linear-gradient(180deg, #f0fdf4 0%, #dcfce7 60%, #bbf7d0 100%);
    border-color: rgba(134, 239, 172, 0.65);
}
.bb-note.bb-tone-3 {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.5) 0%, transparent 40%),
        linear-gradient(180deg, #faf5ff 0%, #f3e8ff 60%, #e9d5ff 100%);
    border-color: rgba(216, 180, 254, 0.65);
}
.bb-note-tape {
    position: absolute;
    top: -0.35rem;
    left: 50%;
    width: 2.6rem;
    height: 0.7rem;
    transform: translateX(-50%) rotate(-2deg);
    background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.15));
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    opacity: 0.85;
    pointer-events: none;
}
.bb-note-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin: 0.15rem 0 0.35rem;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #0f766e;
    background: rgba(15, 118, 110, 0.1);
    border: 1px solid rgba(15, 118, 110, 0.18);
}
.bb-note-badge.is-urgent {
    color: #be123c;
    background: rgba(244, 63, 94, 0.12);
    border-color: rgba(244, 63, 94, 0.22);
}
.bb-note-badge.is-system {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.22);
}
.bb-note-archive {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.55rem;
    height: 1.55rem;
    border: 0;
    border-radius: 0.4rem;
    background: rgba(15, 23, 42, 0.08);
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.bb-note-archive:hover,
.bb-note-archive:focus-visible {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}
.bb-note-archive.is-restore:hover,
.bb-note-archive.is-restore:focus-visible {
    background: rgba(16, 185, 129, 0.18);
    color: #047857;
}
.bb-note.is-urgent {
    background:
        linear-gradient(145deg, rgba(255,255,255,0.45) 0%, transparent 40%),
        linear-gradient(180deg, #fff1f2 0%, #ffe4e6 55%, #fecdd3 100%);
    border-color: rgba(251, 113, 133, 0.55);
}
.bb-pin {
    position: absolute;
    top: -0.45rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    z-index: 3;
}
.bb-pin-normal { background: radial-gradient(circle at 30% 30%, #fb7185, #e11d48); }
.bb-pin-urgent { background: radial-gradient(circle at 30% 30%, #fbbf24, #d97706); width: 1rem; height: 1rem; }

.bb-note-title {
    margin: 0.15rem 0 0.4rem;
    font-size: 0.88rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1.25;
    letter-spacing: -0.01em;
}
.bb-note-body {
    margin: 0;
    font-size: 0.74rem;
    color: #334155;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.bb-note-foot {
    margin-top: 0.65rem;
    padding-top: 0.45rem;
    border-top: 1px dashed rgba(100, 116, 139, 0.28);
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.bb-empty {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255,255,255,0.92);
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.35);
}
.bb-empty-pin { font-size: 2rem; display: block; margin-bottom: 0.5rem; }

/* Student fullscreen modal */
#student-bulletin-modal .student-bulletin-sheet {
    width: min(100%, 56rem);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(15,23,42,0.25);
}
#student-bulletin-modal .student-bulletin-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 1rem; background: #fff; border-bottom: 1px solid #e2e8f0;
}
#student-bulletin-modal .student-bulletin-body { flex: 1; min-height: 0; padding: 0.65rem; }
#student-bulletin-board-root { height: 100%; min-height: 20rem; }

.s-bulletin-open-btn {
    display: inline-flex; align-items: center; gap: 0.35rem;
    margin-left: auto; margin-right: 0.25rem;
    font-size: 0.62rem; font-weight: 800; color: #b45309;
    background: #fffbeb; border: 1px solid #fde68a; border-radius: 999px;
    padding: 0.2rem 0.55rem; cursor: pointer;
}

/* legacy */
.announce-card.is-urgent { border-color: #fecaca; background: linear-gradient(180deg, #fff1f2 0%, #fff 70%); }
.announce-badge-urgent { background: #fee2e2; color: #b91c1c; }
.announce-badge-normal { background: #e0f2fe; color: #0369a1; }

@media (max-width: 640px) {
    .bb-notes-grid { grid-template-columns: 1fr; }
    .bb-surface { min-height: 18rem; }
}
