:root {
    --primary: #2196f3;
    --primary-dark: #1976d2;
    --primary-light: #e3f2fd;
    --secondary: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --text: #1a1a2e;
    --text-secondary: #64748b;
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 顶部导航栏 */
.top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 16px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(33, 150, 243, 0.3);
}

.top-bar h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 1px;
}

.top-bar .back-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 30px;
}

.top-bar .right-action {
    background: none;
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s;
}

.top-bar .right-action:hover {
    transform: scale(1.1);
}

/* 主容器 */
.app-container {
    min-height: calc(100vh - 120px);
    padding-bottom: 80px;
    padding-top: 10px;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    z-index: 1000;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 5px 0;
    flex: 1;
    color: var(--text-secondary);
}

.nav-tab.active {
    color: var(--primary);
}

.nav-tab.active .tab-icon {
    transform: scale(1.1);
}

.nav-tab .tab-icon {
    font-size: 22px;
    margin-bottom: 4px;
    transition: transform 0.3s;
}

.nav-tab p {
    font-size: 11px;
    margin: 0;
    font-weight: 500;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    padding: 15px;
    background-color: #fff;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

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

.search-input i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.search-input input {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.search-input input:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

/* Section 样式 */
.section {
    background-color: #fff;
    margin-bottom: 12px;
    padding: 18px;
}

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

.section-header h2, .section-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.more {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
}

.more:hover {
    color: var(--primary);
}

/* 服务分类 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-3px);
}

.service-icon {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 8px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transition: transform 0.3s;
}

.service-item:hover .service-icon {
    transform: scale(1.1);
}

.service-item p {
    font-size: 12px;
    color: var(--text);
    text-align: center;
    font-weight: 500;
}

/* 热门服务卡片 */
.hot-services-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hot-service-card {
    display: flex;
    background-color: #f8fafc;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.hot-service-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.hot-service-image {
    width: 100px;
    height: 100px;
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

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

.hot-service-details {
    flex: 1;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hot-service-details h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.hot-service-description {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.tag {
    font-size: 10px;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.service-count {
    font-size: 10px;
    color: var(--text-secondary);
}

.service-price-rating {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #ef4444;
}

.rating {
    display: flex;
    gap: 2px;
}

.rating i {
    font-size: 12px;
    color: #fbbf24;
}

/* 订单状态标签 */
.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending { background-color: #fff7ed; color: #ea580c; }
.status-accepted { background-color: #eff6ff; color: #2563eb; }
.status-progress { background-color: #faf5ff; color: #9333ea; }
.status-completed { background-color: #f0fdf4; color: #16a34a; }
.status-cancelled { background-color: #fef2f2; color: #dc2626; }
.status-reviewed { background-color: #f8fafc; color: #64748b; }

/* 按钮样式 */
.btn {
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: #fff;
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: #fff;
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

/* 订单列表 */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
}

.order-card {
    background-color: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.order-card:hover {
    box-shadow: var(--shadow);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #f8fafc;
    border-bottom: 1px solid var(--border);
}

.order-content {
    display: flex;
    padding: 16px;
    gap: 14px;
}

.order-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary);
}

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

.order-info {
    flex: 1;
}

.order-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.order-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.order-price {
    font-size: 18px;
    font-weight: 700;
    color: #ef4444;
}

.order-actions {
    display: flex;
    gap: 10px;
    padding: 14px 16px;
    background-color: #f8fafc;
    border-top: 1px solid var(--border);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 14px;
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 登录页面 */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, #1565c0 100%);
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.login-container::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.login-header {
    text-align: center;
    margin-top: 80px;
    margin-bottom: 40px;
    color: #fff;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.login-header p {
    font-size: 14px;
    opacity: 0.9;
}

.login-form {
    background-color: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.error-message {
    font-size: 12px;
    color: var(--danger);
    margin-top: 8px;
}

/* 角色选择 */
.role-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.role-option {
    padding: 18px 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.role-option.active {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-light) 0%, #e3f2fd 100%);
    transform: scale(1.02);
}

.role-option i {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.role-option p {
    font-size: 12px;
    color: var(--text);
    font-weight: 500;
}

/* Toast 提示 */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 9999;
    display: none;
    animation: toastIn 0.3s ease;
}

.toast.show {
    display: block;
}

@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    border-radius: 20px;
    padding: 28px;
    width: 90%;
    max-width: 420px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--text);
}

/* 表格样式（管理员） */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: var(--text);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 60px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 头像 */
.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: var(--shadow-sm);
}

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

.avatar-lg {
    width: 80px;
    height: 80px;
}

.avatar-sm {
    width: 40px;
    height: 40px;
}

/* 信息卡片 */
.info-card {
    background-color: #fff;
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 18px;
}

.profile-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.profile-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #fbbf24;
    font-size: 14px;
}

/* 标签样式 */
.labels {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.label {
    font-size: 12px;
    color: #d97706;
    background-color: #fffbeb;
    padding: 5px 12px;
    border-radius: 14px;
    font-weight: 500;
}

/* 下单页面样式 */
.order-form {
    padding: 16px;
}

.order-form-section {
    background-color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.order-form-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.order-form-section h3 i {
    color: var(--primary);
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.time-slot {
    padding: 10px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.time-slot:hover {
    border-color: var(--primary);
}

.time-slot.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary);
}

.date-picker {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 16px;
}

.date-item {
    min-width: 60px;
    padding: 10px 8px;
    text-align: center;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8fafc;
}

.date-item:hover {
    border-color: var(--primary);
}

.date-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-color: var(--primary);
}

.date-item .day {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.date-item .date {
    font-size: 18px;
    font-weight: 600;
}

/* 订单详情页 */
.order-detail-section {
    background-color: #fff;
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.order-detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.detail-value {
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    text-align: right;
}

/* 管理员工具栏 */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: #fff;
    border-bottom: 1px solid var(--border);
}

.admin-toolbar h2 {
    font-size: 18px;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 375px) {
    .service-grid { gap: 12px; }
    .service-icon { width: 46px; height: 46px; font-size: 20px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .time-slots { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 320px) {
    .service-grid { gap: 8px; }
    .service-icon { width: 42px; height: 42px; font-size: 18px; }
    .service-item p { font-size: 11px; }
    .role-selector { gap: 8px; }
    .role-option { padding: 14px 8px; }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s ease forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
}
