/* ============================================
   HerDays - 她的日程 | 主样式文件
   ============================================ */

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

html { font-size: 15px; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ===== 主题变量 ===== */

/* --- 可爱优雅主题 --- */
body[data-theme="cute"] {
    --bg-main: #FFF5F8;
    --bg-sidebar: linear-gradient(180deg, #FFD6E5 0%, #FFC4DC 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF0F5;
    --bg-input: #FFF5F8;
    --bg-overlay: rgba(255, 182, 210, 0.7);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(255, 107, 157, 0.1);
    --bg-today: #FF6B9D;
    --bg-weekend: #FFF0F5;
    --bg-cycle: linear-gradient(135deg, #FF85A2, #FFB5C5);
    --bg-cycle-light: rgba(255, 133, 162, 0.15);

    --text-primary: #4A3344;
    --text-secondary: #8B6F7E;
    --text-light: #C4A8B5;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #FF6B9D;
    --accent-hover: #FF4F88;
    --accent-light: rgba(255, 107, 157, 0.15);
    --accent-border: rgba(255, 107, 157, 0.3);
    --accent-glow: 0 0 0 rgba(255, 107, 157, 0);

    --danger: #F44336;
    --danger-hover: #D32F2F;
    --success: #81C784;
    --warning: #FFB74D;

    --border: rgba(255, 107, 157, 0.15);
    --border-hover: rgba(255, 107, 157, 0.4);
    --shadow: 0 2px 12px rgba(255, 107, 157, 0.08);
    --shadow-lg: 0 8px 32px rgba(255, 107, 157, 0.15);
    --shadow-card: 0 2px 8px rgba(180, 100, 130, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 清新色彩主题 --- */
body[data-theme="color"] {
    --bg-main: #FFFFFF;
    --bg-sidebar: linear-gradient(160deg, #E0F7FA 0%, #F3E5F5 45%, #FFECB3 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F9FA;
    --bg-input: #F5F7FA;
    --bg-overlay: rgba(255, 255, 255, 0.9);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(236, 72, 153, 0.1);
    --bg-today: #EC4899;
    --bg-weekend: #FFF8E1;
    --bg-cycle: linear-gradient(135deg, #EC4899, #8B5CF6);
    --bg-cycle-light: rgba(236, 72, 153, 0.12);

    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #EC4899;
    --accent-hover: #DB2777;
    --accent-light: rgba(236, 72, 153, 0.12);
    --accent-border: rgba(236, 72, 153, 0.35);
    --accent-glow: 0 0 0 rgba(236, 72, 153, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(236, 72, 153, 0.35);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.05);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 自定义图片主题 --- */
body[data-theme="custom"] {
    --bg-main: #F5F5F5;
    --bg-sidebar: rgba(30, 30, 40, 0.85);
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 1);
    --bg-input: rgba(245, 245, 245, 0.9);
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(100, 100, 150, 0.1);
    --bg-today: #6366F1;
    --bg-weekend: rgba(245, 245, 245, 0.8);
    --bg-cycle: linear-gradient(135deg, #EC4899, #8B5CF6);
    --bg-cycle-light: rgba(236, 72, 153, 0.15);

    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #6366F1;
    --accent-hover: #4F46E5;
    --accent-light: rgba(99, 102, 241, 0.15);
    --accent-border: rgba(99, 102, 241, 0.4);
    --accent-glow: 0 0 0 rgba(99, 102, 241, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(0, 0, 0, 0.1);
    --border-hover: rgba(99, 102, 241, 0.4);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
    --bg-custom-image: none;
    --bg-overlay-opacity: 0.5;
}

/* --- 紫色系主题 --- */
body[data-theme="purple"] {
    --bg-main: #F8F5FF;
    --bg-sidebar: linear-gradient(160deg, #EDE9FE 0%, #DDD6FE 50%, #F5D0FE 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #F3F0FF;
    --bg-input: #F5F3FF;
    --bg-overlay: rgba(255, 255, 255, 0.92);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(139, 92, 246, 0.1);
    --bg-today: #8B5CF6;
    --bg-weekend: #F3E8FF;
    --bg-cycle: linear-gradient(135deg, #8B5CF6, #D946EF);
    --bg-cycle-light: rgba(139, 92, 246, 0.12);

    --text-primary: #2E1065;
    --text-secondary: #6B21A8;
    --text-light: #A78BFA;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #8B5CF6;
    --accent-hover: #7C3AED;
    --accent-light: rgba(139, 92, 246, 0.12);
    --accent-border: rgba(139, 92, 246, 0.35);
    --accent-glow: 0 0 0 rgba(139, 92, 246, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(139, 92, 246, 0.12);
    --border-hover: rgba(139, 92, 246, 0.4);
    --shadow: 0 2px 12px rgba(139, 92, 246, 0.08);
    --shadow-lg: 0 12px 40px rgba(139, 92, 246, 0.15);
    --shadow-card: 0 2px 8px rgba(139, 92, 246, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 蓝色系主题 --- */
body[data-theme="blue"] {
    --bg-main: #F0F9FF;
    --bg-sidebar: linear-gradient(160deg, #E0F2FE 0%, #BFDBFE 50%, #DBEAFE 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #F0F9FF;
    --bg-input: #F1F5F9;
    --bg-overlay: rgba(255, 255, 255, 0.92);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(59, 130, 246, 0.1);
    --bg-today: #3B82F6;
    --bg-weekend: #E0F2FE;
    --bg-cycle: linear-gradient(135deg, #3B82F6, #06B6D4);
    --bg-cycle-light: rgba(59, 130, 246, 0.12);

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-light: #94A3B8;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #3B82F6;
    --accent-hover: #2563EB;
    --accent-light: rgba(59, 130, 246, 0.12);
    --accent-border: rgba(59, 130, 246, 0.35);
    --accent-glow: 0 0 0 rgba(59, 130, 246, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(59, 130, 246, 0.12);
    --border-hover: rgba(59, 130, 246, 0.4);
    --shadow: 0 2px 12px rgba(59, 130, 246, 0.08);
    --shadow-lg: 0 12px 40px rgba(59, 130, 246, 0.15);
    --shadow-card: 0 2px 8px rgba(59, 130, 246, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 灰黑色系主题 --- */
body[data-theme="dark"] {
    --bg-main: #18181B;
    --bg-sidebar: linear-gradient(180deg, #27272A 0%, #3F3F46 100%);
    --bg-card: #27272A;
    --bg-card-hover: #3F3F46;
    --bg-input: #18181B;
    --bg-overlay: rgba(24, 24, 27, 0.9);
    --bg-modal: #27272A;
    --bg-tag: rgba(161, 161, 170, 0.12);
    --bg-today: #A1A1AA;
    --bg-weekend: #202023;
    --bg-cycle: linear-gradient(135deg, #71717A, #A1A1AA);
    --bg-cycle-light: rgba(161, 161, 170, 0.12);

    --text-primary: #F4F4F5;
    --text-secondary: #A1A1AA;
    --text-light: #71717A;
    --text-on-primary: #18181B;
    --text-on-cycle: #FFFFFF;

    --accent: #A1A1AA;
    --accent-hover: #D4D4D8;
    --accent-light: rgba(161, 161, 170, 0.15);
    --accent-border: rgba(161, 161, 170, 0.4);
    --accent-glow: 0 0 0 rgba(161, 161, 170, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.25);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.2);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 绿色系主题 --- */
body[data-theme="green"] {
    --bg-main: #F0FDF4;
    --bg-sidebar: linear-gradient(160deg, #DCFCE7 0%, #BBF7D0 50%, #D9F99D 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #F0FDF4;
    --bg-input: #F1F5F9;
    --bg-overlay: rgba(255, 255, 255, 0.92);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(34, 197, 94, 0.1);
    --bg-today: #22C55E;
    --bg-weekend: #DCFCE7;
    --bg-cycle: linear-gradient(135deg, #22C55E, #84CC16);
    --bg-cycle-light: rgba(34, 197, 94, 0.12);

    --text-primary: #14532D;
    --text-secondary: #15803D;
    --text-light: #86EFAC;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #22C55E;
    --accent-hover: #16A34A;
    --accent-light: rgba(34, 197, 94, 0.12);
    --accent-border: rgba(34, 197, 94, 0.35);
    --accent-glow: 0 0 0 rgba(34, 197, 94, 0);

    --danger: #EF4444;
    --danger-hover: #DC2626;
    --success: #10B981;
    --warning: #F59E0B;

    --border: rgba(34, 197, 94, 0.12);
    --border-hover: rgba(34, 197, 94, 0.4);
    --shadow: 0 2px 12px rgba(34, 197, 94, 0.08);
    --shadow-lg: 0 12px 40px rgba(34, 197, 94, 0.15);
    --shadow-card: 0 2px 8px rgba(34, 197, 94, 0.06);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* --- 明黄橘色主题 --- */
body[data-theme="sun"] {
    --bg-main: #FFFBF0;
    --bg-sidebar: linear-gradient(160deg, #FFE082 0%, #FFB74D 50%, #FB8C00 100%);
    --bg-card: #FFFFFF;
    --bg-card-hover: #FFF8E1;
    --bg-input: #FFF8E1;
    --bg-overlay: rgba(255, 196, 0, 0.6);
    --bg-modal: #FFFFFF;
    --bg-tag: rgba(251, 140, 0, 0.12);
    --bg-today: #FB8C00;
    --bg-weekend: #FFF3E0;
    --bg-cycle: linear-gradient(135deg, #FFB300, #FB8C00);
    --bg-cycle-light: rgba(251, 140, 0, 0.14);

    --text-primary: #5D4037;
    --text-secondary: #8D6E63;
    --text-light: #BCAAA4;
    --text-on-primary: #FFFFFF;
    --text-on-cycle: #FFFFFF;

    --accent: #FB8C00;
    --accent-hover: #F57C00;
    --accent-light: rgba(251, 140, 0, 0.14);
    --accent-border: rgba(251, 140, 0, 0.4);
    --accent-glow: 0 0 0 rgba(251, 140, 0, 0);

    --danger: #E53935;
    --danger-hover: #C62828;
    --success: #43A047;
    --warning: #FBC02D;

    --border: rgba(251, 140, 0, 0.18);
    --border-hover: rgba(251, 140, 0, 0.4);
    --shadow: 0 2px 12px rgba(251, 140, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(251, 140, 0, 0.18);
    --shadow-card: 0 2px 8px rgba(251, 140, 0, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-full: 999px;

    --sidebar-width: 220px;
    --font-style: normal;
}

/* 自定义主题背景图片 */
body[data-theme="custom"]::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: var(--bg-custom-image);
    background-size: cover;
    background-position: center;
    z-index: -2;
}
body[data-theme="custom"]::after {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, var(--bg-overlay-opacity));
    z-index: -1;
}

/* ===== 侧边栏 ===== */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 24px;
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-primary);
}

body[data-theme="color"] .sidebar-logo { color: var(--accent); text-shadow: var(--accent-glow); }
body[data-theme="custom"] .sidebar-logo,
body[data-theme="dark"] .sidebar-logo { color: #E0E0FF; }

.logo-icon { font-size: 1.6rem; }

.logo-svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

body[data-theme="custom"] .nav-item,
body[data-theme="dark"] .nav-item { color: rgba(255, 255, 255, 0.7); }

.nav-item:hover {
    background: var(--accent-light);
    color: var(--accent);
}

.nav-item.active {
    background: var(--accent);
    color: var(--text-on-primary);
    box-shadow: var(--shadow);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}
.nav-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.sidebar-footer {
    padding: 16px 12px;
}

.cycle-status {
    display: none;
    background: var(--bg-cycle-light);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    border: 1px solid var(--accent-border);
}

.cycle-status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

body[data-theme="custom"] .cycle-status-label,
body[data-theme="dark"] .cycle-status-label { color: rgba(255,255,255,0.6); }

.cycle-status-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.6;
}

body[data-theme="custom"] .cycle-status-text,
body[data-theme="dark"] .cycle-status-text { color: rgba(255,255,255,0.9); }

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 32px;
    background: var(--bg-main);
}

body[data-theme="custom"] .main-content { background: transparent; }

/* ===== 视图切换 ===== */
.view { display: none; }
.view.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 视图头部 ===== */
.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.view-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.view-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.view-switcher {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-full);
    padding: 3px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.view-btn {
    padding: 6px 18px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover { color: var(--text-primary); }

.view-btn.active {
    background: var(--accent);
    color: var(--text-on-primary);
    box-shadow: var(--shadow);
}

body[data-theme="color"] .view-btn.active { box-shadow: var(--accent-glow); }

/* ===== 按钮 ===== */
.btn-primary, .btn-secondary, .btn-danger {
    padding: 8px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

body[data-theme="color"] .btn-primary:hover { box-shadow: var(--accent-glow); }

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

.btn-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
}

.btn-danger {
    background: var(--danger);
    color: #FFFFFF;
}

.btn-danger:hover { background: var(--danger-hover); }

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

/* ===== 日历通用 ===== */
.calendar-wrapper {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

body[data-theme="custom"] .calendar-wrapper { background: var(--bg-card); }

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cal-nav-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.cal-nav-btn svg { width: 16px; height: 16px; }

.cal-nav-btn:hover {
    background: var(--accent-light);
    border-color: var(--accent-border);
    color: var(--accent);
}

.cal-current-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
}

.cal-today-btn {
    margin-left: auto;
    padding: 5px 16px;
    border: 1px solid var(--border);
    background: var(--accent-light);
    color: var(--accent);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.cal-today-btn:hover {
    background: var(--accent);
    color: var(--text-on-primary);
}

.cal-view { display: none; }
.cal-view.active { display: block; }

/* ===== 日视图 ===== */
.day-view-timeline {
    max-height: 70vh;
    overflow-y: auto;
}

.day-timeline-hour {
    position: relative;
    display: flex;
    gap: 12px;
    min-height: 60px;
    border-top: 1px solid var(--border);
    padding: 4px 40px 4px 0;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    transition: background 0.15s ease;
}

.day-timeline-hour:hover {
    background: var(--accent-light);
}

/* 长按/点击新建该时段日程的提示 */
.day-add-hint {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    font-size: 1.1rem;
    color: var(--accent);
    background: var(--bg-card);
    border: 1.5px dashed var(--accent);
    opacity: 0;
    transition: opacity 0.15s ease;
    cursor: pointer;
    z-index: 2;
}

.day-timeline-hour:hover .day-add-hint {
    opacity: 0.9;
}

.day-timeline-hour-label {
    width: 56px;
    text-align: right;
    font-size: 0.75rem;
    color: var(--text-light);
    padding-top: 2px;
    flex-shrink: 0;
    pointer-events: none;
}

.day-timeline-events {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.day-event {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    min-height: 32px;
}

.day-event:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.day-event-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.day-event-time, .day-event-cat, .day-event-importance { display: none; }

/* 日程详情面板 */
.schedule-detail-panel {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    position: relative;
    animation: fadeIn 0.2s ease;
}

.schedule-detail-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: var(--bg-input);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.schedule-detail-close:hover { background: var(--accent-light); color: var(--accent); }
.schedule-detail-close svg { width: 16px; height: 16px; }

.schedule-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding-right: 32px;
}

.schedule-detail-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.schedule-detail-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.schedule-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.schedule-detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-input);
    padding: 3px 10px;
    border-radius: var(--radius-full);
}

.schedule-detail-notes {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.schedule-detail-img {
    max-width: 200px;
    max-height: 160px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border);
    cursor: zoom-in;
}

@media (max-width: 768px) {
    .schedule-detail-panel { padding: 14px; }
    .schedule-detail-img { max-width: 100%; }
}

/* ===== 周视图 ===== */
.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.week-day-col {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.week-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.week-day-header {
    text-align: center;
    padding: 8px 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
    margin-bottom: 4px;
}

.week-day-header .date-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

.week-day-header.is-today .date-num {
    color: var(--accent);
}

.week-day-header.is-weekend { color: var(--text-light); }

.week-day-header.is-cycle {
    background: var(--bg-cycle-light);
    border-radius: var(--radius-sm);
    border-bottom-color: var(--accent-border);
}

.week-event {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 26px;
    display: flex;
    align-items: center;
}

.week-event:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--shadow);
}

.week-event-title {
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.week-event-time { display: none; }

/* ===== 月视图 ===== */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.month-day-header {
    text-align: center;
    padding: 8px 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
}

.month-day-header.is-weekend { color: var(--text-light); }

.month-cell {
    min-height: 90px;
    padding: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.month-cell:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.month-cell.other-month { opacity: 0.35; }

.month-cell.is-today {
    background: var(--accent-light);
    border-color: var(--accent);
}

.month-cell.is-cycle {
    background: var(--bg-cycle-light);
    border-color: var(--accent-border);
}

.month-cell.is-cycle::before {
    content: "🌙";
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.month-cell { position: relative; }

.month-date {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    padding: 2px 4px 0;
}

.month-cell.is-today .month-date {
    width: 22px;
    height: 22px;
    line-height: 22px;
    background: var(--bg-today);
    color: var(--text-on-primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.month-event {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}

.month-event:hover { background: var(--accent); color: var(--text-on-primary); }

.month-event.has-image::after {
    content: " 📷";
}

.month-more {
    font-size: 0.65rem;
    color: var(--text-light);
    text-align: center;
    cursor: pointer;
}

/* ===== 日程分类标签 ===== */
.schedule-cat-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: var(--radius-full);
}

/* ===== 长期目标 ===== */
.goals-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.goal-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.goal-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.goal-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.goal-card-icon {
    font-size: 1.8rem;
    line-height: 1;
}

.goal-card-info { flex: 1; }

.goal-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.goal-card-cat {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.goal-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.goal-card-progress {
    margin: 12px 0 8px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.goal-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-light);
}

.goal-card-entries-count {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 目标详情 */
.goal-detail-progress {
    margin: 16px 0;
}

.goal-detail-progress .progress-bar { height: 16px; }
.goal-detail-progress .progress-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: center;
}

.goal-entries-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 12px;
}

.goal-entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.goal-entry-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.goal-entry-date {
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.goal-entry-date .day {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent);
}

.goal-entry-date .month {
    font-size: 0.7rem;
    color: var(--text-light);
}

.goal-entry-body { flex: 1; }

.goal-entry-progress {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 4px;
}

.goal-entry-note {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.goal-entry-img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: 8px;
    cursor: zoom-in;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 2px solid var(--bg-card);
}

.goal-entry-img:hover {
    transform: scale(1.04);
    box-shadow: var(--shadow);
}

/* 图片放大灯箱 */
#lightboxModal {
    background: rgba(0, 0, 0, 0.82);
    cursor: zoom-out;
}

.lightbox-inner {
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-inner img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ===== 月经周期 ===== */
.menstrual-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cycle-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.cycle-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cycle-stat-card.is-cycle {
    background: var(--bg-cycle);
    color: var(--text-on-cycle);
}

.cycle-stat-card.is-cycle::before {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.cycle-stat-icon { font-size: 1.6rem; margin-bottom: 10px; position: relative; line-height: 1; }

.cycle-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
}

.cycle-stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 6px;
    position: relative;
}

.cycle-stat-value { color: var(--text-primary); }
.cycle-stat-label { color: var(--text-secondary); }

.cycle-stat-card.is-cycle .cycle-stat-value,
.cycle-stat-card.is-cycle .cycle-stat-label { color: var(--text-on-cycle); opacity: 0.95; }

.cycle-stat-card.editable {
    cursor: pointer;
    transition: all 0.2s ease;
}
.cycle-stat-card.editable:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-border);
}

.cycle-care-card {
    background: var(--bg-cycle);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    color: var(--text-on-cycle);
    position: relative;
    overflow: hidden;
}

.cycle-care-card::before {
    content: "🌙";
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.1;
}

.cycle-care-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
}

.cycle-care-body {
    font-size: 1.05rem;
    line-height: 1.9;
    position: relative;
}

.cycle-care-tip {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.35);
    font-size: 0.92rem;
    line-height: 1.7;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.cycle-care-tip .tip-label {
    flex-shrink: 0;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.22);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
}

.cycle-care-tip .tip-text {
    opacity: 0.95;
}

.cycle-care-phase {
    display: inline-block;
    font-size: 0.85rem;
    padding: 4px 14px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    margin-bottom: 10px;
    position: relative;
}

.cycle-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cycle-history-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cycle-record-card {
    display: flex;
    gap: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cycle-record-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--border-hover);
}

.cycle-record-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    background: var(--bg-cycle-light);
    border-radius: var(--radius-md);
    padding: 8px 4px;
}

.cycle-record-date .day {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.cycle-record-date .month {
    font-size: 0.7rem;
    color: var(--text-light);
}

.cycle-record-body { flex: 1; }

.cycle-record-dates {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cycle-record-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.cycle-record-detail {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-tag);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.cycle-record-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.5;
}

.cycle-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== 分类管理 ===== */
.categories-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.category-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.category-card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    line-height: 1;
}

.category-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.category-card-color {
    display: inline-block;
    width: 24px;
    height: 6px;
    border-radius: var(--radius-full);
}

.category-card-count {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 8px;
}

/* ===== 设置 ===== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    max-width: 700px;
}

.settings-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.settings-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

/* ===== 主题色圆点 ===== */
.theme-dots {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 20px;
}

.theme-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    padding: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background-clip: padding-box;
}

.theme-dot::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
    pointer-events: none;
}

.theme-dot:hover { transform: scale(1.12); }

.theme-dot.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--accent-light), 0 2px 8px rgba(0,0,0,0.2);
    transform: scale(1.12);
}

/* 自定义选项：彩虹色填充，置最后 */
.theme-dot-custom {
    background: conic-gradient(#FF6B9D, #FFB74D, #FFE082, #81C784, #4DD0E1, #64B5F6, #9575CD, #BA68C8, #FF6B9D) !important;
}

.custom-bg-upload {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.upload-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.custom-bg-preview {
    margin-top: 12px;
    width: 100%;
    max-height: 120px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-md);
    min-height: 60px;
    border: 1px solid var(--border);
}

.custom-bg-controls { margin-top: 12px; }
.custom-bg-controls label { font-size: 0.85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.custom-bg-controls input[type="range"] { flex: 1; max-width: 200px; }

.data-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.about-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6; }

/* ===== 同步状态 ===== */
.sync-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}
.sync-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--text-light);
    flex-shrink: 0;
}
.sync-dot.online { background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,0.18); }
.sync-dot.warn { background: #FB8C00; box-shadow: 0 0 0 4px rgba(251,140,0,0.18); }
.sync-dot.offline { background: #9CA3AF; }
.sync-status-text { font-size: 0.85rem; color: var(--text-secondary); }

/* ===== 弹窗 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-overlay);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--bg-modal);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.modal-lg { max-width: 700px; }
.modal-sm { max-width: 380px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-modal);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 1;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close svg { width: 18px; height: 18px; }

.modal-close:hover { background: var(--bg-card-hover); color: var(--danger); }

.modal-body { padding: 20px 24px; }

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--bg-modal);
}

/* ===== 表单 ===== */
.form-group { margin-bottom: 16px; }

.form-group > label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group { flex: 1; }

input[type="text"], input[type="date"], input[type="time"], textarea, select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

textarea { resize: vertical; }

/* 重要程度选择 */
.importance-picker { display: flex; gap: 4px; }

.star {
    font-size: 1.4rem;
    color: var(--border);
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.star:hover { transform: scale(1.2); }

.star.active { color: var(--warning); }

/* 表情选择 */
.emoji-picker {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.emoji-picker span {
    font-size: 1.6rem;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    opacity: 0.5;
}

.emoji-picker span:hover { opacity: 1; transform: scale(1.1); }
.emoji-picker span.active { opacity: 1; background: var(--accent-light); }

/* 图标选择 */
.icon-picker {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.icon-picker span {
    font-size: 1.6rem;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    opacity: 0.5;
}

.icon-picker span:hover { opacity: 1; transform: scale(1.1); }
.icon-picker span.active { opacity: 1; background: var(--accent-light); border: 1px solid var(--accent); }

/* 颜色选择 */
.color-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.color-picker span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid transparent;
}

.color-picker span:hover { transform: scale(1.15); }
.color-picker span.active { border-color: var(--text-primary); transform: scale(1.15); }

/* 单选/复选组 */
.radio-group, .checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.radio-group label, .checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 4px 12px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
}

.radio-group input, .checkbox-group input { width: auto; }

/* 图片上传区域 */
.image-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.image-upload-area img {
    max-width: 120px;
    max-height: 120px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 1px solid var(--border);
}

/* 进度滑块 */
.progress-slider {
    -webkit-appearance: none;
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    outline: none;
}

.progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.progress-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    color: #fff;
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--accent); }

/* ===== 月经周期日历视觉效果 ===== */
.month-cell.is-cycle,
.week-day-header.is-cycle {
    animation: cycleGlow 3s ease-in-out infinite;
}

@keyframes cycleGlow {
    0%, 100% { box-shadow: 0 0 0 var(--accent-glow); }
    50% { box-shadow: 0 0 8px var(--accent-border); }
}

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
        min-width: 60px;
    }
    .sidebar-logo .logo-text,
    .nav-label,
    .cycle-status { display: none; }
    .nav-item { justify-content: center; }
    .main-content { padding: 16px; }
    .month-cell { min-height: 60px; }
    .month-event { font-size: 0.65rem; }
    .form-row { flex-direction: column; }
    .goals-container { grid-template-columns: 1fr; }
    .view-header { flex-direction: column; align-items: flex-start; }
}

/* ===== 自定义日期选择器 ===== */
.date-display-input {
    cursor: pointer;
    background: var(--bg-input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 16px;
    padding-right: 34px;
}

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

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

.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.dp-day:hover { background: var(--accent-light); }
.dp-day.other-month { color: var(--text-light); opacity: 0.6; }
.dp-day.is-today { border: 1px solid var(--accent); }
.dp-day.selected {
    background: var(--accent);
    color: var(--text-on-primary);
    box-shadow: var(--shadow);
}

/* ===== 确认弹窗 ===== */
.confirm-text {
    font-size: 0.95rem;
    color: var(--text-primary);
    text-align: center;
    padding: 16px 0;
}

/* ============================================
   新增样式
   ============================================ */

/* ===== 按钮内 SVG 图标 ===== */
.btn-icon {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
}

.btn-primary, .btn-secondary, .btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== 登录/注册遮罩 ===== */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-sidebar);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body[data-theme="cute"] .auth-overlay {
    background: linear-gradient(135deg, #FFD6E5 0%, #FFB5C5 50%, #E8C5E0 100%);
}
body[data-theme="color"] .auth-overlay {
    background: linear-gradient(135deg, #E0F7FA 0%, #F3E5F5 50%, #FFECB3 100%);
}
body[data-theme="custom"] .auth-overlay {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0F3460 100%);
}
body[data-theme="dark"] .auth-overlay {
    background: linear-gradient(135deg, #18181B 0%, #27272A 50%, #3F3F46 100%);
}

.auth-card {
    background: var(--bg-modal);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

body[data-theme="color"] .auth-card { box-shadow: 0 12px 40px rgba(236, 72, 153, 0.18); }

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px 24px 12px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

body[data-theme="cute"] .auth-logo { color: #FF6B9D; }

.auth-logo svg { width: 44px; height: 44px; }

.auth-body { padding: 12px 32px 32px; }

.auth-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 6px;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-field-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-light);
    pointer-events: none;
}

.auth-field input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.auth-submit-btn {
    margin-top: 8px;
    padding: 12px;
    background: var(--accent);
    color: var(--text-on-primary);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    min-height: 48px;
}

.auth-submit-btn:hover,
.auth-submit-btn:active {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.auth-submit-btn:active { transform: scale(0.98); }

body[data-theme="color"] .auth-submit-btn:hover { box-shadow: var(--accent-glow); }

.auth-toggle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
}

.auth-toggle a:hover { text-decoration: underline; }

.auth-quote {
    margin-top: 20px;
    padding: 16px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-style: normal;
    line-height: 1.7;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    letter-spacing: 0.02em;
}

/* ===== 设置页主题切换器 ===== */
.theme-switcher-inline {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-input);
    padding: 4px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

.theme-switcher-inline .theme-switch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.theme-switcher-inline .theme-switch-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.theme-switcher-inline .theme-switch-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}

.theme-switcher-inline .theme-switch-btn.active {
    background: var(--accent);
    color: var(--text-on-primary);
    box-shadow: var(--shadow);
}

/* ===== 侧边栏每日短句 ===== */
.daily-quote {
    display: none;
    padding: 14px 16px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-style: normal;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

body[data-theme="custom"] .daily-quote,
body[data-theme="dark"] .daily-quote { color: rgba(255,255,255,0.8); }

/* ===== 视图标题下短句 ===== */
.view-quote {
    font-size: 0.88rem;
    color: var(--text-light);
    font-style: normal;
    margin-top: 6px;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* 中外文寄语：外文一行、中文翻译另起一行 */
.quote-trans {
    display: block;
    font-size: 0.78rem;
    font-style: normal;
    opacity: 0.72;
    margin-top: 4px;
    line-height: 1.5;
}

/* ===== 侧边栏用户信息 ===== */
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    margin-top: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--text-on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

body[data-theme="custom"] .user-avatar,
body[data-theme="dark"] .user-avatar { box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

.user-details { flex: 1; min-width: 0; }

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-theme="custom"] .user-name,
body[data-theme="dark"] .user-name { color: rgba(255,255,255,0.9); }

.user-logout {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.user-logout:hover { color: var(--danger); }

body[data-theme="custom"] .user-logout,
body[data-theme="dark"] .user-logout { color: rgba(255,255,255,0.5); }
body[data-theme="custom"] .user-logout:hover,
body[data-theme="dark"] .user-logout:hover { color: rgba(255,255,255,0.8); }

/* ===== 设置页分类管理 ===== */
.settings-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.settings-section .categories-container {
    margin-bottom: 0;
}

/* ===== 关于区域 ===== */
.about-slogan {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--accent-light);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    font-size: 0.88rem;
    color: var(--text-primary);
    font-style: normal;
    line-height: 1.7;
    letter-spacing: 0.02em;
}

/* ===== 空状态引用 ===== */
.empty-quote {
    text-align: center;
    padding: 12px 24px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: normal;
    line-height: 1.8;
    max-width: 400px;
    margin: 0 auto;
    letter-spacing: 0.02em;
}

/* ===== 空状态容器 ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--border-hover);
}

.empty-state-icon svg { width: 64px; height: 64px; }

.empty-state-text {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* ===== 侧边栏响应式补充 ===== */
@media (max-width: 768px) {
    .theme-dots { gap: 10px; }
    .theme-dot { width: 28px; height: 28px; }
    .daily-quote { display: none; }
    .user-info { padding: 8px 12px; }
    .auth-card { max-width: 360px; margin: 0 auto; }
    .auth-body { padding: 12px 20px 24px; }
    .auth-title { font-size: 1.1rem; }
    .auth-submit-btn { min-height: 50px; font-size: 1.05rem; }
    .cycle-stat-icon { font-size: 1.4rem; }
    .cycle-stat-value { font-size: 1.5rem; }
    .category-card-icon { font-size: 1.5rem; }
    .category-card { padding: 16px; }
}
