.header-section {
    text-align: center;
    margin-bottom: 3rem;
}

.header-section h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.header-section p {
    font-size: 1.1rem;
    color: #6b7280;
}

@media (max-width: 600px) {
    .header-section h1 { font-size: 1.8rem; }
    .header-section { margin-bottom: 1.5rem; }
}

.calendar-container {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.calendar-nav-btn {
    background: #1e40af;
    color: white;
    border: none;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
}
.calendar-nav-btn:hover { background: #1d3a8a; }
.calendar-nav-btn:disabled { background: #9ca3af; cursor: not-allowed; }

.calendar-month-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #111827;
}

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

.calendar-day-header {
    text-align: center;
    font-size: 0.85rem;
    font-weight: bold;
    color: #6b7280;
    padding: 0.4rem 0;
}

.calendar-day {
    background: white;
    border-radius: 10px;
    padding: 0.5rem;
    min-height: 80px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}
.calendar-day:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.12); border-color: #1e40af; }
.calendar-day.empty { background: transparent; cursor: default; pointer-events: none; border: none; }
.calendar-day.today { border-color: #1e40af; background: #eff6ff; }
.calendar-day.has-activity { background: #f0fdf4; }
.calendar-day.today.has-activity { background: #e0f2fe; }

.calendar-day-number {
    font-size: 0.9rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.35rem;
}
.calendar-day.today .calendar-day-number { color: #1e40af; }

.calendar-activity-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    align-items: center;
}

.activity-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.activity-dot-more {
    font-size: 0.65rem;
    color: #6b7280;
    line-height: 1;
}

/* Day view */
.day-view {
    max-width: 620px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

.back-btn {
    background: none;
    border: 2px solid #1e40af;
    color: #1e40af;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}
.back-btn:hover { background: #1e40af; color: white; }

.day-view-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #111827;
}

.day-entries-section { margin-bottom: 1.5rem; }

.day-entries-section h3 {
    font-size: 1rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid #e5e7eb;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.day-entry-card .category-badge {
    text-transform: capitalize;
}

.day-nav-btn {
    background: none;
    border: 2px solid #d1d5db;
    color: #374151;
    padding: 0.35rem 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
    white-space: nowrap;
}
.day-nav-btn:hover:not(:disabled) { border-color: #1e40af; color: #1e40af; }
.day-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.day-view-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.day-view-title-wrap {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.day-entry-card {
    background: white;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.day-entry-name {
    font-weight: 600;
    color: #111827;
    flex: 1;
    font-size: 0.95rem;
}

.day-entry-points {
    font-size: 0.85rem;
    font-weight: bold;
    color: #6b7280;
    white-space: nowrap;
}

.day-no-activity {
    text-align: center;
    color: #9ca3af;
    padding: 2.5rem;
    font-size: 1rem;
    background: white;
    border-radius: 12px;
}

.calendar-loading, .calendar-login-prompt {
    text-align: center;
    color: #6b7280;
    padding: 3rem;
    font-size: 1rem;
    max-width: 900px;
    margin: 2rem auto;
}
.calendar-login-prompt a { color: #1e40af; font-weight: 600; }

/* ─── Dark Mode ─── */
[data-theme="dark"] .header-section p { color: #9ca3af; }
[data-theme="dark"] .calendar-month-title,
[data-theme="dark"] .day-view-title { color: var(--text-color); }
[data-theme="dark"] .calendar-day-header { color: #6b7280; }

[data-theme="dark"] .calendar-day {
    background: #1a1d2e; border-color: transparent;
}
[data-theme="dark"] .calendar-day:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.3); border-color: #3b82f6; }
[data-theme="dark"] .calendar-day.today { border-color: #3b82f6; background: rgba(30,64,175,0.2); }
[data-theme="dark"] .calendar-day.has-activity { background: rgba(21,128,61,0.15); }
[data-theme="dark"] .calendar-day.today.has-activity { background: rgba(14,70,109,0.3); }
[data-theme="dark"] .calendar-day-number { color: #d1d5db; }
[data-theme="dark"] .calendar-day.today .calendar-day-number { color: #60a5fa; }
[data-theme="dark"] .activity-dot-more { color: #9ca3af; }

[data-theme="dark"] .day-entry-card {
    background: #1a1d2e;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
[data-theme="dark"] .day-entry-name { color: var(--text-color); }
[data-theme="dark"] .day-entry-points { color: #9ca3af; }
[data-theme="dark"] .day-no-activity { background: #1a1d2e; color: #6b7280; }

[data-theme="dark"] .day-entries-section h3 {
    color: #9ca3af; border-bottom-color: #2d3148;
}
[data-theme="dark"] .day-nav-btn { border-color: #3d4163; color: #9ca3af; }
[data-theme="dark"] .day-nav-btn:hover:not(:disabled) { border-color: #3b82f6; color: #3b82f6; }

[data-theme="dark"] .calendar-loading,
[data-theme="dark"] .calendar-login-prompt { color: #9ca3af; }
[data-theme="dark"] .calendar-nav-btn:disabled { background: #2d3148; }

/* Skeleton */
.skeleton-calendar { max-width: 900px; margin: 2rem auto; padding: 0 1rem; }
.skeleton-cal-header { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; margin-bottom: 3rem; }
.skeleton-cal-h1 { height: 36px; width: 260px; }
.skeleton-cal-p  { height: 16px; width: 360px; }
.skeleton-cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.skeleton-cal-btn { height: 36px; width: 80px; border-radius: 8px; }
.skeleton-cal-month { height: 28px; width: 160px; }
.skeleton-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.skeleton-cal-cell { height: 70px; border-radius: 8px; }
.skeleton-cal-dayhdr { height: 28px; border-radius: 4px; }

@media (max-width: 640px) {
    .calendar-day { min-height: 55px; padding: 0.3rem; }
    .calendar-month-title { font-size: 1.1rem; }
    .calendar-day-number { font-size: 0.75rem; }
    .activity-dot { width: 9px; height: 9px; }
    .calendar-grid { gap: 3px; }
    .calendar-nav-btn { padding: 0.4rem 0.7rem; font-size: 0.9rem; }
}
