/* ===== CSS Variables - Google Calendar Theme ===== */
:root {
    /* Google Calendar colors */
    --lucas-color: #1a73e8;
    --lucas-bg: #e8f0fe;
    --lucas-border: #4285f4;
    --lilian-color: #e37400;
    --lilian-bg: #fef7e0;
    --lilian-border: #fbbc04;
    --holiday-color: #d93025;
    --holiday-bg: #fce8e6;
    --birthday-color: #c5221f;
    --birthday-bg: #fce8e6;
    /* Google Calendar UI colors */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #3c4043;
    --text-secondary: #5f6368;
    --border-color: #dadce0;
    --accent-color: #1a73e8;
    /* Google style radius/shadows */
    --radius: 8px;
    --radius-sm: 4px;
    --shadow: 0 1px 2px 0 rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
    --shadow-lg: 0 1px 3px 0 rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
}

/* ===== Dark Theme ===== */
body.dark {
    --bg-primary: #202124;
    --bg-secondary: #292a2d;
    --bg-card: #35363a;
    --text-primary: #e8eaed;
    --text-secondary: #9aa0a6;
    --border-color: #5f6368;
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, .3), 0 1px 3px 1px rgba(0, 0, 0, .15);
    --shadow-lg: 0 1px 3px 0 rgba(0, 0, 0, .3), 0 4px 8px 3px rgba(0, 0, 0, .15);
}

/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Google Sans', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ===== App Container ===== */
.app-container {
    max-width: 1000px !important;
    margin: 0 auto !important;
    padding: 16px !important;
    width: 100%;
    /* Ensure it takes width up to max-width */
}

