* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Instrument Sans", sans-serif;
    color: #12203a;
    background:
        radial-gradient(circle at top left, rgba(20, 102, 59, 0.08), transparent 24%),
        radial-gradient(circle at top right, rgba(232, 245, 237, 0.95), transparent 22%),
        #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

.calendar-page-shell {
    max-width: 1680px;
    margin: 0 auto;
    padding: 18px 20px 28px;
}

.calendar-page {
    margin-top: 10px;
}

.calendar-panel {
    padding: 28px;
    border: 1px solid #e6edf2;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(18, 35, 82, 0.06);
}

.calendar-hero,
.calendar-hero-main,
.calendar-actions,
.calendar-board-head,
.calendar-legend,
.activity-card,
.activity-date-stack,
.calendar-note {
    display: flex;
    align-items: center;
}

.calendar-hero {
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.calendar-hero-main {
    gap: 18px;
}

.calendar-hero-icon {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    border-radius: 20px;
    background: linear-gradient(180deg, #edf8f1 0%, #e4f4ea 100%);
    color: #0d7c46;
}

.calendar-ui-icon {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.calendar-ui-icon.is-small {
    width: 18px;
    height: 18px;
}

.calendar-page-title {
    margin: 0 0 8px;
    color: #0f7a45;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.calendar-page-copy {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
}

.calendar-actions {
    gap: 16px;
    flex-wrap: wrap;
}

.calendar-filter,
.calendar-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
}

.calendar-filter {
    border: 1px solid #dbe6dd;
    background: #fff;
    color: #1f2937;
}

.calendar-download {
    border: 1px solid #7bc190;
    color: #0f7a45;
    background: #fff;
}

.calendar-content {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(360px, 0.95fr);
    gap: 22px;
}

.calendar-board,
.calendar-sidebar {
    border: 1px solid #e6edf2;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
}

.calendar-board-head {
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #edf2f7;
}

.calendar-board-head h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}

.calendar-board-title {
    display: grid;
    gap: 4px;
    text-align: center;
}

.calendar-board-title span {
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #111827;
}

.calendar-nav-btn.is-ghost {
    border: 1px solid #e5ebf0;
    color: #7b8794;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
    border-bottom: 1px solid #edf2f7;
    background: #fbfdfb;
}

.calendar-weekdays div {
    padding: 10px 12px;
    text-align: center;
    color: #15803d;
    font-size: 14px;
    font-weight: 800;
}

.calendar-day {
    display: flex;
    justify-content: center;
    min-height: 68px;
    padding: 18px 18px 12px;
    border-right: 1px dashed #e5edf3;
    border-bottom: 1px dashed #e5edf3;
    color: #111827;
    font-size: 18px;
    font-weight: 500;
}

.calendar-day-weekday {
    display: none;
}

.calendar-day:nth-child(7n) {
    border-right: 0;
}

.calendar-day-number {
    position: relative;
    z-index: 2;
}

.calendar-day.is-muted .calendar-day-number {
    color: #c1c8d0;
}

.calendar-day.is-weekend .calendar-day-number {
    color: #ef4444;
}

.calendar-day.has-badge .calendar-day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    background: #eaf6ef;
    color: #1b4332;
}

.calendar-day.is-today .calendar-day-number {
    box-shadow: 0 0 0 3px rgba(15, 122, 69, 0.12);
}

.calendar-day-count {
    position: absolute;
    top: 18px;
    right: 16px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.calendar-day-dots {
    position: absolute;
    right: 14px;
    bottom: 12px;
    display: inline-flex;
    gap: 6px;
}

.calendar-day-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.dot-green {
    background: #0f9f55;
}

.dot-amber {
    background: #f7b500;
}

.dot-purple {
    background: #8b5cf6;
}

.dot-blue {
    background: #1f8ce6;
}

.dot-emerald {
    background: #10b981;
}

.calendar-day.is-range-start::before,
.calendar-day.is-range-middle::before,
.calendar-day.is-range-end::before {
    content: "";
    position: absolute;
    top: 20px;
    bottom: 20px;
    background: linear-gradient(90deg, #eaf6ef 0%, #eff8f5 100%);
}

.calendar-day.is-range-start::before {
    left: 10px;
    right: 0;
    border-radius: 999px 0 0 999px;
}

.calendar-day.is-range-middle::before {
    left: 0;
    right: 0;
}

.calendar-day.is-range-end::before {
    left: 0;
    right: 10px;
    border-radius: 0 999px 999px 0;
}

.calendar-day.range-amber::before {
    background: linear-gradient(90deg, #fff3cf 0%, #fff8e7 100%);
}

.calendar-day.range-purple::before {
    background: linear-gradient(90deg, #f1e8ff 0%, #f7f2ff 100%);
}

.calendar-day.range-blue::before {
    background: linear-gradient(90deg, #e5f2ff 0%, #f2f8ff 100%);
}

.calendar-day.range-emerald::before {
    background: linear-gradient(90deg, #def7ec 0%, #eefcf4 100%);
}

.calendar-legend {
    gap: 28px;
    flex-wrap: wrap;
    padding: 18px 22px;
    color: #334155;
    font-size: 14px;
    border-top: 1px solid #edf2f7;
}

.calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.legend-green {
    background: #0f9f55;
}

.legend-amber {
    background: #f7b500;
}

.legend-purple {
    background: #8b5cf6;
}

.legend-blue {
    background: #1f8ce6;
}

.legend-gray {
    background: #c9d2dc;
}

.calendar-sidebar {
    padding: 20px;
}

.calendar-sidebar-head {
    margin-bottom: 16px;
    color: #0f7a45;
    font-size: 19px;
    font-weight: 800;
}

.calendar-activity-list {
    display: grid;
    gap: 12px;
}

.activity-card {
    gap: 14px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #edf2f7;
    border-radius: 14px;
    background: #fff;
}

.activity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    color: #fff;
    flex: 0 0 auto;
}

.activity-icon-green {
    background: linear-gradient(180deg, #16a34a 0%, #0f7a45 100%);
}

.activity-icon-amber {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.activity-icon-purple {
    background: linear-gradient(180deg, #8b5cf6 0%, #7c3aed 100%);
}

.activity-icon-blue {
    background: linear-gradient(180deg, #28a4ff 0%, #1d7ed8 100%);
}

.activity-icon-emerald {
    background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
}

.activity-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.activity-copy h3 {
    margin: 2px 0 6px;
    color: #1f2937;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.activity-copy p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.activity-date-stack {
    gap: 10px;
    align-self: center;
}

.activity-date-separator {
    color: #334155;
    font-size: 22px;
    font-weight: 700;
}

.activity-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 58px;
    min-height: 60px;
    border-radius: 10px;
    font-weight: 800;
    line-height: 1;
}

.activity-date-badge strong {
    font-size: 18px;
}

.activity-date-badge span {
    margin-top: 6px;
    font-size: 12px;
}

.activity-date-badge-green {
    background: #eef8f1;
    color: #15803d;
}

.activity-date-badge-amber {
    background: #fff6dd;
    color: #f59e0b;
}

.activity-date-badge-purple {
    background: #f3edff;
    color: #7c3aed;
}

.activity-date-badge-blue {
    background: #ebf5ff;
    color: #1d7ed8;
}

.activity-date-badge-emerald {
    background: #e9fbf4;
    color: #10b981;
}

.calendar-more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    margin-top: 14px;
    border: 1px solid #7bc190;
    border-radius: 12px;
    color: #0f7a45;
    font-size: 16px;
    font-weight: 700;
}

.calendar-note {
    gap: 16px;
    margin-top: 22px;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(90deg, #edf8f1 0%, #f5faf6 100%);
    color: #166534;
}

.calendar-note-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #15803d;
    flex: 0 0 auto;
}

.calendar-note-title {
    margin-bottom: 4px;
    font-size: 16px;
    font-weight: 800;
}

.calendar-note p {
    margin: 0;
    color: #2f6f48;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 1220px) {
    .calendar-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .calendar-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-actions {
        width: 100%;
    }

    .calendar-filter,
    .calendar-download {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 760px) {
    .calendar-page-shell {
        padding: 14px 14px 24px;
    }

    .calendar-panel {
        padding: 18px;
        border-radius: 20px;
    }

    .calendar-hero-main {
        align-items: flex-start;
    }

    .calendar-hero-icon {
        width: 72px;
        height: 72px;
    }

    .calendar-page-title {
        font-size: 28px;
    }

    .calendar-page-copy {
        font-size: 14px;
    }

    .calendar-weekdays,
    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-day {
        border-right: 1px dashed #e5edf3;
    }

    .calendar-day:nth-child(7n) {
        border-right: 1px dashed #e5edf3;
    }

    .calendar-day-weekday {
        display: block;
        margin-bottom: 10px;
        color: #94a3b8;
        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.08em;
    }

    .activity-card {
        flex-wrap: wrap;
    }

    .activity-date-stack {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 520px) {
    .calendar-weekdays {
        display: none;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-day,
    .calendar-day:nth-child(7n) {
        border-right: 0;
    }

    .calendar-day {
        min-height: 86px;
    }

    .calendar-legend {
        gap: 12px;
    }
}
