:root {
    --primary: #007AFF;
    --primary-light: #5AC8FA;
    --success: #34C759;
    --danger: #FF3B30;
    --text-main: #1d1d1f;
    --text-sub: #86868b;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: rgba(255, 255, 255, 0.8);
    --radius: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }

body {
    margin: 0; padding: 0;
    font-family: -apple-system, "SF Pro Display", "Microsoft YaHei", sans-serif;
    background: linear-gradient(-45deg, #a1c4fd, #c2e9fb, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: var(--text-main);
    min-height: 100vh;
}
@keyframes gradientBG { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

body.dashboard-page { display: block; padding-bottom: 120px; }
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }

/* 卡片 */
.glass-panel {
    background: var(--glass-bg); backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); border-radius: var(--radius);
    padding: 25px; margin-bottom: 20px; box-shadow: 0 4px 20px rgba(0, 60, 255, 0.05);
}

/* 头部 */
header { text-align: center; padding: 30px 0 10px; }
.logo-sub { font-size: 12px; letter-spacing: 4px; color: #fff; margin-bottom: 5px; opacity: 0.9; text-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.logo-main { font-size: 2.5rem; font-weight: 900; margin: 0; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.typewriter-container { height: 24px; color: #fff; margin-top: 5px; }

/* 按钮 & 输入框 */
button, .btn { appearance: none; border: none; cursor: pointer; font-weight: 600; border-radius: 10px; padding: 10px 20px; transition: 0.2s; font-size: 14px; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--primary); color: #fff !important; }
.btn-success { background: var(--success); color: #fff !important; }
.btn-danger { background: var(--danger); color: #fff !important; }
.btn-secondary { background: #fff; color: #333; border: 1px solid #ddd; }

.color-chip { appearance: none; display: inline-block; padding: 8px 16px; border-radius: 30px; background: #fff; border: 1px solid #e0e0e0; font-size: 13px; color: #333; cursor: pointer; transition: 0.2s; margin-right: 8px; margin-bottom: 8px; user-select: none; }
.color-chip:hover { border-color: var(--primary); color: var(--primary); }
.color-chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,122,255,0.3); }

input, select { appearance: none; width: 100%; padding: 12px 15px; margin: 8px 0 15px; background: #fff; border: 1px solid #ccc; border-radius: 10px; font-size: 14px; color: #333; transition: 0.3s; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }

/* 滚动列表 */
.scroll-container { display: flex; gap: 15px; overflow-x: auto; padding: 5px 5px 15px 5px; cursor: grab; scrollbar-width: none; margin-bottom: 20px; }
.scroll-container::-webkit-scrollbar { display: none; }
.scroll-container:active { cursor: grabbing; }
.status-card { flex: 0 0 220px; background: #fff; border-radius: 16px; padding: 20px; border: 1px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: transform 0.2s; user-select: none; }
.section-title { font-size: 14px; font-weight: bold; color: #666; margin-bottom: 10px; display: flex; align-items: center; gap: 5px; }

/* 导航 Tabs */
.nav-pills { display: flex; gap: 10px; padding: 5px; background: rgba(255,255,255,0.5); border-radius: 14px; margin-bottom: 20px; }
.nav-item { flex: 1; text-align: center; padding: 10px; border-radius: 10px; color: #666; cursor: pointer; transition: 0.2s; font-size: 14px; }
.nav-item.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.05); font-weight: bold; }

/* 批量上传模块 */
.series-module { background: #f9f9f9; border: 1px solid #eee; border-radius: 16px; padding: 20px; margin-bottom: 20px; position: relative; }
.upload-zone {
    border: 2px dashed #dae1e7; border-radius: 16px; padding: 30px;
    text-align: center; background: #fff; position: relative; 
}
.file-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; z-index: 10; }
.preview-img { max-width: 100%; max-height: 200px; border-radius: 8px; margin-top: 10px; display: none; position: relative; z-index: 5; }

/* 修复：添加按钮样式独立 */
.add-series-btn {
    border: 2px dashed var(--primary); 
    background: rgba(0,122,255,0.05);
    color: var(--primary);
    border-radius: 16px; padding: 20px;
    text-align: center; cursor: pointer;
    font-weight: bold; transition: 0.2s;
    margin-top: 20px;
    position: relative; z-index: 5; /* 提高层级防止被遮挡 */
}
.add-series-btn:hover { background: rgba(0,122,255,0.1); }

/* 表格 */
.table-wrapper { overflow-x: auto; border-radius: 12px; background: #fff; border: 1px solid #eee; }
.user-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.user-table th { text-align: left; padding: 15px; background: #f8f9fa; color: #666; font-size: 13px; }
.user-table td { padding: 15px; border-top: 1px solid #eee; color: #333; font-size: 14px; }

/* 布局 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.product-card { background: #fff; border-radius: 16px; padding: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: relative; }
.product-img { width: 100%; height: 240px; object-fit: contain; border-radius: 10px; background: #f8f8f8; cursor: zoom-in; margin-bottom: 10px; }
.color-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 15px 0; }

.bottom-island { position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%); background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); padding: 12px 25px; border-radius: 50px; width: 90%; max-width: 600px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 1000; border: 1px solid rgba(255,255,255,0.5); }

.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }
.toast { background: #fff; padding: 15px 20px; border-radius: 10px; margin-bottom: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); border-left: 4px solid var(--primary); animation: slideIn 0.3s; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

.modal { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.5); z-index: 5000; }
.modal-box { background: #fff; width: 90%; max-width: 400px; border-radius: 20px; padding: 30px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
#img-modal { background: rgba(0,0,0,0.95); }
#big-img { max-width: 95%; max-height: 95%; position: absolute; top:50%; left:50%; transform: translate(-50%, -50%); }

body.login-page { display: flex; justify-content: center; align-items: center; height: 100vh; }
.login-box { width: 100%; max-width: 400px; background: rgba(255,255,255,0.9); padding: 40px; border-radius: 20px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }