/* AIP边缘算力客户端 - 明亮紫色渐变风格（参考管理后台） */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* 修复画质模糊问题 */
body, html, #app {
    width: 100%;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 高清显示优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 灵动岛动画 */
@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10% { transform: scale(1.2); }
    20% { transform: scale(1); }
}

/* 登录页面 - 紫色渐变背景 */
#login-page {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 玻璃卡片 - 明亮版本 */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 500px;
    max-width: 95%;
    animation: fadeIn 0.6s ease-out;
}

/* 移动端优化 */
@media (max-width: 768px) {
    .glass-card {
        padding: 30px 20px;
        width: 90%;
        border-radius: 16px;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Logo 区域 */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
    animation: glow 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .logo-icon {
        width: 80px;
        height: 80px;
        font-size: 50px;
        margin-bottom: 16px;
    }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 10px 60px rgba(102, 126, 234, 0.6); }
}

.title {
    font-size: 38px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 16px 0;
}

.subtitle {
    font-size: 17px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 12px;
}

.description {
    font-size: 14px;
    color: #9ca3af;
    line-height: 1.7;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.glass-input {
    width: 100%;
    padding: 16px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    color: #1f2937;
    font-size: 15px;
    transition: all 0.3s;
}

.glass-input:focus {
    outline: none;
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.glass-input::placeholder {
    color: #9ca3af;
}

/* 按钮 - 明亮渐变 */
.btn-primary {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
    transition: all 0.3s;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.45);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    width: 100%;
    height: 50px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.25);
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 14px;
    font-size: 14px;
    margin-bottom: 16px;
}

/* 主页面 - 亮色风格 */
#main-page {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
}

/* 顶部导航栏 - 紫色渐变 */
.navbar {
    height: 70px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.2);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-title {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
}

.nav-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.nav-info {
    display: flex;
    gap: 12px;
}

.badge {
    padding: 8px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
}

.badge-version {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-status {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-status.connected {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

/* 主容器 */
.main-container {
    display: flex;
    height: calc(100% - 70px);
}

/* 左侧边栏 - 深蓝紫色 */
.sidebar {
    width: 260px;
    background: #1e293b;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-title-small {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 12px 18px;
    margin-bottom: 8px;
}

.nav-item {
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    color: #cbd5e1;
    border: none;
    border-radius: 12px;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* 主内容区 - 白色明亮 */
.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background: #ffffff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-content h2 {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 28px;
}

/* 卡片样式 - 彩色卡片 */
.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border: 1px solid #f3f4f6;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* 紫色卡片 */
.card-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* 绿色卡片 */
.card-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* 蓝色卡片 */
.card-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* 橙色卡片 */
.card-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

/* 统计数字 */
.stat-value {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.95;
    font-weight: 500;
}

/* 网格布局 */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* 移动端网格优化 */
@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 按钮组 */
.btn-group {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-refresh {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-refresh:hover {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-pull {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.btn-pull:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

th {
    padding: 16px;
    text-align: left;
    font-weight: 700;
    font-size: 14px;
}

td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-size: 14px;
}

tr:hover {
    background: #f9fafb;
}

/* 状态徽章 */
.status-badge {
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-running {
    background: #dbeafe;
    color: #1e40af;
}

.status-completed {
    background: #d1fae5;
    color: #065f46;
}

.status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* 图标样式 */
.icon {
    font-size: 20px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3, #6a3d8f);
}
