/* 报餐记录页面样式 */

/* 筛选器区域 */
.filter-section {
    background: white;
    padding: 10px 8px;
    margin: 10px 5px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.filter-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
    background: #f8f9fa;
    padding: 3px;
    border-radius: 8px;
}

.filter-tab {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab.active {
    background: linear-gradient(135deg, #FF6634 0%, #FF8B66 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 102, 52, 0.2);
}

.filter-tab:hover:not(.active) {
    background: rgba(255, 102, 52, 0.1);
    color: #FF6634;
}

.date-filter {
    position: relative;
}

.filter-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    appearance: none;
    color: #374151;
    font-weight: 500;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 32px;
}

.filter-select:focus {
    outline: none;
    border-color: #FF6634;
    box-shadow: 0 0 0 2px rgba(255, 102, 52, 0.1);
}

/* 统计卡片 */
.summary-card {
    margin: 15px 5px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.summary-item {
    text-align: center;
    padding: 15px 5px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.summary-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #FF6634 0%, #FF8B66 100%);
    opacity: 0.8;
}

.summary-number {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #FF6634 0%, #FF8B66 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    line-height: 1.2;
}

.summary-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* 订单列表 */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 5px;
    margin-top: 10px;
}

.order-item {
    background: white;
    border-radius: 10px;
    padding: 10px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.order-item:hover {
    transform: translateY(-2px);
    border-color: #FF6634;
    box-shadow: 0 4px 12px rgba(255, 102, 52, 0.1);
}

.order-item:active {
    transform: scale(0.98) translateY(0);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-date {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}

.order-status {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.pending {
    background: #fff7ed;
    color: #ea580c;
}

.order-status.completed {
    background: #f0fdf4;
    color: #16a34a;
}

.order-status.cancelled {
    background: #fef2f2;
    color: #dc2626;
}

/* 加载状态 */
.loading-state {
    padding: 20px 0;
    text-align: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #FF6634;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

/* 空状态 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 10px;
    text-align: center;
}

.empty-icon {
    font-size: 40px;
    margin-bottom: 8px;
    opacity: 0.8;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.empty-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.empty-desc a {
    color: #FF6634;
    text-decoration: none;
    font-weight: 500;
}

.empty-desc a:hover {
    text-decoration: underline;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .filter-section,
    .summary-card,
    .orders-list {
        margin: 6px 5px;
    }

    .filter-section {
        padding: 8px 6px;
    }

    .summary-item {
        padding: 8px 4px;
    }

    .summary-number {
        font-size: 20px;
    }

    .order-item {
        padding: 8px 6px;
    }
}

/* 弹窗样式 */
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #FF6634 0%, #E55A2B 100%);
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: white;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.order-detail-item {
    padding: 16px;
    border-radius: 12px;
    background: #f9fafb;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.order-detail-item:hover {
    background: #f3f4f6;
    transform: translateX(4px);
}

.order-detail-item:last-child {
    margin-bottom: 0;
}

.detail-label {
    flex: 0 0 100px;
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.detail-value {
    flex: 1;
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
    word-break: break-word;
}

.highlight {
    color: #FF6634;
    font-weight: 600;
}

.meal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed;
    color: #FF6634;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
}

.status-badge.pending {
    background: #fef3c7;
    color: #d97706;
}

.status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

.modal-buttons {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-btn.primary {
    background: linear-gradient(135deg, #FF6634 0%, #E55A2B 100%);
    color: white;
}

.modal-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 102, 52, 0.2);
}

.modal-btn.danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
}

.modal-btn.danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* 响应式样式 */
@media (max-width: 480px) {
    .filter-section {
        padding: 12px 16px;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-tab {
        padding: 6px 12px;
        font-size: 13px;
    }

    .summary-card {
        padding: 16px;
        gap: 12px;
    }

    .summary-item {
        padding: 8px 4px;
    }

    .summary-number {
        font-size: 20px;
    }

    .order-item {
        padding: 12px;
    }

    .order-details {
        margin-bottom: 8px;
    }

    .action-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-body {
        padding: 20px;
    }

    .order-detail-item {
        padding: 12px;
        flex-direction: column;
    }

    .detail-label {
        flex: none;
        margin-bottom: 4px;
    }

    .detail-value {
        flex: none;
    }

    .modal-buttons {
        padding: 16px 20px;
    }
}

/* 容器基础样式调整 */
.container {
    padding: 0;
    max-width: 100%;
}

/* 页面标题区域调整 */
.page-header {
    padding: 12px 8px;
}

/* 加载更多样式 */
.load-more {
    padding: 15px 0;
    text-align: center;
}

.load-more-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    padding: 10px 20px;
    cursor: pointer;
}

.load-more-btn:active {
    opacity: 0.7;
}

/* 加载状态样式 */
.loading-state {
    padding: 20px 0;
    text-align: center;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #FF6634;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 没有更多数据时的样式 */
.load-more.no-more .load-more-btn {
    pointer-events: none;
    opacity: 0.5;
}

/* 订单详情样式 */
.order-details {
    margin-top: 8px;
    font-size: 14px;
    color: #4b5563;
}

.meal-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.meal-icon {
    font-size: 16px;
}

.meal-type {
    font-weight: 500;
    color: #1f2937;
}

.order-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}

.user-name {
    font-weight: 500;
    color: #1f2937;
}

.department-name {
    color: #6b7280;
}

.order-remarks {
    margin-top: 6px;
    padding: 4px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    font-size: 13px;
    color: #6b7280;
}

/* 订单详情弹窗样式 */
body .order-detail-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

body .order-detail-dialog.show {
    display: flex;
}

body .order-detail-dialog .dialog-content {
    width: 90%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

body .order-detail-dialog .modal-header {
    padding: 12px 16px;
    background: #FF6634;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

body .order-detail-dialog .modal-title {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin: 0;
    flex: 1;
    text-align: center;
}

body .order-detail-dialog .modal-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

body .order-detail-dialog .modal-body {
    padding: 16px;
}

body .order-detail-dialog .order-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

body .order-detail-dialog .detail-date {
    font-size: 15px;
    color: #1f2937;
}

body .order-detail-dialog .meal-badge {
    color: #FF6634;
    font-size: 14px;
}

body .order-detail-dialog .status-badge {
    color: #FF6634;
    font-size: 14px;
}

body .order-detail-dialog .order-user-info {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
}

body .order-detail-dialog .user-info-row {
    display: flex;
    margin-bottom: 16px;
}

body .order-detail-dialog .user-info-row:last-child {
    margin-bottom: 0;
}

body .order-detail-dialog .info-label {
    width: 70px;
    color: #6b7280;
    font-size: 14px;
}

body .order-detail-dialog .info-value {
    flex: 1;
    color: #1f2937;
    font-size: 14px;
}

body .order-detail-dialog .modal-footer {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
}

body .order-detail-dialog .modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
}

body .order-detail-dialog .modal-btn.primary {
    background: #FF6634;
    color: white;
}

body .order-detail-dialog .modal-btn.danger {
    background: #dc2626;
    color: white;
}

@media (max-width: 480px) {
    body .order-detail-dialog .dialog-content {
        width: 95%;
        margin: 10px;
    }

    body .order-detail-dialog .modal-header {
        padding: 10px 16px;
    }

    body .order-detail-dialog .modal-body {
        padding: 12px;
    }

    body .order-detail-dialog .user-info-row {
        margin-bottom: 12px;
    }

    body .order-detail-dialog .info-label {
        width: 60px;
        font-size: 13px;
    }

    body .order-detail-dialog .info-value {
        font-size: 13px;
    }

    body .order-detail-dialog .modal-buttons {
        padding: 16px 20px;
    }
}

/* 确认对话框样式 */
body .confirm-dialog .dialog-content {
    max-width: 320px;
}

body .confirm-dialog .modal-header {
    background: #4B5563;
    padding: 12px 16px;
}

body .confirm-dialog .modal-title {
    font-size: 15px;
}

body .confirm-dialog .modal-body {
    padding: 20px 16px;
    background: #F9FAFB;
}

body .confirm-dialog .confirm-message {
    text-align: center;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.5;
}

body .confirm-dialog .modal-footer {
    padding: 12px 16px;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
    gap: 12px;
}

body .confirm-dialog .modal-btn {
    flex: 1;
    padding: 8px;
    font-size: 14px;
    border: 1px solid #D1D5DB;
    background: white;
    color: #374151;
}

body .confirm-dialog .modal-btn.danger {
    background: #EF4444;
    color: white;
    border: none;
}

body .confirm-dialog .modal-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    body .confirm-dialog .dialog-content {
        width: 90%;
    }

    body .confirm-dialog .modal-body {
        padding: 16px;
    }

    body .confirm-dialog .confirm-message {
        font-size: 14px;
    }

    body .confirm-dialog .modal-footer {
        padding: 12px;
    }

    body .confirm-dialog .modal-btn {
        padding: 8px;
        font-size: 13px;
    }
} 