* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

/* ===== 登录/注册页面 ===== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    animation: fadeInUp 0.5s ease;
}

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

.auth-card h2 {
    text-align: center;
    color: #333;
    font-size: 26px;
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-card .subtitle {
    text-align: center;
    color: #888;
    font-size: 14px;
    margin-bottom: 32px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
    font-family: inherit;
    letter-spacing: 1px;
}

.auth-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.auth-form .btn-primary:active {
    transform: translateY(0);
}

.auth-error {
    background: #fee;
    color: #e74c3c;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #fdd;
}

.auth-success {
    background: #e8f8f0;
    color: #27ae60;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid #d4efdf;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    color: #888;
    font-size: 14px;
}

.auth-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.auth-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* 验证码 */
.captcha-group {
    margin-bottom: 20px;
}

.captcha-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
    min-width: 0;
}

.captcha-img {
    height: 44px;
    border-radius: 10px;
    cursor: pointer;
    border: 2px solid #e8e8e8;
    transition: border-color 0.3s;
}

.captcha-img:hover {
    border-color: #667eea;
}

/* ===== 主页面 ===== */
.main-page {
    max-width: 960px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 16px 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.top-bar .welcome {
    color: #555;
    font-size: 15px;
}

.top-bar .welcome strong {
    color: #667eea;
    font-weight: 600;
}

.top-bar .logout-btn {
    color: #888;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 16px;
    border-radius: 20px;
    transition: all 0.2s;
    border: 1px solid #e8e8e8;
}

.top-bar .logout-btn:hover {
    background: #f5f5f5;
    color: #555;
    border-color: #ccc;
}

.page-title {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.page-title .date {
    font-weight: 400;
    opacity: 0.9;
    font-size: 22px;
}

/* 日期导航 */
.date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.date-nav-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.date-nav-btn:hover {
    background: #fff;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.date-form {
    display: flex;
    gap: 6px;
    align-items: center;
}

.date-input {
    padding: 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.date-today {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

.date-today:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(67, 233, 123, 0.5);
}

/* 任务卡片列表 */
.task-section,
.form-section {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 28px 32px;
    margin-bottom: 24px;
    animation: fadeInUp 0.4s ease;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
    padding-bottom: 14px;
    border-bottom: 2px solid #f5f5f5;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 任务表格 */
.task-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.task-table thead th {
    background: #f8f9ff;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid #eef0ff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
    color: #444;
    vertical-align: middle;
}

.task-table tbody tr:last-child td {
    border-bottom: none;
}

.task-table tbody tr:hover {
    background: #fafbff;
}

.task-table .task-title {
    font-weight: 600;
    color: #333;
}

.task-table .task-desc {
    color: #888;
    font-size: 14px;
}

/* 打卡按钮 */
.check-btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #f0f0f0;
    color: #666;
}

.check-btn:hover {
    transform: scale(1.05);
}

.check-btn.checked {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(67, 233, 123, 0.4);
}

/* 编辑按钮 */
.edit-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    color: #667eea;
    background: #f0f3ff;
    transition: all 0.2s;
    margin-right: 6px;
}

.edit-btn:hover {
    background: #667eea;
    color: #fff;
}

/* 删除按钮 */
.delete-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    color: #e74c3c;
    background: #fef0f0;
    transition: all 0.2s;
}

.delete-btn:hover {
    background: #e74c3c;
    color: #fff;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #aaa;
    font-size: 16px;
}

/* 添加任务表单 */
.task-form {
    display: grid;
    gap: 16px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row label {
    color: #555;
    font-size: 14px;
    font-weight: 500;
}

.task-form input[type="text"],
.task-form input[type="date"],
.task-form textarea,
.task-form select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #fafafa;
    font-family: inherit;
    box-sizing: border-box;
}

.task-form input[type="text"]:focus,
.task-form input[type="date"]:focus,
.task-form textarea:focus,
.task-form select:focus {
    outline: none;
    border-color: #667eea;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

.task-form textarea {
    resize: vertical;
    min-height: 60px;
}

.task-form .submit-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 1px;
    justify-self: start;
}

.task-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

/* 链接颜色覆盖 */
a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    color: #764ba2;
}

/* ===== 用户管理 ===== */
.top-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 87, 108, 0.35);
}

