/* 默认黑夜模式（科技深色） */
:root {
    --bg-main:#060816;
    --bg-secondary:#0B1020;
    --bg-card:rgba(15,18,32,.72);
    --bg-card-hover:rgba(20,24,42,.82);
    --line-soft:rgba(255,255,255,.06);
    --line-strong:rgba(255,255,255,.12);
    --primary:#6EA8FE;
    --primary-deep:#4F7CFF;
    --cyan:#67E8F9;
    --purple:#A78BFA;
    --danger:#FF7849;
    --danger-soft:rgba(255,120,73,.12);
    --success:#22C55E;
    --text-1:#F8FAFC;
    --text-2:#CBD5E1;
    --text-3:#64748B;
    --shadow-card:0 10px 30px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.04);
    --shadow-hover:0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03);
    --blur-xl:24px;
    --radius-xl:32px;
    --radius-lg:24px;
    --radius-md:18px;
    --radius-sm:14px;
    --ease:cubic-bezier(.22,1,.36,1);
}

/* 白天模式 - 清新自然风格 */
body.theme-light {
    --bg-main: #F6F9F2;
    --bg-secondary: #EBF0E6;
    --bg-card: rgba(255, 255, 245, 0.88);
    --bg-card-hover: rgba(255, 255, 250, 0.96);
    --line-soft: rgba(100, 80, 60, 0.12);
    --line-strong: rgba(100, 80, 60, 0.2);
    --primary: #CF8B5E;
    --primary-deep: #B56D42;
    --cyan: #AAC9A0;
    --purple: #CF8B5E;
    --danger: #E07A5F;
    --danger-soft: rgba(224, 122, 95, 0.1);
    --success: #7A9E7E;
    --text-1: #3C3A2F;
    --text-2: #6B6556;
    --text-3: #9B927A;
    --shadow-card: 0 8px 20px rgba(0,0,0,0.05), inset 0 1px rgba(255,255,255,0.8);
    --shadow-hover: 0 16px 32px rgba(0,0,0,0.1);
}

* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), opacity .3s var(--ease), box-shadow .3s var(--ease), color .3s var(--ease);
}

html { scroll-behavior:smooth; }

/* 背景 - 深色静态渐变 + 极光层 + 粒子 */
body {
    min-height:100vh;
    color:var(--text-1);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
    background: radial-gradient(circle at 20% 30%, rgba(6,8,22,1) 0%, #03050f 100%);
    background-attachment: fixed;
    overflow-x:hidden;
}

body.theme-light {
    background: radial-gradient(circle at 20% 30%, #F6F9F2 0%, #EBF0E6 100%);
    background-attachment: fixed;
}

/* Aurora 极光层 */
.aurora {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}
.aurora::before,
.aurora::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 60%;
    border-radius: 50%;
    filter: blur(100px);
    mix-blend-mode: overlay;
    animation: auroraMove 12s ease-in-out infinite alternate;
}
.aurora::before {
    background: rgba(103,232,249,0.3);
    top: 10%;
    left: -20%;
}
.aurora::after {
    background: rgba(167,139,250,0.3);
    bottom: 10%;
    right: -20%;
    animation-duration: 18s;
    animation-direction: alternate-reverse;
}
body.theme-light .aurora::before {
    background: rgba(207,139,94,0.08);
}
body.theme-light .aurora::after {
    background: rgba(170,201,160,0.08);
}
@keyframes auroraMove {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(5%, 5%) rotate(5deg) scale(1.2); }
}

.app-wrapper {
    position:relative;
    z-index:2;
    max-width:1400px;
    margin:auto;
    padding:28px;
}

