/* ============================================
   报工管理系统 - H5 公共样式
   基于 Bootstrap 5 + 移动端适配
   ============================================ */

/* 基础设置 */
html, body {
    height: 100%;
    font-size: 16px;
}

body {
    background-color: #f5f5f5;
    padding-bottom: 70px; /* 底部导航栏高度 */
}

/* 登录页样式 */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.login-box h2 {
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

/* 页面标题栏 */
.page-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.bottom-nav a {
    color: #666;
    text-decoration: none;
    text-align: center;
    font-size: 0.75rem;
    flex: 1;
}

.bottom-nav a i {
    display: block;
    font-size: 1.3rem;
    margin-bottom: 3px;
}

.bottom-nav a.active {
    color: #667eea;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 15px;
}

.card-header {
    background: white;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 15px;
    font-weight: 600;
}

/* 悬浮添加按钮 */
.fab-add {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
}

.fab-add:active {
    transform: scale(0.95);
}

/* 列表项样式 */
.work-item {
    background: white;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.work-item:last-child {
    border-bottom: none;
}

.work-item:active {
    background-color: #f8f9fa;
}

.work-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.work-item-title {
    font-weight: 600;
    color: #333;
}

.work-item-status {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.status-normal {
    background: #e3f2fd;
    color: #1976d2;
}

.status-over {
    background: #e8f5e9;
    color: #388e3c;
}

.work-item-info {
    color: #666;
    font-size: 0.85rem;
}

.work-item-info span {
    margin-right: 15px;
}

/* 表单样式 */
.form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 12px;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 计算结果展示 */
.calc-result {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

.calc-result-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.calc-result-item:last-child {
    border-bottom: none;
}

.calc-result-label {
    color: #666;
}

.calc-result-value {
    font-weight: 600;
    color: #333;
}

.calc-result-value.highlight {
    color: #667eea;
    font-size: 1.1rem;
}

/* 员工选择列表 */
.employee-list {
    max-height: 300px;
    overflow-y: auto;
}

.employee-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.employee-item:last-child {
    border-bottom: none;
}

.employee-checkbox {
    margin-right: 12px;
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-weight: 500;
}

.employee-dept {
    font-size: 0.8rem;
    color: #999;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

.btn-secondary {
    background: #f0f0f0;
    border: none;
    color: #666;
    border-radius: 8px;
}

.btn-block {
    width: 100%;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 15px;
    color: #ddd;
}

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
}

.toast {
    min-width: 200px;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin: 15px;
}

.search-box input {
    padding-left: 40px;
    border-radius: 20px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* 个人中心 */
.user-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    text-align: center;
}

.user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2.5rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.menu-list {
    background: white;
    margin-top: 15px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    text-decoration: none;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item i:first-child {
    width: 30px;
    color: #667eea;
}

.menu-item i:last-child {
    margin-left: auto;
    color: #ccc;
}

/* 响应式调整 */
@media (max-width: 375px) {
    html, body {
        font-size: 14px;
    }
}
