/* 智能生产计划系统 - 科技感主题样式 */

/* ==================== 基础变量 ==================== */
:root {
    --primary-color: #00f2ff;
    --secondary-color: #7b2dff;
    --accent-color: #ff00e5;
    --bg-dark: #0a0a1a;
    --bg-card: #0d1025;
    --bg-card-hover: #151a3d;
    --text-primary: #ffffff;
    --text-secondary: #8b92b3;
    --border-color: rgba(0, 242, 255, 0.2);
    --glow-color: rgba(0, 242, 255, 0.5);
}

/* ==================== 基础样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
}

/* ==================== 登录页面科技感样式 ==================== */
#login-page {
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 50%, #0a1a2e 100%);
    position: relative;
    overflow: hidden;
}

/* 科技网格背景 */
#login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 242, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

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

/* 粒子效果 */
#login-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(0, 242, 255, 0.15) 0%, transparent 2%),
        radial-gradient(circle at 80% 70%, rgba(123, 45, 255, 0.15) 0%, transparent 2%),
        radial-gradient(circle at 40% 80%, rgba(255, 0, 229, 0.1) 0%, transparent 1%),
        radial-gradient(circle at 60% 20%, rgba(0, 242, 255, 0.1) 0%, transparent 1%);
    animation: particleFloat 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* 登录卡片 */
#login-page .bg-white {
    background: rgba(13, 16, 37, 0.95) !important;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 0 40px rgba(0, 242, 255, 0.1),
        inset 0 0 60px rgba(0, 242, 255, 0.02);
    position: relative;
    z-index: 1;
}

#login-page .bg-white:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 0 60px rgba(0, 242, 255, 0.2),
        inset 0 0 80px rgba(0, 242, 255, 0.03);
}

/* 登录头部 */
#login-page .bg-gradient-to-r {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%) !important;
    position: relative;
    overflow: hidden;
}

#login-page .bg-gradient-to-r::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

/* 输入框样式 */
#login-page input {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    transition: all 0.3s ease;
}

#login-page input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

#login-page input::placeholder {
    color: var(--text-secondary);
}

/* 登录按钮 */
#login-page button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    position: relative;
    overflow: hidden;
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
}

#login-page button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

#login-page button[type="submit"]:hover::before {
    left: 100%;
}

#login-page button[type="submit"]:hover {
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
    transform: translateY(-2px);
}

/* 演示账号提示 */
#login-page .bg-blue-50 {
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--border-color);
}

#login-page .text-blue-800,
#login-page .text-blue-600 {
    color: var(--primary-color) !important;
}

/* ==================== 侧边栏科技感样式 ==================== */
aside {
    background: var(--bg-card) !important;
    border-right: 1px solid var(--border-color);
}

aside .border-b {
    border-color: var(--border-color) !important;
}

/* 导航按钮样式 */
.nav-btn {
    color: var(--text-secondary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--primary-color);
}

.nav-btn:hover::before {
    transform: scaleY(1);
}

.nav-btn.active {
    background: linear-gradient(90deg, rgba(0, 242, 255, 0.15), transparent);
    color: var(--primary-color);
    font-weight: 600;
    border-left: 3px solid var(--primary-color);
}

.nav-btn.active::before {
    transform: scaleY(1);
}

/* ==================== 主内容区科技感样式 ==================== */
main {
    background: var(--bg-dark);
}

/* 顶部导航 */
header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
}

header h2 {
    color: var(--text-primary);
}

header p {
    color: var(--text-secondary);
}

/* ==================== 卡片样式 ==================== */
.bg-white {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.bg-white:hover {
    border-color: rgba(0, 242, 255, 0.4);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.1);
}

