
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* =========================================
   LOKSEWA TAYARI - STUDY CALENDAR
   File: calendar.css
   Complete Replacement
========================================= */

:root {
    --primary: #5479ed;
    --primary-dark: #3659b8;
    --primary-light: #edf2ff;

    --text: #202a3b;
    --muted: #8993a4;

    --border: #edf0f5;
    --background: #f5f7fb;
    --white: #ffffff;

    --green: #16a36a;
    --green-light: #e8f8f0;

    --orange: #f59e0b;
    --orange-light: #fff5df;

    --purple: #8b5cf6;
    --purple-light: #f2ecff;

    --red: #ef4444;

    --shadow: 0 4px 20px rgba(31, 45, 75, 0.045);
    --shadow-hover: 0 12px 30px rgba(31, 45, 75, 0.09);

    --radius: 16px;
    --transition: 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--background);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.calendar-app {
    width: 100%;
    min-height: 100vh;
    animation: pageFadeIn 0.65s ease both;
}

/* =========================================
   ANIMATIONS
========================================= */

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.94);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes softPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(84, 121, 237, 0);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(84, 121, 237, 0.09);
    }
}

@keyframes selectedPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.08);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
    }
}

@keyframes dotPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(0.85);
    }
}

@keyframes taskEnter {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes eventEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes calendarRefresh {
    from {
        opacity: 0.35;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   HEADER
========================================= */

.calendar-header {
    background: var(--white);
    min-height: 82px;
    padding: 15px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    gap: 20px;
    animation: slideDown 0.6s ease both;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}

.back-button:hover {
    color: var(--primary);
    transform: translateX(-4px);
}

.back-button span:first-child {
    font-size: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 43px;
    height: 43px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), #7894ff);
    color: white;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 16px;
    box-shadow: 0 5px 14px rgba(84, 121, 237, 0.22);
    transition: var(--transition);
}

.brand:hover .brand-icon {
    transform: rotate(-7deg) scale(1.06);
}

.brand h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 17px;
    font-weight: 800;
}

.brand p {
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.today-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    animation: slideLeft 0.7s ease both;
}

.today-label {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.today-info strong {
    font-size: 13px;
}

.today-info span:last-child {
    color: var(--muted);
    font-size: 12px;
}

/* =========================================
   MAIN CONTENT
========================================= */

.calendar-main {
    width: min(1450px, 92%);
    margin: 35px auto 50px;
}

.page-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    animation: slideUp 0.6s ease both;
}

.section-tag {
    display: inline-block;
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
}

.page-intro h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 31px;
    font-weight: 800;
    margin-bottom: 7px;
}

.page-intro p {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.7;
}

.today-button {
    border: none;
    background: linear-gradient(135deg, var(--primary), #718eff);
    color: white;
    padding: 12px 23px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 12px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(84, 121, 237, 0.16);
}

.today-button:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(84, 121, 237, 0.25);
}

.today-button:active {
    transform: scale(0.96);
}

/* =========================================
   SUMMARY CARDS
========================================= */

.calendar-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 17px;
    margin-bottom: 25px;
}

.summary-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 19px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow);
    min-width: 0;
    opacity: 0;
    animation: slideUp 0.55s ease forwards;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.summary-card:nth-child(1) { animation-delay: 0.08s; }
.summary-card:nth-child(2) { animation-delay: 0.16s; }
.summary-card:nth-child(3) { animation-delay: 0.24s; }
.summary-card:nth-child(4) { animation-delay: 0.32s; }

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: #dce4ff;
}

.summary-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 19px;
    transition: transform 0.3s ease;
}

.summary-card:hover .summary-icon {
    transform: scale(1.12) rotate(-5deg);
}

.summary-icon.blue { background: var(--primary-light); }
.summary-icon.purple { background: var(--purple-light); }
.summary-icon.orange { background: var(--orange-light); }
.summary-icon.green { background: var(--green-light); }

.summary-card span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 5px;
}

.summary-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

/* =========================================
   MAIN CALENDAR LAYOUT
========================================= */

.calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 22px;
}

