* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* 登录页面 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    font-size: 60px;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #ff6a00;
    font-size: 26px;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #ff6a00;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #ff6a00, #ff8c00);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 106, 0, 0.4);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.error-message.show,
.success-message.show {
    display: block;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.demo-accounts {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 25px;
}

.demo-accounts h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 15px;
}

.demo-account {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #ff6a00;
    cursor: pointer;
    transition: all 0.3s;
}

.demo-account:hover {
    background: #fff8f0;
    transform: translateX(5px);
}

.demo-account strong {
    color: #333;
    font-size: 13px;
}

.demo-account span {
    color: #666;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.login-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 13px;
}

.login-footer a {
    color: #ff6a00;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* 仪表板通用样式 */
.dashboard-page {
    padding: 20px;
    display: none;
}

.dashboard-page.active {
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    background: white;
    border-radius: 15px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header h1 {
    color: #ff6a00;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.factory-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8f5e9;
    padding: 10px 20px;
    border-radius: 25px;
}

.live-dot {
    width: 12px;
    height: 12px;
    background: #4caf50;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.stat-card .label {
    color: #666;
    font-size: 14px;
}

.controls {
    background: white;
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.filter-select {
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    background: white;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6a00, #ff8c00);
    color: white;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 106, 0, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.orders-table {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: linear-gradient(135deg, #ff6a00, #ff8c00);
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

td {
    padding: 15px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #333;
}

tr:hover {
    background: #fff8f0;
}

.status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
}

.status-pending { background: #fff3e0; color: #ff6a00; }
.status-paid { background: #e8f5e9; color: #4caf50; }
.status-shipped { background: #e3f2fd; color: #2196f3; }
.status-completed { background: #f3e5f5; color: #9c27b0; }
.status-cancelled { background: #ffebee; color: #f44336; }

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.3s;
}

.action-btn-view {
    background: #e3f2fd;
    color: #2196f3;
}

.action-btn-view:hover {
    background: #2196f3;
    color: white;
}

.action-btn-process {
    background: #e8f5e9;
    color: #4caf50;
}

.action-btn-process:hover {
    background: #4caf50;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #333;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: none;
    z-index: 1001;
    border-left: 4px solid #4caf50;
}

.notification.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 5px;
    cursor: pointer;
}

.pagination button.active {
    background: #ff6a00;
    color: white;
    border-color: #ff6a00;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .controls {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }
}
.action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* 禁止点击 */
}