/* 移动端票据上传页面样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 导航栏样式 - 与kitout页面完全一致 */
/* 导航BLOCK样式 */
.home_navigation-block {
    margin-bottom: 10px;
}

/* 日期显示样式 */
.home_date-display {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 8px 15px; /* 减小两侧内边距 */
    margin-bottom: 2px; /* 最小间距 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home_date-display #home_current-date {
    font-size: 20px; /* 字号减小一号 */
    font-weight: bold;
    color: #4a5568;
    text-align: center;
}

/* 母菜单容器样式 */
.home_parent-menu-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px; /* 圆角改小 */
    padding: 5px; /* 边柜间距更细 */
    margin-bottom: 2px; /* 最小间距 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 母菜单箭头按钮组件样式 */
.home_parent-menu-arrows {
    display: flex;
    align-items: center;
    margin-right: 5px;
}

.home_parent-menu-arrow {
    background: #28a745; /* 绿色 */
    color: white; /* 白符号 */
    border: none;
    border-radius: 0; /* 移除默认圆角 */
    width: 24px; /* 1.5字宽 */
    height: 36px; /* 上下各减2px，从40px改为36px */
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 箭头按钮组件中的箭头样式 */
.home_parent-menu-arrows .home_parent-menu-arrow {
    border-radius: 0;
}

/* 左箭头：只有左边有圆角 */
.home_parent-menu-arrows .home_parent-menu-arrow-left {
    border-radius: 8px 0 0 8px;
}

/* 右箭头：只有右边有圆角 */
.home_parent-menu-arrows .home_parent-menu-arrow-right {
    border-radius: 0 8px 8px 0;
}

.home_parent-menu-arrow-left {
    border-radius: 8px 0 0 8px;
}

.home_parent-menu-arrow-right {
    border-radius: 0 8px 8px 0;
}

.home_parent-menu-arrow:hover {
    background: #218838; /* 深绿色 */
}

.home_parent-menu-scroll-container {
    flex: 1;
    overflow: hidden;
    margin: 0 0; /* 移除左右间距 */
}

.home_parent-menu-scroll {
    display: flex;
    transition: transform 0.3s ease;
}

.home_parent-menu {
    display: flex;
    gap: 10px;
}

.home_parent-menu-item {
    padding: 6px 24px; /* 上下各减2px，从8px改为6px */
    background: #f7fafc;
    border: 1px solid #28a745; /* 边框减到最细 */
    border-radius: 4px; /* 圆角改小 */
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal; /* 未选中字体不要加粗 */
    color: #4a5568;
    white-space: nowrap;
}

.home_parent-menu-item:hover {
    background: #edf2f7;
    border-color: #218838; /* 深绿色边框 */
}

.home_parent-menu-item.home_active {
    background: #8dd19d; /* 修改为#8dd19d */
    color: #000000;
    border-color: #8dd19d;
    box-shadow: 0 4px 15px rgba(141, 209, 157, 0.3);
    font-weight: bold; /* 选中时字体加粗 */
}

.home_parent-menu-item.active {
    background: #8dd19d; /* 修改为#8dd19d */
    color: #000000;
    border-color: #8dd19d;
    box-shadow: 0 4px 15px rgba(141, 209, 157, 0.3);
    font-weight: bold; /* 选中时字体加粗 */
}

/* 子菜单容器样式 */
.home_child-menu-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px; /* 圆角改小 */
    padding: 5px; /* 边柜间距更细 */
    margin-bottom: 10px; /* 减小底部间距 */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home_child-menu-scroll-container {
    flex: 1;
    overflow: hidden;
    margin: 0 0; /* 移除左右间距 */
}

.home_child-menu-scroll {
    display: flex;
    transition: transform 0.3s ease;
}

.home_child-menu {
    display: flex;
    flex-shrink: 0;
    width: 100%; /* 改为100%宽度 */
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
    padding: 1px;
}

.home_child-menu.home_hidden {
    display: none;
}

.home_child-menu-item {
    flex-shrink: 0;
    padding: 6px 16px; /* 减小上下内边距 */
    background-color: #f0f0f0;
    border: 1px solid #ffd700; /* 浅黄边框 */
    border-radius: 6px; /* 四周小圆角 */
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    white-space: nowrap;
    min-width: 80px; /* 4个汉字宽度 */
    text-align: center;
    z-index: 10; /* 确保子菜单项在正确层级 */
    position: relative; /* 为z-index生效 */
}

.home_child-menu-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.home_child-menu-item.home_active {
    background-color: #abf6bd;
    color: #000000;
    border-color: #84e0b8;
    box-shadow: 0 2px 8px rgba(132, 224, 184, 0.3);
    font-weight: bold;
}

.home_child-menu-item.active {
    background-color: #abf6bd;
    color: #000000;
    border-color: #84e0b8;
    box-shadow: 0 2px 8px rgba(132, 224, 184, 0.3);
    font-weight: bold;
}

/* 子菜单箭头按钮 */
.home_child-menu-arrow {
    background-color: #28a745; /* 绿色 */
    color: white; /* 白符号 */
    border: 1px solid #218838;
    border-radius: 0; /* 移除默认圆角 */
    width: 24px; /* 1.5字宽 */
    height: 32px; /* 修改高度为32px */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
    z-index: 10;
}

/* 子菜单左箭头：只有左边有圆角 */
.home_child-menu-arrow-left {
    border-radius: 8px 0 0 8px;
}

/* 子菜单右箭头：只有右边有圆角 */
.home_child-menu-arrow-right {
    border-radius: 0 8px 8px 0;
}

.home_child-menu-arrow:hover {
    background-color: #218838; /* 深绿色 */
    border-color: #1e7e34;
}

.mobile-container {
    max-width: 100%;
    min-height: 100vh;
    background: #f8f9fa;
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.header-btn {
    border: none;
    width: 60px;
    height: 60px;
    z-index: 99;
    top: 50%;
    right: 16px;
    position: fixed;
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.header-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* 搜索筛选区域 */
.search-section {
    background: white;
    padding: 16px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: none;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
}

.search-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.date-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.date-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    background: #f8f9fa;
}

.date-separator {
    color: #6c757d;
    font-size: 12px;
    white-space: nowrap;
}

/* 移除状态筛选可见样式（若保留DOM也不显示） */
.status-select { display: none; }

.search-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

/* 主要内容区域 */
.main-content {
    padding: 0 16px 16px;
}

/* 账单列表 */
.bill-list {
    margin-bottom: 16px;
}

.bill-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.bill-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.bill-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* 隐藏卡片中的 #id 显示 */
.bill-id { display: none; }

/* 不显示状态徽标 */
.bill-status { display: none; }

/* 价格与状态同一行显示 */
.bill-amount-inline {
    font-size: 16px;
    font-weight: 700;
    color: #dc3545;
}

.bill-status.pending {
    background: #fff3cd;
    color: #856404;
}

.bill-status.completed {
    background: #d4edda;
    color: #155724;
}

.bill-amount {
    font-size: 20px;
    font-weight: 700;
    color: #dc3545;
    margin-bottom: 8px;
}

/* 只显示前三行信息（不包含操作按钮） */
.bill-info { display: block; margin-bottom: 8px; }
.bill-meta { display: flex; gap: 12px; align-items: center; margin-bottom: 6px; }
.meta-item { display: inline-flex; gap: 6px; }
.meta-item .label { color: #6c757d; font-size: 12px; }
.meta-item .value { font-size: 14px; font-weight: 500; }
.nowrap { white-space: nowrap; }
.bill-desc .label { color: #6c757d; font-size: 12px; display: inline-block; margin-right: 6px; }
.bill-desc .value { display: block; font-size: 14px; color: #333; }

.bill-info-item { display: none; }
.bill-info-item:nth-child(-n+3) {
    display: flex;
    flex-direction: column;
}

.bill-info-label { font-size: 12px; color: #6c757d; margin-bottom: 2px; }
.nowrap { white-space: nowrap; }

.bill-info-value {
    font-size: 14px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bill-actions {
    display: flex;
    gap: 8px;
}

.bill-action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.bill-action-btn.edit {
    background: #007bff;
    color: white;
}

.bill-action-btn.delete {
    background: #dc3545;
    color: white;
}

.bill-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.page-btn {
    padding: 8px 16px;
    border: 1px solid #e9ecef;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.page-btn:hover:not(:disabled) {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 0;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f8f9fa;
    color: #333;
}

/* 表单样式 */
.bill-form {
    padding: 0 20px 20px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.form-group label {
    flex-shrink: 0;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    min-width: 80px;
    margin: 0;
    padding-top: 12px;
}

/* 图片上传部分换行布局 */
.form-group:first-of-type {
    flex-direction: column;
    align-items: stretch;
}

.form-group:first-of-type label {
    padding-top: 0;
    margin-bottom: 8px;
    min-width: auto;
}

/* 标签选择部分换行布局 */
.form-group:last-of-type {
    flex-direction: column;
    align-items: stretch;
}

.form-group:last-of-type label {
    padding-top: 0;
    margin-bottom: 8px;
    min-width: auto;
}

.required {
    color: #dc3545;
}

.input-wrapper {
    position: relative;
    flex: 1;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.textarea {
    padding-left: 12px;
    resize: vertical;
    min-height: 80px;
}

/* 标签选择 */
.tags-container {
    margin-top: 8px;
    width: 100%;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    padding: 8px 12px;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.tag-item:hover {
    background: #e9ecef;
    border-color: #667eea;
    color: #667eea;
}

.tag-item.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.tag-item.selected:hover {
    background: #5a6fd8;
    border-color: #5a6fd8;
}

.tag-item i {
    font-size: 12px;
}

/* 图片上传 */
.image-upload-area {
    margin-top: 8px;
    width: 100%;
}

.upload-btn {
    border: 2px dashed #e9ecef;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-btn:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.upload-icon {
    font-size: 32px;
    color: #6c757d;
    margin-bottom: 8px;
}

.upload-text {
    color: #6c757d;
    font-size: 14px;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 加载指示器 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.loading-spinner i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 12px;
}

.loading-text {
    color: #6c757d;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 480px) {
    .header {
        padding: 10px 12px;
    }
    
    .header-title {
        font-size: 16px;
    }
    
    .search-section {
        padding: 12px;
    }
    
    .filter-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .date-filter {
        min-width: auto;
    }
    
    .main-content {
        padding: 0 12px 12px;
    }
    
    .bill-item {
        padding: 12px;
    }
    
    .bill-info {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .modal-content {
        margin: 8px;
        max-height: 95vh;
    }
    
    .bill-form {
        padding: 0 16px 16px;
    }
    
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #333;
}

.empty-state p {
    font-size: 14px;
    margin: 0;
} 