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

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

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Auth Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #fc6d26 0%, #e24329 100%);
}

.auth-card {
  background: white;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
}

.auth-card h1 {
  color: #fc6d26;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.auth-card h2 {
  color: #333;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 500;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #555;
}

.form-group input {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: #fc6d26;
  box-shadow: 0 0 0 3px rgba(252, 109, 38, 0.1);
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #fc6d26;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #e85d16;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #5a6268;
}

.auth-error {
  background-color: #fce4e4;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  color: #666;
  font-size: 0.9rem;
}

.auth-switch a {
  color: #fc6d26;
  text-decoration: none;
  font-weight: 500;
}

.auth-switch a:hover {
  text-decoration: underline;
}

/* Header Styles */
.header {
  background-color: #fc6d26;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.header-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-btn {
  background-color: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s, border-color 0.2s;
}

.nav-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.nav-btn.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-color: white;
}

.logout-btn {
  background-color: rgba(0, 0, 0, 0.1);
}

.logout-btn:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

.user-info {
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-weight: 500;
}

/* Settings Styles */
.settings-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem;
}

.settings-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
}

.settings-card h2 {
  color: #333;
  margin-bottom: 0.5rem;
}

.settings-info {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.settings-info code {
  background-color: #f4f5f7;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85rem;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.settings-error {
  background-color: #fce4e4;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.settings-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.token-saved {
  color: #28a745;
  font-weight: normal;
  font-size: 0.85rem;
}

/* Setup Notice */
.setup-notice {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.setup-notice p {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* Board Toolbar */
.board-toolbar {
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.9rem;
  color: #555;
  font-weight: 500;
}

.filter-select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: white;
  min-width: 180px;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #fc6d26;
  box-shadow: 0 0 0 2px rgba(252, 109, 38, 0.1);
}

.filter-clear {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: #999;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}

.filter-clear:hover {
  color: #c0392b;
}

.refresh-btn {
  background-color: white;
  color: #fc6d26;
  border: 1px solid #fc6d26;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.refresh-btn:hover:not(:disabled) {
  background-color: #fff5f0;
}

.refresh-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Error Message */
.error-message {
  background-color: #fce4e4;
  border: 1px solid #f5c6c6;
  color: #c0392b;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #c0392b;
}

/* Board Styles */
.board {
  display: flex;
  gap: 1rem;
  padding: 0 1.5rem 1.5rem;
  flex: 1;
  overflow-x: auto;
}

.column {
  background-color: #ebecf0;
  border-radius: 8px;
  min-width: 300px;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
}

.column.drag-over {
  background-color: #d4d6db;
}

.column-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.column-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

.issue-count {
  background-color: #ddd;
  color: #666;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.column-content {
  padding: 0.5rem;
  overflow-y: auto;
  flex: 1;
}

.issue-card {
  background-color: white;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.2s;
}

.issue-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.issue-card.dragging {
  opacity: 0.5;
  transform: rotate(3deg);
}

.issue-card:active {
  cursor: grabbing;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.issue-id {
  color: #666;
  font-size: 0.85rem;
  font-weight: 500;
}

.issue-link {
  color: #fc6d26;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
}

.issue-link:hover {
  color: #e85d16;
}

.issue-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.issue-meta {
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.no-assignee {
  font-style: italic;
  color: #999;
}

.issue-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.label {
  background-color: #e8e8e8;
  color: #555;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.75rem;
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 1rem;
  }

  .header-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-wrap: wrap;
  }

  .filter-select {
    flex: 1;
    min-width: 0;
  }

  .board {
    flex-direction: column;
    align-items: center;
  }

  .column {
    min-width: 100%;
    max-width: 100%;
    max-height: none;
  }

  .settings-actions {
    flex-direction: column;
  }
}
