
/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background-color: #0d1117;
  color: #c9d1d9;
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: #58a6ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.sidebar-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 260px;
  background-color: #161b22;
  border-right: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px;
  border-bottom: 1px solid #30363d;
}

.sidebar-brand a {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f0f6fc;
}

.sidebar-brand a:hover {
  text-decoration: none;
}

.sidebar-project-selector {
  padding: 16px 20px;
  border-bottom: 1px solid #30363d;
}

.sidebar-section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-dropdown {
  width: 100%;
  padding: 8px 12px;
  background-color: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.875rem;
  cursor: pointer;
}

.project-dropdown:focus {
  outline: none;
  border-color: #58a6ff;
}

.sidebar-new-project-btn {
  display: block;
  margin-top: 12px;
  padding: 8px 12px;
  background-color: #238636;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.875rem;
  text-align: center;
}

.sidebar-new-project-btn:hover {
  background-color: #2ea043;
  text-decoration: none;
}

.sidebar-nav {
  padding: 16px 12px;
  flex-grow: 1;
}

.sidebar-nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.875rem;
}

.sidebar-nav-link:hover {
  background-color: #21262d;
  text-decoration: none;
}

.sidebar-nav-link.active {
  background-color: #21262d;
  color: #f0f6fc;
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid #30363d;
}

.sidebar-user-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-username {
  font-size: 0.875rem;
  color: #8b949e;
}

.sidebar-logout-btn {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 0.75rem;
  cursor: pointer;
}

.sidebar-logout-btn:hover {
  color: #f85149;
}

.sidebar-main-content {
  flex: 1;
  margin-left: 260px;
  padding: 24px;
  min-height: 100vh;
}

/* Login Page */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 400px;
}

.login-box h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: #f0f6fc;
}

.login-subtitle {
  color: #8b949e;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #c9d1d9;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background-color: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #c9d1d9;
  font-size: 0.875rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #58a6ff;
}

.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: #238636;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #2ea043;
  text-decoration: none;
}

.btn-secondary {
  background-color: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
}

.btn-secondary:hover {
  background-color: #30363d;
  text-decoration: none;
}

.login-hint {
  margin-top: 24px;
  font-size: 0.75rem;
  color: #8b949e;
  text-align: center;
}

.error-message {
  background-color: rgba(248, 81, 73, 0.1);
  border: 1px solid #f85149;
  color: #f85149;
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

/* Kanban Board */
.task-kanban-container {
  max-width: 100%;
}

.task-kanban-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.task-kanban-header h1 {
  font-size: 1.5rem;
  color: #f0f6fc;
}

.add-task-btn {
  padding: 8px 16px;
  background-color: #238636;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.875rem;
}

.add-task-btn:hover {
  background-color: #2ea043;
  text-decoration: none;
}

.task-kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
}

.task-kanban-column {
  min-width: 280px;
  max-width: 280px;
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.task-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #30363d;
}

.task-column-header h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f0f6fc;
}

.task-column-count {
  background-color: #30363d;
  color: #8b949e;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.task-column-content {
  padding: 12px;
  flex-grow: 1;
  overflow-y: auto;
  max-height: calc(100vh - 200px);
}

.task-card {
  background-color: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 8px;
}

.task-card:last-child {
  margin-bottom: 0;
}

.task-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.task-card-description {
  font-size: 0.75rem;
  color: #8b949e;
  margin-bottom: 8px;
}

.task-card-agent-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.status-backlog {
  background-color: #30363d;
  color: #8b949e;
}

.status-working {
  background-color: rgba(56, 139, 253, 0.2);
  color: #58a6ff;
}

.status-completed {
  background-color: rgba(35, 134, 54, 0.2);
  color: #3fb950;
}

.status-paused {
  background-color: rgba(187, 128, 9, 0.2);
  color: #d29922;
}

.status-failed {
  background-color: rgba(248, 81, 73, 0.2);
  color: #f85149;
}

.pod-indicator {
  font-size: 0.625rem;
  padding: 2px 6px;
  background-color: #388bfd;
  color: #ffffff;
  border-radius: 4px;
  font-weight: 600;
}

.empty-state {
  color: #8b949e;
  font-size: 0.875rem;
  text-align: center;
  padding: 24px;
}

/* Empty Project State */
.empty-project-state {
  text-align: center;
  padding: 64px 24px;
}

.empty-project-state h2 {
  font-size: 1.5rem;
  color: #f0f6fc;
  margin-bottom: 12px;
}

.empty-project-state p {
  color: #8b949e;
  margin-bottom: 24px;
}

.create-project-btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: #238636;
  color: #ffffff;
  border-radius: 6px;
  font-size: 0.875rem;
}

.create-project-btn:hover {
  background-color: #2ea043;
  text-decoration: none;
}

/* Projects Page */
.projects-container {
  max-width: 800px;
}

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

.projects-header h1 {
  font-size: 1.5rem;
  color: #f0f6fc;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.project-card {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 16px;
}

.project-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.project-card h3 a {
  color: #58a6ff;
}

