/* assets/css/premium.css - 星火 ERP 全局高级视觉系统 */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --secondary: #a855f7;
    --bg-deep: #0f172a;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent-emerald: #10b981;
    --accent-rose: #f43f5e;
    --accent-amber: #f59e0b;
}

body {
    background: var(--bg-deep);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* 统一容器 */
.premium-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 3rem;
}

/* 面包屑导航 */
.breadcrumb-wrapper {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.breadcrumb-wrapper a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-wrapper a:hover {
    color: var(--primary);
}

.breadcrumb-wrapper .sep {
    color: var(--glass-border);
}

.breadcrumb-wrapper .current {
    color: var(--text-main);
    font-weight: 600;
}

/* 玻璃态卡片 */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin-bottom: 2rem;
}

/* 标题样式 */
.premium-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.premium-title i {
    color: var(--primary);
}

/* 按钮统一 */
.btn-premium {
    background: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    color: white;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-premium:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* 表格/列表统一样式 */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.premium-table th {
    background: rgba(255,255,255,0.05);
    padding: 15px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.premium-table tr.row-item {
    background: rgba(255,255,255,0.02);
    transition: all 0.2s;
}

.premium-table tr.row-item:hover {
    background: rgba(255,255,255,0.05);
    transform: scale(1.002);
}

.premium-table td {
    padding: 15px;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.premium-table td:first-child { border-left: 1px solid var(--glass-border); border-radius: 12px 0 0 12px; }
.premium-table td:last-child { border-right: 1px solid var(--glass-border); border-radius: 0 12px 12px 0; }

/* 表单控件增强 */
.premium-input, select.premium-input {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 10px 15px;
    color: white;
    outline: none;
    transition: all 0.3s;
}

.premium-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select.premium-input option {
    background: #1e293b;
    color: white;
}

/* 筛选控制栏 */
.premium-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin-bottom: 2rem;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: center;
}

/* 批量操作条 */
.premium-batch-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.2rem 2rem;
    border-radius: 18px;
    margin-bottom: 2rem;
    color: white;
    display: none;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.3);
    animation: slideDown 0.3s ease-out;
}

.premium-batch-bar.active { display: flex; }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 状态标签 */
.status-pill {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pill.instock, .status-pill.success { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }
.status-pill.outofstock, .status-pill.danger { background: rgba(244, 63, 94, 0.2); color: var(--accent-rose); }
.status-pill.pending, .status-pill.warning { background: rgba(245, 158, 11, 0.2); color: var(--accent-amber); }

/* 列表行项优化 */
.premium-list-header {
    display: grid;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--glass-border);
}

.premium-list-row {
    display: grid;
    padding: 1.2rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 16px;
    margin-bottom: 8px;
    align-items: center;
    transition: all 0.3s;
}

.premium-list-row:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
    transform: translateX(5px);
}

.premium-list-row.selected {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
}

/* 分页组件 */
.premium-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.page-info {
    background: rgba(255,255,255,0.05);
    padding: 8px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* 变体展开详情样式 */
.variant-container {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    margin: 1rem 2rem;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
}

.variant-grid-header {
    display: grid;
    grid-template-columns: 80px 2fr 130px 130px 180px;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.variant-grid-row {
    display: grid;
    grid-template-columns: 80px 2fr 130px 130px 180px;
    gap: 15px;
    align-items: center;
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.2s;
    margin-bottom: 5px;
}

.variant-grid-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.variant-img-box {
    width: 54px;
    height: 54px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
}

.variant-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.variant-name-box {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.variant-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.variant-input-group .premium-input {
    padding: 6px 10px;
    font-size: 0.85rem;
    width: 100% !important;
}

.variant-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 订单产品列表样式重构 */
.order-item-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item-grid {
    display: grid;
    grid-template-columns: 60px 1fr 120px 100px;
    gap: 20px;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.order-item-grid:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--glass-border);
}

.order-item-img-box {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
}

.order-item-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-info {
    display: flex;
    flex-direction: column;
}

.order-item-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.order-item-sku {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.order-item-price {
    text-align: right;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.order-item-total {
    text-align: right;
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-emerald);
}

/* 弹窗系统 - 避免冲突，更名为 premium-modal */
.premium-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.premium-modal.active {
    display: flex;
    opacity: 1;
}

.premium-modal .modal-content {
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.premium-modal.active .modal-content {
    transform: translateY(0);
}

/* 兼容 Bootstrap 弹窗样式调整 - 加入玻璃态效果 */
.modal-content { 
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--glass-border) !important; 
    border-radius: 24px !important;
    color: white !important;
}
.modal-header { border-bottom: 1px solid var(--glass-border) !important; }
.modal-footer { border-top: 1px solid var(--glass-border) !important; }
.close { color: white !important; text-shadow: none !important; opacity: 0.7; }
.close:hover { color: white !important; opacity: 1; }
.modal-backdrop.show { opacity: 0.7 !important; backdrop-filter: blur(4px); }

/* ==========================================
   高级悬浮操作栏 (Floating Action Bar)
   ========================================== */
.floating-action-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 60px);
    max-width: 1540px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 16px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.floating-action-bar:hover {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.floating-action-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-action-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 适配容器底部间距，防止悬浮条遮挡内容 */
.premium-container {
    padding-bottom: 120px !important;
}

/* 移动端/响应式适配 */
@media (max-width: 991px) {
    .floating-action-bar {
        flex-direction: column;
        align-items: stretch;
        bottom: 12px;
        width: calc(100% - 24px);
        border-radius: 20px;
        padding: 16px;
        gap: 16px;
    }
    .floating-action-group {
        width: 100% !important;
        justify-content: space-between;
    }
    .floating-action-group.justify-content-end {
        justify-content: center;
    }
    .premium-container {
        padding-bottom: 220px !important;
    }
}
