/* 全局样式 - 现代化 Material Design 风格 */
:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #BBDEFB;
    --accent-color: #FF4081;
    --text-primary: #212121;
    --text-secondary: #757575;
    --divider-color: #E0E0E0;
    --background: #F5F7FA;
    --surface: #FFFFFF;
    --error: #F44336;
    --success: #4CAF50;
    --warning: #FF9800;
    --radius-sm: 16px;
    --radius-md: 20px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --ease-snappy: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 12px color-mix(in srgb, var(--primary-color) 18%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 20px color-mix(in srgb, var(--primary-color) 25%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px color-mix(in srgb, var(--primary-color) 30%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 85%, black) 50%, color-mix(in srgb, var(--primary-color) 70%, black) 100%);
    --gradient-surface: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--primary-color) 8%) 0%, color-mix(in srgb, var(--surface) 98%, white) 100%);
    --surface-border: color-mix(in srgb, var(--primary-color) 12%, var(--divider-color));
    --overlay-color: color-mix(in srgb, black 60%, transparent);
    --status-pending: #FF9800;
    --status-progress: #2196F3;
    --status-completed: #4CAF50;
    --status-cancelled: #F44336;
}

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 14px; /* 基础字体从默认16px缩小到14px (约87.5%) */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iOS PWA 支持 - Safe Area */
@supports (padding: env(safe-area-inset-top)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .top-bar {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
    
    .bottom-nav {
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--divider-color);
    border-radius: 4px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 70%, black) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 背景动画装饰 */
.login-container::before,
.login-container::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 20s infinite ease-in-out;
}

.login-container::before {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.login-container::after {
    width: 400px;
    height: 400px;
    bottom: -200px;
    left: -200px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

.login-card {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 380px;
    padding: 36px 32px;
    animation: slideUp 0.6s var(--ease-smooth);
    position: relative;
    z-index: 1;
    border: 1px solid var(--surface-border);
}

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

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 3px solid rgba(255, 255, 255, 0.8);
}

.login-header h1 {
    font-size: 24px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.2s var(--ease-snappy);
    background: var(--gradient-surface);
    box-shadow: inset 0 2px 6px color-mix(in srgb, var(--primary-color) 14%, transparent), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary-color) 60%, var(--surface-border));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-color) 20%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.form-input:hover:not(:focus) {
    border-color: color-mix(in srgb, var(--primary-color) 30%, var(--divider-color));
}

.btn {
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy);
    text-transform: none;
    letter-spacing: 0.4px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 13px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.btn-primary:not(.btn-small):not(.btn-compact) {
    width: 100%;
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(0) scale(0.97);
}

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 13px;
    display: none;
    animation: slideDown 0.4s var(--ease-smooth);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.show {
    display: block;
}

.alert-error {
    background-color: color-mix(in srgb, var(--error) 12%, var(--surface));
    color: var(--error);
    border-left: 4px solid var(--error);
    border: 1px solid color-mix(in srgb, var(--error) 25%, var(--divider-color));
}

.alert-success {
    background-color: color-mix(in srgb, var(--success) 12%, var(--surface));
    color: var(--success);
    border-left: 4px solid var(--success);
    border: 1px solid color-mix(in srgb, var(--success) 25%, var(--divider-color));
}

/* Dashboard 样式 */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--background);
}

.top-bar {
    background: var(--gradient-surface);
    color: var(--text-primary);
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--surface-border);
    gap: 10px;
}

.top-bar h1 {
    font-size: 18px;
    font-weight: 600;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-info span {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.btn-logout {
    background: color-mix(in srgb, var(--primary-color) 12%, var(--surface));
    color: var(--primary-color);
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy);
    flex-shrink: 0;
}

.btn-logout:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-sm);
}

.main-content {
    flex: 1;
    padding: 18px;
    padding-bottom: calc(85px + env(safe-area-inset-bottom));
    width: 100%;
    box-sizing: border-box;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
    width: 100%;
}

.stat-card {
    background: var(--gradient-surface);
    padding: 22px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy);
    border: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
    min-width: 0; /* 允许flex子项缩小 */
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.2s var(--ease-snappy);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-md);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value {
    font-size: 30px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    word-break: break-word;
}

.card {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    border: 1px solid var(--surface-border);
    overflow: hidden;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy);
}

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

.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-color) 6%, transparent), transparent);
}

.card-header .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
    flex: 1;
}

.card-body {
    padding: 18px 22px;
}

