/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Toast消息通知系统 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.toast {
    background-color: #2563eb;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    max-width: 300px;
    opacity: 0;
    pointer-events: auto;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    transform-origin: top right;
    will-change: transform, box-shadow;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.hide {
    opacity: 0;
    transform: translateY(-20px);
}

.toast.hovering {
    transform: translateY(0) scale(1.03);
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.toast-content {
    display: flex;
    align-items: center;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast.error   { background-color: #dc2626; }
.toast.warn    { background-color: #d97706; }
.toast.info    { background-color: #2563eb; }


/* 进度条固定在 toast 底部 */
.toast .progress {
  position: absolute;
  left: 12px; right: 12px; bottom: 8px;  /* 留一点内边距 */
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.35);
  overflow: hidden;

  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none; /* 不挡鼠标 */
}

.toast.hovering .progress {
  opacity: 1;           /* 悬停显示 */
}

/* 动画片段保持不变 */
.toast .progress::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 100%;
  background: rgba(255,255,255,0.9);
}

.toast .progress.run::after {
  animation: shrink var(--toast-duration, 3000ms) linear forwards;
}

/* 如果悬停时要暂停进度 */
.toast.hovering .progress.run::after {
  animation-play-state: paused;
}

@keyframes shrink {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* 顶部导航栏 */
.navbar {
    background-color: #1e3a8a;
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-items {
    display: flex;
}

.nav-item {
    padding: 0 15px;
    cursor: pointer;
    height: 60px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: #2563eb;
}

.nav-item.active {
    background-color: #2563eb;
    font-weight: 500;
}

.navbar a {
    text-decoration: none;
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
}

/* 主内容区 */
.container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background-color: white;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

/* 通用section标题 */
.section-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.section-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e3a8a;
}

.header-actions button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.header-actions button:hover {
    background-color: #1d4ed8;
}

/* 通用状态样式 */
.status-running {
    background-color: #dbeafe;
    color: #1e40af;
}

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

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

.status-killed {
    background-color: #f3f4f6;
    color: #4b5563;
}

.status-pending {
    background-color: #fff7ed;
    color: #9a3412;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
} 