.project-card p {
  font-size: 0.875rem;
  color: #8b949e;
  margin-bottom: 8px;
}

.project-meta {
  font-size: 0.75rem;
  color: #6e7681;
}

/* New Project / Project Detail */
.new-project-container,
.project-detail-container {
  max-width: 600px;
}

.new-project-container h1,
.project-detail-container h1 {
  font-size: 1.5rem;
  color: #f0f6fc;
  margin-bottom: 24px;
}

.project-form {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

.project-info {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
}

.project-info p {
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.project-info p:last-child {
  margin-bottom: 0;
}

.project-info strong {
  color: #f0f6fc;
}

.project-actions {
  display: flex;
  gap: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 480px;
  margin: 24px;
}

.modal-content h2 {
  font-size: 1.25rem;
  color: #f0f6fc;
  margin-bottom: 20px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-align: center;
}

.button.primary {
  background-color: #238636;
  color: #ffffff;
}

.button.primary:hover {
  background-color: #2ea043;
  text-decoration: none;
}

.button.secondary {
  background-color: #21262d;
  color: #c9d1d9;
  border: 1px solid #30363d;
}

.button.secondary:hover {
  background-color: #30363d;
  text-decoration: none;
}

/* Performance Test Page */
.perf-test-container {
  max-width: 900px;
}

.perf-test-header {
  margin-bottom: 24px;
}

.perf-test-header h1 {
  font-size: 1.5rem;
  color: #f0f6fc;
  margin-bottom: 8px;
}

.perf-test-description {
  color: #8b949e;
  font-size: 0.875rem;
}

/* API Documentation */
.perf-test-api-docs {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.perf-test-api-docs h2 {
  font-size: 1rem;
  color: #f0f6fc;
  margin-bottom: 16px;
}

.api-endpoint-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background-color: #0d1117;
  border-radius: 6px;
}

.api-method {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  min-width: 60px;
  text-align: center;
}

.api-method-get {
  background-color: rgba(35, 134, 54, 0.2);
  color: #3fb950;
}

.api-method-post {
  background-color: rgba(56, 139, 253, 0.2);
  color: #58a6ff;
}

.api-method-put {
  background-color: rgba(187, 128, 9, 0.2);
  color: #d29922;
}

.api-method-delete {
  background-color: rgba(248, 81, 73, 0.2);
  color: #f85149;
}

.api-path {
  font-family: monospace;
  font-size: 0.875rem;
  color: #c9d1d9;
  background-color: #21262d;
  padding: 4px 8px;
  border-radius: 4px;
}

.api-description {
  font-size: 0.75rem;
  color: #8b949e;
}

.api-note {
  margin-top: 12px;
  font-size: 0.75rem;
  color: #8b949e;
  font-style: italic;
}

/* Form Section */
.perf-test-form-section {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}

.perf-test-form-section h2 {
  font-size: 1rem;
  color: #f0f6fc;
  margin-bottom: 16px;
}

.perf-test-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
}

.form-row .form-group:last-child {
  max-width: 150px;
}

/* Items Section */
.perf-test-items-section {
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 20px;
}

.perf-test-items-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.perf-test-items-header h2 {
  font-size: 1rem;
  color: #f0f6fc;
}

.perf-test-empty {
  text-align: center;
  padding: 32px;
  color: #8b949e;
}

.perf-test-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.perf-test-item-card {
  background-color: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 16px;
}

.perf-test-item-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.perf-test-item-info {
  flex: 1;
}

.perf-test-item-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #f0f6fc;
  margin-bottom: 4px;
}

.perf-test-item-description {
  font-size: 0.75rem;
  color: #8b949e;
  margin-bottom: 8px;
}

.perf-test-item-meta {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
}

.perf-test-item-value {
  color: #58a6ff;
}

.perf-test-item-id {
  color: #6e7681;
}

.perf-test-item-id code {
  font-family: monospace;
  font-size: 0.625rem;
  background-color: #21262d;
  padding: 2px 4px;
  border-radius: 4px;
}

.perf-test-item-actions {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.perf-test-item-timestamps {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #30363d;
}

.perf-test-item-timestamps small {
  font-size: 0.625rem;
  color: #6e7681;
}

/* Edit Details */
.perf-test-edit-details {
  position: relative;
}

.perf-test-edit-details summary {
  list-style: none;
  cursor: pointer;
}

.perf-test-edit-details summary::-webkit-details-marker {
  display: none;
}

.perf-test-edit-form {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 10;
  background-color: #21262d;
  border: 1px solid #30363d;
  border-radius: 6px;
  padding: 12px;
  margin-top: 4px;
  min-width: 250px;
}

.perf-test-edit-form .form-group {
  margin-bottom: 8px;
}

.perf-test-edit-form input {
  padding: 6px 10px;
  font-size: 0.75rem;
}

/* Button Variants */
.btn-danger {
  background-color: #da3633;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #f85149;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.75rem;
}

.delete-all-form {
  display: inline;
}

.perf-test-delete-form {
  display: inline;
}
