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

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg3);
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

    .calendar-header h2 {
        font-size: 16px;
        font-weight: 600;
        color: var(--text2);
    }

.calendar-grid {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border);
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: stretch;
}

.cal-weekday {
    padding: 12px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    min-height: 48px;
}

.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-day {
    min-height: 140px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background-color: var(--bg2);
    transition: background-color 0.2s ease;
}

.cal-day:hover {
    background-color: var(--bg3);
}

.cal-day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    text-align: center;
    width: 100%;
    margin-bottom: 4px;
}

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

    .cal-day:nth-child(-n+7) {
        border-top: 1px solid var(--border);
    }

    .cal-day.other-month .cal-day-num {
        opacity: 0.3;
    }

    .cal-day.today .cal-day-num {
        background: var(--primary);
        color: #fff;
        border-radius: 50%;
        width: 26px;
        height: 26px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
    }


.cal-day-num {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    text-align: center;
    width: 100%;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cal-day-add-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text3);
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

    .cal-day-add-btn:hover {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
        transform: scale(1.05);
    }

.cal-day:hover .cal-day-add-btn {
    opacity: 1;
}

.cal-entry-chip {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: normal;
    overflow-wrap: break-word;
    word-wrap: break-word;
    border: 1px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 100%;
    min-width: 0;
}

    .cal-entry-chip:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .cal-entry-chip.task-chip {
        background: linear-gradient(135deg, rgba(99,102,241,0.15) 0%, rgba(99,102,241,0.25) 100%);
        color: var(--primary);
        border-color: rgba(99,102,241,0.3);
    }

        .cal-entry-chip.task-chip:hover {
            background: linear-gradient(135deg, rgba(99,102,241,0.25) 0%, rgba(99,102,241,0.35) 100%);
            border-color: var(--primary);
        }

    .cal-entry-chip.synced-task-chip {
        background: linear-gradient(135deg, rgba(34,197,94,0.15) 0%, rgba(34,197,94,0.25) 100%);
        color: #22c55e;
        border-color: rgba(34,197,94,0.3);
    }

        .cal-entry-chip.synced-task-chip:hover {
            background: linear-gradient(135deg, rgba(34,197,94,0.25) 0%, rgba(34,197,94,0.35) 100%);
            border-color: #22c55e;
        }

    .cal-entry-chip.meeting-chip {
        background: linear-gradient(135deg, rgba(236,72,153,0.15) 0%, rgba(236,72,153,0.25) 100%);
        color: #ec4899;
        border-color: rgba(236,72,153,0.3);
    }

        .cal-entry-chip.meeting-chip:hover {
            background: linear-gradient(135deg, rgba(236,72,153,0.25) 0%, rgba(236,72,153,0.35) 100%);
            border-color: #ec4899;
        }

    .cal-entry-chip i {
        font-size: 12px;
        flex-shrink: 0;
    }

    .cal-entry-chip .entry-time {
        font-size: 10px;
        opacity: 0.9;
        margin-left: auto;
        font-weight: 500;
        padding-left: 8px;
        border-left: 1px solid currentColor;
    }

    .cal-entry-chip .entry-teamspace {
        font-size: 9px;
        opacity: 0.8;
        font-weight: 500;
        padding: 2px 6px;
        border-radius: 4px;
        background: rgba(0,0,0,0.1);
        margin-left: 6px;
        white-space: nowrap;
    }

    .synced-task-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .synced-task-page {
        font-size: 9px;
        font-weight: 600;
        opacity: 0.7;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .synced-task-name {
        font-size: 11px;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cal-entry-chip.dragging {
        opacity: 0.5;
        cursor: grabbing;
        transform: rotate(2deg);
    }

.cal-day.drag-over {
    background: var(--primary-light);
    border-color: var(--primary);
}

.entry-type-toggle {
    display: inline-flex;
    gap: 8px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 20px;
}

.entry-type-btn {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text2);
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .entry-type-btn i {
        font-size: 15px;
        transition: transform 0.2s ease;
    }

    .entry-type-btn:hover {
        background: var(--bg4);
        color: var(--text);
        transform: translateY(-1px);
    }

    .entry-type-btn.active {
        background: var(--primary);
        color: #fff;
        box-shadow: 0 2px 8px rgba(99,102,241,0.3);
    }

        .entry-type-btn.active i {
            transform: scale(1.1);
        }

.entry-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
}

.entry-detail-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    background: var(--bg3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: border-color 0.2s ease;
}

    .entry-detail-item:hover {
        border-color: var(--border2);
    }

.entry-detail-label {
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .entry-detail-label i {
        font-size: 13px;
        color: var(--primary);
        width: 16px;
        text-align: center;
    }

.entry-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.5;
    padding-left: 24px;
}

.entry-detail-description-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.entry-detail-description {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
    white-space: pre-wrap;
    background: var(--bg3);
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    min-height: 80px;
}

.entry-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

    .entry-type-badge.task {
        background: rgba(99,102,241,0.15);
        color: var(--primary);
        border-color: rgba(99,102,241,0.3);
    }

    .entry-type-badge.meeting {
        background: rgba(236,72,153,0.15);
        color: #ec4899;
        border-color: rgba(236,72,153,0.3);
    }

    .entry-type-badge i {
        font-size: 14px;
    }


    body.light .cal-day.other-month {
        background-color: var(--bg1);
    }

body.light .cal-entry-chip.task-chip {
    background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(99,102,241,0.2) 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

body.light .cal-entry-chip.synced-task-chip {
    background: linear-gradient(135deg, rgba(34,197,94,0.1) 0%, rgba(34,197,94,0.2) 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

body.light .cal-entry-chip.meeting-chip {
    background: linear-gradient(135deg, rgba(236,72,153,0.1) 0%, rgba(236,72,153,0.2) 100%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

body.light .cal-entry-chip:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

body.light .entry-detail-item {
    background: var(--bg2);
}

body.light .entry-detail-description {
    background: var(--bg2);
}
