/* 管理页面样式 */
.admin-content {
    margin-top: 56px;
    padding: 16px;
}

.back-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.back-link:active {
    background: rgba(255,255,255,0.2);
}

.add-dish-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.add-dish-btn:active {
    background: rgba(255,255,255,0.3);
}

.admin-menu-list {
    max-width: 100%;
}

.admin-menu-item {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.admin-menu-item:active {
    transform: scale(0.98);
}

.admin-menu-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f0f0f0;
}

.admin-menu-item-info {
    flex: 1;
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.admin-menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.admin-menu-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.admin-menu-item-category {
    display: inline-block;
    background: #667eea;
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-top: 4px;
}

.admin-menu-item-desc {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    line-height: 1.4;
}

.admin-menu-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-menu-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #ff4757;
}

.admin-menu-item-price::before {
    content: '¥';
    font-size: 14px;
}

.admin-menu-item-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.action-btn:active {
    opacity: 0.7;
}

.edit-btn {
    background: #667eea;
    color: white;
}

.delete-btn {
    background: #ff4757;
    color: white;
}

/* 菜品表单弹窗 */
.dish-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.dish-modal.show {
    opacity: 1;
    visibility: visible;
}

.dish-modal .modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s;
    overflow: hidden;
}

.dish-modal.show .modal-content {
    transform: scale(1);
}

.dish-modal .modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.cancel-btn,
.save-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cancel-btn {
    background: #f0f0f0;
    color: #666;
}

.save-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cancel-btn:active,
.save-btn:active {
    opacity: 0.8;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state p {
    margin-bottom: 8px;
    font-size: 14px;
}

/* 图片上传样式 */
.image-upload-container {
    width: 100%;
}

.image-upload-area {
    width: 100%;
    min-height: 200px;
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    overflow: hidden;
    position: relative;
    background: #fafafa;
}

.image-upload-area:hover {
    border-color: #667eea;
    background: #f5f5f5;
}

.image-upload-area:active {
    border-color: #764ba2;
}

.image-upload-placeholder {
    text-align: center;
    padding: 20px;
    color: #999;
}

.image-upload-placeholder p {
    margin: 8px 0 4px;
    font-size: 14px;
    color: #666;
}

.image-upload-placeholder small {
    font-size: 12px;
    color: #999;
}

.image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.image-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.change-image-btn,
.remove-image-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.change-image-btn {
    background: #667eea;
    color: white;
}

.remove-image-btn {
    background: #ff4757;
    color: white;
}

.change-image-btn:active,
.remove-image-btn:active {
    opacity: 0.8;
}

