/* 全局样式 */
:root {
    --primary-color: #c41e3a;
    --primary-hover: #a01830;
    --secondary-color: #d4a574;
    --bg-gradient: linear-gradient(135deg, #fff5f5 0%, #ffe0e0 100%);
}

/* 状态标签样式 */
.status-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.status-pending {
    background-color: #ffc107;
    color: #000;
}

.status-confirmed {
    background-color: #0d6efd;
    color: #fff;
}

.status-completed {
    background-color: #198754;
    color: #fff;
}

.status-cancelled {
    background-color: #6c757d;
    color: #fff;
}

body {
    background: var(--bg-gradient);
    min-height: 100vh;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    padding-bottom: 70px;
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

/* 日历样式 */
.calendar-container {
    max-width: 500px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px 10px 0 0;
}

.calendar-header h4 {
    margin: 0;
    font-size: 1.2rem;
}

.calendar-nav-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 16px;
    padding: 0;
}

.calendar-nav-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.calendar-nav-btn:hover {
    background: rgba(255,255,255,0.3);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e9ecef;
    border: 1px solid #e9ecef;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.calendar-weekday {
    background: #f8f9fa;
    padding: 10px 5px;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #666;
}

.calendar-day {
    background: white;
    padding: 8px 4px;
    text-align: center;
    min-height: 50px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover:not(.disabled):not(.booked) {
    background: #ffe0e0;
}

.calendar-day.disabled {
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
}

.calendar-day.booked {
    background: #ffebee;
    cursor: not-allowed;
}

.calendar-day.booked::after {
    content: "已订";
    font-size: 0.65rem;
    color: #e53935;
    margin-top: 2px;
}

.calendar-day.selected {
    background: var(--primary-color) !important;
    color: white !important;
}

.calendar-day.selected::after {
    content: "已选";
    font-size: 0.65rem;
    color: rgba(255,255,255,0.8);
    margin-top: 2px;
}

.calendar-day.selected .day-number {
    color: white !important;
}

.calendar-day.other-month {
    color: #ccc;
}

.day-number {
    font-size: 1rem;
    font-weight: 500;
}

/* 底部操作栏 */
.booking-action-bar {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #dee2e6;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    margin-bottom: 10px;
}

@media (min-width: 992px) {
    .booking-action-bar {
        bottom: 0;
        margin-bottom: 0;
    }
}

.selected-info {
    font-size: 0.9rem;
    color: #666;
}

.selected-count {
    color: var(--primary-color);
    font-weight: 600;
}

/* 价格档次卡片 */
.tier-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.tier-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(196, 30, 58, 0.15);
}

.tier-card.selected {
    border-color: var(--primary-color);
    background: #ffe0e0;
}

.tier-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tier-price span {
    font-size: 0.9rem;
    font-weight: 400;
    color: #666;
}

/* 菜品卡片 */
.dish-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    background: white;
}

.dish-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #f5f5f5;
}

.dish-image-wrapper {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #ffe0e0 0%, #ffc0c0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dish-placeholder {
    font-size: 2.5rem;
    color: var(--primary-color);
    opacity: 0.6;
}

.dish-info {
    padding: 10px 12px;
}

.dish-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.dish-category {
    font-size: 0.75rem;
    color: #999;
}

/* Tab导航 */
.tier-tabs {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.tier-tab {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid #dee2e6;
    background: white;
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.tier-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tier-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* 成功页面 */
.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #ffe0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon i {
    font-size: 40px;
    color: var(--primary-color);
}

.booking-code {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 2px;
}

/* 表单样式优化 */
.form-control, .form-select {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 8px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(196, 30, 58, 0.25);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 8px;
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* 分类标题 */
.category-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    padding: 12px 0;
    margin-top: 16px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

/* 后台样式 */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: #212529;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.7);
    padding: 12px 20px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

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

.status-confirmed {
    background: #d1e7dd;
    color: #0f5132;
}

.status-cancelled {
    background: #f8d7da;
    color: #842029;
}

.status-completed {
    background: #cfe2ff;
    color: #084298;
}
