/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* 黑橙色主题 */
body.dark-orange {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    color: #ffffff;
}

/* 白橙色主题 */
body.light-orange {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #dee2e6 100%);
    color: #333333;
}

/* 登录页面样式 */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #2a2a2a 100%);
    overflow: hidden;
}

/* 登录背景动画 */
.login-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255, 107, 0, 0.1) 0%, transparent 50%);
    animation: backgroundPulse 4s ease-in-out infinite alternate;
}

@keyframes backgroundPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 12px;
    padding: 40px 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 107, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: boxGlow 2s ease-in-out infinite alternate;
}

@keyframes boxGlow {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
                    0 0 0 1px rgba(255, 107, 0, 0.1),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
    100% {
        box-shadow: 0 8px 32px rgba(255, 107, 0, 0.2),
                    0 0 20px rgba(255, 107, 0, 0.3),
                    inset 0 1px 0 rgba(255, 255, 255, 0.05);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: #ff6b00;
    margin-bottom: 8px;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.login-header p {
    font-size: 14px;
    color: #888;
    font-weight: 300;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.login-form input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.error-message {
    background: rgba(255, 82, 82, 0.2);
    border: 1px solid rgba(255, 82, 82, 0.4);
    color: #ff5252;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    animation: buttonPulse 2s ease-in-out infinite alternate;
}

@keyframes buttonPulse {
    0% {
        box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
        transform: translateY(0);
    }
    100% {
        box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
        transform: translateY(-2px);
    }
}

.login-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: #666;
}

/* 首页样式 */
.main-container {
    min-height: 100vh;
    padding: 20px;
}

.header {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 12px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 24px;
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    color: #ccc;
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 82, 82, 0.2);
    border: 1px solid rgba(255, 82, 82, 0.4);
    color: #ff5252;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
}

.logout-btn:hover {
    background: rgba(255, 82, 82, 0.3);
    border-color: #ff5252;
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #ff6b00;
    box-shadow: 0 8px 24px rgba(255, 107, 0, 0.2),
                0 0 0 1px rgba(255, 107, 0, 0.1);
}

.card-icon {
    font-size: 48px;
    color: #ff6b00;
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.card-title {
    font-size: 18px;
    color: #fff;
    margin-bottom: 10px;
    font-weight: 600;
}

.card-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.5;
}

/* 白橙色主题样式 */
body.light-orange .login-box {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(255, 107, 0, 0.1);
}

body.light-orange .login-header h1 {
    color: #ff6b00;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

body.light-orange .login-header p {
    color: #666;
}

body.light-orange .login-form label {
    color: #333;
}

body.light-orange .login-form input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: #333;
}

body.light-orange .login-form input:focus {
    background: #fff;
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

body.light-orange .login-footer {
    color: #999;
}

body.light-orange .header {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-orange .header h1 {
    color: #ff6b00;
}

body.light-orange .username {
    color: #333;
}

body.light-orange .card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-orange .card-title {
    color: #333;
}

body.light-orange .card-desc {
    color: #666;
}

/* 设置页面样式 */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
}

.settings-header {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.settings-header h2 {
    color: #ff6b00;
    margin-bottom: 10px;
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.settings-section {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.settings-section h3 {
    color: #ff6b00;
    margin-bottom: 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255, 107, 0, 0.3);
    padding-bottom: 10px;
}

.settings-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form label {
    display: block;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-form input {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.settings-form input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff6b00;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.theme-options {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.theme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ff6b00;
}

.theme-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.theme-preview.dark-orange {
    background: linear-gradient(135deg, #0a0a0a 0%, #ff6b00 100%);
}

.theme-preview.light-orange {
    background: linear-gradient(135deg, #ffffff 0%, #ff6b00 100%);
}

.settings-btn {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    border: none;
    color: #fff;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    animation: buttonPulse 2s ease-in-out infinite alternate;
}

.settings-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6);
}

.success-message {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
}

/* 白橙色主题下的设置页面样式 */
body.light-orange .settings-header,
body.light-orange .settings-section {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-orange .settings-section h3 {
    color: #ff6b00;
    border-bottom: 1px solid rgba(255, 107, 0, 0.3);
}

body.light-orange .settings-form label {
    color: #333;
}

body.light-orange .settings-form input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: #333;
}

body.light-orange .theme-option {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 0, 0.3);
}

body.light-orange .theme-option:hover {
    background: #fff;
    border-color: #ff6b00;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .settings-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .theme-options {
        flex-direction: column;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 107, 0, 0.3);
    border-radius: 50%;
    border-top-color: #ff6b00;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 光效线条 */
.light-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.5), transparent);
    animation: lightScan 3s ease-in-out infinite;
}

/* 消息提示样式 */
.message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.message.success {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #4caf50;
}

.message.error {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.4);
    color: #f44336;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 15% auto;
    padding: 0;
    border: 1px solid rgba(255, 107, 0, 0.5);
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(255, 107, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close:hover {
    color: #000;
    text-decoration: none;
    transform: rotate(90deg);
}

.modal-body {
    padding: 20px;
}

/* 按钮样式 */
.stock-in-btn {
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.3);
    margin-right: 8px;
}

.stock-in-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.5);
    transform: translateY(-2px);
}

.delete-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.delete-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5);
    transform: translateY(-2px);
}

.delete-confirm-btn {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.delete-confirm-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5);
}

.cancel-btn {
    background: linear-gradient(135deg, #607d8b 0%, #455a64 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(96, 125, 139, 0.3);
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #455a64 0%, #607d8b 100%);
    box-shadow: 0 4px 12px rgba(96, 125, 139, 0.5);
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #ff6b00;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b00;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

/* 白橙色主题下的模态框样式 */
body.light-orange .modal-content {
    background-color: #ffffff;
    border: 1px solid rgba(255, 107, 0, 0.5);
}

body.light-orange .modal-body {
    color: #333;
}

body.light-orange .form-group label {
    color: #ff6b00;
}

body.light-orange .form-group input {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 107, 0, 0.3);
    color: #333;
}

body.light-orange .form-group input:focus {
    background: #fff;
    border-color: #ff6b00;
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

/* 自动完成样式 */
.autocomplete-list {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.autocomplete-list div {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    color: #333;
}

.autocomplete-list div:hover {
    background-color: rgba(255, 107, 0, 0.1);
    color: #ff6b00;
}

/* 批量导入结果弹窗样式 */
.import-result-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.import-result-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.import-result-header {
    padding: 20px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c00 100%);
    color: #fff;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.import-result-header h3 {
    margin: 0;
    font-size: 20px;
}

.import-result-header .close {
    font-size: 24px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
}

.import-result-header .close:hover {
    color: #ffeb3b;
}

.import-result-body {
    padding: 20px;
    color: #333;
    font-size: 16px;
    line-height: 1.6;
}

.import-result-body p {
    margin: 0;
}

.import-result-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}


@keyframes lightScan {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}