.btn-secondary {
    background: var(--gradient-surface);
    color: var(--primary-color);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy);
}

.btn-secondary:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, color-mix(in srgb, var(--error) 70%, black) 100%);
    color: white;
    border: none;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--error) 40%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.15);
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy);
}

.btn-danger:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--error) 85%, black) 0%, color-mix(in srgb, var(--error) 65%, black) 100%);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--error) 45%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-2px) scale(1.01);
}

.btn-danger:active {
    transform: translateY(0);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-compact {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    min-width: auto;
    width: auto;
}

/* 订单列表 */
.order-list {
    list-style: none;
    max-height: calc(100vh - 400px);
    min-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 滚动条样式优化 */
.order-list::-webkit-scrollbar {
    width: 8px;
}

.order-list::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
    border-radius: 4px;
}

.order-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.2s var(--ease-snappy);
}

.order-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.order-item {
    padding: 16px;
    border-bottom: 1px solid var(--surface-border);
    transition: transform 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
    cursor: pointer;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
}

.order-item:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent);
    transform: translateX(4px) scale(1.01);
    border-color: color-mix(in srgb, var(--primary-color) 25%, var(--surface-border));
    box-shadow: var(--shadow-sm);
}

.order-item:last-child {
    border-bottom: none;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 12px;
}

.order-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.order-status {
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-pending {
    background: linear-gradient(135deg, color-mix(in srgb, var(--status-pending) 12%, var(--surface)), color-mix(in srgb, var(--status-pending) 22%, var(--surface)));
    color: color-mix(in srgb, var(--status-pending) 70%, black);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--status-pending) 25%, transparent);
}

/* 进行中状态 - 支持两种命名格式 */
.status-in-progress,
.status-in_progress {
    background: linear-gradient(135deg, color-mix(in srgb, var(--status-progress) 10%, var(--surface)), color-mix(in srgb, var(--status-progress) 22%, var(--surface)));
    color: color-mix(in srgb, var(--status-progress) 75%, black);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--status-progress) 25%, transparent);
}

.status-completed {
    background: linear-gradient(135deg, color-mix(in srgb, var(--status-completed) 10%, var(--surface)), color-mix(in srgb, var(--status-completed) 22%, var(--surface)));
    color: color-mix(in srgb, var(--status-completed) 75%, black);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--status-completed) 25%, transparent);
}

.status-cancelled {
    background: linear-gradient(135deg, color-mix(in srgb, var(--status-cancelled) 10%, var(--surface)), color-mix(in srgb, var(--status-cancelled) 22%, var(--surface)));
    color: color-mix(in srgb, var(--status-cancelled) 75%, black);
    box-shadow: 0 6px 14px color-mix(in srgb, var(--status-cancelled) 25%, transparent);
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.order-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* 底部导航（移动端） */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gradient-surface);
    box-shadow: 0 -10px 24px color-mix(in srgb, var(--primary-color) 18%, transparent);
    display: flex;
    justify-content: space-around;
    padding: 10px 6px calc(14px + env(safe-area-inset-bottom));
    z-index: 1000;
    border-top: 1px solid var(--surface-border);
    gap: 4px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.bottom-nav::-webkit-scrollbar {
    display: none;
}

.nav-item {
    flex: 0 0 auto;
    text-align: center;
    padding: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: transform 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy);
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius-md);
    position: relative;
    min-width: 64px;
    scroll-snap-align: center;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 0 0 3px 3px;
    opacity: 0;
    transition: opacity 0.3s;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::before {
    opacity: 1;
}

.nav-item:hover:not(.active) {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
}

.nav-icon {
    font-size: 20px;
    transition: transform 0.2s var(--ease-snappy);
}

.nav-item span:not(.nav-icon) {
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
}

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

/* Modal 样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    animation: fadeIn 0.3s var(--ease-snappy);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideUp 0.4s var(--ease-smooth);
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--surface-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.close-btn {
    background: color-mix(in srgb, var(--primary-color) 6%, var(--surface));
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy);
}

.close-btn:hover {
    background: color-mix(in srgb, var(--error) 12%, var(--surface));
    color: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--surface-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: linear-gradient(to top, color-mix(in srgb, var(--primary-color) 6%, transparent), transparent);
}

/* 表单行 */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    background: var(--gradient-surface);
    cursor: pointer;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
    font-family: inherit;
}