/* ===== Header ===== */
.header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header h1 span {
    background: linear-gradient(135deg, var(--lucas-color), var(--lilian-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons (Google Style) ===== */
.btn {
    padding: 10px 24px;
    border: none;
    border-radius: 24px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(.4, 0, .2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
    letter-spacing: 0.25px;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    background: #1557b0;
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e8f0fe;
    border-color: var(--accent-color);
}

body.dark .btn-secondary:hover {
    background: var(--bg-card);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.8rem;
    background: var(--bg-secondary);
    color: var(--accent-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.btn-small:hover {
    background: #e8f0fe;
    border-color: var(--accent-color);
}

.btn-nav {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-nav:hover {
    background: var(--bg-primary);
    border-color: var(--lucas-color);
    color: var(--lucas-color);
}

/* ===== Stats Bar ===== */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
    padding: 12px 20px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

.stat-value.lucas {
    background: var(--lucas-bg);
    color: var(--lucas-color);
}

.stat-value.lilian {
    background: var(--lilian-bg);
    color: var(--lilian-color);
}

/* ===== Month Navigation ===== */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.month-nav h2 {
    font-size: 1.25rem;
    font-weight: 600;
    min-width: 180px;
    text-align: center;
    color: var(--text-primary);
}

/* ===== Approval Section ===== */
.approval-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.approval-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.approval-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.approval-status.pending {
    background: #fef3c7;
    color: #d97706;
}

.approval-status.partial {
    background: #e8f0fe;
    color: #1a73e8;
}

.approval-status.approved {
    background: #d1fae5;
    color: #059669;
}

.approval-checkboxes {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.approval-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    user-select: none;
}

.approval-checkbox:hover {
    border-color: var(--accent-color);
}

.approval-checkbox input {
    display: none;
}

.approval-checkbox .checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.approval-checkbox input:checked+.checkmark {
    background: #059669;
    border-color: #059669;
}

.approval-checkbox input:checked+.checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.approval-checkbox.lucas {
    border-color: var(--lucas-bg);
}

.approval-checkbox.lucas:hover,
.approval-checkbox.lucas:has(input:checked) {
    background: var(--lucas-bg);
    border-color: var(--lucas-color);
    color: #1e293b;
    /* Force dark text for contrast */
}

.approval-checkbox.lucas:hover .approval-name,
.approval-checkbox.lucas:has(input:checked) .approval-name {
    color: #1e293b;
}

.approval-checkbox.lilian {
    border-color: var(--lilian-bg);
}

.approval-checkbox.lilian:hover,
.approval-checkbox.lilian:has(input:checked) {
    background: var(--lilian-bg);
    border-color: var(--lilian-color);
    color: #1e293b;
    /* Force dark text for contrast */
}

.approval-checkbox.lilian:hover .approval-name,
.approval-checkbox.lilian:has(input:checked) .approval-name {
    color: #1e293b;
}

.approval-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ===== Legend ===== */
.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.legend-item {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
}

.legend-item.lucas {
    background: var(--lucas-bg);
    color: var(--lucas-color);
}

.legend-item.lilian {
    background: var(--lilian-bg);
    color: var(--lilian-color);
}

.legend-item.holiday {
    background: var(--holiday-bg);
    color: var(--holiday-color);
}

.legend-item.birthday {
    background: var(--birthday-bg);
    color: var(--birthday-color);
}

/* ===== Calendar ===== */
.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.day-name {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0;
}

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

/* ===== Day Cell ===== */
/* ===== Day Cell (Refactored for Robust Layout) ===== */
.day-cell {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    padding: 6px;
    min-height: 90px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 4px;
    overflow: hidden;
    /* Prevent spillover */
}

.day-cell:hover {
    border-color: var(--lucas-color);
    box-shadow: var(--shadow);
    z-index: 10;
}

.day-cell.empty {
    background: transparent;
    cursor: default;
    border: none;
    box-shadow: none;
}

.day-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    margin-bottom: 2px;
}

/* Holiday styling inside cell */
.day-cell.holiday {
    background: var(--holiday-bg);
    border-color: #fca5a5;
}

.day-cell.holiday .day-number {
    color: var(--holiday-color);
}

.day-cell.weekend {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

/* Weekend owned by Lucas */
.day-cell.weekend-lucas {
    background: linear-gradient(135deg, #e8f0fe 0%, #c2e0ff 100%);
    border-color: var(--lucas-color);
    border-width: 3px;
}

.day-cell.weekend-lucas .day-number {
    color: var(--lucas-color);
    font-size: 1rem;
}

/* Weekend owned by Lílian */
.day-cell.weekend-lilian {
    background: linear-gradient(135deg, #fef7e0 0%, #ffe4b5 100%);
    border-color: var(--lilian-color);
    border-width: 3px;
}

.day-cell.weekend-lilian .day-number {
    color: var(--lilian-color);
    font-size: 1rem;
}

/* Weekend shared by both */
.day-cell.weekend-both {
    background: linear-gradient(135deg, #e8f0fe 0%, #fef7e0 100%);
    border-width: 3px;
    border-image: linear-gradient(135deg, var(--lucas-color), var(--lilian-color)) 1;
}

.day-cell.weekend-both .day-number {
    color: #6b21a8;
    /* Fallback solid color */
    font-size: 1rem;
}

.holiday-label {
    font-size: 0.65rem;
    color: var(--holiday-color);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.6);
    padding: 1px 4px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: flex-start;
    max-width: 100%;
    line-height: 1.2;
}

/* Indicators positioning */
.birthday-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.65rem;
    background: var(--birthday-bg);
    color: var(--birthday-color);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 600;
    z-index: 5;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid var(--accent-color);
}

.day-periods {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.period {
    font-size: 0.7rem;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.period.lucas {
    background: var(--lucas-bg);
    color: var(--lucas-color);
}

.period.lilian {
    background: var(--lilian-bg);
    color: var(--lilian-color);
}

.period-label {
    font-weight: 600;
}

.period-name {
    font-weight: 700;
}

.day-activities {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.activity-tag {
    font-size: 0.6rem;
    padding: 2px 5px;
    border-radius: 3px;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 600;
}

.activity-tag.natacao {
    background: #cffafe;
    color: #0e7490;
}

.activity-tag.futebol {
    background: #dcfce7;
    color: #15803d;
}

background: rgba(255, 255, 255, 0.5);
padding: 2px 4px;
border-radius: 4px;
margin-top: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
border-left: 3px solid var(--accent-color);
}

/* ===== Suggestions ===== */
.suggestion-indicator {
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 1.2rem;
    animation: pulse 2s infinite;
    cursor: help;
    z-index: 20;
    background: #fff;
    border-radius: 50%;
    padding: 0;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.day-cell.has-suggestion {
    border: 2px dashed #f59e0b;
}

.suggestion-alert {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 16px;
    color: #92400e;
}

body.dark .suggestion-alert {
    background: rgba(180, 83, 9, 0.2);
    border-color: #b45309;
    color: #fbbf24;
}

.suggestion-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #b45309;
    font-weight: 700;
}

body.dark .suggestion-header {
    color: #f59e0b;
}

.suggestion-content {
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 12px;
    font-size: 0.9rem;
}

body.dark .suggestion-content {
    background: #292a2d;
    border-color: #4b5563;
    color: #e5e7eb;
}

/* Ensure strong text in dark mode for suggestion diff */
body.dark .suggestion-diff strong {
    color: #9ca3af;
}

/* Fix day cell backgrounds in dark mode for better readability */
body.dark .day-cell.weekend-lucas {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #3b82f6;
}

.suggestion-diff {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.suggestion-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.footer-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: flex-end;
}

.btn-success {
    background: #10b981;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dc2626;
}

padding: 2px 6px;
border-radius: 10px;
}

.holiday-label {
    display: block;
    font-size: 0.6rem;
    color: var(--holiday-color);
    font-weight: 600;
    margin-bottom: 4px;
    padding: 2px 4px;
    background: var(--holiday-bg);
    border-radius: 3px;
}

/* ===== Chat Section ===== */
.chat-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.chat-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.chat-input:focus {
    outline: none;
    border-color: var(--lucas-color);
}

.chat-input::placeholder {
    color: var(--text-secondary);
}

.chat-messages {
    margin-top: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.chat-message {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.chat-message.user {
    background: var(--lucas-bg);
    color: var(--lucas-color);
}

.chat-message.system {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.chat-message.success {
    background: #dcfce7;
    color: #15803d;
}

.chat-message.error {
    background: var(--holiday-bg);
    color: var(--holiday-color);
}

/* ===== Birthdays Section ===== */
.birthdays-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.birthdays-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.birthdays-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.birthday-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 4px solid;
}

.birthday-item.lucas {
    border-color: var(--lucas-color);
}

.birthday-item.lilian {
    border-color: var(--lilian-color);
}

.birthday-info {
    display: flex;
    flex-direction: column;
}

.birthday-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.birthday-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.birthday-delete {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 4px;
}

.birthday-delete:hover {
    color: var(--holiday-color);
}

/* ===== Events Section ===== */
.events-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.events-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

/* ===== Holidays Section ===== */
.holidays-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.holidays-section h3 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.holidays-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.holiday-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--holiday-bg);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--holiday-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.holiday-item:hover {
    box-shadow: var(--shadow);
}

.holiday-info {
    display: flex;
    flex-direction: column;
}

.holiday-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--holiday-color);
}

.holiday-date-range {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--lucas-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-item:hover {
    box-shadow: var(--shadow);
}

.event-info {
    display: flex;
    flex-direction: column;
}

.event-name {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.event-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid var(--border-color);
}

.checkbox-label:has(input:checked) {
    background: var(--lucas-bg);
    border-color: var(--lucas-color);
    color: var(--lucas-color);
}

.btn-danger {
    background: var(--holiday-color);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modal-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.period-edit label,
.note-edit label,
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.radio-group {
    display: flex;
    gap: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.radio-label.lucas {
    background: var(--lucas-bg);
    color: var(--lucas-color);
}

.radio-label.lilian {
    background: var(--lilian-bg);
    color: var(--lilian-color);
}

.radio-label:has(input:checked) {
    border-color: currentColor;
}

.radio-label input {
    accent-color: currentColor;
}

.note-edit input,
.form-group input[type="text"],
.form-group input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.note-edit input:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--lucas-color);
}

/* ===== Export Container ===== */
.export-container {
    position: fixed;
    left: -9999px;
    top: 0;
    background: white;
    padding: 20px;
    width: 400px;
}

.export-container.hidden {
    display: block;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
    .app-container {
        padding: 24px;
    }

    .header {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .header h1 {
        font-size: 2rem;
    }

    .day-cell {
        min-height: 100px;
        padding: 10px;
    }

    .day-number {
        font-size: 1rem;
    }

    .period {
        font-size: 0.75rem;
    }

    .activity-tag {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .day-name {
        font-size: 0.6rem;
    }

    .day-cell {
        min-height: 65px;
        padding: 4px;
    }
}

/* ===== Day Cell Dark Mode Fixes (Vibrant Google Style) ===== */
body.dark .day-cell.weekend-lucas {
    background: #174ea6 !important;
    /* Google Blue 800 */
    border-color: #8ab4f8 !important;
    /* Google Blue 200 */
}

body.dark .day-cell.weekend-lilian {
    background: #a50e0e !important;
    /* Google Red 900 (simulated orange/brown) -> Let's use custom Orange */
    background: #c05600 !important;
    /* Strong Orange */
    border-color: #fdd663 !important;
    /* Google Yellow 200 */
}

body.dark .day-cell.weekend-lilian .period-name,
body.dark .day-cell.weekend-lilian .day-number,
body.dark .day-cell.weekend-lilian .holiday-label {
    color: #fdd663 !important;
}

body.dark .day-cell.weekend-both {
    background: linear-gradient(135deg, #174ea6 0%, #c05600 100%) !important;
    border-image: linear-gradient(135deg, #8ab4f8, #fdd663) 1 !important;
}

/* Dark Mode Holidays */
body.dark .day-cell.holiday {
    background: #8c1d18 !important;
    /* Google Red 900 */
    border-color: #f28b82 !important;
    /* Google Red 200 */
}

body.dark .day-cell.holiday .day-number,
body.dark .day-cell.holiday .holiday-label {
    color: #f28b82 !important;
}

body.dark .period.lilian {
    background: #c05600;
    color: #fef7e0;
}

body.dark .period.lucas {
    background: #174ea6;
    color: #e8f0fe;
}

/* Typography Boost */
.day-number {
    font-size: 1.1rem !important;
    /* Increased from 0.9rem */
    margin-bottom: 4px;
}

.period {
    font-size: 0.8rem !important;
    /* Increased from 0.7rem */
    padding: 3px 6px;
}

.holiday-label {
    font-size: 0.75rem !important;
}

.day-note {
    font-size: 0.8rem !important;
}

.day-number {
    font-size: 0.8rem;
    margin-bottom: 2px;
}

.period {
    font-size: 0.55rem;
    padding: 2px 4px;
}

.period-label {
    display: none;
}

.activity-tag {
    font-size: 0.5rem;
    padding: 1px 3px;
}

.legend {
    gap: 4px;
    padding: 8px;
}

.legend-item {
    font-size: 0.65rem;
    padding: 3px 6px;
}

.btn {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.month-nav h2 {
    font-size: 1rem;
    min-width: 140px;
}

.stats-bar {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.stat-item {
    justify-content: center;
}
}