/* ============================================
   CRM 客户管理系统 - 白色科技感风格
   ============================================ */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
}

/* ========== 科技感登录页（保持深色风格） ========== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0c0c0c 0%, #1a1a2e 50%, #16213e 100%);
}

/* 科技网格背景 */
.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 科技发光球体 */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00ffff, transparent);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, #8b5cf6, transparent);
    bottom: -80px;
    right: -80px;
    animation-delay: 3s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #06b6d4, transparent);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 1.5s;
}

@keyframes orbFloat {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    50% { transform: scale(1.2) translate(30px, -20px); opacity: 0.5; }
}

/* 科技粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(0, 255, 255, 0.4);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.6);
    animation: particleFloat 20s infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(120vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-20vh) rotate(720deg);
        opacity: 0;
    }
}

/* 登录卡片 - 科技炫酷风格 */
.login-card {
    width: 420px;
    padding: 0;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 24px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow:
        0 0 60px rgba(0, 255, 255, 0.1),
        0 0 120px rgba(139, 92, 246, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, #8b5cf6, transparent);
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 卡片头部 */
.card-header {
    padding: 45px 40px 30px;
    text-align: center;
    position: relative;
}

.logo-circle {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    position: relative;
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(0, 255, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(0, 255, 255, 0.8)); }
}

.logo-svg {
    width: 100%;
    height: 100%;
}

.card-header .title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px;
    background: linear-gradient(135deg, #00ffff, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 3px;
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
}

.card-header .subtitle {
    font-size: 12px;
    color: #67e8f9;
    letter-spacing: 4px;
    margin: 0;
    text-transform: uppercase;
    opacity: 0.8;
}

/* 卡片主体 */
.card-body {
    padding: 0 40px 30px;
}

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

.input-wrapper .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #00ffff;
    z-index: 10;
    pointer-events: none;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(0, 255, 255, 0.5));
}

.input-wrapper .el-form-item {
    margin-bottom: 0;
}

.tech-input .el-input__wrapper {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(0, 255, 255, 0.2) !important;
    border-radius: 12px !important;
    padding: 12px 16px 12px 48px !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.tech-input .el-input__wrapper:hover {
    border-color: rgba(0, 255, 255, 0.4) !important;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1) !important;
}

.tech-input .el-input__wrapper.is-focus {
    border-color: #00ffff !important;
    background: rgba(15, 23, 42, 0.95) !important;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2), inset 0 0 20px rgba(0, 255, 255, 0.03) !important;
}

.tech-input .el-input__wrapper.is-focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #00ffff;
    filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.8));
}

.tech-input .el-input__inner {
    background: transparent !important;
    color: #e0e0e0 !important;
    font-size: 15px;
}

.tech-input .el-input__inner::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* 登录按钮 - 科技炫酷风格 */
.login-btn {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #00ffff 0%, #8b5cf6 50%, #06b6d4 100%);
    color: #0a0a0f;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.4), 0 0 80px rgba(139, 92, 246, 0.2);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-arrow {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.login-btn:hover .btn-arrow {
    transform: translateX(5px);
}

.loading-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(10, 10, 15, 0.3);
    border-top-color: #0a0a0f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 卡片底部 */
.card-footer {
    padding: 0 40px 40px;
    text-align: center;
}

.deco-line {
    width: 50%;
    height: 1px;
    margin: 0 auto 14px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.4), transparent);
}

.copyright {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    margin: 0;
    letter-spacing: 1px;
}

/* ========== 主布局 - 白色背景科技感风格 ========== */
.app-layout {
    display: flex;
    min-height: 100vh;
    background: #f8fafc;
}

.app-sidebar {
    width: 240px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
}

.app-sidebar .logo {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00ffff;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.app-sidebar .el-menu {
    border-right: none;
    background: transparent !important;
}

.app-sidebar .el-menu-item {
    color: #cbd5e1;
    transition: all 0.3s ease;
    margin: 4px 12px;
    border-radius: 8px;
}

.app-sidebar .el-menu-item:hover {
    background: rgba(0, 255, 255, 0.1) !important;
    color: #00ffff;
}

.app-sidebar .el-menu-item.is-active {
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(59, 130, 246, 0.1));
    color: #00ffff;
}

