/* ========== 每日打卡模块 ========== */
.checkin-header-card {
    background: linear-gradient(135deg, #5B9BD5, #2E75B6);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    color: white;
    box-shadow: var(--shadow-md);
}
.checkin-header-card h2 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.checkin-header-card p { font-size: 12px; opacity: 0.9; }

.checkin-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}

.add-checkin-form {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
    background: #F8F9FA;
    padding: 12px;
    border-radius: var(--radius-md);
}
.add-checkin-form input {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 13px;
    outline: none;
}
.add-checkin-form input:focus { border-color: #5B9BD5; }
.add-checkin-form select {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 10px;
    font-size: 13px;
    background: white;
}

/* 单一层级的 emoji 图标选择器（无二级分类） */
.ci-icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    margin-top: 2px;
}
.ci-emoji {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border-radius: 10px;
    background: white;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.15s;
}
.ci-emoji.active {
    border-color: #2E75B6;
    background: #EAF2FB;
    transform: scale(1.05);
}

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

.checkin-card {
    background: var(--bg-cream);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 4px solid #5B9BD5;
}

.checkin-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #E8F0FE, #D2E3FC);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.checkin-info { flex: 1; min-width: 0; }
.checkin-name { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.checkin-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-gray);
    flex-wrap: wrap;
}
.checkin-stats b { color: #2E75B6; }

.checkin-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.ci-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.ci-btn.primary { background: #5B9BD5; color: white; border-color: #5B9BD5; }
.ci-btn.primary:hover { background: #2E75B6; }
.ci-btn.ghost:hover { background: #f0f0f0; }
.ci-btn.danger { color: #C62828; border-color: #FFCDD2; }
.ci-btn.danger:hover { background: #C62828; color: white; }

/* ========== 日历视图 ========== */
.checkin-calendar-section {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-top: 16px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cal-nav-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#cal-title {
    font-size: 15px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

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

.cal-weekdays {
    display: contents;
}
.cal-weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-gray);
    padding: 6px 0;
}

.cal-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    position: relative;
    cursor: default;
    transition: all 0.15s;
}
.cal-cell.empty { background: transparent; }
.cal-cell.today { box-shadow: inset 0 0 0 2px #5B9BD5; font-weight: 700; }
.cal-cell.full { background: #E8F5E9; color: #2E7D32; }
.cal-cell.partial { background: #FFF8E1; color: #F57F17; }
.cal-cell.none { background: #FAFAFA; color: #bbb; }
.cal-cell.no-data { opacity: 0.3; }

.cal-day-num { font-size: 13px; line-height: 1; }
.cal-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #2E7D32;
    position: absolute;
    bottom: 3px;
}

.cal-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 10px;
    font-size: 11px;
    color: var(--text-gray);
    align-items: center;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    display: inline-block;
    margin-right: 4px;
}
.legend-dot.full { background: #E8F5E9; border: 1px solid #A5D6A7; }
.legend-dot.partial { background: #FFF8E1; border: 1px solid #FFE082; }
.legend-dot.none { background: #FAFAFA; border: 1px solid #e0e0e0; }

@media (max-width: 480px) {
    .checkin-card { flex-wrap: wrap; }
    .checkin-actions { width: 100%; justify-content: flex-end; margin-top: 8px; }
    .add-checkin-form { flex-direction: column; }
    .add-checkin-form input, .add-checkin-form select { width: 100%; }
}