.calendar-panel,
.sidebar-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.calendar-panel {
    padding: 25px;
    min-width: 0;
    animation: slideUp 0.65s ease 0.15s both;
    transition: box-shadow 0.3s ease;
}

.calendar-panel:hover {
    box-shadow: var(--shadow-hover);
}

.date-sidebar {
    display: flex;
    flex-direction: column;
    gap: 17px;
    min-width: 0;
}

.sidebar-card {
    padding: 19px;
    animation: slideLeft 0.6s ease both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-card:nth-child(1) { animation-delay: 0.15s; }
.sidebar-card:nth-child(2) { animation-delay: 0.22s; }
.sidebar-card:nth-child(3) { animation-delay: 0.29s; }
.sidebar-card:nth-child(4) { animation-delay: 0.36s; }

.sidebar-card:hover {
    box-shadow: var(--shadow-hover);
}

/* =========================================
   CALENDAR TOOLBAR
========================================= */

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}

.month-information h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 25px;
    font-weight: 800;
    transition: opacity 0.2s ease;
}

.month-information p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

.calendar-controls {
    display: flex;
    gap: 9px;
}

.nav-month-btn {
    width: 37px;
    height: 37px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: white;
    color: var(--text);
    font-size: 14px;
    transition: var(--transition);
}

.nav-month-btn:hover {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(84, 121, 237, 0.2);
}

.nav-month-btn:active {
    transform: scale(0.92);
}

/* =========================================
   LEGEND
========================================= */

.calendar-legend {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 17px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.today-dot {
    background: var(--primary);
    animation: dotPulse 2s infinite;
}

.selected-dot { background: var(--purple); }
.event-dot { background: var(--orange); }
.task-dot { background: var(--green); }

/* =========================================
   WEEK DAYS
========================================= */

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

.calendar-weekdays div {
    text-align: center;
    padding: 12px 2px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
}

/* =========================================
   CALENDAR GRID
========================================= */

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

.calendar-day {
    min-width: 0;
    min-height: 103px;
    padding: 10px 8px;
    background: #fbfcfe;
    border: 1px solid #f0f2f7;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    animation: scaleIn 0.3s ease both;
}

.calendar-day:nth-child(7n + 1) { animation-delay: 0.02s; }
.calendar-day:nth-child(7n + 2) { animation-delay: 0.04s; }
.calendar-day:nth-child(7n + 3) { animation-delay: 0.06s; }
.calendar-day:nth-child(7n + 4) { animation-delay: 0.08s; }
.calendar-day:nth-child(7n + 5) { animation-delay: 0.10s; }
.calendar-day:nth-child(7n + 6) { animation-delay: 0.12s; }
.calendar-day:nth-child(7n) { animation-delay: 0.14s; }

.calendar-day:hover {
    background: var(--primary-light);
    border-color: #cbd7ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 14px rgba(84, 121, 237, 0.10);
    z-index: 2;
}

.calendar-day:active {
    transform: scale(0.96);
}

.calendar-day.other-month {
    opacity: 0.38;
    background: #f8f9fb;
}

.calendar-day.other-month:hover {
    opacity: 0.75;
}

.calendar-day.today {
    border: 1.5px solid var(--primary);
    background: #f1f5ff;
    animation: softPulse 3s ease-in-out infinite;
}

.calendar-day.selected {
    border: 2px solid var(--purple);
    background: var(--purple-light);
    box-shadow: 0 3px 12px rgba(139, 92, 246, 0.12);
    z-index: 1;
}

.calendar-day.selected:not(.today) {
    animation: selectedPulse 2.5s ease-in-out infinite;
}

.calendar-day.today.selected {
    border: 2px solid var(--primary);
    background: #edf2ff;
    animation: softPulse 3s ease-in-out infinite;
}

.day-english {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    margin-top: 9px;
}

.day-event {
    font-size: 9px;
    padding: 3px 5px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
    background: var(--green-light);
    color: var(--green);
}

.day-event.event {
    background: var(--orange-light);
    color: #b77908;
}

.day-event.task {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* =========================================
   CALENDAR FOOTER
========================================= */

.calendar-footer {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-footer p {
    color: var(--muted);
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer-indicator {
    width: 7px;
    height: 7px;
    background: var(--green);
    border-radius: 50%;
    animation: dotPulse 2s infinite;
}

/* =========================================
   DATE SIDEBAR
========================================= */

.sidebar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.sidebar-heading h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    font-weight: 800;
}

.heading-icon {
    font-size: 17px;
    transition: transform 0.3s ease;
}

.sidebar-card:hover .heading-icon {
    transform: scale(1.15);
}

/* =========================================
   SELECTED DATE
========================================= */

.selected-date-display {
    padding: 12px 0 16px;
    text-align: center;
}

.selected-date-display span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.selected-date-display h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 24px;
    font-weight: 800;
}

.selected-date-display h3 {
    color: var(--primary);
    font-size: 15px;
    margin-top: 7px;
}

.date-divider {
    height: 1px;
    background: var(--border);
    margin: 5px 0 14px;
}

.date-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.date-details div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}

.date-details span {
    color: var(--muted);
    font-size: 10px;
}

.date-details strong {
    text-align: right;
    font-size: 10px;
}

/* =========================================
   STUDY PLANNER FORM
========================================= */

.sidebar-description {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
    margin-top: -7px;
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 7px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 42px;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    background: #fbfcfe;
    color: var(--text);
    font-size: 11px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(84, 121, 237, 0.09);
    transform: translateY(-1px);
}

.form-group input::placeholder {
    color: #aeb5c1;
}

.add-task-button {
    width: 100%;
    height: 43px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #718eff);
    color: white;
    font-size: 11px;
    font-weight: 800;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(84, 121, 237, 0.15);
}

.add-task-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 7px 16px rgba(84, 121, 237, 0.22);
}