/* 玻璃导航栏 */
.glass-nav {
    position:sticky;
    top:18px;
    z-index:50;
    height:76px;
    padding:0 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:var(--bg-card);
    backdrop-filter:blur(24px) saturate(180%);
    border:1px solid var(--line-soft);
    border-radius:28px;
    box-shadow:var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.03) inset;
    margin-bottom:32px;
}
body.theme-light .glass-nav {
    background: var(--bg-card);
    border-color: rgba(100,80,60,0.1);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.8) inset;
}
.logo {
    display:flex;
    align-items:center;
    gap:10px;
    font-size:1.15rem;
    font-weight:700;
    letter-spacing:.2px;
}
.logo i { color:var(--cyan); }
.light { color:var(--cyan); font-weight:500; }
.nav-actions {
    display:flex;
    align-items:center;
    gap:12px;
}
.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 6px 14px;
    height: 44px;
    margin-right: 4px;
    font-size: 0.85rem;
    transition: all var(--ease);
}
.weather-widget i {
    font-size: 1.2rem;
    color: var(--cyan);
}
.weather-temp {
    font-weight: 600;
    color: var(--text-1);
    white-space: nowrap;
}
.weather-desc {
    color: var(--text-2);
    font-size: 0.75rem;
    white-space: nowrap;
}
body.theme-light .weather-widget {
    background: rgba(100,80,60,0.05);
}
@media (max-width: 640px) {
    .weather-widget {
        padding: 4px 10px;
        gap: 4px;
    }
    .weather-desc {
        display: none;
    }
    .weather-temp {
        font-size: 0.8rem;
    }
}
.nav-btn {
    width:44px;
    height:44px;
    border:none;
    outline:none;
    border-radius:16px;
    background:rgba(255,255,255,.04);
    color:var(--text-2);
    font-size:1rem;
    cursor:pointer;
    backdrop-filter:blur(10px);
}
.nav-btn:hover {
    background:rgba(110,168,254,.16);
    color:white;
    transform:translateY(-2px);
}
body.theme-light .nav-btn {
    background: rgba(100,80,60,0.05);
    color: var(--text-2);
}
body.theme-light .nav-btn:hover {
    background: var(--primary);
    color: white;
}

/* 分组筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 0 8px;
}
.filter-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--line-soft);
    color: var(--text-2);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-btn:hover {
    background: rgba(110,168,254,0.2);
    color: var(--primary);
}
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}
body.theme-light .filter-btn {
    background: rgba(100,80,60,0.05);
    color: var(--text-2);
}
body.theme-light .filter-btn.active {
    background: var(--primary);
    color: white;
}

/* KPI 卡片 */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-bottom: 28px;
}
.kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 130px;
    padding: 20px 24px;
    border-radius: 28px;
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.03) inset;
    transition: var(--ease);
    overflow: hidden;
    cursor: pointer;
}
.kpi-card.active {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 10px 30px rgba(0,0,0,.45);
    background: linear-gradient(145deg, rgba(110,168,254,0.15), rgba(79,124,255,0.05));
}
body.theme-light .kpi-card.active {
    border-color: var(--primary);
    background: linear-gradient(145deg, rgba(207,139,94,0.1), rgba(181,109,66,0.04));
}
.kpi-card::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(103,232,249,.18), transparent 70%);
    pointer-events: none;
}
.kpi-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    z-index: 2;
}
.kpi-value {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.1;
    margin-bottom: 6px;
}
.kpi-label {
    font-size: 0.85rem;
    color: var(--text-3);
    letter-spacing: 0.5px;
}
.kpi-icon {
    position: static;
    font-size: 2.5rem;
    color: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.kpi-card.alert .kpi-value {
    color: var(--danger);
}
.kpi-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.kpi-card:hover .kpi-icon {
    opacity: 1;
}

/* 班次信息卡片 */
.shift-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--bg-card);
    backdrop-filter: blur(16px) saturate(180%);
    border-radius: 28px;
    padding: 16px 24px;
    margin-bottom: 24px;
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.03) inset;
    transition: var(--ease);
    cursor: pointer;
}
.shift-card:hover {
    background: rgba(255,255,255,0.12);
    transform: translateY(-2px);
}
.shift-icon {
    font-size: 2.2rem;
    color: var(--primary);
    opacity: 0.8;
}
.shift-info {
    flex: 1;
}
.shift-label {
    font-size: 0.75rem;
    color: var(--text-3);
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.shift-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.3;
}
.shift-next {
    font-size: 0.75rem;
    color: var(--text-2);
    margin-top: 4px;
}
.shift-badge {
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: var(--primary);
    white-space: nowrap;
}
body.theme-light .shift-card {
    background: var(--bg-card);
    border-color: rgba(100,80,60,0.1);
}
body.theme-light .shift-badge {
    background: rgba(100,80,60,0.06);
}

