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

body { 
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a1a;
  padding: 24px;
  max-width: 1600px;
  margin: 0 auto;
}

.header {
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left h1 { 
  font-size: 24px; 
  font-weight: 600;
  margin-bottom: 4px;
  color: #1a1a1a;
}

.header-left p { 
  font-size: 14px; 
  color: #737373;
}

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

.user-email {
  font-size: 14px;
  color: #525252;
  font-weight: 500;
}

.logout-btn {
  padding: 8px 16px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: #525252;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.stat-value { 
  font-size: 28px; 
  font-weight: 600; 
  color: #1a1a1a;
}

.stat-label { 
  color: #737373; 
  margin-top: 4px;
  font-size: 13px;
}

.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.panel {
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e5e5;
}

.panel h2 {
  margin-bottom: 16px;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 600;
}

.project {
  background: #fafafa;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 6px;
  border-left: 3px solid #d4d4d4;
  cursor: pointer;
  transition: background 0.2s;
}

.project:hover { background: #f5f5f5; }
.project.running { border-left-color: #3b82f6; }
.project.completed { border-left-color: #10b981; }
.project.failed { border-left-color: #ef4444; }

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

.project-id { 
  font-weight: 500; 
  font-size: 14px;
  color: #1a1a1a;
}

.status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status.starting { background: #fef3c7; color: #92400e; }
.status.running { background: #dbeafe; color: #1e40af; }
.status.completed { background: #d1fae5; color: #065f46; }
.status.failed { background: #fee2e2; color: #991b1b; }

.project-info {
  font-size: 12px;
  color: #737373;
  line-height: 1.6;
}

.logs {
  background: #fafafa;
  padding: 12px;
  border-radius: 6px;
  max-height: 600px;
  overflow-y: auto;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  font-size: 12px;
  border: 1px solid #e5e5e5;
}

.log-entry {
  padding: 4px 0;
  line-height: 1.6;
}

.log-time { color: #a3a3a3; font-size: 11px; }

.log-level { 
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  margin: 0 6px;
  text-transform: uppercase;
}

.log-level.info { background: #dbeafe; color: #1e40af; }
.log-level.warn { background: #fef3c7; color: #92400e; }
.log-level.error { background: #fee2e2; color: #991b1b; }

.log-project { color: #3b82f6; font-weight: 500; }
.log-message { color: #525252; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d4d4d4; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a3a3a3; }

.empty { 
  text-align: center; 
  color: #a3a3a3; 
  padding: 40px;
  font-size: 14px;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  padding: 24px;
}

.modal.active { display: flex; align-items: center; justify-content: center; }

.modal-content {
  background: #fff;
  border-radius: 8px;
  max-width: 900px;
  width: 100%;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #737373;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover { background: #f5f5f5; }

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.project-detail {
  background: #fafafa;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 13px;
  line-height: 1.8;
}

.detail-logs {
  background: #fafafa;
  padding: 12px;
  border-radius: 6px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 11px;
  border: 1px solid #e5e5e5;
}

.detail-log-entry {
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.log-data {
  margin-top: 4px;
  padding: 8px;
  background: #fff;
  border-radius: 4px;
  font-size: 10px;
  color: #525252;
  white-space: pre;
  max-height: 200px;
  overflow: auto;
  border: 1px solid #e5e5e5;
  font-family: 'SF Mono', Monaco, monospace;
}

.log-toggle {
  color: #3b82f6;
  cursor: pointer;
  font-size: 10px;
  margin-left: 8px;
  text-decoration: underline;
}

/* Login page */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #fafafa;
}

.login-card {
  background: #fff;
  padding: 48px;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.login-card h1 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #1a1a1a;
  font-weight: 600;
}

.login-card p {
  color: #737373;
  margin-bottom: 32px;
  font-size: 14px;
}

.error-message {
  margin-top: 16px;
  padding: 12px;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  font-size: 13px;
}