.form-select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary-color) 60%, var(--surface-border));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-color) 20%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.form-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
    background: var(--gradient-surface);
    box-shadow: inset 0 2px 6px color-mix(in srgb, var(--primary-color) 12%, transparent), inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

.form-textarea:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--primary-color) 60%, var(--surface-border));
    box-shadow: 0 8px 20px color-mix(in srgb, var(--primary-color) 20%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.75), inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

/* 备注时间线 */
.comments-timeline {
    margin-top: 18px;
}

.comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--surface-border);
    animation: fadeInUp 0.4s var(--ease-smooth);
}

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

.comment-item:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.comment-content-wrapper {
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.comment-time {
    font-size: 11px;
    color: var(--text-secondary);
}

.comment-content {
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
    white-space: pre-wrap;
    background: var(--gradient-surface);
    padding: 10px 12px;
    border-radius: var(--radius-md);
    border-left: 3px solid color-mix(in srgb, var(--primary-color) 65%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.06);
}

.comment-actions {
    margin-top: 8px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--error);
    cursor: pointer;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy);
    font-weight: 500;
}

.btn-text:hover {
    background: color-mix(in srgb, var(--error) 12%, var(--surface));
}

/* 用户列表 */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: calc(100vh - 400px);
    min-height: 400px;
    overflow-y: auto;
    padding-right: 8px;
}

/* 用户网格滚动条样式 */
.user-grid::-webkit-scrollbar {
    width: 8px;
}

.user-grid::-webkit-scrollbar-track {
    background: color-mix(in srgb, var(--primary-color) 6%, transparent);
    border-radius: 4px;
}

.user-grid::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
    transition: background 0.2s var(--ease-snappy);
}

.user-grid::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.user-card {
    background: var(--gradient-surface);
    padding: 18px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
    border: 1px solid var(--surface-border);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.2s var(--ease-snappy);
}

.user-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--primary-color) 25%, var(--surface-border));
}

.user-card:hover::before {
    transform: scaleX(1);
}

/* 用户卡片点击提示 */
.user-card[onclick]:hover {
    cursor: pointer;
}

.user-card[onclick]:active {
    transform: translateY(-2px) scale(0.99);
}

.user-card-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.user-card-header > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.user-id {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Courier New', monospace;
    background: color-mix(in srgb, var(--primary-color) 10%, var(--surface));
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-block;
    width: fit-content;
}