/* 班次查询模态框 */
.shift-query-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.shift-query-form label {
    font-size: 0.8rem;
    color: var(--text-3);
}
.shift-query-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 30px;
    border: 1px solid var(--line-soft);
    background: rgba(0,0,0,0.2);
    color: var(--text-1);
}
.shift-query-result {
    background: rgba(0,0,0,0.2);
    border-radius: 20px;
    padding: 16px;
    margin-bottom: 16px;
}
.result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-soft);
}
.result-item:last-child {
    border-bottom: none;
}
.result-label {
    color: var(--text-3);
    font-weight: 500;
}
.result-value {
    color: var(--text-1);
    font-weight: 600;
}

/* 警告条 */
.alert-banner {
    position:relative;
    overflow:hidden;
    display:flex;
    align-items:center;
    gap:16px;
    padding:18px 22px;
    margin-bottom:30px;
    border-radius:24px;
    background: linear-gradient(90deg, rgba(255,120,73,.14), rgba(255,120,73,.03));
    backdrop-filter: blur(18px);
    border:1px solid rgba(255,120,73,.18);
}
.alert-banner i { color:var(--danger); font-size:1.2rem; }
.alert-banner span { color:#FFD1BF; font-weight:500; }
body.theme-light .alert-banner span { color: #B95C3A; }

/* 房间卡片网格 */
.rooms-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(360px,1fr));
    gap:24px;
}

