/* 全局背景与字体 */
body {
    background: #f0f2f5;
    font-family: 'Segoe UI', Roboto, system-ui, -apple-system, sans-serif;
    margin: 0;
}

.app-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 24px;
}

/* 顶部导航 */
.app-header {
    background: white;
    padding: 12px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.app-logo {
    font-weight: 700;
    font-size: 1.6rem;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

/* 诊所切换器 */
.clinic-picker {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    min-width: 220px;
    margin-top: 6px;
    border: 1px solid #e9ecef;
}

/* 标签页 */
.app-tabs .nav-link {
    border-radius: 30px;
    padding: 8px 24px;
    font-weight: 500;
    color: #555;
    border: none;
    margin-right: 4px;
}
.app-tabs .nav-link.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 10px rgba(37,99,235,0.2);
}

/* 卡片 */
.app-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    background: white;
}
.app-card .card-header {
    background: transparent;
    border-bottom: 1px solid #f1f3f5;
    font-weight: 600;
    padding: 16px 20px;
    border-radius: 16px 16px 0 0;
}

/* 表格 */
.table th {
    font-weight: 600;
    color: #6b7280;
    border-bottom-width: 1px;
}
.table td {
    vertical-align: middle;
}

/* 排班表格 */
.schedule-table td {
    cursor: pointer;
    transition: 0.15s;
    font-weight: 500;
    white-space: nowrap;
    min-width: 7em;
    padding: 10px 4px;
}
.schedule-table td:hover {
    filter: brightness(0.96);
    transform: scale(1.01);
}

/* 班次颜色 */
td.shift-rest { background-color: #f0f0f0 !important; color: #9ca3af; }
td.shift-early { background-color: #d1fae5 !important; color: #065f46; }
td.shift-late { background-color: #dbeafe !important; color: #1e40af; }
td.shift-sterile { background-color: #ffedd5 !important; color: #9a3412; }
td.locked-cell { box-shadow: inset 0 0 0 3px #f43f5e !important; }

/* 图例 */
.badge.shift-early { background-color: #d1fae5 !important; color: #065f46; }
.badge.shift-late { background-color: #dbeafe !important; color: #1e40af; }
.badge.shift-sterile { background-color: #ffedd5 !important; color: #9a3412; }
.badge.shift-rest { background-color: #f3f4f6 !important; color: #6b7280; }

/* 按钮微调 */
.btn {
    border-radius: 8px;
    font-weight: 500;
}
.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
}
.btn-primary:hover {
    background: #1d4ed8;
}

/* 模态框美化 */
.modal-content {
    border-radius: 16px;
    border: none;
}

.app-header .form-check-label {
    font-size: 0.9rem;
}

.shift-picker-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.shift-picker-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    min-width: 280px;
    text-align: center;
}

/* 打印样式 */
@media print {
    body {
        background: white !important;
    }
    .app-header,
    .app-tabs,
    .btn,
    .form-switch,
    .shift-picker-overlay,
    .alert,
    .badge,
    #infoToast,
    .clinic-picker,
    .modal,
    footer,
    .d-flex.mb-3,
    .nav {
        display: none !important;
    }
    .app-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    .card {
        box-shadow: none !important;
        border: none !important;
        page-break-inside: avoid;
    }
    .schedule-table {
        font-size: 12px;
    }
    .schedule-table td,
    .schedule-table th {
        padding: 4px 6px;
    }
}

.app-footer {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-top: 24px;
}