/* teacher/agenda v3 — öğretmen komuta merkezi */

#agenda-view {
    --ag-bg: #e4ebe8;
    --ag-surface: #f2f6f4;
    --ag-surface-raised: #fafcfb;
    --ag-row-alt: #dce8e4;
    --ag-row-lunch: #e8e2d6;
    --ag-border: #b8c9c2;
    --ag-border-soft: #cddbd5;
    --ag-ink: #1a2f32;
    --ag-ink-muted: #4a6568;
    --ag-brand: #0a6b62;
    --ag-brand-dark: #064e47;
    --ag-brand-glow: #5eead4;
    --ag-accent-warm: #c27803;
}

.agenda-workspace {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

/* —— Araç çubuğu —— */
.agenda-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: linear-gradient(135deg, var(--ag-surface-raised) 0%, var(--ag-surface) 100%);
    border: 1px solid var(--ag-border-soft);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.agenda-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.2rem;
    background: var(--ag-row-alt);
    border-radius: 0.85rem;
}
.agenda-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border: none;
    border-radius: 0.65rem;
    background: transparent;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.agenda-tab i { font-size: 0.7rem; opacity: 0.85; }
.agenda-tab:hover { color: var(--ag-brand); background: var(--ag-surface-raised); }
.agenda-tab.is-active {
    background: var(--ag-surface-raised);
    color: var(--ag-brand-dark);
    box-shadow: 0 1px 4px rgba(6, 78, 71, 0.12);
}
.agenda-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.agenda-nav-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    border: 1px solid var(--ag-border-soft);
    background: var(--ag-surface-raised);
    color: var(--ag-ink-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
}
.agenda-nav-btn:hover { background: #d4ede8; border-color: var(--ag-brand-glow); color: var(--ag-brand-dark); }
.agenda-nav-label {
    min-width: 6.5rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ag-ink-muted);
    padding: 0 0.25rem;
}
.agenda-nav-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    min-width: 0;
}
.agenda-week-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 14rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    color: #0f766e;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
}
.agenda-week-badge.is-summer {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #c2410c;
}
.agenda-nav-today {
    margin-left: 0.25rem;
    padding: 0.4rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.68rem;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s;
}
.agenda-nav-today:hover { background: #ccfbf1; }

/* —— Öğretmen defteri (kapalı widget) —— */
.agenda-notebook-bar {
    display: flex;
    justify-content: flex-start;
}
.agenda-notebook-widget {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.15rem 0.65rem;
    align-items: center;
    width: min(100%, 16.5rem);
    padding: 0.55rem 0.7rem 0.55rem 0.45rem;
    border: 1px solid #c4a574;
    border-radius: 0.55rem 0.85rem 0.85rem 0.55rem;
    background: linear-gradient(145deg, #8b3a2a 0%, #6b2d22 48%, #5a251c 100%);
    box-shadow:
        2px 3px 0 #4a1e16,
        4px 6px 14px rgba(42, 18, 12, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    cursor: pointer;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}
.agenda-notebook-widget:hover {
    transform: translateY(-2px);
    box-shadow:
        2px 4px 0 #4a1e16,
        6px 10px 18px rgba(42, 18, 12, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.agenda-notebook-widget:active { transform: translateY(0); }
.agenda-notebook-spine {
    grid-row: 1 / span 2;
    width: 0.42rem;
    align-self: stretch;
    border-radius: 0.2rem;
    background: repeating-linear-gradient(
        180deg,
        #d4d4d8 0,
        #d4d4d8 3px,
        #a1a1aa 3px,
        #a1a1aa 6px
    );
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.15);
}
.agenda-notebook-cover {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    color: #fde8d8;
}
.agenda-notebook-cover i {
    font-size: 0.85rem;
    opacity: 0.9;
}
.agenda-notebook-cover-title {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.agenda-notebook-cover-meta {
    font-size: 0.58rem;
    font-weight: 700;
    opacity: 0.82;
}
.agenda-notebook-preview {
    grid-column: 2;
    font-size: 0.62rem;
    line-height: 1.35;
    color: rgba(255, 248, 240, 0.75);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* —— Defter modal —— */
.agenda-notebook-modal {
    position: fixed;
    inset: 0;
    z-index: 295;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.58);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.agenda-notebook-modal.hidden { display: none !important; }
.agenda-notebook-stage {
    position: relative;
    z-index: 1;
    width: min(34rem, 96vw);
    perspective: 1200px;
    animation: agenda-nb-rise 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.agenda-notebook-close {
    position: absolute;
    top: -0.35rem;
    right: -0.35rem;
    z-index: 5;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: #fff;
    color: #64748b;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
    cursor: pointer;
}
.agenda-notebook-close:hover { color: #0f172a; background: #f8fafc; }
.agenda-notebook-book {
    position: relative;
    min-height: 26rem;
    transform-style: preserve-3d;
}
.agenda-notebook-cover-panel {
    position: absolute;
    inset: 0;
    z-index: 3;
    transform-origin: left center;
    transform: rotateY(0deg);
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    backface-visibility: hidden;
    border-radius: 0.35rem 0.85rem 0.85rem 0.35rem;
    background: linear-gradient(135deg, #9a3f2e 0%, #6f2d20 55%, #5c2519 100%);
    box-shadow: 4px 6px 20px rgba(42, 18, 12, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.agenda-notebook-cover-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    color: #ffedd5;
    font-size: 0.95rem;
    font-weight: 900;
    text-align: center;
    padding: 1rem;
}
.agenda-notebook-cover-inner i { font-size: 1.35rem; opacity: 0.9; }
.agenda-notebook-book.is-cover-open .agenda-notebook-cover-panel {
    transform: rotateY(-168deg);
}
.agenda-notebook-sheet {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 26rem;
    border: 1px solid #d6d3d1;
    border-radius: 0.35rem 0.65rem 0.65rem 0.35rem;
    background: #fffef8;
    box-shadow:
        inset 12px 0 0 #f5f5f4,
        0 8px 28px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateX(6px);
    transition: opacity 0.35s ease 0.35s, transform 0.35s ease 0.35s;
}
.agenda-notebook-book.is-cover-open .agenda-notebook-sheet {
    opacity: 1;
    transform: translateX(0);
}
.agenda-notebook-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem 0.35rem;
    border-bottom: 1px dashed #e7e5e4;
}
.agenda-notebook-sheet-head h3 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 900;
    color: #44403c;
}
.agenda-notebook-save-hint {
    font-size: 0.58rem;
    font-weight: 700;
    color: #16a34a;
    opacity: 0;
    transition: opacity 0.2s;
}
.agenda-notebook-checks {
    padding: 0.45rem 0.75rem 0.2rem;
    border-top: 1px dashed #e7e5e4;
    background: #fafaf9;
}
.agenda-notebook-checks-label {
    margin: 0 0 0.35rem;
    font-size: 0.68rem;
    font-weight: 800;
    color: #44403c;
}
.agenda-lunch-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.65rem;
    font-weight: 800;
    color: #475569;
}
.agenda-lunch-select-wrap select {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.28rem 0.4rem;
    font-size: 0.65rem;
    background: #fff;
}
.agenda-notebook-paper {
    flex: 1;
    padding: 0.35rem 0.65rem 0.5rem;
    background:
        repeating-linear-gradient(
            transparent,
            transparent 1.35rem,
            #dbeafe 1.35rem,
            #dbeafe calc(1.35rem + 1px)
        );
    background-position: 0 0.55rem;
}
.agenda-notebook-editor {
    width: 100%;
    min-height: 15rem;
    max-height: 20rem;
    border: none;
    background: transparent;
    resize: none;
    font-family: 'Caveat', 'Segoe Print', 'Comic Sans MS', cursive;
    font-size: 1.05rem;
    line-height: 1.35rem;
    color: #1c1917;
    outline: none;
    padding: 0.15rem 0.25rem;
}
.agenda-notebook-editor::placeholder { color: #a8a29e; font-family: inherit; }
.agenda-notebook-sheet-foot {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.65rem 0.6rem;
    border-top: 1px solid #e7e5e4;
    background: #fafaf9;
    border-radius: 0 0 0.65rem 0.35rem;
}
.agenda-notebook-nav {
    width: 2rem;
    height: 2rem;
    border: 1px solid #e7e5e4;
    border-radius: 0.45rem;
    background: #fff;
    color: #57534e;
    cursor: pointer;
}
.agenda-notebook-nav:disabled { opacity: 0.35; cursor: not-allowed; }
.agenda-notebook-pager {
    flex: 1;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #57534e;
}
.agenda-notebook-add-page {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.35rem 0.5rem;
    border-radius: 0.45rem;
    cursor: pointer;
    white-space: nowrap;
}
.agenda-notebook-add-page:hover { background: #ccfbf1; }

body.agenda-notebook-open { overflow: hidden !important; }

@keyframes agenda-nb-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes agenda-nb-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 1024px) {
    .agenda-notebook-stage { width: min(38rem, 88vw); }
    .agenda-notebook-book,
    .agenda-notebook-sheet { min-height: 28rem; }
    .agenda-notebook-editor {
        min-height: 17rem;
        max-height: 22rem;
        font-size: 1.12rem;
    }
}

/* —— Ana panel —— */
.agenda-main {
    flex: 1;
    min-height: 0;
    background: var(--ag-bg);
    border: 1px solid var(--ag-border-soft);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 12px rgba(15, 40, 35, 0.06);
}

/* —— Excel tarzı haftalık tablo (10×5 kompakt) —— */
.agenda-sheet-wrap {
    overflow: auto;
    max-height: min(calc(100dvh - 17rem), 34rem);
    -webkit-overflow-scrolling: touch;
    background: var(--ag-bg);
}
.agenda-sheet {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.68rem;
    table-layout: fixed;
    min-width: 0;
    background: var(--ag-surface);
}
.agenda-sheet.is-compact .agenda-sheet-cell {
    height: 2.45rem;
    min-width: 0;
}
.agenda-sheet.is-compact .agenda-sheet-time {
    padding: 0.28rem 0.35rem;
}
.agenda-sheet.is-compact .agenda-sheet-time .num {
    font-size: 0.72rem;
}
.agenda-sheet.is-compact .agenda-sheet-time .clock {
    font-size: 0.5rem;
    line-height: 1.2;
}
.agenda-sheet.is-compact .agenda-sheet-time .lunch-tag {
    font-size: 0.46rem;
}
.agenda-sheet thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--ag-brand-dark);
    border-bottom: 2px solid var(--ag-brand);
    padding: 0.55rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #e6fffa;
    text-align: center;
}
.agenda-sheet thead th small {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.56rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: #99f6e4;
    opacity: 0.95;
}
.agenda-sheet-corner {
    left: 0;
    z-index: 4 !important;
    background: #053f3a !important;
    color: #a7f3d0 !important;
    text-align: left !important;
    padding-left: 0.65rem !important;
    min-width: 4.5rem;
}
.agenda-sheet tbody tr:nth-child(even):not(.agenda-sheet-row-lunch) .agenda-sheet-cell:not(.is-lunch-cell) {
    background: var(--ag-row-alt);
}
.agenda-sheet tbody tr:nth-child(odd):not(.agenda-sheet-row-lunch) .agenda-sheet-cell {
    background: var(--ag-surface);
}
.agenda-sheet-time {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #c5dbd4;
    border-right: 2px solid var(--ag-border);
    border-bottom: 1px solid var(--ag-border-soft);
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
    min-width: 4.5rem;
    font-weight: 800;
    color: var(--ag-ink);
}
.agenda-sheet-time.is-lunch-time {
    background: #ddd4c4;
    color: #5c4f3a;
}
.agenda-sheet-time .lunch-tag {
    display: block;
    font-size: 0.52rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #8b6914;
    margin: 0.15rem 0;
    line-height: 1.2;
}
.agenda-sheet-time .lunch-tag i { margin-right: 0.15rem; }
.agenda-sheet-time .num {
    display: block;
    font-size: 0.85rem;
    color: var(--ag-brand-dark);
}
.agenda-sheet-time .clock {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--ag-ink-muted);
    margin-top: 0.1rem;
}
.agenda-sheet-cell {
    border: 1px solid var(--ag-border-soft);
    padding: 0;
    vertical-align: middle;
    min-width: 0;
    height: 2.45rem;
    cursor: pointer;
    transition: box-shadow 0.12s, background 0.12s;
    background: var(--ag-surface);
}
.agenda-sheet-cell.is-lunch-cell {
    background: repeating-linear-gradient(
        -45deg,
        var(--ag-row-lunch),
        var(--ag-row-lunch) 5px,
        #dfd6c8 5px,
        #dfd6c8 10px
    ) !important;
}
.agenda-sheet-cell.is-lunch-filled {
    border-color: var(--ag-border);
}
.agenda-sheet-row-lunch .agenda-sheet-cell:hover,
.agenda-sheet-cell.is-lunch-cell:hover {
    box-shadow: inset 0 0 0 2px #c9a227;
}
.agenda-sheet-cell .lunch-hint {
    font-size: 0.58rem;
    color: #7a6a4a;
    font-weight: 700;
    line-height: 1.25;
}
.agenda-sheet-cell .cell-add {
    color: var(--ag-border);
    font-size: 0.75rem;
    font-weight: 700;
}
.agenda-sheet-cell:hover {
    box-shadow: inset 0 0 0 2px var(--ag-brand-glow);
    z-index: 1;
}
.agenda-sheet-cell.is-filled {
    border-color: var(--ag-border);
}
.agenda-sheet-cell-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0.2rem 0.3rem;
    text-align: center;
    line-height: 1.15;
    position: relative;
}
.agenda-sheet-cell .cls {
    font-weight: 900;
    font-size: 0.92rem;
    color: var(--ag-brand-dark);
    line-height: 1.1;
    word-break: break-word;
}
.agenda-sheet-cell .note-pin {
    position: absolute;
    top: 0.12rem;
    right: 0.15rem;
    font-size: 0.55rem;
    color: var(--ag-accent-warm);
    opacity: 0.9;
}
.agenda-sheet-cell .topic {
    display: none;
}

/* —— Bugün görünümü —— */
.agenda-day-wrap {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--ag-bg);
}
.agenda-day-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: start;
    padding: 1rem 1.1rem;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, #0f766e 0%, #115e59 55%, #134e4a 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(15, 118, 110, 0.25);
}
.agenda-day-hero h3 {
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 0.25rem;
}
.agenda-day-hero p {
    margin: 0;
    font-size: 0.75rem;
    opacity: 0.9;
    line-height: 1.45;
}
.agenda-day-hero-badge {
    text-align: right;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
}
.agenda-day-hero-badge strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    margin-top: 0.15rem;
}
.agenda-day-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.agenda-day-slot {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
    gap: 0.65rem;
    align-items: stretch;
    padding: 0.55rem 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid var(--ag-border-soft);
    background: var(--ag-surface-raised);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: left;
}
.agenda-day-slot:hover {
    border-color: var(--ag-brand-glow);
    box-shadow: 0 2px 8px rgba(6, 78, 71, 0.1);
}
.agenda-day-slot.is-now {
    border-color: var(--ag-brand);
    box-shadow: 0 0 0 2px rgba(10, 107, 98, 0.25);
    background: #e8f5f2;
}
.agenda-day-slot.is-empty {
    border-style: dashed;
    background: var(--ag-surface);
}
.agenda-day-slot.is-lunch-slot {
    background: repeating-linear-gradient(
        -45deg,
        var(--ag-row-lunch),
        var(--ag-row-lunch) 6px,
        #dfd6c8 6px,
        #dfd6c8 12px
    );
    border-color: #c9b896;
}
.agenda-day-slot.is-lunch-slot.is-empty { opacity: 1; }
.agenda-day-slot.is-lunch-filled {
    background: var(--ag-surface-raised);
    border-style: solid;
}
.agenda-day-slot-time .lunch-tag-sm {
    display: block;
    font-size: 0.55rem;
    font-weight: 800;
    color: #8b6914;
    text-transform: uppercase;
    margin: 0.1rem 0;
}
.agenda-day-slot-body .lunch-hint-day,
.agenda-day-slot-body .cell-empty-hint {
    color: var(--ag-ink-muted);
    font-size: 0.72rem;
}
.agenda-day-slot-body .lunch-hint-day { color: #7a6a4a; font-weight: 600; }
.agenda-day-slot-time {
    font-size: 0.62rem;
    font-weight: 800;
    color: #64748b;
    line-height: 1.35;
}
.agenda-day-slot-time em {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--ag-brand-dark);
}
.agenda-day-slot-body .cls { font-weight: 800; color: var(--ag-brand-dark); font-size: 0.8rem; }
.agenda-day-slot-body .topic { color: var(--ag-ink-muted); font-size: 0.72rem; margin-top: 0.1rem; }
.agenda-day-slot-body .note { color: var(--ag-accent-warm); font-size: 0.68rem; margin-top: 0.2rem; }
.agenda-day-journal label {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.35rem;
}
.agenda-day-journal textarea {
    width: 100%;
    min-height: 5.5rem;
    border: 1px solid var(--ag-border-soft);
    border-radius: 0.75rem;
    padding: 0.65rem 0.75rem;
    font-size: 0.78rem;
    line-height: 1.5;
    resize: vertical;
    background: var(--ag-surface);
    color: var(--ag-ink);
}
.agenda-day-journal textarea:focus {
    outline: none;
    border-color: var(--ag-brand-glow);
    background: var(--ag-surface-raised);
}

/* —— Ay görünümü —— */
.agenda-month-wrap { padding: 0.85rem; background: var(--ag-bg); }
.agenda-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1px;
    background: var(--ag-border);
    border: 1px solid var(--ag-border);
    border-radius: 0.75rem;
    overflow: hidden;
}
.agenda-month-dow {
    background: var(--ag-row-alt);
    padding: 0.4rem 0.2rem;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
}
.agenda-month-day {
    background: var(--ag-surface-raised);
    min-height: 4.5rem;
    padding: 0.35rem;
    cursor: pointer;
    transition: background 0.12s;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
.agenda-month-day:hover { background: #f0fdfa; }
.agenda-month-day.is-out { background: #f8fafc; opacity: 0.55; }
.agenda-month-day.is-today {
    box-shadow: inset 0 0 0 2px #14b8a6;
}
.agenda-month-day.is-selected {
    background: #ecfdf5;
}
.agenda-month-day-num {
    font-size: 0.72rem;
    font-weight: 800;
    color: #334155;
}
.agenda-month-day.is-today .agenda-month-day-num { color: #0f766e; }
.agenda-month-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
}
.agenda-month-chip {
    font-size: 0.52rem;
    font-weight: 800;
    padding: 0.1rem 0.28rem;
    border-radius: 0.25rem;
    background: #ccfbf1;
    color: #0f766e;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.agenda-month-note-flag {
    font-size: 0.55rem;
    color: #d97706;
    font-weight: 700;
}

/* —— Yıl görünümü —— */
.agenda-year-wrap {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.75rem;
}
.agenda-year-month {
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.65rem;
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}
.agenda-year-month:hover {
    border-color: #99f6e4;
    transform: translateY(-1px);
}
.agenda-year-month h4 {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
}
.agenda-year-month .bar {
    height: 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 0.35rem;
}
.agenda-year-month .bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #14b8a6, #0d9488);
    border-radius: 999px;
}
.agenda-year-month p {
    margin: 0;
    font-size: 0.62rem;
    color: #64748b;
    font-weight: 600;
}
.agenda-year-legend {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #f0fdfa;
    border-radius: 0.75rem;
    border: 1px solid #99f6e4;
    font-size: 0.68rem;
    color: #115e59;
    font-weight: 600;
}

/* —— Yapılacaklar çekmecesi —— */
.agenda-todo-bar {
    border: 1px solid var(--ag-border-soft);
    border-radius: 0.85rem;
    background: var(--ag-surface-raised);
    overflow: hidden;
}
.agenda-todo-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border: none;
    background: var(--ag-row-alt);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 800;
    color: #334155;
    text-align: left;
}
.agenda-todo-toggle em {
    font-style: normal;
    margin-left: auto;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.62rem;
    padding: 0.12rem 0.45rem;
    border-radius: 999px;
}
.agenda-todo-chevron {
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s;
}
.agenda-todo-bar.is-open .agenda-todo-chevron { transform: rotate(180deg); }
.agenda-todo-body {
    padding: 0.65rem 0.85rem 0.85rem;
    border-top: 1px solid #e2e8f0;
}
.agenda-todo-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-height: 10rem;
    overflow-y: auto;
    margin-bottom: 0.55rem;
}
.agenda-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--ag-ink);
    transition: background 0.12s;
}
.agenda-todo-item:hover { background: #f8fafc; }
.agenda-todo-item.is-done { color: #64748b; }
.agenda-todo-item.is-done .agenda-todo-text { text-decoration: line-through; }
.agenda-todo-done-tag {
    margin-left: auto;
    font-size: 0.58rem;
    font-weight: 800;
    color: #15803d;
    background: #dcfce7;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
}
.agenda-todo-add {
    display: flex;
    gap: 0.35rem;
}
.agenda-todo-add input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
    background: #f8fafc;
}
.agenda-todo-add input:focus {
    outline: none;
    border-color: #5eead4;
    background: #fff;
}
.agenda-todo-add-btn {
    width: 2.25rem;
    border: none;
    border-radius: 0.55rem;
    background: #0d9488;
    color: #fff;
    cursor: pointer;
}
.agenda-todo-add-btn:hover { background: #0f766e; }

/* —— Hücre popover —— */
.agenda-cell-popover {
    position: fixed;
    z-index: 290;
    width: min(18rem, calc(100vw - 1.5rem));
    background: var(--ag-surface-raised);
    border-radius: 1rem;
    border: 1px solid var(--ag-border);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    animation: agenda-pop-in 0.18s ease-out;
}
@keyframes agenda-pop-in {
    from { opacity: 0; transform: translateY(6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.agenda-cell-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
}
.agenda-cell-popover-head strong {
    font-size: 0.78rem;
    color: #0f172a;
}
.agenda-cell-popover-close {
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}
.agenda-cell-popover-body {
    padding: 0.65rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.agenda-field span {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    margin-bottom: 0.2rem;
}
.agenda-field input,
.agenda-field textarea {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    padding: 0.45rem 0.55rem;
    font-size: 0.75rem;
    background: #f8fafc;
}
.agenda-field input:focus,
.agenda-field textarea:focus {
    outline: none;
    border-color: #5eead4;
    background: #fff;
}
.agenda-cell-popover-foot {
    display: flex;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem 0.75rem;
}
.agenda-btn-ghost,
.agenda-btn-primary {
    flex: 1;
    padding: 0.5rem;
    border-radius: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    border: none;
}
.agenda-btn-ghost {
    background: var(--ag-row-alt);
    color: #475569;
}
.agenda-btn-primary {
    background: #0d9488;
    color: #fff;
}
.agenda-btn-primary:hover { background: #0f766e; }

/* —— Haftalık arşiv —— */
.agenda-archive-bar {
    border: 1px solid var(--ag-border-soft);
    border-radius: 0.85rem;
    background: var(--ag-surface-raised);
    overflow: hidden;
}
.agenda-archive-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border: none;
    background: var(--ag-row-alt);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 800;
    color: #334155;
    text-align: left;
}
.agenda-archive-toggle em {
    font-style: normal;
    margin-left: auto;
    background: #e2e8f0;
    color: #475569;
    font-size: 0.6rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
}
.agenda-archive-chevron {
    font-size: 0.62rem;
    color: #94a3b8;
    transition: transform 0.2s;
}
.agenda-archive-bar.is-open .agenda-archive-chevron { transform: rotate(180deg); }
.agenda-archive-body {
    padding: 0.55rem 0.75rem 0.75rem;
    border-top: 1px solid #e2e8f0;
    max-height: 9rem;
    overflow-y: auto;
}
.agenda-archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.55rem;
    border-radius: 0.55rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
}
.agenda-archive-item:last-child { margin-bottom: 0; }
.agenda-archive-item strong { color: #0f172a; font-size: 0.7rem; }
.agenda-archive-item span { color: #64748b; font-size: 0.62rem; }
.agenda-archive-item button {
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f766e;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 0.28rem 0.45rem;
    border-radius: 0.45rem;
    cursor: pointer;
    white-space: nowrap;
}
.agenda-cell-note-preview {
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    font-size: 0.72rem;
    line-height: 1.45;
    color: #78350f;
    white-space: pre-wrap;
}
.agenda-cell-note-preview.hidden { display: none !important; }
.agenda-cell-note-preview-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #b45309;
    margin-bottom: 0.25rem;
}

.agenda-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #94a3b8;
    font-size: 0.78rem;
    font-style: italic;
}

@media (max-width: 767px) {
    .agenda-tab span { display: none; }
    .agenda-tab { padding: 0.45rem 0.55rem; }
    .agenda-toolbar {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.45rem;
    }
    .agenda-nav {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 0.4rem;
        align-items: center;
    }
    .agenda-nav-center {
        flex: 1 1 calc(100% - 5.5rem);
        min-width: 0;
        max-width: 100%;
    }
    .agenda-nav-today {
        margin-left: 0;
        flex: 1 1 auto;
        min-width: 4.5rem;
        text-align: center;
        writing-mode: horizontal-tb !important;
        white-space: nowrap;
    }
    .agenda-lunch-select-wrap {
        flex: 1 1 100%;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem;
        writing-mode: horizontal-tb !important;
    }
    .agenda-lunch-select-wrap select {
        flex: 1 1 auto;
        min-width: 0;
        max-width: 100%;
    }
    .agenda-nav-label { min-width: 0; font-size: 0.68rem; }
    .agenda-week-badge {
        max-width: 100%;
        white-space: normal;
        writing-mode: horizontal-tb !important;
        font-size: 0.6rem;
        line-height: 1.3;
    }
    .agenda-sheet-wrap {
        max-height: 55vh;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .agenda-sheet {
        min-width: 34rem;
    }
    .agenda-day-hero { grid-template-columns: 1fr; }
    .agenda-year-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .agenda-notebook-widget { width: 100%; max-width: 100%; }
    .agenda-notebook-modal {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0;
    }
    .agenda-notebook-stage {
        width: 100%;
        max-width: 100%;
    }
    .agenda-notebook-close { top: 0.5rem; right: 0.5rem; }
    .agenda-notebook-book,
    .agenda-notebook-sheet {
        min-height: min(88dvh, 100%);
    }
    .agenda-notebook-sheet {
        border-radius: 1rem 1rem 0 0;
    }
    .agenda-notebook-editor {
        min-height: min(50dvh, 18rem);
        max-height: min(56dvh, 22rem);
    }
}
