* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: "PingFang SC", "Noto Serif SC", Georgia, "Helvetica Neue", "Microsoft YaHei", serif;
    color: #3d3530;
    overflow-x: hidden;
}

body {
    background: linear-gradient(135deg, #fff0f3 0%, #fde8ef 15%, #fff5e8 35%, #f0f8ff 55%, #fce4ec 75%, #fff8f0 100%);
    background-size: 400% 400%;
    animation: bgFlow 20s ease infinite;
    background-attachment: fixed;
}

@keyframes bgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#app {
    width: 100%;
    height: 100vh;
    position: relative;
}

.view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.view.active {
    display: block !important;
}

.hidden {
    display: none !important;
}

/* ===== 登录页 ===== */
#login-view {
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 20%, #fbc2eb 40%, #a6c1ee 60%, #fda7a5 80%, #ffb6c1 100%);
    background-size: 300% 300%;
    animation: loginBgFlow 15s ease infinite;
    align-items: center;
    justify-content: center;
}

@keyframes loginBgFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#login-view.active {
    display: flex !important;
}

.login-container {
    width: 85%;
    max-width: 360px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 28px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.6), 0 20px 60px rgba(255, 107, 157, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-logo {
    width: 110px;
    height: 110px;
    margin: 0 auto 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 30% 30%, #fff7fb 0%, #ffd8e8 24%, #ffb8d2 48%, #dba0ae 72%, #a66a75 100%);
    box-shadow: 0 14px 36px rgba(166, 106, 117, 0.28), inset 0 2px 10px rgba(255,255,255,0.72);
    animation: bounce 2s ease-in-out infinite;
}

.login-logo span {
    font-size: 62px;
    filter: drop-shadow(0 3px 8px rgba(0,0,0,0.18));
}

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

.login-title {
    font-size: 28px;
    font-weight: 700;
    font-family: "Noto Serif SC", Georgia, serif;
    background: linear-gradient(135deg, #ff6b9d 0%, #d4a5a5 30%, #c9a96e 60%, #ff8e8e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.login-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.password-input:focus {
    border-color: #c9929c;
    box-shadow: 0 0 0 4px rgba(201, 146, 156, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff9a9e 0%, #d4a5a5 50%, #c9a96e 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 157, 0.35);
    letter-spacing: 1px;
}

.login-btn:active {
    transform: scale(0.96);
}

.login-tip {
    margin-top: 20px;
    font-size: 12px;
    color: #aaa;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-10px); }
    80% { transform: translateX(10px); }
}

/* ===== 主容器 ===== */
.main-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 顶部导航栏 ===== */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 182, 193, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(255, 107, 157, 0.06);
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-icon {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,233,241,0.92) 36%, rgba(219,160,174,0.22) 100%);
    box-shadow: 0 6px 18px rgba(166, 106, 117, 0.14);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    font-family: "Noto Serif SC", Georgia, serif;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.top-nav-center {
    flex: 1;
    text-align: center;
}

.date-display {
    font-size: 13px;
    color: #666;
    background: rgba(201, 146, 156, 0.08);
    padding: 6px 12px;
    border-radius: 20px;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.teacher-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a5a5 0%, #c9a96e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(201, 169, 110, 0.3);
}

.teacher-name {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

/* ===== 首页 - 两大模块 ===== */
#home-view {
    flex: 1;
    overflow-y: auto;
}

.home-content {
    display: flex;
    gap: 16px;
    padding: 16px;
    height: calc(100vh - 60px - 60px);
    min-height: 400px;
}

.gender-card {
    flex: 1;
    border-radius: 24px;
    padding: 30px 20px;
    color: white;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.gender-card:active {
    transform: scale(0.98);
}

.female-card {
    background: linear-gradient(135deg, #e8b4b8 0%, #d4a5a5 50%, #c9888c 100%);
}

.male-card {
    background: linear-gradient(135deg, #a3b0c4 0%, #7d8fa8 50%, #6b7d96 100%);
}

.card-decoration {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.female-card .circle-1 {
    width: 160px;
    height: 160px;
    top: -40px;
    right: -40px;
}

.female-card .circle-2 {
    width: 120px;
    height: 120px;
    bottom: -30px;
    left: -30px;
}

.male-card .circle-1 {
    width: 180px;
    height: 180px;
    top: -50px;
    right: -50px;
    background: rgba(255, 255, 255, 0.08);
}

.male-card .circle-2 {
    width: 140px;
    height: 140px;
    bottom: -40px;
    left: -40px;
    background: rgba(255, 255, 255, 0.06);
}

.card-icon {
    font-size: 56px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.card-subtitle {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.card-stats {
    display: flex;
    gap: 30px;
    margin-bottom: auto;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.85;
}

.card-enter {
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    position: relative;
    z-index: 1;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== 子页面公共头部 ===== */
.page-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
}

.back-btn {
    padding: 8px 14px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-btn:active {
    transform: scale(0.95);
}

.page-sub-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.sub-icon {
    font-size: 28px;
}

.dorm-count-badge {
    font-size: 13px;
    font-weight: 500;
    color: #c9929c;
    background: rgba(201, 146, 156, 0.1);
    padding: 4px 10px;
    border-radius: 12px;
}

.header-right {
    min-width: 60px;
    text-align: right;
}

.add-dorm-btn-small {
    padding: 8px 14px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.3);
}

.add-dorm-btn-small:active {
    transform: scale(0.95);
}

/* ===== 搜索框 ===== */
.search-container {
    padding: 12px 16px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid rgba(201, 146, 156, 0.15);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
    border-color: #c9929c;
    box-shadow: 0 0 0 3px rgba(201, 146, 156, 0.1);
}

/* ===== 宿舍卡片网格 ===== */
.dorm-card-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.dorm-card-new {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.dorm-card-new:active {
    transform: scale(0.97);
}

.dorm-card-top-bar {
    height: 6px;
    background: linear-gradient(90deg, #52c41a, #95de64);
}

.dorm-card-top-bar.unchecked {
    background: linear-gradient(90deg, #d9d9d9, #f0f0f0);
}

.dorm-card-body {
    padding: 16px;
}

.dorm-card-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8f0ff 0%, #d6e4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

.dorm-card-status {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #f6ffed;
    color: #52c41a;
}

.dorm-card-status.unchecked {
    background: #fafafa;
    color: #999;
}

.dorm-card-roomno {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.dorm-card-class {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(201, 146, 156, 0.1);
    color: #c9929c;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.dorm-card-class-text {
    line-height: 1;
}

.dorm-card-edit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    font-size: 13px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.dorm-card-edit-icon:hover {
    color: #c9929c;
}

.dorm-card-floor {
    font-size: 13px;
    color: #999;
    margin-bottom: 16px;
}

.dorm-card-divider {
    height: 1px;
    background: #f0f0f0;
    margin-bottom: 12px;
}

.dorm-card-score-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.dorm-card-score-label {
    font-size: 13px;
    color: #999;
}

.dorm-card-score-value {
    font-size: 32px;
    font-weight: 700;
    color: #52c41a;
    line-height: 1;
}

.dorm-card-score-value.low {
    color: #ff4d4f;
}

/* ===== 检查详情页 ===== */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(201, 146, 156, 0.12);
}

.detail-title {
    text-align: center;
}

#detail-dorm-no {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    display: block;
}

.detail-class {
    font-size: 12px;
    color: #999;
}

.export-btn {
    padding: 8px 14px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.3);
}

.export-btn:active {
    transform: scale(0.95);
}

/* 总分卡片 */
.score-card {
    margin: 16px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    border-radius: 20px;
    padding: 24px;
    color: white;
    box-shadow: 0 8px 24px rgba(201, 146, 156, 0.4);
}

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

.score-info {
    flex: 1;
}

.score-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.score-value {
    font-size: 32px;
    font-weight: 700;
}

.score-value span {
    font-size: 44px;
}

.score-status {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.score-date {
    font-size: 13px;
    opacity: 0.8;
}

/* 检查列表 */
.checklist-container {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.check-item {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.check-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.check-item-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.check-item-icon {
    font-size: 24px;
}

.check-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.score-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-toggle-btn {
    width: 50px;
    height: 30px;
    border-radius: 15px;
    background: #e8e8e8;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.score-toggle-btn.pass {
    background: #52c41a;
}

.score-toggle-btn.deduct {
    background: #ff4d4f;
}

.score-toggle-btn.unchecked {
    background: #d9d9d9;
}

.score-toggle-btn::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.score-toggle-btn.deduct::after {
    left: 23px;
}

.score-toggle-btn.unchecked::after {
    left: 13px;
    background: #f0f0f0;
}

.score-label-text {
    font-size: 13px;
    font-weight: 500;
    min-width: 42px;
}

.score-label-text.pass {
    color: #52c41a;
}

.score-label-text.deduct {
    color: #ff4d4f;
}

.score-label-text.unchecked {
    color: #999;
}

/* 图片上传区域 */
.images-section {
    margin-bottom: 12px;
    border: 2px dashed #d9d9d9;
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
}

.images-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.images-grid:empty {
    display: none;
    margin-bottom: 0;
}

.image-preview {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
}

.image-preview-wrapper {
    position: relative;
}

.delete-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    background: #ff4d4f;
    color: white;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(255, 77, 79, 0.4);
    z-index: 5;
}

.upload-btn {
    flex: 1;
    min-height: 70px;
    border: 2px dashed #d9d9d9;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
}

.upload-btn:active {
    border-color: #c9929c;
    color: #c9929c;
}

.upload-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}

.camera-btn {
    flex: 1;
    min-height: 70px;
    border: 2px dashed #c9929c;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    box-sizing: border-box;
    cursor: pointer;
    color: #c9929c;
    background: rgba(201, 146, 156, 0.04);
    transition: all 0.3s ease;
}

.camera-btn:active {
    background: rgba(201, 146, 156, 0.15);
    transform: scale(0.97);
}

.camera-btn-text {
    font-size: 15px;
    font-weight: 500;
}

.camera-btn input {
    display: none;
}

/* 图片加载占位 */
img.image-preview[data-img-id]:not([src]) {
    background: linear-gradient(90deg, #f0f0f5 25%, #e8e8f0 50%, #f0f0f5 75%);
    background-size: 200% 100%;
    animation: imgLoading 1.2s ease infinite;
}

@keyframes imgLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.images-grid.grid-single {
    display: flex;
    width: 100%;
}

.images-grid.grid-single .image-preview-wrapper {
    width: 100%;
}

.images-grid.grid-single .image-preview {
    width: 100%;
    height: 180px;
    border-radius: 8px;
}

.images-grid.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.images-grid.grid-two .image-preview {
    width: 100%;
    height: 140px;
}

.images-grid.grid-four {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.images-grid.grid-four .image-preview {
    width: 100%;
    height: 110px;
}

.upload-btn-text {
    font-size: 15px;
    font-weight: 500;
}

.upload-btn input {
    display: none;
}

/* 备注输入 */
.remark-section {
    margin-top: 8px;
}

.remark-input {
    width: 100%;
    padding: 10px 12px;
    background: #f5f7fa;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    resize: none;
    font-family: inherit;
}

.remark-input::placeholder {
    color: #bbb;
}

/* ===== 记录统计页 ===== */
.page-header {
    padding: 20px 16px 12px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.page-subtitle {
    font-size: 13px;
    color: #999;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 16px 16px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card-1 .stat-card-icon {
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
}

.stat-card-2 .stat-card-icon {
    background: linear-gradient(135deg, #52c41a 0%, #95de64 100%);
}

.stat-card-3 .stat-card-icon {
    background: linear-gradient(135deg, #fa8c16 0%, #ffc53d 100%);
}

.stat-card-4 .stat-card-icon {
    background: linear-gradient(135deg, #eb2f96 0%, #ff85c0 100%);
}

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

.stat-card-num {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    line-height: 1.2;
}

.stat-card-label {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.stats-tabs {
    display: flex;
    gap: 12px;
    padding: 0 16px 16px;
}

.stats-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.stats-tab.active {
    border-color: #c9929c;
    background: rgba(201, 146, 156, 0.05);
    color: #c9929c;
    font-weight: 600;
}

.stats-tab-badge {
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.stats-tab.active .stats-tab-badge {
    background: rgba(201, 146, 156, 0.15);
    color: #c9929c;
}

.stats-history-list {
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-date-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.history-date-card:active {
    transform: scale(0.98);
}

.history-date-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8f0ff 0%, #d6e4ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.history-date-info {
    flex: 1;
}

.history-date-text {
    font-size: 17px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.history-date-today {
    font-size: 12px;
    color: #52c41a;
    font-weight: 500;
    margin-left: 6px;
}

.history-date-sub {
    font-size: 13px;
    color: #999;
}

.history-date-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.history-date-stat {
    text-align: right;
}

.history-date-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #52c41a;
}

.history-date-stat-label {
    font-size: 11px;
    color: #999;
}

.history-date-arrow {
    color: #ccc;
    font-size: 18px;
}

/* ===== 我的页面 ===== */
.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(201, 146, 156, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid rgba(201, 146, 156, 0.12);
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.profile-role {
    font-size: 13px;
    color: #999;
}

.menu-section {
    padding: 16px;
}

.menu-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #999;
    margin-bottom: 10px;
    padding-left: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.menu-item:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

.menu-icon {
    font-size: 20px;
    width: 28px;
    text-align: center;
}

.menu-text {
    flex: 1;
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.menu-arrow {
    color: #ccc;
    font-size: 20px;
    font-weight: 300;
}

.danger-item .menu-text {
    color: #ff4d4f;
}

.logout-item {
    justify-content: center;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
}

.logout-item .menu-text {
    color: white;
    font-weight: 600;
    flex: none;
}

.logout-item .menu-icon {
    color: white;
}

.logout-item .menu-arrow {
    display: none;
}

/* ===== 底部导航栏 ===== */
.bottom-nav {
    display: flex;
    background: #fff;
    border-top: 1px solid rgba(201, 146, 156, 0.12);
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-item.active .nav-icon {
    transform: scale(1.1);
}

.nav-item.active .nav-text {
    color: #c9929c;
    font-weight: 600;
}

.nav-icon {
    font-size: 22px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
}

.nav-text {
    font-size: 11px;
    color: #999;
    transition: all 0.3s ease;
}

.bottom-space {
    height: 10px;
}

/* ===== 弹窗 ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
}

.modal-large {
    max-width: 420px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f7fa;
    border-radius: 10px;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

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

.form-group {
    padding: 0 24px 16px;
}

.form-group:first-of-type {
    padding-top: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: #f5f7fa;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #c9929c;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(201, 146, 156, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    padding: 16px 24px 24px;
}

.cancel-btn, .confirm-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f5f7fa;
    color: #666;
}

.confirm-btn {
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.3);
}

.cancel-btn:active, .confirm-btn:active {
    transform: scale(0.97);
}

/* 宿舍管理弹窗列表 */
.manage-dorm-list {
    padding: 16px 24px;
    overflow-y: auto;
    flex: 1;
}

.manage-dorm-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    margin-bottom: 8px;
}

.manage-dorm-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.manage-dorm-no {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.manage-dorm-class-name {
    font-size: 12px;
    color: #999;
}

.delete-dorm-btn {
    padding: 6px 12px;
    background: #fff1f0;
    color: #ff4d4f;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.add-dorm-btn-full {
    margin: 16px 24px 24px;
    padding: 14px;
    background: rgba(201, 146, 156, 0.08);
    color: #c9929c;
    border: 1px dashed #c9929c;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.add-dorm-btn-full:active {
    transform: scale(0.98);
}

/* ===== 图片查看器 ===== */
.image-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.image-viewer.active {
    display: flex;
}

.image-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ===== 响应式 ===== */
@media (min-width: 768px) {
    .dorm-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 0;
    height: 0;
}

.view {
    height: calc(100vh - 60px);
    padding-top: 0;
}

.main-container .view {
    position: relative;
}

/* ===== 顶部右侧操作区 ===== */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-search-box {
    position: relative;
}

.header-search-input {
    width: 200px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid rgba(201, 146, 156, 0.15);
    border-radius: 12px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.header-search-input:focus {
    border-color: #c9929c;
    box-shadow: 0 0 0 3px rgba(201, 146, 156, 0.1);
}

.add-dorm-btn-header {
    padding: 10px 18px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.3);
    white-space: nowrap;
}

.add-dorm-btn-header:active {
    transform: scale(0.95);
}

/* ===== 多选功能 ===== */
.multi-select-entry {
    padding: 0 16px 12px;
}

.multi-select-entry-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.25);
}

.multi-select-entry-btn:active {
    transform: scale(0.98);
}

.multi-select-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.multi-select-info {
    font-size: 15px;
    font-weight: 600;
}

.multi-select-info span {
    font-size: 20px;
    margin: 0 4px;
}

.multi-select-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.multi-select-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.multi-select-btn.select-all {
    background: rgba(255,255,255,0.25);
    color: white;
}

.multi-select-btn.export {
    background: #52c41a;
    color: white;
}

.multi-select-btn.cancel {
    background: rgba(255,255,255,0.25);
    color: white;
}

.multi-select-btn:active {
    transform: scale(0.95);
}

.dorm-card-new.multi-select-mode {
    position: relative;
}

.dorm-card-new.multi-select-mode .dorm-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: all 0.2s;
}

.dorm-card-new.multi-select-mode.selected .dorm-checkbox {
    background: #52c41a;
    border-color: #52c41a;
}

.dorm-card-new.multi-select-mode.selected .dorm-checkbox::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.dorm-card-new.multi-select-mode.selected {
    border: 2px solid #52c41a;
    box-shadow: 0 0 0 4px rgba(82, 196, 26, 0.1);
}

.dorm-card-new.locked .dorm-card-top-bar {
    background: #faad14 !important;
}

.dorm-card-new.locked::after {
    content: '🔒';
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 16px;
    z-index: 5;
}

.dorm-card-status.locked {
    background: #fff7e6;
    color: #d46b08;
    border: 1px solid #ffd591;
}

.dorm-card-top-bar.locked {
    background: #faad14 !important;
}

.dorm-card-score-value.pending {
    color: #faad14;
    font-size: 18px;
    font-weight: 700;
}

/* ===== 检查项标准说明 ===== */
.check-item-standard {
    padding: 8px 12px;
    background: #f0f7ff;
    border-left: 3px solid #c9929c;
    border-radius: 6px;
    font-size: 15px;
    color: #555;
    margin: 8px 0;
    line-height: 1.5;
}

/* ===== 大字体优化（方便视力不好的老师） ===== */
.check-item-name {
    font-size: 18px !important;
    font-weight: 700;
}

.check-item-icon {
    font-size: 26px !important;
}

.score-label-text {
    font-size: 16px !important;
    font-weight: 600;
}

.score-toggle-btn {
    width: 52px !important;
    height: 30px !important;
}

.score-toggle-btn::before {
    width: 24px !important;
    height: 24px !important;
}

.remark-input {
    font-size: 16px !important;
}

.dorm-card-roomno {
    font-size: 22px !important;
}

.dorm-card-class {
    font-size: 15px !important;
}

.dorm-card-floor {
    font-size: 14px !important;
}

.dorm-card-score-value {
    font-size: 26px !important;
}

.dorm-card-score-label {
    font-size: 14px !important;
}

.dorm-card-status {
    font-size: 13px !important;
    padding: 4px 12px !important;
}

.upload-btn {
    width: 100% !important;
    min-height: 80px !important;
}

.image-preview {
    width: 100% !important;
    height: auto !important;
}

/* ===== 详情页操作按钮 ===== */
.detail-header-actions {
    display: flex;
    gap: 8px;
}

#detail-dorm-no, #detail-class-name {
    cursor: pointer;
    position: relative;
}

#detail-dorm-no:hover, #detail-class-name:hover {
    text-decoration: underline;
    text-decoration-style: dotted;
    text-decoration-color: #999;
}

/* ===== 检查项锁定状态（已废弃，保留空选择器避免报错） ===== */
.check-item.locked {
    opacity: 1;
    background: #fff;
}

/* ===== 已保存锁定状态 ===== */
.check-item.locked {
    opacity: 0.88;
    background: #fafafa;
    border: 1px solid #e8e8e8;
}

.check-item.locked .score-toggle-btn {
    opacity: 0.6;
    cursor: pointer;
}

.check-item.locked .remark-input {
    background: #f0f0f0;
    color: #666;
    cursor: not-allowed;
}

body.dark-mode .check-item.locked {
    background: #2a2a3e;
    border-color: #3a3a4e;
}

body.dark-mode .check-item.locked .remark-input {
    background: #1e1e2e;
    color: #888;
}

.lock-badge {
    font-size: 16px;
    margin-left: 6px;
    opacity: 0.6;
}

/* 已保存按钮 */
.save-record-btn.saved-btn {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.35);
}

/* ===== 个人资料编辑 ===== */
.profile-header {
    position: relative;
    cursor: pointer;
}

.profile-edit-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.5;
}

.avatar-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 12px;
    background: #f8f9ff;
    border-radius: 12px;
}

.avatar-option {
    font-size: 28px;
    padding: 8px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.avatar-option:hover {
    background: #e8ebff;
}

.avatar-option.selected {
    background: #e8ebff;
    border-color: #c9929c;
}

/* ===== 历史记录卡片美化 ===== */
.stats-history-list {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-date-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.history-date-card:active {
    transform: scale(0.98);
}

.history-date-card[data-gender="female"] {
    border-left-color: #ff6b9d;
}

.history-date-card[data-gender="male"] {
    border-left-color: #c9929c;
}

.history-date-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, #faf7f2 0%, #e8ebff 100%);
    flex-shrink: 0;
}

.history-date-info {
    flex: 1;
}

.history-date-text {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-date-today {
    font-size: 11px;
    color: #52c41a;
    background: #f6ffed;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.history-date-sub {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.history-date-stats {
    display: flex;
    gap: 16px;
    text-align: center;
}

.history-date-stat-num {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.history-date-stat-num.score {
    color: #52c41a;
}

.history-date-stat-label {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.history-date-arrow {
    color: #ccc;
    font-size: 20px;
}

/* ===== 记录统计Tab美化 ===== */
.stats-tabs {
    display: flex;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 8px;
}

.stats-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: white;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.stats-tab.active {
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(201, 146, 156, 0.3);
}

.stats-tab-badge {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.stats-tab.active .stats-tab-badge {
    background: rgba(255,255,255,0.25);
}

/* ===== 记录统计页头部 ===== */
.page-header-with-search {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 16px 12px;
    gap: 16px;
}

.page-header-left {
    flex: 1;
}

.page-header-right {
    flex-shrink: 0;
}

/* ===== 优化子页面头部 ===== */
.page-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

.page-sub-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    flex-shrink: 0;
}

/* ===== 背景渐变装饰 ===== */
#home-view::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(201, 146, 156, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#home-view::after {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

#dorm-list-view::before,
#stats-view::before {
    content: '';
    position: fixed;
    top: 20%;
    right: 5%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(201, 146, 156, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#dorm-list-view::after,
#stats-view::after {
    content: '';
    position: fixed;
    bottom: 20%;
    left: 5%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

#dorm-list-container,
.stats-cards,
.stats-tabs,
.stats-history-list,
.page-header-with-search {
    position: relative;
    z-index: 1;
}

/* ===== 响应式调整 ===== */
@media (max-width: 640px) {
    .header-right-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }
    
    .header-search-input {
        width: 160px;
    }
    
    .page-header-with-search {
        flex-direction: column;
    }
    
    .page-header-right {
        width: 100%;
    }
    
    .header-search-box,
    .header-search-input {
        width: 100%;
    }
}

/* ===== 保存按钮 ===== */
.save-btn-container {
    padding: 20px 0;
    text-align: center;
}

.save-record-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.35);
    transition: all 0.2s ease;
}

.save-record-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 6px rgba(201, 146, 156, 0.3);
}

/* ===== 优秀宿舍徽章 ===== */
.score-status.excellent {
    background: linear-gradient(135deg, #fff1b8 0%, #ffd700 100%);
    color: #ad6800;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* ===== 弹窗 ===== */
.dialog-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dialogFadeIn 0.3s ease;
}

@keyframes dialogFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.dialog-card {
    background: #fff;
    border-radius: 24px;
    padding: 36px 32px 28px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    animation: dialogPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

@keyframes dialogPopIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.dialog-icon {
    font-size: 52px;
    margin-bottom: 12px;
    animation: dialogShake 0.6s ease;
}

@keyframes dialogShake {
    0%, 100% { transform: rotate(0); }
    20% { transform: rotate(-10deg); }
    40% { transform: rotate(10deg); }
    60% { transform: rotate(-6deg); }
    80% { transform: rotate(6deg); }
}

.incomplete-dialog h2 {
    color: #e65100;
    font-size: 22px;
    margin-bottom: 12px;
}

.dialog-card p {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.dialog-hint {
    color: #999 !important;
    font-size: 13px !important;
    margin-bottom: 20px !important;
}

.dialog-confirm-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.35);
    transition: transform 0.15s;
}

.dialog-confirm-btn:active {
    transform: scale(0.96);
}

/* 优秀宿舍弹窗 */
.excellent-dialog {
    background: linear-gradient(180deg, #fffbe6 0%, #ffffff 60%);
    border: 2px solid #ffd700;
}

.dialog-confetti {
    font-size: 40px;
    animation: confettiBounce 0.8s ease;
}

@keyframes confettiBounce {
    0% { transform: translateY(-30px) scale(0); opacity: 0; }
    60% { transform: translateY(10px) scale(1.2); opacity: 1; }
    100% { transform: translateY(0) scale(1); }
}

.dialog-trophy {
    font-size: 64px;
    margin-bottom: 8px;
    animation: trophyGlow 1s ease;
}

@keyframes trophyGlow {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.excellent-dialog h2 {
    color: #ad6800;
    font-size: 24px;
    margin-bottom: 8px;
}

.dialog-dorm-name {
    color: #c9929c !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
}

.excellent-btn {
    background: linear-gradient(135deg, #ffd700 0%, #ff8f00 100%) !important;
    box-shadow: 0 4px 12px rgba(255, 143, 0, 0.4) !important;
}

/* ============================================================
   新增功能样式（进度条 / 批量操作 / 整改追踪 / 快捷备注 /
   楼层筛选 / 首页统计 / 快捷操作 / 通知入口 / 排行榜 /
   角色切换 / 通知项 / 深色模式）
   ============================================================ */

/* ===== 检查进度条 ===== */
.progress-bar-card {
    margin: 12px 16px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.progress-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.progress-bar-label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
}

.progress-bar-count {
    font-size: 14px;
    font-weight: 700;
    color: #c9929c;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: #f0f0f5;
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9929c 0%, #a66a75 100%);
    border-radius: 6px;
    transition: width 0.4s ease, background 0.3s ease;
}

.progress-bar-fill.complete {
    background: linear-gradient(90deg, #52c41a 0%, #389e0d 100%);
}

/* ===== 批量操作按钮 ===== */
.batch-actions {
    display: flex;
    gap: 10px;
    padding: 0 16px 8px;
}

.batch-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.batch-btn:active {
    transform: scale(0.96);
}

.batch-pass {
    background: linear-gradient(135deg, #52c41a 0%, #389e0d 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.batch-reset {
    background: #fff;
    color: #666;
    border: 1px solid #e8e8e8;
}

/* ===== 整改追踪 ===== */
.rectify-section {
    margin: 8px 0 4px;
}

.rectify-btn {
    padding: 6px 14px;
    background: #fff4e6;
    color: #d46b08;
    border: 1px dashed #ffc53d;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.rectify-btn:active {
    transform: scale(0.94);
}

.rectify-btn.rectified {
    background: #f6ffed;
    color: #389e0d;
    border-color: #b7eb8f;
    border-style: solid;
}

.check-item.rectified-item {
    border-left: 4px solid #52c41a;
}

/* ===== 快捷备注 ===== */
.quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.quick-tag {
    padding: 4px 10px;
    background: #faf7f2;
    color: #c9929c;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(201, 146, 156, 0.15);
}

.quick-tag:active {
    transform: scale(0.92);
    background: #c9929c;
    color: #fff;
}

/* 扣分标签 - 红色系 */
.quick-tag.deduct-tag {
    background: #fff2f0;
    color: #ff4d4f;
    border-color: rgba(255, 77, 79, 0.2);
}

.quick-tag.deduct-tag:active {
    background: #ff4d4f;
    color: #fff;
}

/* 表扬标签 - 绿色系 */
.quick-tag.praise-tag {
    background: #f0fff4;
    color: #52c41a;
    border-color: rgba(82, 196, 26, 0.2);
}

.quick-tag.praise-tag:active {
    background: #52c41a;
    color: #fff;
}

/* ===== 楼层筛选 ===== */
.floor-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.7);
}

.floor-filter-label {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
}

.floor-filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.floor-tag {
    padding: 5px 12px;
    background: #fff;
    color: #666;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floor-tag:active {
    transform: scale(0.94);
}

.floor-tag.active {
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(201, 146, 156, 0.3);
}

/* ===== 首页统计卡片 ===== */
.home-stats-section {
    padding: 0 16px 20px;
}

.home-stats-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.home-stat-card {
    padding: 16px 8px;
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.home-stat-card.stat-excellent {
    background: linear-gradient(135deg, #fffbe6 0%, #fff1b8 100%);
    border: 1px solid #ffe58f;
}

.home-stat-card.stat-improve {
    background: linear-gradient(135deg, #fff1f0 0%, #ffccc7 100%);
    border: 1px solid #ffa39e;
}

.home-stat-card.stat-rate {
    background: linear-gradient(135deg, #faf7f2 0%, #d6e4ff 100%);
    border: 1px solid #adc6ff;
}

.home-stat-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 4px;
}

.home-stat-card.stat-excellent .home-stat-num { color: #ad6800; }
.home-stat-card.stat-improve .home-stat-num { color: #cf1322; }
.home-stat-card.stat-rate .home-stat-num { color: #c9929c; }

.home-stat-label {
    font-size: 12px;
    color: #888;
}

/* ===== 首页快捷操作 ===== */
.home-quick-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.quick-action-btn {
    flex: 1;
    padding: 11px 6px;
    background: #fff;
    color: #555;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-action-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #c9929c 0%, #a66a75 100%);
    color: #fff;
    border-color: transparent;
}

/* ===== 顶部通知入口 ===== */
.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-bell {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    transition: all 0.2s ease;
}

.notification-bell:active {
    transform: scale(0.9);
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ff4d4f;
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===== 宿舍排行榜 ===== */
.ranking-section {
    padding: 16px;
    background: #fff;
    margin: 12px 16px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 12px;
}

.ranking-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    background: #f5f7fa;
    border-radius: 10px;
    padding: 4px;
}

.ranking-tab {
    flex: 1;
    text-align: center;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    color: #888;
    cursor: pointer;
    transition: all 0.25s ease;
}

.ranking-tab.active {
    background: #fff;
    color: #c9929c;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #fafbfc;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.ranking-item:active {
    transform: scale(0.99);
    background: #faf7f2;
}

.ranking-medal {
    font-size: 22px;
    min-width: 32px;
    text-align: center;
    font-weight: 700;
    color: #999;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-room {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.ranking-class {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

.ranking-sub {
    font-size: 11px;
    color: #bbb;
    margin-top: 2px;
}

.ranking-score {
    font-size: 20px;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
}

.ranking-score.high { color: #cf1322; }
.ranking-score.mid { color: #d46b08; }
.ranking-score.low { color: #666; }

/* ===== 角色切换 ===== */
.role-switcher {
    display: flex;
    gap: 10px;
    padding: 0 16px 8px;
}

.role-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.role-option:active {
    transform: scale(0.96);
}

.role-option.active {
    border-color: #c9929c;
    background: linear-gradient(135deg, #faf7f2 0%, #e6e0ff 100%);
    box-shadow: 0 4px 12px rgba(201, 146, 156, 0.2);
}

.role-icon {
    font-size: 28px;
}

.role-text {
    font-size: 14px;
    font-weight: 700;
    color: #333;
}

.role-option.active .role-text {
    color: #c9929c;
}

.role-desc {
    font-size: 11px;
    color: #999;
}

/* ===== 通知项 ===== */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #fafbfc;
    border-radius: 12px;
    margin-bottom: 8px;
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    word-break: break-word;
}

.notification-time {
    font-size: 11px;
    color: #bbb;
    margin-top: 4px;
}

/* ===== 深色模式 ===== */
body.dark-mode {
    background: #1f1a1e;
    background-image:
        radial-gradient(ellipse at top left, rgba(201, 146, 156, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(201, 169, 110, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    color: #e0d9dd;
}

body.dark-mode .top-nav,
body.dark-mode .page-sub-header {
    background: rgba(31, 26, 30, 0.92);
    border-bottom-color: rgba(201, 146, 156, 0.15);
}

body.dark-mode .logo-text,
body.dark-mode .page-title,
body.dark-mode .section-title,
body.dark-mode .home-stats-title,
body.dark-mode .card-title {
    color: #e0d0d4;
}

body.dark-mode .date-display {
    background: rgba(201, 146, 156, 0.15);
    color: #b8b0d0;
}

body.dark-mode .teacher-name,
body.dark-mode .role-desc,
body.dark-mode .ranking-sub {
    color: #9a90b0;
}

body.dark-mode .check-item,
body.dark-mode .progress-bar-card,
body.dark-mode .ranking-section,
body.dark-mode .home-stat-card,
body.dark-mode .quick-action-btn,
body.dark-mode .batch-reset,
body.dark-mode .stat-card,
body.dark-mode .stats-tab,
body.dark-mode .ranking-item,
body.dark-mode .role-option,
body.dark-mode .notification-item,
body.dark-mode .modal-content,
body.dark-mode .search-input,
body.dark-mode .header-search-input,
body.dark-mode .dorm-card-new,
body.dark-mode .floor-tag {
    background: #211b30;
    color: #e0dcec;
    border-color: rgba(201, 146, 156, 0.25);
}

body.dark-mode .stats-tab.active,
body.dark-mode .ranking-tab.active,
body.dark-mode .floor-tag.active {
    background: #2a2240;
    color: #b8a8e8;
}

body.dark-mode .ranking-tabs {
    background: #1a1428;
}

body.dark-mode .quick-tag {
    background: rgba(201, 146, 156, 0.12);
    color: #b8a8e8;
    border-color: rgba(201, 146, 156, 0.2);
}

body.dark-mode .quick-tag.deduct-tag {
    background: rgba(255, 77, 79, 0.12);
    color: #ff7875;
    border-color: rgba(255, 77, 79, 0.2);
}

body.dark-mode .quick-tag.praise-tag {
    background: rgba(82, 196, 26, 0.12);
    color: #73d13d;
    border-color: rgba(82, 196, 26, 0.2);
}

body.dark-mode .remark-input {
    background: #1a1428;
    color: #e0dcec;
}

body.dark-mode .check-item-name,
body.dark-mode .ranking-room,
body.dark-mode .notification-message,
body.dark-mode .role-text,
body.dark-mode .home-stat-num {
    color: #e6e0f5;
}

body.dark-mode .progress-bar-track {
    background: #1a1428;
}

body.dark-mode .back-btn {
    background: #211b30;
    color: #c0b8d8;
}

body.dark-mode .upload-btn {
    border-color: rgba(201, 146, 156, 0.3);
    color: #9a90b0;
}

body.dark-mode .images-section {
    border-color: rgba(201, 146, 156, 0.25);
}

body.dark-mode .camera-btn {
    border-color: rgba(201, 146, 156, 0.4);
    color: #b8a8e8;
    background: rgba(201, 146, 156, 0.08);
}

body.dark-mode img.image-preview[data-img-id]:not([src]) {
    background: linear-gradient(90deg, #211b30 25%, #2a2240 50%, #211b30 75%);
    background-size: 200% 100%;
}

body.dark-mode .dorm-card-top-bar.unchecked,
body.dark-mode .score-toggle-btn.unchecked {
    background: #3a3350;
}

/* ===== 花瓣飘落动态背景 ===== */
.petal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.petal {
    position: absolute;
    top: -20px;
    font-size: 18px;
    opacity: 0;
    animation: petal-fall linear infinite;
    user-select: none;
}

@keyframes petal-fall {
    0% {
        transform: translateY(-20px) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    50% {
        transform: translateY(50vh) translateX(30px) rotate(180deg);
    }
    90% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(105vh) translateX(-20px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes petal-sway {
    0%, 100% { margin-left: 0; }
    50% { margin-left: 25px; }
}

/* ===== 登录问好弹窗 ===== */
.greeting-card {
    position: relative;
    background: linear-gradient(160deg, #fff5f5 0%, #ffeef0 30%, #fff8e7 60%, #fff0f5 100%);
    border-radius: 28px;
    padding: 40px 28px 28px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 20px 60px rgba(201, 146, 156, 0.35);
    overflow: hidden;
    animation: greetingEnter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes greetingEnter {
    from { transform: scale(0.5) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.greeting-deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.greeting-deco-circle.c1 {
    width: 140px; height: 140px;
    top: -50px; right: -40px;
    background: radial-gradient(circle, #ff6b9d, #ff9a9e);
}

.greeting-deco-circle.c2 {
    width: 100px; height: 100px;
    bottom: -30px; left: -30px;
    background: radial-gradient(circle, #ffd700, #c9a96e);
}

.greeting-deco-circle.c3 {
    width: 80px; height: 80px;
    top: 40%; right: -20px;
    background: radial-gradient(circle, #d4a5a5, #e8b4b8);
}

.greeting-confetti {
    font-size: 30px;
    position: absolute;
    top: 12px; right: 16px;
    animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0); opacity: 0.8; }
    50% { transform: scale(1.3) rotate(20deg); opacity: 1; }
}

.greeting-avatar-ring {
    width: 80px; height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9a9e 0%, #d4a5a5 50%, #c9a96e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 4px rgba(255,255,255,0.8), 0 8px 24px rgba(201, 146, 156, 0.4);
    animation: avatarFloat 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

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

.greeting-avatar {
    font-size: 40px;
}

.greeting-flower {
    position: absolute;
    top: 30px; left: 20px;
    font-size: 24px;
    animation: flowerSway 4s ease-in-out infinite;
}

@keyframes flowerSway {
    0%, 100% { transform: rotate(-15deg); }
    50% { transform: rotate(15deg); }
}

.greeting-title {
    font-size: 24px;
    font-weight: 700;
    font-family: "Noto Serif SC", Georgia, serif;
    background: linear-gradient(135deg, #d4a5a5 0%, #c9888c 50%, #c9a96e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.greeting-sub {
    font-size: 14px;
    color: #b08690;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.greeting-quote-box {
    position: relative;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(201, 146, 156, 0.15);
    position: relative;
    z-index: 1;
}

.greeting-quote-mark {
    font-size: 30px;
    color: #d4a5a5;
    opacity: 0.4;
    line-height: 1;
    display: block;
    text-align: left;
}

.greeting-quote-mark.end {
    text-align: right;
    margin-top: -8px;
}

.greeting-quote-text {
    font-size: 15px;
    color: #6b5559;
    line-height: 1.7;
    font-family: "Noto Serif SC", Georgia, serif;
    font-style: italic;
    margin: 4px 0;
}

.greeting-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #d4a5a5 0%, #c9888c 50%, #c9a96e 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(201, 146, 156, 0.4);
    transition: transform 0.2s;
    position: relative;
    z-index: 1;
    letter-spacing: 1px;
}

.greeting-btn:active {
    transform: scale(0.96);
}

body.dark-mode .greeting-card {
    background: linear-gradient(160deg, #2a1f26 0%, #2a2030 30%, #2a2520 60%, #2a1f28 100%);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 20px 60px rgba(0,0,0,0.5);
}

body.dark-mode .greeting-title {
    background: linear-gradient(135deg, #d4a5a5 0%, #e8b4b8 50%, #c9a96e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .greeting-sub { color: #a08090; }

body.dark-mode .greeting-quote-box {
    background: rgba(255,255,255,0.04);
    border-color: rgba(201, 146, 156, 0.2);
}

body.dark-mode .greeting-quote-text { color: #c0b0b8; }


@media (max-width: 640px) {
  .login-logo { width: 96px; height: 96px; border-radius: 26px; }
  .login-logo span { font-size: 54px; }
  .logo-icon { min-width: 38px; height: 38px; font-size: 22px; }
  .logo-text { font-size: 18px; }
}
