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

:root {
    --primary: #1a73e8;
    --primary-dark: #0d47a1;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --gray-bg: #f5f7fa;
    --white: #ffffff;
    --border: #e9ecef;
    --text: #333333;
    --text-light: #6c757d;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--gray-bg);
    color: var(--text);
    line-height: 1.5;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* 电脑端导航 */
.navbar {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text);
    padding: 8px 0;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user span {
    color: var(--text-light);
}

.btn-logout {
    background: none;
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-light);
}

/* 手机端底部导航 */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    padding: 8px 0 12px;
    z-index: 1000;
    border-top: 1px solid var(--border);
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
    text-decoration: none;
    color: #94a3b8;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

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

.bottom-nav-item .nav-icon {
    font-size: 22px;
    font-weight: normal;
}

.bottom-nav-item .nav-label {
    font-size: 11px;
    font-weight: 500;
}

/* 卡片样式 */
.card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 600;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th {
    background: #f8f9fa;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

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

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-warning {
    background: var(--warning);
    color: #333;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-text {
    background: none;
    color: var(--primary);
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-text:hover {
    background: #f0f0f0;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 16px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 状态标签 */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-pending { background: #fef3c7; color: #d97706; }
.status-following { background: #dbeafe; color: #2563eb; }
.status-completed { background: #d1fae5; color: #059669; }
.status-abandoned { background: #fee2e2; color: #dc2626; }
.status-draft { background: #f3e5f5; color: #7b1fa2; }
.status-submitted { background: #e0f2fe; color: #0288d1; }
.status-cancelled { background: #f1f5f9; color: #475569; }

/* 响应式 - 手机端 */
@media (max-width: 768px) {
    .container {
        padding: 12px;
        margin-bottom: 70px;
    }
    
    .navbar {
        display: none;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    .card {
        border-radius: 16px;
        padding: 15px;
    }
    
    .table-responsive {
        display: none;
    }
    
    .mobile-card-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    
    .mobile-card {
        background: var(--white);
        border-radius: 16px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        border: 1px solid var(--border);
    }
    
    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-card-row:last-child {
        border-bottom: none;
    }
    
    .mobile-card-label {
        font-weight: 500;
        color: var(--text-light);
        width: 100px;
        font-size: 13px;
    }
    
    .mobile-card-value {
        flex: 1;
        text-align: right;
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
    }
    
    .mobile-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    
    .mobile-card-actions .btn-text {
        flex: 1;
        text-align: center;
        padding: 8px;
        background: #f8f9fa;
        border-radius: 8px;
    }
    
    .form-control, .btn {
        font-size: 15px;
        padding: 10px 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        border-radius: 20px;
    }
}

/* 平板端 */
@media (min-width: 768px) and (max-width: 1024px) {
    .mobile-card-list {
        display: none;
    }
    .table-responsive {
        overflow-x: auto;
    }
}

/* 电脑端 */
@media (min-width: 1024px) {
    .mobile-card-list {
        display: none;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-2 { margin-top: 10px; }
.mb-2 { margin-bottom: 10px; }
.ml-2 { margin-left: 10px; }
.mr-2 { margin-right: 10px; }
.w-100 { width: 100%; }
.price { color: #1a73e8; font-weight: 600; }
.cost { color: #dc3545; }

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* 配件标签 */
.accessory-item {
    display: inline-block;
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    margin: 2px;
    font-size: 12px;
    cursor: pointer;
}
.accessory-item:hover { background: #e0e0e0; }
.accessory-item .remove { color: #dc3545; cursor: pointer; margin-left: 4px; }

/* 内联产品面板 */
.inline-product-panel { background: white; border-radius: 12px; margin-bottom: 20px; border: 1px solid #1a73e8; display: none; }
.inline-product-panel.show { display: block; }
.inline-product-header { padding: 15px 20px; background: #f8f9fa; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; font-weight: 600; color: #1a73e8; }
.inline-product-body { padding: 20px; }