.admin-success,
.admin-error {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.admin-success {
    background: #e8f8f0;
    color: #27ae60;
    border: 1px solid #d4efdf;
}

.admin-error {
    background: #fee;
    color: #e74c3c;
    border: 1px solid #fdd;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    min-width: 600px;
}

.admin-table td {
    font-size: 14px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.badge-user {
    background: #e8f0fe;
    color: #667eea;
}

.action-btns {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-form {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.mini-input {
    padding: 6px 10px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    width: 130px;
    transition: border-color 0.3s;
}

.mini-input:focus {
    outline: none;
    border-color: #667eea;
}

.mini-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.mini-btn.btn-primary-color {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.mini-btn.btn-primary-color:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mini-btn.btn-danger {
    background: #fef0f0;
    color: #e74c3c;
}

.mini-btn.btn-danger:hover {
    background: #e74c3c;
    color: #fff;
}

.mini-btn.btn-add-admin {
    background: #fff7e6;
    color: #fa8c16;
}

.mini-btn.btn-add-admin:hover {
    background: #fa8c16;
    color: #fff;
}

.mini-btn.btn-remove-admin {
    background: #f0f0f0;
    color: #666;
}

.mini-btn.btn-remove-admin:hover {
    background: #666;
    color: #fff;
}

.self-tag {
    display: inline-block;
    padding: 6px 10px;
    background: #f5f5f5;
    color: #999;
    border-radius: 8px;
    font-size: 12px;
}

/* ===== 打卡记录 ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 36px;
    line-height: 1;
}

.stat-streak {
    background: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
    color: #fff;
}

.stat-total-days {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: #fff;
}

.stat-total-checkins {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.stat-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
}

/* 热力图 */
.heatmap {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.heat-cell {
    border-radius: 8px;
    padding: 8px 4px;
    text-align: center;
    min-height: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: #555;
    transition: transform 0.2s;
    cursor: default;
}

.heat-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.heat-date {
    font-weight: 500;
}

.heat-count {
    font-size: 10px;
    color: #666;
    margin-top: 2px;
}

.heatmap-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    font-size: 12px;
    color: #888;
}

.legend-color {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

/* 时间线 */
.timeline {
    position: relative;
}

.timeline-date-block {
    margin-bottom: 28px;
    position: relative;
}

.timeline-date-block:last-child {
    margin-bottom: 0;
}

.timeline-date-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9ff 0%, #eef0ff 100%);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 14px;
    border-left: 4px solid #667eea;
}

.date-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
}

.tag-today {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tag-yesterday {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.date-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.date-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #666;
}

.date-progress strong {
    color: #667eea;
    font-size: 15px;
}

.progress-bar {
    width: 80px;
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #43e97b 0%, #38f9d7 100%);
    border-radius: 3px;
    transition: width 0.3s;
}

.timeline-items {
    padding-left: 8px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    background: #fff;
    color: #555;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s;
}

.page-link:hover {
    background: #667eea;
    color: #fff;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.page-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-color: transparent;
    font-weight: 600;
}

.page-info {
    color: #888;
    font-size: 13px;
    margin-left: 8px;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding: 12px 14px;
    background: #fafbff;
    border-radius: 10px;
    margin-bottom: 10px;
    transition: background 0.2s;
}

.timeline-item:hover {
    background: #f0f3ff;
}

.item-dot {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 2px;
}

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

.item-title {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.item-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}

.item-desc {
    color: #999;
}

.item-time {
    color: #bbb;
}

/* ===== 响应式：平板 ===== */
@media (max-width: 768px) {
    .main-page {
        max-width: 100%;
        padding: 16px 14px 40px;
    }

    .page-title {
        font-size: 24px;
    }

    .task-section,
    .form-section {
        padding: 22px 20px;
        border-radius: 14px;
    }

    .auth-card {
        padding: 40px 32px;
    }
}

/* ===== 响应式：手机 ===== */
@media (max-width: 600px) {
    body {
        font-size: 15px;
    }

    /* 登录/注册 */
    .auth-page {
        padding: 16px;
        align-items: flex-start;
        padding-top: 40px;
    }

    .auth-card {
        padding: 32px 24px;
        border-radius: 14px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

    .auth-card h2 {
        font-size: 22px;
    }

    .auth-card .subtitle {
        font-size: 13px;
        margin-bottom: 24px;
    }

    .auth-form .form-group {
        margin-bottom: 16px;
    }

    .auth-form input[type="text"],
    .auth-form input[type="password"] {
        padding: 12px 14px;
        font-size: 16px;
    }

    .auth-form .btn-primary {
        padding: 13px;
        font-size: 15px;
    }

    /* 验证码 */
    .captcha-row {
        gap: 8px;
    }

    .captcha-input {
        font-size: 16px;
    }

    .captcha-img {
        height: 40px;
    }

    /* 顶部栏 */
    .top-bar {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 14px 16px;
        border-radius: 12px;
    }

    .top-bar-actions {
        justify-content: center;
    }

    .top-bar .welcome {
        font-size: 14px;
    }

    .top-bar .logout-btn {
        display: inline-block;
        padding: 8px 20px;
    }

    /* 页面标题 */
    .page-title {
        font-size: 20px;
        margin-bottom: 18px;
    }

    /* 日期导航 */
    .date-nav {
        justify-content: center;
        gap: 8px;
        margin-bottom: 18px;
    }

    .date-nav-btn,
    .date-today {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .date-form {
        width: 100%;
        justify-content: center;
    }

    .date-input {
        width: 100%;
        text-align: center;
        font-size: 15px;
        padding: 10px 12px;
    }

    /* 区域卡片 */
    .task-section,
    .form-section {
        padding: 18px 14px;
        border-radius: 12px;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 17px;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    /* 任务表格 → 卡片布局 */
    .task-table,
    .task-table thead,
    .task-table tbody,
    .task-table tr,
    .task-table td {
        display: block;
        width: 100%;
    }

    .task-table thead {
        display: none;
    }

    .task-table tbody tr {
        background: #fafbff;
        border: 1px solid #eef0ff;
        border-radius: 12px;
        padding: 14px 16px;
        margin-bottom: 12px;
        transition: box-shadow 0.2s;
    }

    .task-table tbody tr:last-child {
        margin-bottom: 0;
    }

    .task-table tbody tr:hover {
        background: #f5f7ff;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.08);
    }

    .task-table tbody td {
        padding: 4px 0;
        border: none;
        font-size: 15px;
        line-height: 1.5;
    }

    .task-table .task-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .task-table .task-desc {
        font-size: 13px;
        color: #888;
        margin-bottom: 10px;
    }

    /* 打卡/删除按钮行 */
    .task-table td:nth-child(3),
    .task-table td:nth-child(4) {
        padding: 6px 0;
    }

    .task-table td:nth-child(3) {
        margin-top: 8px;
    }

    .check-btn {
        display: block;
        text-align: center;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 500;
        margin-bottom: 8px;
    }

    .check-btn:hover {
        transform: none;
    }

    .edit-btn {
        display: block;
        text-align: center;
        padding: 8px 14px;
        font-size: 13px;
        margin-bottom: 6px;
        margin-right: 0;
    }

    .delete-btn {
        display: block;
        text-align: center;
        padding: 8px 14px;
        font-size: 13px;
    }

    /* 添加任务表单 */
    .task-form {
        gap: 14px;
    }

    .task-form input[type="text"],
    .task-form input[type="date"],
    .task-form textarea,
    .task-form select {
        padding: 12px 14px;
        font-size: 16px;
        border-radius: 10px;
    }

    /* 让表单输入框在iOS上不会被缩放 */
    .task-form input[type="text"],
    .task-form input[type="date"],
    .task-form select {
        font-size: 16px;
    }

    .task-form .submit-btn {
        width: 100%;
        padding: 14px;
        font-size: 15px;
        justify-self: stretch;
    }

    .empty-state {
        padding: 30px 16px;
        font-size: 14px;
    }

    /* 用户管理移动端 */
    .top-bar-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-table {
        min-width: 500px;
    }

    .action-btns {
        gap: 6px;
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .mini-input {
        width: 100%;
    }

    /* 打卡记录移动端 */
    .stats-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 18px 16px;
    }

    .stat-value {
        font-size: 28px;
    }

    .heatmap {
        grid-template-columns: repeat(6, 1fr);
        gap: 4px;
    }

    .heat-cell {
        min-height: 38px;
        padding: 6px 2px;
        font-size: 10px;
    }

    .heat-count {
        font-size: 9px;
    }

    .timeline-date-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
    }

    .date-progress {
        width: 100%;
        justify-content: space-between;
    }

    .progress-bar {
        flex: 1;
        max-width: 120px;
    }

    .timeline-item {
        padding: 10px 12px;
        gap: 10px;
    }

    .pagination {
        gap: 4px;
    }

    .page-link {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
        padding: 0 6px;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin-left: 0;
        margin-top: 4px;
    }

    .item-dot {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }

    .item-title {
        font-size: 14px;
    }

    .item-meta {
        font-size: 12px;
    }
}

/* ===== 响应式：小屏手机 ===== */
@media (max-width: 360px) {
    .auth-card {
        padding: 28px 20px;
    }

    .auth-card h2 {
        font-size: 20px;
    }

    .page-title {
        font-size: 18px;
    }

    .date-nav {
        gap: 6px;
    }

    .date-nav-btn,
    .date-today {
        padding: 8px 12px;
        font-size: 12px;
    }

    .task-section,
    .form-section {
        padding: 16px 12px;
    }

    .task-table tbody tr {
        padding: 12px 14px;
    }
}