/* 房间卡片 - 3D悬浮 + 流光扫过 */
.room-card {
    position:relative;
    overflow:hidden;
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(180%);
    border:1px solid var(--line-soft);
    border-radius:var(--radius-xl);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.03) inset;
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
    transform-style: preserve-3d;
    perspective: 1000px;
}
.room-card::before {
    content:"";
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:1px;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
}
/* 流光扫过效果 - 柔和版本 */
.room-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(110,168,254,0.12), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}
.room-card:hover::after {
    left: 100%;
}
body.theme-light .room-card::after {
    background: linear-gradient(90deg, transparent, rgba(207,139,94,0.08), transparent);
}
.room-card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(1deg) scale(1.01);
    box-shadow: var(--shadow-hover);
    border-color:rgba(110,168,254,.22);
}
.room-card.warning {
    border-color: rgba(255,120,73,.25);
    animation: warning-pulse-border 1.2s infinite;
}
.room-card.warning::after {
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    box-shadow:inset 0 0 0 1px rgba(255,120,73,.18);
    pointer-events:none;
}
/* 手机端禁用3D旋转 */
@media (max-width: 768px) {
    .room-card:hover {
        transform: translateY(-4px) scale(1.01);
        rotate: none;
    }
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    cursor: pointer;
    gap: 16px;
    flex-wrap: nowrap;
}
.room-info {
    flex: 1;
    min-width: 0;
}
.room-name {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
}
.remark-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 4px;
    padding: 2px 0;
    border-top: 1px dashed var(--line-soft);
    max-width: 100%;
    overflow: hidden;
}
.remark-preview i {
    font-size: 0.7rem;
    color: var(--primary);
    flex-shrink: 0;
}
.remark-preview span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 768px) {
    .remark-preview {
        font-size: 0.65rem;
        gap: 4px;
    }
    .remark-preview i {
        font-size: 0.65rem;
    }
}
.room-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse-light 2s infinite;
}
.room-card.warning .status-dot {
    background: var(--danger);
    animation: pulse-orange 2s infinite;
}
.status-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.2);
    padding: 0 8px;
    border-radius: 30px;
    height: 36px;
    line-height: 36px;
    font-size: 0.8rem;
    white-space: nowrap;
}
.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.8rem;
    min-width: 36px;
    text-align: center;
}
.status-icon.snow-active .fa-snowflake {
    display: inline-block;
    animation: snowflake-float 3s ease-in-out infinite;
}
.status-icon.fan-active .fa-fan {
    display: inline-block;
    animation: spin 2s linear infinite;
}
.window-open-icon {
    display: inline-block;
    animation: window-open 2s ease-in-out infinite;
}
@keyframes window-open {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.08) rotate(2deg); }
}
body.theme-light .window-open-icon {
    animation: window-open-light 2s ease-in-out infinite;
}
@keyframes window-open-light {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.08) rotate(2deg); }
}
.status-icon .fa-snowflake,
.status-icon .fa-fan {
    transition: none;
}
body.theme-light .status-icons {
    background: rgba(100,80,60,0.08);
}
.temp-badge {
    min-width: 80px;
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 1.3rem;
    font-weight: 700;
    color: #7DD3FC;
    line-height: 1;
    flex-shrink: 0;
}
.warning .temp-badge {
    color:#FF9A6C;
    background:rgba(255,120,73,.10);
    border-color:rgba(255,120,73,.25);
}
.expand-icon {
    font-size: 0.85rem;
    color: var(--text-3);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.room-card.expanded .expand-icon {
    transform: rotate(180deg);
}

.card-detail {
    display:none;
    padding:0 22px 22px;
    border-top:1px solid rgba(255,255,255,.05);
}
.room-card.expanded .card-detail {
    display:block;
    animation:fadeSlide .35s var(--ease);
}

.control-group {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-top:18px;
    flex-wrap:wrap;
}
.control-label {
    display:flex;
    align-items:center;
    gap:8px;
    color:var(--text-3);
    font-size:.82rem;
}
.temp-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.05);
}
.temp-control input {
    width: 70px;
    background: none;
    border: none;
    outline: none;
    color: #7DD3FC;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    line-height: normal;
    padding: 0;
    height: auto;
}
.temp-control span {
    font-size: 0.9rem;
    color: var(--text-2);
}
.ac-stepper, .toggle-group {
    display:flex;
    align-items:center;
    gap:12px;
    padding:8px 14px;
    border-radius:18px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.05);
}
.ac-stepper button, .toggle-group button {
    border:none;
    background:none;
    color:var(--text-2);
    cursor:pointer;
}
.ac-stepper button {
    width:30px;
    height:30px;
    border-radius:10px;
}
.ac-stepper button:hover { background:rgba(255,255,255,.06); }
.ac-stepper span {
    min-width:34px;
    text-align:center;
    font-weight:700;
}
.toggle-group button {
    padding:8px 16px;
    border-radius:12px;
    font-size:.75rem;
}
.toggle-group button.active {
    background:linear-gradient(135deg, var(--primary), var(--primary-deep));
    color:white;
    box-shadow:0 10px 24px rgba(79,124,255,.25);
}
.remark-line {
    margin-top:18px;
    padding:14px 16px;
    border-radius:18px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.05);
    color:var(--text-2);
    font-size:.78rem;
    line-height:1.6;
}
.btn-primary, .emergency-action {
    height:48px;
    padding:0 24px;
    border-radius:18px;
    background:linear-gradient(135deg, #6EA8FE, #4F7CFF);
    color:white;
    font-weight:600;
    cursor:pointer;
    box-shadow:0 10px 24px rgba(79,124,255,.35);
}
.btn-primary:hover, .emergency-action:hover {
    transform:translateY(-2px);
    box-shadow:0 16px 36px rgba(79,124,255,.45);
}
.emergency-action {
    width:100%;
    margin-top:18px;
    background:linear-gradient(135deg, #FF8A63, #FF7849);
    box-shadow:0 10px 24px rgba(255,120,73,.35);
}
.btn-outline {
    height:48px;
    padding:0 24px;
    border-radius:18px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.08);
    color:var(--text-2);
    cursor:pointer;
}
.modal {
    position:fixed;
    inset:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(0,0,0,.55);
    backdrop-filter:blur(18px);
    opacity:0;
    visibility:hidden;
    z-index:2000;
}
.modal.active { opacity:1; visibility:visible; }
.modal-panel {
    width:100%;
    max-width:520px;
    padding:28px;
    border-radius:32px;
    background:rgba(15,18,32,.92);
    border:1px solid rgba(255,255,255,.06);
    backdrop-filter:blur(28px);
    box-shadow:0 30px 80px rgba(0,0,0,.55);
}
.modal-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:20px;
}
.modal-close {
    width:40px;
    height:40px;
    border-radius:14px;
    background:rgba(255,255,255,.04);
    color:var(--text-2);
    cursor:pointer;
}
.modal textarea {
    width:100%;
    min-height:140px;
    padding:18px;
    resize:vertical;
    border:none;
    outline:none;
    border-radius:20px;
    background:rgba(255,255,255,.04);
    color:var(--text-1);
    font-family:inherit;
    border:1px solid rgba(255,255,255,.05);
}
.modal-actions {
    display:flex;
    justify-content:flex-end;
    gap:12px;
    margin-top:20px;
}
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.toast {
    background: rgba(15, 18, 32, 0.95);
    backdrop-filter: blur(20px);
    border-left: 4px solid var(--primary);
    border-radius: 14px;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    animation: toastIn 0.2s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.skeleton-loader {
    padding:70px;
    text-align:center;
    border-radius:32px;
    color:var(--text-3);
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.05);
}
@keyframes fadeSlide {
    from { opacity:0; transform:translateY(-10px); }
    to { opacity:1; transform:translateY(0); }
}
@keyframes cardIn {
    from { opacity:0; transform:translateY(24px) scale(.98); }
    to { opacity:1; transform:translateY(0) scale(1); }
}