.user-roles {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.role-badge {
    padding: 3px 8px;
    border-radius: var(--radius-xl);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.role-admin {
    background: linear-gradient(135deg, color-mix(in srgb, #FF5252 12%, var(--surface)), color-mix(in srgb, #FF5252 24%, var(--surface)));
    color: color-mix(in srgb, #FF5252 75%, black);
}

.role-distributor {
    background: linear-gradient(135deg, color-mix(in srgb, #2196F3 10%, var(--surface)), color-mix(in srgb, #2196F3 22%, var(--surface)));
    color: color-mix(in srgb, #2196F3 75%, black);
}

.role-executor {
    background: linear-gradient(135deg, color-mix(in srgb, #9C27B0 10%, var(--surface)), color-mix(in srgb, #9C27B0 22%, var(--surface)));
    color: color-mix(in srgb, #9C27B0 70%, black);
}

.role-customer {
    background: linear-gradient(135deg, color-mix(in srgb, #4CAF50 10%, var(--surface)), color-mix(in srgb, #4CAF50 22%, var(--surface)));
    color: color-mix(in srgb, #4CAF50 70%, black);
}

.user-info-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
}

.user-info-item {
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    line-height: 1.5;
    padding: 4px 0;
}

.user-info-item strong {
    color: var(--text-primary);
    margin-right: 8px;
    font-weight: 600;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid var(--surface-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.9s var(--ease-snappy) infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 72px;
    margin-bottom: 20px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

/* 响应式设计 */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: 24px;
    }
    
    .dashboard-container {
        flex-direction: row;
        height: 100vh;
        overflow: hidden;
    }
    
    .sidebar {
        width: 220px;
    background: var(--gradient-surface);
        box-shadow: var(--shadow-sm);
        display: flex;
        flex-direction: column;
    border-right: 1px solid var(--surface-border);
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        overflow-y: auto;
        z-index: 90;
    }
    
    .sidebar-header {
        padding: 16px;
    border-bottom: 1px solid var(--surface-border);
        display: flex;
        align-items: center;
        gap: 12px;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--primary-color) 8%, transparent), transparent);
    }
    
    .sidebar-logo {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid color-mix(in srgb, var(--surface) 80%, var(--primary-color));
    }
    
    .sidebar-header-text h2 {
        font-size: 16px;
        font-weight: 600;
        color: var(--primary-color);
        margin: 0;
        line-height: 1.2;
    }
    
    .sidebar-header-text p {
        font-size: 11px;
        color: var(--text-secondary);
        margin: 4px 0 0 0;
        line-height: 1.2;
    }
    
    .sidebar-nav {
        list-style: none;
        padding: 12px 0;
    }
    
    .sidebar-item {
        padding: 12px 18px;
        color: var(--text-primary);
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
    transition: transform 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy), color 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy);
        font-weight: 500;
        font-size: 14px;
        margin: 3px 10px;
    border-radius: var(--radius-md);
        position: relative;
    }
    
    .sidebar-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 0;
        background: var(--gradient-primary);
        border-radius: 0 3px 3px 0;
    transition: height 0.2s var(--ease-snappy);
    }
    
    .sidebar-item:hover {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    transform: translateX(3px) scale(1.01);
    box-shadow: var(--shadow-sm);
    }
    
    .sidebar-item.active {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 12%, transparent), color-mix(in srgb, var(--primary-color) 6%, transparent));
        color: var(--primary-color);
        font-weight: 600;
    }
    
    .sidebar-item.active::before {
        height: 20px;
    }
    
    .main-content {
        flex: 1;
        margin-left: 220px;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100vh;
        padding-top: 88px; /* 为固定的top-bar留出空间 */
        width: calc(100vw - 220px); /* 减去侧边栏宽度 */
        max-width: calc(100vw - 220px);
    }
    
    .top-bar {
        position: fixed;
        top: 0;
        left: 220px;
        right: 0;
        z-index: 100;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* 中等屏幕优化 */
@media (min-width: 768px) and (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    /* 移动端统计卡片优化 */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-label {
        font-size: 11px;
        margin-bottom: 8px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    /* 移动端列表滚动优化 */
    .order-list,
    .user-grid {
        max-height: calc(100vh - 300px);
        min-height: 300px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
    }
    
    .user-grid {
        grid-template-columns: 1fr;
    }
    
    /* 防止移动端主体滚动 */
    .main-content {
        overflow: hidden;
        height: auto;
        min-height: calc(100vh - 60px);
        width: 100%;
    }
    
    /* 移动端顶部栏优化 */
    .top-bar {
        padding: 12px 16px;
    }
    
    .top-bar h1 {
        font-size: 16px;
        max-width: 120px;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .user-info span {
        font-size: 12px;
        display: none; /* 移动端隐藏用户信息文字 */
    }
    
    .btn-logout {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .order-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .login-card {
        padding: 36px 28px;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        max-height: 85vh;
    }
    
    .card-header,
    .card-body,
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    /* 超小屏幕优化 */
    .top-bar h1 {
        font-size: 14px;
        max-width: 100px;
    }
    
    .btn-logout {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .main-content {
        padding: 16px;
    }

    .bottom-nav {
        padding: 8px 4px calc(12px + env(safe-area-inset-bottom));
        gap: 2px;
    }

    .nav-item {
        min-width: 58px;
        padding: 6px 4px;
    }

    .nav-icon {
        font-size: 18px;
    }

    .nav-item span:not(.nav-icon) {
        font-size: 10px;
    }
}

/* 工具类 */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.items-center {
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

/* 订单详情现代化布局 */
.order-detail-modern {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--gradient-surface);
    padding: 18px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
    position: relative;
    overflow: hidden;
}

.info-card.clickable {
    cursor: pointer;
}

.info-card.clickable .user-link {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.info-card .view-icon,
.info-card .edit-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s var(--ease-snappy);
}

.info-card.clickable:hover .view-icon,
.info-card.clickable:hover .edit-icon {
    opacity: 0.6;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.2s var(--ease-snappy);
}

.info-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: color-mix(in srgb, var(--primary-color) 25%, var(--surface-border));
}

.info-card:hover::before {
    transform: scaleX(1);
}

.info-icon {
    font-size: 28px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.info-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
    word-break: break-word;
    line-height: 1.4;
}

.info-value-small {
    font-size: 13px;
    font-weight: 500;
}

.info-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

/* 订单操作按钮 */
.order-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--surface-border);
}

.order-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.order-actions .btn span {
    font-size: 16px;
}

/* 备注区域 */
.comments-section {
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-icon {
    font-size: 24px;
}

.comment-input-wrapper {
    margin-bottom: 24px;
}

.comment-input-wrapper .form-textarea {
    margin-bottom: 12px;
}

.comment-input-wrapper .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-input-wrapper .btn span {
    font-size: 16px;
}

/* 响应式优化 */
@media (max-width: 767px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        width: 100%;
    }
}

/* 搜索结果样式 */
#customerSearchResults > div,
#distributorSearchResults > div {
    padding: 12px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy);
    background: var(--gradient-surface);
}

#customerSearchResults > div:hover,
#distributorSearchResults > div:hover {
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 10%, transparent), transparent);
    border-color: color-mix(in srgb, var(--primary-color) 35%, var(--surface-border));
    transform: translateX(4px) scale(1.01);
    box-shadow: var(--shadow-sm);
}

/* 复选框美化 */
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* 信息提示框 */
.alert-info {
    background: var(--gradient-surface);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px;
    color: color-mix(in srgb, var(--primary-dark) 80%, black);
    margin-top: 16px;
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* 用户资料查看 */
.user-profile-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-header {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 24px;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.btn-copy-welcome {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy);
    box-shadow: var(--shadow-sm);
}

.btn-copy-welcome:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.btn-copy-welcome:active {
    transform: translateY(0) scale(0.98);
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.profile-header-info {
    flex: 1;
}

.profile-header-info h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.profile-id {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: 'Monaco', 'Courier New', monospace;
    background: color-mix(in srgb, var(--primary-color) 10%, var(--surface));
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-bottom: 12px;
}

.profile-roles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.profile-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    background: var(--gradient-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy);
}

.profile-info-item:hover {
    transform: translateX(2px) scale(1.01);
    box-shadow: var(--shadow-sm);
    border-color: color-mix(in srgb, var(--primary-color) 25%, var(--surface-border));
}

.profile-info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.profile-info-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.profile-info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.profile-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.profile-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.profile-actions .btn span {
    font-size: 16px;
}

/* 订单状态修改 */
.status-change-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.current-status-display {
    text-align: center;
    padding: 20px;
    background: var(--gradient-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-sm);
}

.current-status-display .status-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 12px;
}

.current-status-display .order-status {
    display: inline-flex;
    font-size: 14px;
}

.status-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.status-option {
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    cursor: pointer;
    transition: transform 0.2s var(--ease-snappy), box-shadow 0.2s var(--ease-snappy), border-color 0.2s var(--ease-snappy), background 0.2s var(--ease-snappy);
    position: relative;
    text-align: center;
    background: var(--gradient-surface);
}

.status-option:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.status-option.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary-color) 14%, transparent), color-mix(in srgb, var(--primary-color) 6%, transparent));
    box-shadow: var(--shadow-md);
}

