/* ========================================
   团队日程管理系统 - 自定义样式
   ======================================== */

/* ===== 全局样式 ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ===== 动画效果 ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.3s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

/* ===== 日历网格样式 ===== */
.calendar-month-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid #e5e7eb;
}

.dark .calendar-header {
    border-bottom-color: #374151;
}

.calendar-header-cell {
    padding: 12px 8px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.dark .calendar-header-cell {
    color: #9ca3af;
}

.calendar-header-cell.weekend {
    color: #ef4444;
}

.dark .calendar-header-cell.weekend {
    color: #f87171;
}

.calendar-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    flex: 1;
    min-height: 500px;
}

.calendar-day-cell {
    position: relative;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    min-height: 100px;
    padding: 4px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    overflow: hidden;
}

.dark .calendar-day-cell {
    border-right-color: #374151;
    border-bottom-color: #374151;
}

.calendar-day-cell:hover {
    background-color: #f9fafb;
}

.dark .calendar-day-cell:hover {
    background-color: #1f2937;
}

.calendar-day-cell:nth-child(7n) {
    border-right: none;
}

.calendar-day-cell.other-month {
    background-color: #f9fafb;
}

.dark .calendar-day-cell.other-month {
    background-color: #111827;
}

.calendar-day-cell.today {
    background-color: #eff6ff;
}

.dark .calendar-day-cell.today {
    background-color: rgba(59, 130, 246, 0.1);
}

.calendar-day-cell.selected {
    background-color: #dbeafe;
}

.dark .calendar-day-cell.selected {
    background-color: rgba(59, 130, 246, 0.2);
}

.day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
    line-height: 1;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 50%;
}

.today .day-number {
    background-color: #3b82f6;
    color: white;
}

.calendar-day-cell.other-month .day-number {
    color: #d1d5db;
}

.dark .calendar-day-cell.other-month .day-number {
    color: #4b5563;
}

.lunar-date {
    font-size: 0.6875rem;
    color: #9ca3af;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 50%;
    text-align: right;
}

.dark .lunar-date {
    color: #6b7280;
}

.lunar-festival {
    color: #ef4444;
    font-weight: 500;
}

.dark .lunar-festival {
    color: #f87171;
}

.lunar-term {
    color: #10b981;
    font-weight: 500;
}

.dark .lunar-term {
    color: #34d399;
}

.calendar-day-cell.other-month .lunar-date {
    color: #e5e7eb;
}

.dark .calendar-day-cell.other-month .lunar-date {
    color: #4b5563;
}

/* 日历事件卡片 */
.calendar-event {
    position: relative;
    padding: 2px 6px;
    margin: 1px 0;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    overflow: hidden;
    white-space: normal;
    line-height: 1.3;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 1;
}

.calendar-event:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.calendar-event.dragging {
    opacity: 0.8;
    cursor: grabbing;
    z-index: 100;
}

