/* ============================================================
   plans.css · 计划页
   ============================================================ */

.plans-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 4px 14px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.plans-header-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 1px;
}
.plans-region {
    padding: 5px 10px;
    background: rgba(192,132,252,0.08);
    border: 1px solid rgba(192,132,252,0.28);
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: all .2s;
}
.plans-region:hover {
    background: rgba(192,132,252,0.18);
    border-color: rgba(192,132,252,0.5);
}
.plans-region option {
    background: #1a0e2e;
    color: #fff;
}

/* ===== 月份导航 ===== */
.plans-month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 14px 0 10px;
    flex-shrink: 0;
}
.plans-month-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    font-size: 22px;
    cursor: pointer;
    transition: all .2s;
    user-select: none;
}
.plans-month-btn:hover {
    background: rgba(192,132,252,0.15);
    color: #fff;
}
.plans-month-label {
    font-family: 'WenJinMincho', 'Noto Serif SC', serif;
    font-size: 18px;
    color: #fff;
    letter-spacing: 2px;
    min-width: 120px;
    text-align: center;
    text-shadow: 0 0 12px rgba(192,132,252,0.35);
}

/* ===== 星期表头 ===== */
.plans-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 6px 4px 8px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--border);
}
.plans-weekdays span {
    text-align: center;
    font-size: 11px;
    color: var(--text-dim);
    letter-spacing: 1px;
    font-family: 'JetBrains Mono', monospace;
}

/* ===== 月历网格 ===== */
.plans-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 8px 4px 10px;
    flex-shrink: 0;
}
.plans-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
    transition: all .15s;
    border: 1px solid transparent;
}
.plans-cell:hover {
    background: rgba(192,132,252,0.08);
}
.plans-cell.other-month {
    opacity: 0.25;
    cursor: default;
}
.plans-cell.today {
    border-color: rgba(192,132,252,0.5);
    background: rgba(192,132,252,0.08);
}
.plans-cell.selected {
    background: linear-gradient(135deg, rgba(192,132,252,0.35), rgba(236,72,153,0.28));
    border-color: rgba(192,132,252,0.7);
    box-shadow: 0 0 12px rgba(192,132,252,0.4);
}
.plans-cell.holiday .plans-day-num {
    color: #fca5a5;
}
.plans-day-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: var(--text);
    line-height: 1;
    margin-bottom: 3px;
}
.plans-cell.selected .plans-day-num {
    color: #fff;
    font-weight: 600;
}

/* 事件红点 */
.plans-dots {
    display: flex;
    gap: 2px;
    height: 4px;
}
.plans-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 4px rgba(236,72,153,0.7);
}

/* 节假日名（月历里小字） */
.plans-holiday-name {
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 8px;
    color: #fca5a5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
    font-family: system-ui, sans-serif;
    opacity: 0.85;
    pointer-events: none;
}

/* ===== 当天事件区 ===== */
.plans-day-section {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    border-top: 1px solid var(--border);
    padding: 12px 4px 16px;
}
.plans-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px 10px;
}
.plans-day-label {
    font-size: 14px;
    color: var(--text);
    letter-spacing: 0.5px;
    font-family: 'WenJinMincho', 'Noto Serif SC', serif;
}
.plans-day-add {
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all .2s;
    user-select: none;
}
.plans-day-add:hover {
    background: rgba(192,132,252,0.15);
}
.plans-events {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.plans-event {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(192,132,252,0.15);
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    overflow: hidden;
}
.plans-event:hover {
    background: rgba(192,132,252,0.08);
    border-color: rgba(192,132,252,0.35);
}
.plans-event::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}
.plans-event-body {
    flex: 1;
    min-width: 0;
}
.plans-event-title {
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}
.plans-event-note {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 2px;
    line-height: 1.5;
    word-break: break-word;
}
.plans-empty {
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
    padding: 24px 0;
    font-style: italic;
}
/* ===== 类型选择 ===== */
.plan-type-row {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.plan-type-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(192,132,252,0.2);
    border-radius: 10px;
    color: var(--text-dim);
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all .2s;
}
.plan-type-btn:hover {
    background: rgba(192,132,252,0.1);
    color: var(--text);
}
.plan-type-btn.active {
    background: linear-gradient(135deg, rgba(192,132,252,0.3), rgba(236,72,153,0.25));
    border-color: rgba(192,132,252,0.7);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 0 10px rgba(192,132,252,0.35);
}

/* ===== 事件卡片：待办样式 ===== */
.plans-event.todo {
    padding-left: 12px;
}
.plans-event.todo .plans-event-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1.8px solid rgba(192,132,252,0.55);
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: all .2s;
    background: rgba(255,255,255,0.03);
}
.plans-event.todo.done .plans-event-check {
    background: linear-gradient(135deg, #c084fc, #ec4899);
    border-color: transparent;
    box-shadow: 0 0 10px rgba(192,132,252,0.6);
}
.plans-event.todo.done .plans-event-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.plans-event.todo.done .plans-event-title {
    color: var(--text-dim);
    text-decoration: line-through;
}
.plans-event.todo.done .plans-event-note {
    color: rgba(255,255,255,0.3);
    text-decoration: line-through;
}
.plans-event.todo::before {
    background: linear-gradient(180deg, rgba(192,132,252,0.6), rgba(139,157,212,0.6));
}
/* ===== 顶部右侧按钮组 ===== */
.plans-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.plans-period-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(192,132,252,0.08);
    border: 1px solid rgba(192,132,252,0.28);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all .2s;
}
.plans-period-btn:hover {
    background: rgba(192,132,252,0.2);
    border-color: rgba(192,132,252,0.55);
}
.plans-period-btn.active {
    background: linear-gradient(135deg, rgba(236,72,153,0.4), rgba(192,132,252,0.35));
    border-color: rgba(236,72,153,0.7);
    color: #fff;
    box-shadow: 0 0 10px rgba(236,72,153,0.45);
}

/* ===== 月经周期标记 ===== */
.plans-cell.period-past:not(.selected) {
    background: rgba(236,72,153,0.14);
}
.plans-cell.period-past .plans-day-num {
    color: #f9a8d4;
}
.plans-cell.period-predicted:not(.selected) {
    background: rgba(236,72,153,0.05);
    border: 1px dashed rgba(236,72,153,0.4);
}
.plans-cell.period-predicted .plans-day-num {
    color: rgba(249,168,212,0.7);
}
.plans-cell.period-past.selected,
.plans-cell.period-predicted.selected {
    /* 选中状态优先，不做额外修改 */
}
/* ===== 共享列表 ===== */
.plans-share-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 12px;
}
.plans-share-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(192,132,252,0.18);
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
}
.plans-share-item:hover {
    background: rgba(192,132,252,0.08);
}
.plans-share-item.selected {
    background: rgba(192,132,252,0.15);
    border-color: rgba(192,132,252,0.5);
}
.plans-share-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(192,132,252,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
}
.plans-share-name {
    flex: 1;
    font-size: 14px;
    color: var(--text);
}
.plans-share-cb {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    flex-shrink: 0;
}