/* 情侣点餐 - 移动端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff6b81;
    --primary-light: #ff8e9e;
    --primary-bg: #fff5f6;
    --success: #2ed573;
    --danger: #ff4757;
    --warning: #ffa502;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #f8f8f8;
    --card-bg: #fff;
    --border: #eee;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

#app {
    min-height: 100vh;
    padding-bottom: calc(70px + var(--safe-bottom));
}

/* 页面容器 */
.page {
    display: none;
    padding: 16px;
    padding-bottom: 100px;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 页面头部 */
.page-header {
    text-align: center;
    padding: 20px 0 24px;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.page-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* 商品列表 */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 商品卡片 */
.item-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.item-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-bg) 0%, #fff 100%);
}

.item-card:active {
    transform: scale(0.98);
}

.item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary);
}

.item-price-unit {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 4px;
}

.item-check {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    transition: all 0.3s ease;
}

.item-card.selected .item-check {
    background: var(--primary);
    border-color: var(--primary);
}

.item-method {
    font-size: 12px;
    color: var(--primary);
    background: var(--primary-bg);
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.item-delete {
    font-size: 12px;
    color: var(--danger);
    background: #ffebee;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
}

/* 底部栏 */
.bottom-bar {
    position: fixed;
    bottom: calc(70px + var(--safe-bottom));
    left: 0;
    right: 0;
    background: var(--card-bg);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 90;
}

.bottom-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bottom-count {
    font-size: 13px;
    color: var(--text-light);
}

.bottom-price {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary);
}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(70px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--card-bg);
    display: flex;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-item.active {
    color: var(--primary);
}

.tab-icon {
    font-size: 24px;
}

.tab-text {
    font-size: 11px;
}

/* 按钮 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:active {
    transform: scale(0.96);
    opacity: 0.9;
}

.btn-primary.btn-full {
    width: 100%;
    margin-top: 20px;
}

.btn-secondary {
    background: var(--bg);
    color: var(--text-light);
    border: none;
    border-radius: 25px;
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #7bed9f 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #ff6b81 100%);
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
}

/* 表单 */
.form-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    outline: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #fff;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* 类型选择器 */
.type-selector {
    display: flex;
    gap: 12px;
}

.type-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-option.active {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.type-icon {
    font-size: 32px;
}

.type-option span:last-child {
    font-size: 13px;
    color: var(--text-light);
}

.type-option.active span:last-child {
    color: var(--primary);
    font-weight: 500;
}

/* 订单列表 */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}

.order-date {
    font-size: 14px;
    color: var(--text-light);
}

.status-tag {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
}

.status-pending {
    background: #fff3e0;
    color: var(--warning);
}

.status-approved {
    background: #e8f5e9;
    color: var(--success);
}

.status-rejected {
    background: #ffebee;
    color: var(--danger);
}

.status-completed {
    background: #e3f2fd;
    color: #2196f3;
}

.order-items {
    margin-bottom: 12px;
}

.order-section {
    margin-bottom: 12px;
}

.order-section-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.order-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-tag {
    background: var(--primary-bg);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.order-total {
    font-size: 15px;
    color: var(--text-light);
    text-align: right;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.order-total-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
    margin-left: 8px;
}

.order-reason {
    background: #fff5f5;
    padding: 12px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 13px;
    color: var(--danger);
}

.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* 弹窗 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    width: calc(100% - 48px);
    max-width: 320px;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
    text-align: center;
}

.modal-content p {
    font-size: 14px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.6;
}

#modal-input-container {
    margin-bottom: 20px;
}

#modal-input-container.hidden {
    display: none;
}

#modal-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button {
    flex: 1;
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 14px;
    z-index: 300;
    animation: toastIn 0.3s ease;
}

.toast.hidden {
    display: none;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 14px;
}
/* ϴ */
.upload-container {
    width: 100%;
    height: 160px;
    border: 2px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.upload-container:hover {
    border-color: var(--primary);
    background: #fff5f6;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.upload-icon {
    font-size: 32px;
}

#image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#image-preview.hidden {
    display: none;
}


/* òʱѡ */
.meal-time-selector {
    margin: 16px 0;
    text-align: left;
}

.meal-time-selector p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.radio-group {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.radio-option {
    flex: 1;
    position: relative;
}

.radio-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.radio-option input:checked + .radio-label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(255, 107, 129, 0.3);
}

.order-time-tag {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #666;
    margin-left: 8px;
}


/* ͷòʱǩ */
.order-header .order-time-tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e3f2fd;
    color: #1976d2;
    font-weight: bold;
    margin: 0 8px;
}

