body.agenda-mode .main-area > :not(#agenda-view) {
    display: none !important;
}

.agenda-view {
    min-height: 100vh;
    padding: 28px 30px 50px;
    background: #eef3f9;
}

.agenda-view.hidden {
    display: none;
}

.agenda-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 22px;
}

.agenda-eyebrow {
    color: #1473e6;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.agenda-header h1 {
    margin: 5px 0 4px;
    color: #112641;
    font-size: 30px;
}

.agenda-header p {
    margin: 0;
    color: #66778f;
}

.agenda-summary {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.agenda-stat-card {
    display: grid;
    gap: 4px;
    padding: 19px;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e1e8f1;
    border-radius: 15px;
    cursor: pointer;
}

.agenda-stat-card:hover {
    border-color: #b8cce6;
    transform: translateY(-1px);
}

.agenda-stat-card span {
    color: #65758b;
    font-size: 12px;
    font-weight: 800;
}

.agenda-stat-card strong {
    color: #10233f;
    font-size: 27px;
}

.agenda-stat-card small {
    color: #7a899d;
}

.agenda-content {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e1e8f1;
    border-radius: 16px;
}

.agenda-tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 14px;
    border-bottom: 1px solid #e3eaf3;
}

.agenda-tab {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    padding: 9px 12px;
    color: #52657e;
    white-space: nowrap;
    background: #f4f7fb;
    border: 1px solid #e0e7f0;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.agenda-tab span {
    padding: 2px 7px;
    background: #ffffff;
    border-radius: 999px;
    font-size: 11px;
}

.agenda-tab.active {
    color: #ffffff;
    background: #1473e6;
    border-color: #1473e6;
}

.agenda-tab.active span {
    color: #1473e6;
}

.agenda-list {
    display: grid;
}

.agenda-loading,
.agenda-empty {
    display: grid;
    gap: 6px;
    min-height: 280px;
    place-content: center;
    padding: 30px;
    color: #718198;
    text-align: center;
}

.agenda-empty strong {
    color: #263b57;
    font-size: 17px;
}

.agenda-empty.error strong {
    color: #a72e2e;
}

.agenda-item {
    display: grid;
    grid-template-columns:
        220px minmax(0, 1fr);
    border-bottom: 1px solid #e6ebf2;
}

.agenda-item:last-child {
    border-bottom: 0;
}

.agenda-item.overdue {
    box-shadow:
        inset 4px 0 0 #d94a4a;
}

.agenda-item-date {
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 21px;
    background: #f8fafd;
    border-right: 1px solid #e5ebf2;
}

.agenda-item-date > span {
    color: #1473e6;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.agenda-item-date strong {
    color: #172b47;
    font-size: 15px;
}

.agenda-badge {
    width: fit-content;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

.agenda-badge.overdue {
    color: #a72e2e;
    background: #fff0f0;
}

.agenda-badge.meeting {
    color: #6842b8;
    background: #f0eaff;
}

.agenda-badge.today {
    color: #1473e6;
    background: #e9f3ff;
}

.agenda-badge.pending {
    color: #6a778a;
    background: #edf1f6;
}

.agenda-item-main {
    display: grid;
    gap: 13px;
    padding: 21px;
}

.agenda-item-main h3 {
    margin: 0 0 4px;
    color: #132843;
    font-size: 16px;
}

.agenda-item-main p {
    margin: 0;
    color: #738299;
    font-size: 12px;
}

.agenda-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #6a7a90;
    font-size: 12px;
}

.agenda-item-meta strong {
    color: #2e425e;
}

.agenda-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.agenda-cancel-button {
    padding: 9px 11px;
    color: #a72e2e;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
}

.agenda-cancel-button:hover {
    background: #fff1f1;
    border-color: #ffd5d5;
}

.agenda-modal-overlay {
    position: fixed;
    z-index: 100100;
    inset: 0;
    display: grid;
    padding: 24px;
    place-items: center;
    background: rgba(7, 24, 47, 0.68);
    backdrop-filter: blur(4px);
}

.agenda-modal-overlay.hidden {
    display: none;
}

.agenda-modal {
    width: min(610px, 100%);
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 18px;
    box-shadow:
        0 28px 90px rgba(6, 24, 49, 0.3);
}

.agenda-modal-header {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 23px 25px 19px;
    border-bottom: 1px solid #e3eaf3;
}

.agenda-modal-header h2 {
    margin: 5px 0 3px;
    color: #10233f;
    font-size: 23px;
}

.agenda-modal-header p {
    margin: 0;
    color: #6b7b91;
    font-size: 13px;
}

.agenda-modal-close {
    width: 38px;
    height: 38px;
    color: #64748b;
    background: #ffffff;
    border: 1px solid #dbe5f2;
    border-radius: 10px;
    font-size: 25px;
    cursor: pointer;
}

.agenda-modal-content {
    display: grid;
    gap: 17px;
    padding: 24px 25px;
}

.agenda-modal-content label {
    display: grid;
    gap: 7px;
}

.agenda-modal-content label span {
    color: #32445d;
    font-size: 13px;
    font-weight: 800;
}

.agenda-modal-content input,
.agenda-modal-content textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px;
    color: #182b46;
    background: #ffffff;
    border: 1px solid #d9e3ef;
    border-radius: 11px;
    font: inherit;
    outline: none;
}

.agenda-modal-content input:focus,
.agenda-modal-content textarea:focus {
    border-color: #1473e6;
    box-shadow:
        0 0 0 3px rgba(20, 115, 230, 0.12);
}

.agenda-modal-content textarea {
    resize: vertical;
}

.agenda-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 18px 25px;
    background: #f8fafc;
    border-top: 1px solid #e3eaf3;
}

body.agenda-modal-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .agenda-summary {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .agenda-view {
        padding: 20px 14px 40px;
    }

    .agenda-header {
        flex-direction: column;
    }

    .agenda-summary {
        grid-template-columns: 1fr;
    }

    .agenda-item {
        grid-template-columns: 1fr;
    }

    .agenda-item-date {
        border-right: 0;
        border-bottom: 1px solid #e5ebf2;
    }

    .agenda-modal-overlay {
        padding: 10px;
    }

    .agenda-modal-footer {
        flex-direction: column-reverse;
    }

    .agenda-modal-footer .button {
        width: 100%;
    }
}