/* 统计卡片 */
.bg-white.rounded-xl.shadow-sm.p-6 {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.bg-white.rounded-xl.shadow-sm.p-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* ==================== 状态标签 ==================== */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-production {
    background: rgba(0, 242, 255, 0.2);
    color: var(--primary-color);
    border: 1px solid rgba(0, 242, 255, 0.3);
}

.status-completed {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==================== 优先级标签 ==================== */
.priority-high {
    color: #f87171;
    font-weight: 600;
}

.priority-medium {
    color: #fbbf24;
    font-weight: 500;
}

.priority-low {
    color: #34d399;
    font-weight: 500;
}

/* ==================== 甘特图样式 ==================== */
.gantt-header {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.gantt-header-cell {
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.gantt-row {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
    min-height: 60px;
}

.gantt-task-name {
    padding: 0.75rem;
    font-weight: 500;
    color: var(--text-primary);
}

.gantt-cell {
    border-left: 1px solid rgba(0, 242, 255, 0.1);
    position: relative;
}

.gantt-bar {
    position: absolute;
    top: 15px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    color: white;
    overflow: hidden;
    white-space: nowrap;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.3);
}

/* ==================== 进度条 ==================== */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* ==================== 资源卡片 ==================== */
.resource-card {
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.resource-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0, 242, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}

/* ==================== 告警卡片 ==================== */
.alert-card {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid;
    background: rgba(0, 0, 0, 0.3);
}

.alert-warning {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

.alert-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.alert-info {
    border-left-color: var(--primary-color);
    background: rgba(0, 242, 255, 0.1);
}

/* ==================== 建议卡片 ==================== */
.suggestion-card {
    padding: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    border-radius: 8px;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ==================== 表格样式 ==================== */
table {
    color: var(--text-primary);
}

table thead tr {
    border-color: var(--border-color);
}

table thead th {
    color: var(--text-secondary);
}

table tbody tr {
    transition: all 0.2s;
    border-color: var(--border-color);
}

table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ==================== 模态框 ==================== */
#modal-overlay {
    opacity: 0;
    transition: opacity 0.3s;
}

#modal-overlay.show {
    opacity: 1;
}

#modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 60px rgba(0, 242, 255, 0.2);
}

/* ==================== 按钮样式 ==================== */
button {
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

button:focus {
    outline: none;
}

/* 主要按钮 */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: #000 !important;
    font-weight: 600;
}

.bg-primary:hover {
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.5);
    transform: translateY(-2px);
}

/* 次要按钮 */
.bg-gray-100, .bg-gray-200 {
    background: var(--bg-card-hover) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}

.bg-gray-100:hover, .bg-gray-200:hover {
    background: rgba(0, 242, 255, 0.1) !important;
    border-color: var(--primary-color);
}

/* ==================== 输入框样式 ==================== */
input, select, textarea {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.2) !important;
}

input::placeholder, textarea::placeholder {
    color: var(--text-secondary);
}

/* ==================== 系统状态区域 ==================== */
.bg-blue-50 {
    background: rgba(0, 242, 255, 0.05) !important;
    border: 1px solid var(--border-color);
}

.text-blue-900, .text-blue-700, .text-blue-600 {
    color: var(--primary-color) !important;
}

.bg-gray-50 {
    background: var(--bg-card-hover) !important;
    border: 1px solid var(--border-color);
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ==================== 用户头像 ==================== */
#user-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 242, 255, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px rgba(0, 242, 255, 0.4); }
}

/* ==================== 登录表单抖动动画 ==================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-shake {
    animation: shake 0.5s ease-in-out;
}

/* ==================== 淡入动画 ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ==================== 通知样式 ==================== */
.fixed.top-4.right-4 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
    color: #000 !important;
    font-weight: 600;
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.5);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    .gantt-row, .gantt-header {
        grid-template-columns: 150px repeat(7, 1fr);
    }
    
    .gantt-task-name {
        font-size: 0.875rem;
    }
}

/* ==================== 文字颜色统一 ==================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

.text-gray-500, .text-gray-600, .text-gray-700, .text-gray-800 {
    color: var(--text-secondary) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
    text-shadow: 0 0 10px var(--primary-color);
}

/* ==================== 快捷工具按钮 ==================== */
.bg-gray-50.hover\:bg-gray-100 {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
}

.bg-gray-50.hover\:bg-gray-100:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
}
