/* ===== 社区居家养老运营管理系统 - 样式 ===== */

/* 全局 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 700;
    letter-spacing: 1px;
}

#nav-menu .nav-link {
    border-radius: 8px;
    margin: 0 2px;
    transition: all 0.2s;
}
#nav-menu .nav-link:hover,
#nav-menu .nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* 统计卡片 */
.stats-card {
    border-radius: 16px;
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.stats-card .card-body {
    padding: 1.2rem 0.8rem;
}
.stats-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 5px 0;
}

/* 员工卡片 */
.staff-card {
    border-radius: 12px;
    border: none;
    transition: box-shadow 0.2s;
}
.staff-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 老人卡片 */
.elderly-card {
    border-radius: 12px;
    border: none;
    transition: box-shadow 0.2s;
}
.elderly-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* 工单卡片 */
.order-card {
    border-radius: 12px;
    transition: transform 0.2s;
}
.order-card:hover {
    transform: translateY(-2px);
}

/* 头像圆圈 */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* 卡片通用 */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 0.75rem 1rem;
}

/* Modal */
.modal-content {
    border-radius: 12px;
    border: none;
}
.modal-header {
    border-radius: 12px 12px 0 0;
}

/* 列表组 */
.list-group-item {
    border-left: none;
    border-right: none;
}
.list-group-item:first-child {
    border-top: none;
}

/* 表格 */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
}

/* Toast */
.toast {
    border-radius: 10px;
}

/* 响应式 - 移动端适配 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem !important;
    }
    .stats-card h3 {
        font-size: 1.5rem;
    }
    .stats-card .card-body {
        padding: 0.8rem 0.5rem;
    }
    .col-6 {
        padding-left: 4px;
        padding-right: 4px;
    }
    .btn {
        font-size: 0.85rem;
        padding: 0.35rem 0.65rem;
    }
    h4 {
        font-size: 1.1rem;
    }
}

/* 打印优化 */
@media print {
    .navbar, .btn, .dropdown, #filter-date, #filter-status, #filter-log-date, #filter-log-staff, .modal {
        display: none !important;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* 动画 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
.pulse {
    animation: pulse 2s infinite;
}

/* 加载中 */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    height: 20px;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== 移动端优化 ===== */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .navbar-brand { font-size: 1rem; }
    #nav-menu .nav-link { padding: 0.4rem 0.6rem; font-size: 0.9rem; }
    
    /* 统计卡片 */
    .stats-card { margin-bottom: 10px; }
    .stats-card h3 { font-size: 1.5rem; }
    .stats-card .card-body { padding: 0.8rem; }
    
    /* 表格优化 */
    .table-responsive { font-size: 0.85rem; }
    .table th, .table td { padding: 0.4rem; }
    
    /* 按钮优化 */
    .btn { padding: 0.375rem 0.75rem; font-size: 0.9rem; }
    .btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }
    
    /* 卡片优化 */
    .card { margin-bottom: 10px; }
    .elderly-card .avatar-circle { width: 35px; height: 35px; font-size: 0.9rem; }
    
    /* 模态框优化 */
    .modal-dialog { margin: 10px; }
    .modal-body { padding: 1rem; }
    
    /* 表单优化 */
    .form-control, .form-select { font-size: 0.9rem; }
    
    /* 标题优化 */
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
}

/* 触摸友好 */
@media (hover: none) {
    .btn, .nav-link, .dropdown-item { min-height: 44px; display: flex; align-items: center; }
    .stats-card:hover { transform: none; }
}

/* 打印优化 */
@media print {
    .navbar, .btn, .dropdown { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}