.app-main {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    position: relative;
}

/* 顶部栏 */
.app-header {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.app-header .breadcrumb {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.app-header .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #475569;
}

.app-header .user-info .el-icon {
    color: #0ea5e9;
}

/* 内容区 */
.app-content {
    padding: 24px;
    flex: 1;
    position: relative;
    z-index: 1;
}

/* ========== 统计卡片 - 白色科技感风格 ========== */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-color, #0ea5e9), transparent);
}

.stat-card:nth-child(1) { --card-color: #0ea5e9; }
.stat-card:nth-child(2) { --card-color: #10b981; }
.stat-card:nth-child(3) { --card-color: #f59e0b; }
.stat-card:nth-child(4) { --card-color: #ef4444; }

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--card-color, rgba(14, 165, 233, 0.2));
    border-color: var(--card-color, rgba(14, 165, 233, 0.3));
}

.stat-card .stat-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--card-color, #0ea5e9);
}

.stat-card .stat-value.money { color: #0ea5e9; }
.stat-card .stat-value.success { color: #10b981; }
.stat-card .stat-value.warning { color: #f59e0b; }
.stat-card .stat-value.danger { color: #ef4444; }

.stat-card .stat-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 6px;
}

/* ========== 通用面板 - 白色科技感风格 ========== */
.panel {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
}

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

.panel-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 1px;
}

/* 搜索栏 */
.search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    align-items: flex-end;
}

/* 表格优化 - 白色风格 */
.el-table {
    background: transparent !important;
    color: #1e293b;
}

.el-table th.el-table__cell {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700;
    border-bottom: 2px solid #e2e8f0;
}

.el-table tr {
    background: transparent !important;
}

.el-table td.el-table__cell {
    border-bottom: 1px solid #f1f5f9;
}

.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell {
    background: #f8fafc !important;
}

.el-table .el-button + .el-button {
    margin-left: 8px;
}

/* 分页 */
.pagination-wrap {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* 详情页统计 */
.detail-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.detail-stats .stat-item {
    text-align: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.detail-stats .stat-item .value {
    font-size: 26px;
    font-weight: 800;
    color: #0ea5e9;
}

.detail-stats .stat-item .label {
    font-size: 13px;
    color: #64748b;
    margin-top: 6px;
}

/* 订单表单项目选择 */
.order-items-table {
    margin: 20px 0;
}

.order-items-table .el-input-number {
    width: 100px;
}

/* Element Plus 浅色主题适配 */
.el-dialog {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.el-dialog__header {
    border-bottom: 1px solid #f1f5f9;
}

.el-dialog__title {
    color: #1e293b;
    font-weight: 700;
}

.el-form-item__label {
    color: #475569;
}

.el-input__wrapper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: none !important;
    border-radius: 10px;
}

.el-input__wrapper:hover {
    border-color: #cbd5e1 !important;
}

.el-input__wrapper.is-focus {
    border-color: #0ea5e9 !important;
    box-shadow: 0 0 0 1px #0ea5e9 inset !important;
}

.el-input__inner {
    color: #1e293b !important;
}

.el-select .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 1px #0ea5e9 inset !important;
}

.el-popper {
    background: #ffffff !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.el-select-dropdown__item {
    color: #1e293b;
}

.el-select-dropdown__item:hover {
    background: #f1f5f9;
}

.el-select-dropdown__item.selected {
    color: #0ea5e9;
    font-weight: 600;
}

.el-pagination button,
.el-pager li {
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.el-pagination button:hover,
.el-pager li:hover {
    color: #0ea5e9;
    border-color: #0ea5e9;
}

.el-pager li.is-active {
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    color: #ffffff;
    border-color: transparent;
}

.el-tag {
    border-radius: 6px;
}

.el-message-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.el-message-box__title {
    color: #1e293b;
}

.el-message-box__content {
    color: #475569;
}

/* 响应式 */
@media (max-width: 1200px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .detail-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .stat-cards { grid-template-columns: 1fr; }
    .app-sidebar { width: 64px; }
    .app-sidebar .logo span { display: none; }
    .app-main { margin-left: 64px; }
}