.add-task-button:active {
    transform: scale(0.97);
}

/* =========================================
   DAILY TASK LIST
========================================= */

.task-count {
    background: var(--primary-light);
    color: var(--primary);
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.daily-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: #fcfdff;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
    animation: taskEnter 0.35s ease both;
}

.task-item:hover {
    transform: translateX(3px);
    border-color: #d4defb;
    background: #f8faff;
}

.task-checkbox {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    accent-color: var(--primary);
    margin-top: 2px;
    cursor: pointer;
}

.task-information {
    flex: 1;
    min-width: 0;
}

.task-information h4 {
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.task-information p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
}

.task-information.completed h4 {
    text-decoration: line-through;
    color: var(--muted);
}

.delete-task-btn {
    border: none;
    background: transparent;
    color: #c4cad4;
    font-size: 15px;
    padding: 0 3px;
    transition: var(--transition);
}

.delete-task-btn:hover {
    color: var(--red);
    transform: scale(1.2);
}

/* =========================================
   EMPTY STATE
========================================= */

.empty-state {
    text-align: center;
    padding: 20px 10px;
    background: #fafbfe;
    border: 1px dashed #e4e8f0;
    border-radius: 10px;
    animation: scaleIn 0.4s ease both;
}

.empty-icon {
    font-size: 25px;
    margin-bottom: 9px;
}

.empty-state p {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
}

.empty-state span {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 5px;
}

/* =========================================
   UPCOMING EVENTS
========================================= */

.event-item {
    padding: 11px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    margin-bottom: 9px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    animation: eventEnter 0.4s ease both;
}

.event-item:hover {
    transform: translateX(3px);
    border-color: #f4dfb5;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.08);
}

.event-date {
    min-width: 39px;
    height: 42px;
    border-radius: 8px;
    background: var(--orange-light);
    color: #b77908;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.event-date strong {
    font-size: 14px;
}

.event-date span {
    font-size: 8px;
    font-weight: 800;
}

.event-information {
    min-width: 0;
}

.event-information h4 {
    font-size: 11px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.event-information p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 5px;
}

/* =========================================
   CALENDAR NOTE
========================================= */

.calendar-note {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: #edf2ff;
    border: 1px solid #dce5ff;
    border-radius: 13px;
    padding: 20px;
    margin-top: 23px;
    animation: slideUp 0.6s ease 0.2s both;
    transition: box-shadow 0.3s ease;
}

.calendar-note:hover {
    box-shadow: 0 8px 20px rgba(84, 121, 237, 0.09);
}

