/* 京东风格配色方案 */
:root {
    /* 主色调 - 京东红 */
    --primary: #e1251b;
    --primary-dark: #c41b12;
    --primary-light: #ff4136;
    
    /* 辅助色 */
    --secondary: #f5f5f5;
    --success: #00a650;
    --warning: #ff9800;
    --danger: #e1251b;
    --info: #2196f3;
    
    /* 背景色 */
    --bg: #f5f5f5;
    --card-bg: #ffffff;
    
    /* 文字颜色 */
    --text: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    
    /* 边框和阴影 */
    --border: #e5e5e5;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }

/* 页面容器 */
.page-container {
    max-width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg);
    position: relative;
}

/* 页面头部 - 京东风格 */
.page-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(225,37,27,0.3);
}

.page-header h1 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.page-header .back-btn {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    background: none;
    border: none;
}

/* 页面内容 */
.page-content {
    padding: 16px;
    padding-bottom: 70px;
}

/* 底部导航 - 京东风格 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    /* 添加安全区域支持 */
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-bottom: constant(safe-area-inset-bottom, 0); /* iOS 11.0-11.2 */
    /* 确保内容不超出 */
    box-sizing: border-box;
    min-height: 60px;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 10px 0 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-lighter);
    font-size: 12px;
    /* 确保内容不超出 */
    box-sizing: border-box;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.bottom-nav .nav-item.active {
    color: var(--primary);
}

.bottom-nav .nav-item .nav-icon {
    font-size: 24px;
    display: block;
    margin-bottom: 3px;
    line-height: 1;
}

/* 卡片 - 京东风格 */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    box-shadow: none;
    border: 1px solid var(--border);
}

/* 时间段选择项 - 自适应多列布局 */
.slot-item {
    background: var(--card-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 6px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0; /* 防止内容溢出 */
}

.slot-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(225,37,27,0.1);
}

.slot-item.selected {
    background: #fff5f5;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(225,37,27,0.2);
}

.slot-item.disabled {
    background: #f5f5f5;
    border-color: #e0e0e0;
    cursor: not-allowed;
    opacity: 0.6;
}

.slot-item.disabled:hover {
    border-color: #e0e0e0;
    box-shadow: none;
}

.slot-item.expired {
    background: #fafafa;
    border-color: #d0d0d0;
    cursor: not-allowed;
    opacity: 0.5;
}

.slot-item.expired:hover {
    border-color: #d0d0d0;
    box-shadow: none;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

/* 按钮 - 京东风格 */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:active {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:active {
    background: var(--primary);
    color: #fff;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

/* 表单 - 京东风格 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-weight: 500;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.2s;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(225,37,27,0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

/* 徽章 - 京东风格 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending {
    background: #fff8e1;
    color: #f57c00;
}

.badge-completed {
    background: #e8f5e9;
    color: #43a047;
}

.badge-cancelled {
    background: #ffebee;
    color: #e53935;
}

/* 列表项 - 京东风格 */
.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item span:first-child {
    color: var(--text-light);
    font-size: 14px;
}

/* 统计卡片 - 京东风格 */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 12px 8px;
    text-align: center;
    border: 1px solid var(--border);
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-light);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-lighter);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Toast提示 - 京东风格 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.75);
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 9999;
    max-width: 80%;
    text-align: center;
    animation: toastFadeIn 0.2s ease-out;
    /* GPU加速 */
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@keyframes toastFadeIn {
    from { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9);
    }
    to { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes toastFadeOut {
    from { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1);
    }
    to { 
        opacity: 0; 
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-lighter);
    font-size: 14px;
}

/* 模态框 - 京东风格 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.2s ease-out;
    /* GPU加速 */
    will-change: opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.modal {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
    /* GPU加速 */
    will-change: transform, opacity;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
    color: var(--text);
}

/* 模态框动画 */
@keyframes modalFadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

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