/* ========== 动画效果区 ========== */
@keyframes pulse-light {
    0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.7); transform: scale(1); }
    70% { box-shadow: 0 0 0 6px rgba(34,197,94,0); transform: scale(1.1); }
    100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); transform: scale(1); }
}
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(255,120,73,0.8); transform: scale(1); }
    70% { box-shadow: 0 0 0 8px rgba(255,120,73,0); transform: scale(1.15); }
    100% { box-shadow: 0 0 0 0 rgba(255,120,73,0); transform: scale(1); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
@keyframes snowflake-float {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-2px) rotate(15deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes warning-pulse-border {
    0% { border-color: var(--danger); box-shadow: 0 0 0 0 rgba(255,120,73,0.4); }
    70% { border-color: #ffaa66; box-shadow: 0 0 0 8px rgba(255,120,73,0); }
    100% { border-color: var(--danger); box-shadow: 0 0 0 0 rgba(255,120,73,0); }
}
body.theme-light .status-dot {
    box-shadow: 0 0 0 0 rgba(122,158,126,0.5);
}
body.theme-light .room-card.warning .status-dot {
    background: var(--danger);
    box-shadow: 0 0 0 0 rgba(224,122,95,0.5);
}

/* 移动端响应式 */
@media (max-width:768px) {
    .app-wrapper { padding:16px; }
    .glass-nav { height:64px; padding:0 16px; border-radius:22px; }
    .logo { font-size:1rem; }
    .nav-btn { width:40px; height:40px; }
    .filter-bar { gap:8px; margin-bottom:16px; }
    .filter-btn { padding:6px 14px; font-size:0.75rem; }
    .kpi-grid { grid-template-columns:repeat(2,1fr); gap:14px; }
    .kpi-card { padding: 16px 20px; min-height: 110px; }
    .kpi-value { font-size: 2rem; }
    .kpi-icon { font-size: 2rem; }
    .shift-card { padding: 12px 16px; gap: 12px; }
    .shift-icon { font-size: 1.6rem; }
    .shift-value { font-size: 1rem; }
    .shift-badge { padding: 4px 10px; font-size: 0.7rem; }
    .rooms-grid { grid-template-columns:1fr; gap:18px; }
    .room-card { border-radius:26px; }
    .card-header { padding: 14px 16px; gap: 10px; }
    .room-name { font-size: 0.9rem; }
    .room-right { gap: 6px; }
    .status-icons { gap: 3px; padding: 0 6px; height: 30px; line-height: 30px; font-size: 0.7rem; }
    .status-icon { min-width: 30px; font-size: 0.7rem; gap: 2px; }
    .temp-badge { min-width: 65px; height: 40px; font-size: 1.1rem; padding: 0 12px; }
    .card-detail { padding:0 18px 18px; }
    .control-group { flex-direction:column; align-items:stretch; }
    .temp-control, .ac-stepper, .toggle-group { width:100%; justify-content:center; }
    .temp-control input { width: 60px; font-size: 1rem; }
    .modal-panel { padding:22px; border-radius:28px; }
}

/* ========== 右上角动态天气通知 ========== */
.weather-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    max-width: 320px;
    min-width: 260px;
    pointer-events: none;
}
.weather-toast {
    background: rgba(15, 18, 32, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 16px 20px;
    margin-bottom: 12px;
    color: var(--text-1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line-soft);
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1) forwards;
}
body.theme-light .weather-toast {
    background: rgba(255, 255, 245, 0.96);
    color: var(--text-1);
}
.weather-toast-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
    font-weight: 600;
    color: var(--primary);
}
.weather-toast-header i {
    font-size: 1.2rem;
}
.weather-toast-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.weather-toast-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.weather-toast-item span:first-child {
    color: var(--text-3);
}
.weather-toast-item span:last-child {
    font-weight: 600;
    color: var(--text-1);
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}
@media (max-width: 640px) {
    .weather-notification {
        top: 10px;
        right: 10px;
        left: auto;
        max-width: 280px;
        min-width: 240px;
    }
    .weather-toast {
        padding: 12px 16px;
    }
    .weather-toast-item {
        font-size: 0.8rem;
    }
}

/* ========== 白天模式下的 Toast 和模态框修复 ========== */
body.theme-light .toast {
    background: rgba(255, 255, 245, 0.95);
    color: var(--text-1);
    border-left-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body.theme-light .modal-panel {
    background: rgba(255, 255, 245, 0.96);
    border: 1px solid rgba(100,80,60,0.15);
    color: var(--text-1);
}

body.theme-light .modal-header h3 {
    color: var(--text-1);
}

body.theme-light .modal-close {
    background: rgba(100,80,60,0.05);
    color: var(--text-2);
}

body.theme-light .shift-query-form input,
body.theme-light .modal-panel input,
body.theme-light .modal-panel select {
    background: rgba(100,80,60,0.05);
    border: 1px solid rgba(100,80,60,0.15);
    color: var(--text-1);
}

body.theme-light .shift-query-result {
    background: rgba(100,80,60,0.04);
    border: 1px solid rgba(100,80,60,0.1);
}

body.theme-light .result-item {
    border-bottom-color: rgba(100,80,60,0.08);
}

body.theme-light .result-label {
    color: var(--text-2);
}

body.theme-light .result-value {
    color: var(--text-1);
}

body.theme-light .btn-outline {
    background: rgba(100,80,60,0.04);
    border-color: rgba(100,80,60,0.15);
    color: var(--text-2);
}

body.theme-light .btn-outline:hover {
    background: rgba(100,80,60,0.08);
}

/* 鼠标跟随光晕元素 */
.glow-cursor {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(110,168,254,0.2) 0%, rgba(110,168,254,0) 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.05s linear;
    will-change: transform;
}
body.theme-light .glow-cursor {
    background: radial-gradient(circle, rgba(207,139,94,0.1) 0%, rgba(207,139,94,0) 70%);
}

/* 粒子背景 canvas */
.particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}