.calendar-event.color-blue { background-color: #3b82f6; }
.calendar-event.color-green { background-color: #22c55e; }
.calendar-event.color-purple { background-color: #a855f7; }
.calendar-event.color-orange { background-color: #f97316; }
.calendar-event.color-pink { background-color: #ec4899; }
.calendar-event.color-red { background-color: #ef4444; }

.calendar-event-time {
    font-weight: 600;
    margin-right: 4px;
    opacity: 0.9;
}

.calendar-event-first-line {
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-event-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.calendar-event-second-line {
    font-size: 0.65rem;
    opacity: 0.85;
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.calendar-event-sub {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 50%;
}

.calendar-event-sub i {
    font-size: 0.6rem;
    flex-shrink: 0;
}

.calendar-event-sep {
    opacity: 0.7;
    flex-shrink: 0;
}

/* 更多事件提示 */
.more-events {
    padding: 2px 6px;
    font-size: 0.75rem;
    color: #6b7280;
    cursor: pointer;
    font-weight: 500;
}

.dark .more-events {
    color: #9ca3af;
}

.more-events:hover {
    text-decoration: underline;
}

/* 隐藏的日程事件 */
.hidden-calendar-event {
    display: none;
}

/* ===== 周视图 / 日视图 ===== */
.calendar-time-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.time-view-header {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.dark .time-view-header {
    border-bottom-color: #374151;
}

.time-view-day-header {
    padding: 12px 4px;
    text-align: center;
    border-left: 1px solid #e5e7eb;
}

.dark .time-view-day-header {
    border-left-color: #374151;
}

.time-view-day-header .day-name {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
}

.dark .time-view-day-header .day-name {
    color: #9ca3af;
}

.time-view-day-header .day-date {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 4px;
}

.time-view-day-header.today .day-date {
    width: 36px;
    height: 36px;
    line-height: 36px;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    margin: 4px auto 0;
    font-size: 1.25rem;
}

.time-view-body {
    display: flex;
    flex: 1;
    overflow-y: auto;
}

.time-view-time-column {
    width: 60px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
}

.dark .time-view-time-column {
    border-right-color: #374151;
}

.time-slot {
    height: 48px;
    padding: 0 8px 0 0;
    text-align: right;
    font-size: 0.75rem;
    color: #9ca3af;
    position: relative;
    top: -6px;
}

.time-view-grid {
    flex: 1;
    display: grid;
    position: relative;
}

.time-view-day {
    position: relative;
    border-left: 1px solid #e5e7eb;
}

.dark .time-view-day {
    border-left-color: #374151;
}

.time-view-day:first-child {
    border-left: none;
}

.hour-line {
    height: 48px;
    border-bottom: 1px solid #f3f4f6;
}

.dark .hour-line {
    border-bottom-color: #1f2937;
}

/* 时间视图中的事件 */
.time-view-event {
    position: absolute;
    left: 4px;
    right: 4px;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: white;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: box-shadow 0.15s ease;
}

.time-view-event:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.time-view-event.color-blue { background-color: #3b82f6; border-left: 3px solid #1d4ed8; }
.time-view-event.color-green { background-color: #22c55e; border-left: 3px solid #15803d; }
.time-view-event.color-purple { background-color: #a855f7; border-left: 3px solid #7e22ce; }
.time-view-event.color-orange { background-color: #f97316; border-left: 3px solid #c2410c; }
.time-view-event.color-pink { background-color: #ec4899; border-left: 3px solid #be185d; }
.time-view-event.color-red { background-color: #ef4444; border-left: 3px solid #b91c1c; }

.time-view-event .event-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.time-view-event .event-time {
    opacity: 0.9;
    font-size: 0.7rem;
}

.time-view-event .event-sub-info {
    opacity: 0.85;
    font-size: 0.65rem;
    margin-top: 1px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 当前时间线 */
.current-time-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #ef4444;
    z-index: 5;
    pointer-events: none;
}

.current-time-line::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    background-color: #ef4444;
    border-radius: 50%;
}

/* ===== 列表视图 ===== */
.list-view {
    padding: 16px;
}

.list-view-date-group {
    margin-bottom: 24px;
}

.list-view-date-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.dark .list-view-date-header {
    border-bottom-color: #374151;
}

.list-view-date-header .date-day {
    font-size: 1.5rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.list-view-date-header .date-info {
    flex: 1;
}

.list-view-date-header .date-weekday {
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
}

.dark .list-view-date-header .date-weekday {
    color: #9ca3af;
}

.list-view-date-header .date-full {
    font-size: 0.75rem;
    color: #9ca3af;
}

.dark .list-view-date-header .date-full {
    color: #6b7280;
}

.list-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    margin-bottom: 4px;
}

.list-event-item:hover {
    background-color: #f9fafb;
}

.dark .list-event-item:hover {
    background-color: #1f2937;
}

.list-event-color {
    width: 4px;
    height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.list-event-time {
    width: 100px;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .list-event-time {
    color: #9ca3af;
}

.list-event-title {
    flex: 1;
    font-weight: 500;
}

.list-event-location {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 2px;
}

/* ===== 迷你日历 ===== */
.mini-calendar {
    font-size: 0.75rem;
}

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

.mini-calendar-header button {
    padding: 4px 8px;
    border-radius: 6px;
    color: #6b7280;
    transition: background-color 0.15s;
}

.dark .mini-calendar-header button {
    color: #9ca3af;
}

.mini-calendar-header button:hover {
    background-color: #e5e7eb;
}

.dark .mini-calendar-header button:hover {
    background-color: #374151;
}

.mini-calendar-month {
    font-weight: 600;
    color: #374151;
}

.dark .mini-calendar-month {
    color: #e5e7eb;
}

.mini-calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 4px;
}

.mini-calendar-weekday {
    color: #9ca3af;
    font-size: 0.7rem;
    padding: 4px 0;
}

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

.mini-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    color: #374151;
    transition: all 0.15s;
    line-height: 1.1;
    gap: 1px;
}

.mini-day-num {
    font-size: 0.75rem;
    font-weight: 500;
}

.mini-lunar {
    font-size: 0.55rem;
    color: #9ca3af;
    transform: scale(0.85);
    transform-origin: center;
    white-space: nowrap;
}

.dark .mini-lunar {
    color: #6b7280;
}

.mini-lunar-festival {
    color: #ef4444;
    font-weight: 500;
}

.dark .mini-lunar-festival {
    color: #f87171;
}

.mini-lunar-term {
    color: #10b981;
    font-weight: 500;
}

.dark .mini-lunar-term {
    color: #34d399;
}

.dark .mini-calendar-day {
    color: #e5e7eb;
}

.mini-calendar-day:hover {
    background-color: #dbeafe;
}

.dark .mini-calendar-day:hover {
    background-color: rgba(59, 130, 246, 0.2);
}

.mini-calendar-day.other-month {
    color: #d1d5db;
}

.dark .mini-calendar-day.other-month {
    color: #4b5563;
}

.mini-calendar-day.today {
    background-color: #3b82f6;
    color: white;
    font-weight: 600;
}

.mini-calendar-day.selected {
    background-color: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.dark .mini-calendar-day.selected {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.mini-calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background-color: #3b82f6;
    border-radius: 50%;
}

.mini-calendar-day {
    position: relative;
}

/* ===== 分类列表 ===== */
.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.15s;
}

.category-item:hover {
    background-color: #f3f4f6;
}

.dark .category-item:hover {
    background-color: #374151;
}

.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
}

.dark .category-name {
    color: #e5e7eb;
}

.category-count {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* 日历项删除按钮 */
.calendar-item:hover .calendar-delete-btn {
    opacity: 1 !important;
}

/* 共享日历分组标题 */
.shared-calendar-section-title {
    margin-top: 12px;
}

/* ===== 待办事项 ===== */
.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background-color: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dark .todo-item {
    background-color: #1f2937;
}

.todo-item:hover {
    background-color: #f3f4f6;
}

.dark .todo-item:hover {
    background-color: #374151;
}

.todo-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.dark .todo-checkbox {
    border-color: #4b5563;
}

.todo-checkbox:hover {
    border-color: #3b82f6;
}

.todo-item.completed .todo-checkbox {
    background-color: #22c55e;
    border-color: #22c55e;
}

.todo-checkbox i {
    color: white;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.todo-item.completed .todo-checkbox i {
    opacity: 1;
}

.todo-text {
    flex: 1;
    font-size: 0.875rem;
    color: #374151;
    transition: all 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dark .todo-text {
    color: #e5e7eb;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #9ca3af;
}

.todo-delete {
    opacity: 0;
    padding: 4px;
    color: #9ca3af;
    border-radius: 6px;
    transition: all 0.2s;
}

.todo-item:hover .todo-delete {
    opacity: 1;
}

.todo-delete:hover {
    color: #ef4444;
    background-color: #fee2e2;
}

.dark .todo-delete:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

/* ===== 拖拽样式 ===== */
.draggable {
    cursor: grab;
}

.draggable:active {
    cursor: grabbing;
}

.drop-target {
    background-color: #dbeafe !important;
    border: 2px dashed #3b82f6 !important;
}

.dark .drop-target {
    background-color: rgba(59, 130, 246, 0.2) !important;
}

.drag-ghost {
    opacity: 0.5;
}

/* ===== Toast 通知 ===== */
.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid #3b82f6;
}

.dark .toast {
    background: #1f2937;
    border-left-color: #60a5fa;
}

.toast.success {
    border-left-color: #22c55e;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.toast.info .toast-icon {
    background-color: #eff6ff;
    color: #3b82f6;
}

.dark .toast.info .toast-icon {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.toast.success .toast-icon {
    background-color: #f0fdf4;
    color: #22c55e;
}

.dark .toast.success .toast-icon {
    background-color: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.toast.error .toast-icon {
    background-color: #fef2f2;
    color: #ef4444;
}

.dark .toast.error .toast-icon {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.toast.warning .toast-icon {
    background-color: #fffbeb;
    color: #f59e0b;
}

.dark .toast.warning .toast-icon {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
}

.dark .toast-title {
    color: #f9fafb;
}

.toast-message {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

.dark .toast-message {
    color: #9ca3af;
}

.toast-close {
    padding: 4px;
    color: #9ca3af;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.toast-close:hover {
    color: #4b5563;
    background-color: #f3f4f6;
}

.dark .toast-close:hover {
    color: #d1d5db;
    background-color: #374151;
}

/* ===== 模态框动画 ===== */
.modal-enter {
    animation: scaleIn 0.25s ease-out forwards;
}

.modal-enter-scale {
    animation: scaleIn 0.25s ease-out forwards;
}

/* ===== 优先级指示器 ===== */
.priority-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.priority-high { background-color: #ef4444; }
.priority-medium { background-color: #f59e0b; }
.priority-low { background-color: #22c55e; }

/* ===== 重复事件标记 ===== */
.recurrence-icon {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    color: inherit;
    opacity: 0.8;
}

/* ===== 响应式设计 ===== */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    main {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    .calendar-day-cell {
        min-height: 70px;
        padding: 2px;
    }

    .day-number {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .calendar-event {
        font-size: 0.65rem;
        padding: 1px 4px;
    }

    .time-view-header {
        grid-template-columns: 50px repeat(7, 1fr);
    }

    .time-view-time-column {
        width: 50px;
    }

    .time-slot {
        font-size: 0.65rem;
    }

    .time-view-day-header .day-date {
        font-size: 1.125rem;
    }

    .list-event-time {
        width: 70px;
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    #currentDateLabel {
        font-size: 0.875rem;
        min-width: 120px !important;
    }

    #todayBtn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .calendar-day-cell {
        min-height: 50px;
    }

    .calendar-event {
        font-size: 0.6rem;
    }

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

    #sidebar {
        width: 280px;
    }
}

/* ===== 工具类 ===== */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dark .glass {
    background: rgba(31, 41, 55, 0.8);
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

/* 点击空白创建日程的高亮效果 */
.calendar-day-cell.create-hover {
    background-color: #eff6ff;
}

.dark .calendar-day-cell.create-hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* 视图切换动画 */
.view-transition {
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.view-enter {
    opacity: 0;
    transform: translateY(10px);
}

.view-enter-active {
    opacity: 1;
    transform: translateY(0);
}

/* 加载状态 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: #6b7280;
}

.dark .empty-state-title {
    color: #9ca3af;
}

.empty-state-desc {
    font-size: 0.875rem;
    text-align: center;
}

/* ===== 登录页面样式 ===== */
.auth-page-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.dark .auth-page-bg {
    background: linear-gradient(135deg, #1e3a8a 0%, #581c87 100%);
}

.auth-page-bg::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    top: -200px;
    right: -100px;
}

.auth-page-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -150px;
    left: -100px;
}

/* ===== 状态标签样式 ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-badge.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.status-pending::before {
    background-color: #f59e0b;
}

.dark .status-badge.status-pending {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.status-badge.status-active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.status-active::before {
    background-color: #10b981;
}

.dark .status-badge.status-active {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.status-badge.status-rejected {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.status-rejected::before {
    background-color: #ef4444;
}

.dark .status-badge.status-rejected {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ===== 角色标签样式 ===== */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.role-admin {
    background-color: #ede9fe;
    color: #6d28d9;
}

.dark .role-badge.role-admin {
    background-color: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.role-badge.role-user {
    background-color: #e5e7eb;
    color: #4b5563;
}

.dark .role-badge.role-user {
    background-color: rgba(75, 85, 99, 0.5);
    color: #9ca3af;
}

/* ===== 管理员用户管理表格 ===== */
#adminModal table {
    width: 100%;
    border-collapse: collapse;
}

#adminModal th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 24px;
    text-align: left;
    background-color: #f9fafb;
    color: #6b7280;
}

.dark #adminModal th {
    background-color: rgba(55, 65, 81, 0.5);
    color: #9ca3af;
}

#adminModal td {
    padding: 16px 24px;
    font-size: 0.875rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}

.dark #adminModal td {
    color: #e5e7eb;
    border-bottom-color: #374151;
}

#adminModal tbody tr:hover {
    background-color: #f9fafb;
}

.dark #adminModal tbody tr:hover {
    background-color: rgba(55, 65, 81, 0.3);
}

.admin-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.admin-user-info .admin-user-name {
    font-weight: 500;
    color: #111827;
}

.dark .admin-user-info .admin-user-name {
    color: #f9fafb;
}

.admin-user-info .admin-user-email {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 2px;
}

.dark .admin-user-info .admin-user-email {
    color: #9ca3af;
}

.admin-table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.admin-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
}

.admin-btn-approve {
    background-color: #d1fae5;
    color: #065f46;
}

.admin-btn-approve:hover {
    background-color: #a7f3d0;
}

.dark .admin-btn-approve {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.dark .admin-btn-approve:hover {
    background-color: rgba(16, 185, 129, 0.3);
}

.admin-btn-reject {
    background-color: #fee2e2;
    color: #991b1b;
}

.admin-btn-reject:hover {
    background-color: #fecaca;
}

.dark .admin-btn-reject {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.dark .admin-btn-reject:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

/* 状态筛选按钮 */
.admin-status-filter {
    transition: all 0.15s ease;
}

.admin-status-filter.active {
    background-color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.dark .admin-status-filter.active {
    background-color: #4b5563;
}

/* ===== 待审核/拒绝页面样式 ===== */
#pendingPage,
#rejectedPage {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.dark #pendingPage,
.dark #rejectedPage {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

/* ===== 响应式调整 ===== */
@media (max-width: 768px) {
    #adminModal .admin-table-actions {
        flex-direction: column;
    }

    #adminModal th,
    #adminModal td {
        padding: 12px 16px;
    }

    #adminModal .admin-user-cell {
        gap: 8px;
    }
}