.note-icon {
    font-size: 23px;
    transition: transform 0.3s ease;
}

.calendar-note:hover .note-icon {
    transform: rotate(-10deg) scale(1.1);
}

.calendar-note h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 6px;
}

.calendar-note p {
    font-size: 11px;
    line-height: 1.8;
    color: #66738c;
}

/* =========================================
   FOOTER
========================================= */

.calendar-page-footer {
    padding: 22px 5%;
    border-top: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.calendar-page-footer p,
.calendar-page-footer a {
    font-size: 11px;
    color: var(--muted);
}

.calendar-page-footer a {
    font-weight: 700;
    transition: var(--transition);
}

.calendar-page-footer a:hover {
    color: var(--primary);
}

/* =========================================
   RESPONSIVE: TABLET
========================================= */

@media (max-width: 1100px) {
    .calendar-layout {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 15px;
    }

    .calendar-panel {
        padding: 17px;
    }

    .calendar-day {
        min-height: 90px;
        padding: 8px 5px;
    }

    .day-english {
        font-size: 14px;
    }

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

/* =========================================
   RESPONSIVE: TABLET / MOBILE
========================================= */

@media (max-width: 800px) {
    .calendar-header {
        padding: 14px 4%;
    }

    .header-left {
        gap: 15px;
    }

    .calendar-main {
        width: 94%;
        margin-top: 25px;
    }

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

    .date-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .calendar-panel {
        padding: 18px 12px;
    }

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

    .calendar-weekdays div {
        font-size: 9px;
    }

    .calendar-legend {
        gap: 11px;
    }

    .legend-item {
        font-size: 9px;
    }
}

/* =========================================
   RESPONSIVE: SMALL MOBILE
========================================= */

@media (max-width: 550px) {
    .calendar-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 13px;
    }

    .header-left {
        width: 100%;
        justify-content: space-between;
    }

    .header-right {
        width: 100%;
    }

    .today-info {
        align-items: flex-start;
    }

    .page-intro {
        align-items: flex-start;
    }

    .page-intro h2 {
        font-size: 25px;
    }

    .page-intro p {
        font-size: 11px;
    }

    .today-button {
        padding: 10px 14px;
        font-size: 10px;
    }

    .calendar-summary {
        grid-template-columns: repeat(2, 1fr);
        gap: 9px;
    }

    .summary-card {
        padding: 12px 9px;
        gap: 9px;
    }

    .summary-icon {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .summary-card h3 {
        font-size: 15px;
    }

    .summary-card span {
        font-size: 9px;
    }

    .calendar-toolbar {
        margin-bottom: 16px;
    }

    .month-information h2 {
        font-size: 19px;
    }

    .month-information p {
        font-size: 11px;
    }

    .calendar-panel {
        padding: 14px 7px;
    }

    .calendar-weekdays div {
        font-size: 8px;
        padding: 9px 0;
    }

    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 68px;
        padding: 6px 3px;
        border-radius: 6px;
    }

    .day-english {
        font-size: 12px;
    }

    .day-events {
        margin-top: 5px;
        gap: 2px;
    }

    .day-event {
        font-size: 7px;
        padding: 2px 3px;
    }

    .calendar-legend {
        gap: 9px;
        padding-bottom: 13px;
    }

    .legend-item {
        font-size: 8px;
        gap: 4px;
    }

    .legend-dot {
        width: 6px;
        height: 6px;
    }

    .calendar-footer {
        gap: 7px;
    }

    .calendar-footer p {
        font-size: 8px;
    }

    .date-sidebar {
        grid-template-columns: 1fr;
    }

    .calendar-note {
        padding: 15px;
    }

    .calendar-note h3 {
        font-size: 12px;
    }

    .calendar-note p {
        font-size: 10px;
    }

    .calendar-page-footer {
        flex-direction: column;
        text-align: center;
    }
}

/* =========================================
   ACCESSIBILITY & INTERACTION
========================================= */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.calendar-day:focus-visible {
    outline: 3px solid rgba(84, 121, 237, 0.3);
    outline-offset: 2px;
}

.calendar-day:focus {
    outline: none;
}

.calendar-day:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* =========================================
   REDUCED MOTION
========================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