@keyframes modalSlideIn {
    from { 
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to { 
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 日期选择器 - 京东风格 */
.date-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.date-item {
    flex: 0 0 calc(14.28% - 7px);
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    background: var(--secondary);
    transition: all 0.2s;
}

.date-item.active {
    background: var(--primary);
    color: #fff;
}

.date-item.disabled {
    color: var(--text-lighter);
    cursor: not-allowed;
    opacity: 0.5;
}

/* 时间段列表 - 自适应网格布局 */
.time-slot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
}

.time-slot-item {
    flex: 0 0 calc(33.33% - 6px);
    text-align: center;
    padding: 10px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    background: var(--secondary);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.time-slot-item.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.time-slot-item.disabled {
    color: var(--text-lighter);
    cursor: not-allowed;
    opacity: 0.5;
}

/* 表格 - 京东风格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--secondary);
    font-weight: 600;
    color: var(--text);
}

.table tr:hover {
    background: var(--secondary);
}

/* 后台管理样式 */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    width: 200px;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 16px 0;
}

.admin-main {
    flex: 1;
    padding: 20px;
    background: var(--bg);
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    color: var(--text);
}

.menu-item:hover {
    background: var(--secondary);
}

.menu-item.active {
    background: rgba(225,37,27,0.1);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

/* 响应式布局 - 多端适配 */

/* 超小屏幕 (手机竖屏, < 375px) */
@media (max-width: 374px) {
    body {
        font-size: 12px;
    }
    
    .page-header {
        padding: 12px 16px;
    }
    
    .page-header h1 {
        font-size: 16px;
    }
    
    .page-content {
        padding: 8px;
        padding-bottom: 60px;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .bottom-nav-item {
        padding: 6px 0;
        font-size: 11px;
    }
    
    .bottom-nav-item .icon {
        font-size: 18px;
    }
    
    .modal {
        width: 95%;
        padding: 16px;
    }
    
    .modal-title {
        font-size: 14px;
    }
    
    .date-item {
        font-size: 11px;
        padding: 6px 2px;
    }
    
    .time-slot-item {
        font-size: 11px;
        padding: 8px 4px;
    }
}

/* 小屏幕 (手机竖屏, 375px - 414px) */
@media (min-width: 375px) and (max-width: 414px) {
    body {
        font-size: 13px;
    }
    
    .page-header {
        padding: 14px 18px;
    }
    
    .page-header h1 {
        font-size: 17px;
    }
    
    .page-content {
        padding: 10px;
        padding-bottom: 65px;
    }
    
    .card {
        padding: 14px;
    }
    
    .btn {
        padding: 9px 18px;
        font-size: 13px;
    }
    
    .bottom-nav-item {
        padding: 7px 0;
        font-size: 12px;
    }
    
    .modal {
        width: 92%;
        padding: 18px;
    }
}

/* 中等屏幕 (手机横屏/小平板, 415px - 768px) */
@media (min-width: 415px) and (max-width: 768px) {
    body {
        font-size: 14px;
    }
    
    .page-content {
        padding: 12px;
        padding-bottom: 70px;
    }
    
    .modal {
        width: 90%;
        max-width: 400px;
    }
}

/* 平板 (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .page-container {
        max-width: 768px;
        margin: 0 auto;
    }
    
    .page-header {
        padding: 18px 24px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .page-content {
        padding: 16px;
        padding-bottom: 80px;
    }
    
    .card {
        padding: 18px;
        margin-bottom: 12px;
    }
    
    .modal {
        max-width: 450px;
    }
    
    .admin-layout {
        flex-direction: row;
    }
    
    .admin-sidebar {
        width: 220px;
    }
}

/* 大屏幕 (桌面, > 1024px) */
@media (min-width: 1025px) {
    .page-container {
        max-width: 1024px;
        margin: 0 auto;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
    }
    
    .page-header {
        padding: 20px 32px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .page-content {
        padding: 20px;
        padding-bottom: 90px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .modal {
        max-width: 500px;
    }
    
    .admin-layout {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .admin-sidebar {
        width: 240px;
    }
    
    .admin-main {
        padding: 24px;
    }
}

/* 鸿蒙元服务特殊优化 */

/* 手机竖屏 */
@media screen and (max-width: 414px) and (orientation: portrait) {
    .page-content {
        padding-bottom: 70px;
    }
    
    .bottom-nav {
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    
    /* 紧凑布局 */
    .card {
        padding: 14px;
        margin-bottom: 10px;
    }
    
    .btn {
        padding: 10px 18px;
    }
}

/* 手机横屏 */
@media screen and (max-height: 414px) and (orientation: landscape) {
    .page-header {
        padding: 10px 20px;
    }
    
    .page-header h1 {
        font-size: 16px;
    }
    
    .page-content {
        padding: 10px 20px;
        padding-bottom: 55px;
    }
    
    .bottom-nav {
        height: 50px;
    }
    
    .bottom-nav-item {
        padding: 6px 0;
    }
    
    .bottom-nav-item .icon {
        font-size: 18px;
    }
    
    .bottom-nav-item span {
        font-size: 11px;
    }
}

/* 平板竖屏 (7-10英寸) */
@media screen and (min-width: 600px) and (max-width: 1024px) and (orientation: portrait) {
    .page-container {
        max-width: 768px;
        margin: 0 auto;
    }
    
    .page-header {
        padding: 20px 32px;
    }
    
    .page-header h1 {
        font-size: 22px;
    }
    
    .page-content {
        padding: 20px;
        padding-bottom: 80px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 15px;
    }
    
    .bottom-nav {
        height: 64px;
    }
    
    .bottom-nav-item {
        padding: 10px 0;
    }
    
    .bottom-nav-item .icon {
        font-size: 26px;
    }
    
    .bottom-nav-item span {
        font-size: 14px;
    }
    
    /* 两列卡片布局 */
    .card-grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 统计卡片放大 */
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 32px;
    }
    
    .stat-label {
        font-size: 14px;
    }
    
    /* 时间段选择4列 */
    .time-slot-item {
        flex: 0 0 calc(25% - 6px);
    }
}

/* 平板横屏 (7-10英寸) */
@media screen and (min-height: 600px) and (max-height: 1024px) and (orientation: landscape) {
    .page-container {
        max-width: 1024px;
        margin: 0 auto;
    }
    
    .page-header {
        padding: 16px 40px;
    }
    
    .page-header h1 {
        font-size: 20px;
    }
    
    .page-content {
        padding: 16px 40px;
        padding-bottom: 70px;
    }
    
    .card {
        padding: 18px;
    }
    
    .bottom-nav {
        height: 56px;
    }
    
    .bottom-nav-item .icon {
        font-size: 24px;
    }
    
    /* 三列卡片布局 */
    .card-grid-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}

/* 大平板/折叠屏展开 (10-13英寸) */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .page-container {
        max-width: 1024px;
        margin: 0 auto;
        box-shadow: 0 0 30px rgba(0,0,0,0.1);
    }
    
    .page-header {
        padding: 24px 48px;
    }
    
    .page-header h1 {
        font-size: 24px;
    }
    
    .page-content {
        padding: 24px;
        padding-bottom: 90px;
    }
    
    .card {
        padding: 24px;
        margin-bottom: 20px;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 16px;
    }
    
    .bottom-nav {
        height: 72px;
    }
    
    .bottom-nav-item {
        padding: 12px 0;
    }
    
    .bottom-nav-item .icon {
        font-size: 28px;
    }
    
    .bottom-nav-item span {
        font-size: 15px;
    }
    
    /* 四列卡片布局 */
    .card-grid-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    /* 统计卡片更大 */
    .stat-card {
        padding: 24px;
    }
    
    .stat-value {
        font-size: 36px;
    }
    
    .stat-label {
        font-size: 15px;
    }
}

/* 折叠屏特殊适配 */
@media screen and (min-width: 600px) and (max-width: 900px) {
    /* 华为Mate X系列、三星Galaxy Z Fold系列 */
    
    /* 折叠屏展开状态 */
    .page-content {
        padding: 18px;
    }
    
    /* 两列布局 */
    .card-grid-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 优化按钮间距 */
    .btn-group {
        gap: 12px;
    }
    
    /* 时间段选择3列 */
    .time-slot-item {
        flex: 0 0 calc(33.33% - 6px);
    }
}

/* 鸿蒙折叠屏动态适配 */
@media screen and (min-device-width: 600px) and (max-device-width: 900px) {
    /* 支持动态调整 */
    .page-container {
        width: 100%;
        max-width: 100%;
    }
    
    /* 弹性布局 */
    .flex-layout {
        display: flex;
        flex-wrap: wrap;
        gap: 16px;
    }
    
    .flex-layout > * {
        flex: 1 1 calc(50% - 8px);
        min-width: 280px;
    }
}

/* 超宽屏幕 (> 1366px) */
@media screen and (min-width: 1367px) {
    .page-container {
        max-width: 1200px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(0,0,0,0.15);
    }
    
    .page-header {
        padding: 28px 56px;
    }
    
    .page-header h1 {
        font-size: 26px;
    }
    
    .page-content {
        padding: 28px;
        padding-bottom: 100px;
    }
    
    .card {
        padding: 28px;
        margin-bottom: 24px;
    }
    
    .btn {
        padding: 16px 32px;
        font-size: 17px;
    }
    
    .bottom-nav {
        height: 80px;
    }
    
    .bottom-nav-item {
        padding: 14px 0;
    }
    
    .bottom-nav-item .icon {
        font-size: 32px;
    }
    
    .bottom-nav-item span {
        font-size: 16px;
    }
}

/* 鸿蒙多窗口模式 */
@media screen and (max-width: 600px) and (min-height: 600px) {
    /* 分屏模式 */
    .page-header {
        padding: 12px 16px;
    }
    
    .page-content {
        padding: 10px;
        padding-bottom: 60px;
    }
    
    .bottom-nav {
        height: 52px;
    }
}

/* 鸿蒙平行视界 (平板横屏双栏) */
@media screen and (min-width: 1024px) and (orientation: landscape) {
    .parallel-view {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        height: calc(100vh - 60px);
    }
    
    .parallel-view-left,
    .parallel-view-right {
        overflow-y: auto;
        padding: 20px;
    }
}

/* 安全区域适配 (刘海屏、挖孔屏) */
@supports (padding: max(0px)) {
    .page-header {
        padding-top: max(16px, env(safe-area-inset-top));
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .page-content {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }
    
    .bottom-nav {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border-width: 0.5px;
    }
    
    .btn {
        border-radius: 4px;
    }
}

/* 暗色模式支持 (可选) */
@media (prefers-color-scheme: dark) {
    /* 暂不启用,保持京东红色主题 */
}

/* 打印样式 */
@media print {
    .page-header,
    .bottom-nav,
    .btn {
        display: none;
    }
    
    .page-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* 响应式表格 */
@media (max-width: 768px) {
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 6px;
    }
    
    /* 表格横向滚动 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 响应式表单 */
@media (max-width: 414px) {
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    select.form-control {
        padding-right: 28px;
    }
}

/* 响应式卡片网格 */
@media (min-width: 769px) {
    .card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 16px;
    }
}

/* 响应式统计卡片 */
@media (max-width: 414px) {
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-label {
        font-size: 11px;
    }
}

/* 响应式时间段选择 */
@media (max-width: 374px) {
    .time-slot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .slot-item {
        padding: 6px 5px;
    }
}

@media (min-width: 375px) and (max-width: 414px) {
    .time-slot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (min-width: 415px) and (max-width: 768px) {
    .time-slot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
}

@media (min-width: 769px) {
    .time-slot-list {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 8px;
    }
    
    .slot-item {
        padding: 10px 8px;
    }
}

/* 响应式日期选择 */
@media (max-width: 374px) {
    .date-item {
        flex: 0 0 calc(14.28% - 6px);
        font-size: 10px;
    }
}

/* 响应式管理后台 */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 12px 0;
    }
    
    .admin-main {
        padding: 12px;
    }
    
    .menu-item {
        padding: 10px 16px;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-lighter); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }

 
 
/* 星期选择器 */
.weekday-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.wd-item {
    flex: 1;
    min-width: calc(14.28% - 7px);
    padding: 12px 8px;
    text-align: center;
    background: var(--secondary);
    border: 2px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    user-select: none;
}

.wd-item:hover {
    border-color: var(--primary);
    background: #fff5f5;
}

.wd-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.wd-item.active:hover {
    background: var(--primary-dark);
}