.status-option[data-status="pending"]:hover {
    border-color: var(--status-pending);
}

.status-option[data-status="in_progress"]:hover {
    border-color: var(--status-progress);
}

.status-option[data-status="completed"]:hover {
    border-color: var(--status-completed);
}

.status-option[data-status="cancelled"]:hover {
    border-color: var(--status-cancelled);
}

.status-option-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    animation: checkBounce 0.4s var(--ease-smooth);
}

@keyframes checkBounce {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* 执行人区域 */
.executors-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--surface-border);
}

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

.executors-section .section-title .btn-compact {
    margin-left: auto;
}

.executor-item {
    animation: slideIn 0.3s var(--ease-smooth);
}

/* 执行人添加表单 */
.executor-add-form {
    display: grid;
    grid-template-columns: 2fr 1.5fr auto;
    gap: 12px;
    align-items: center;
}

.executor-add-form input {
    margin: 0;
}

.executor-add-form .btn {
    height: 44px;
    padding: 0 20px;
    min-width: auto;
    width: auto;
}

/* 响应式 - 执行人添加表单 */
@media (max-width: 600px) {
    .executor-add-form {
        grid-template-columns: 1fr;
    }
    
    .executor-add-form .btn {
        width: 100%;
    }
}

/* 响应式 - 状态修改 */
@media (max-width: 480px) {
    .status-options {
        grid-template-columns: 1fr;
    }
}

/* 响应式 - 用户资料 */
@media (max-width: 767px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    
    .profile-actions {
        flex-direction: column;
    }
}

/* 性能优化 */
* {
    will-change: auto;
}

.btn:hover,
.card:hover,
.stat-card:hover,
.order-item:hover {
    will-change: transform, box-shadow;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
