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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  color: #667eea;
}

header p {
  color: #666;
  font-size: 1.1rem;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.card h2 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: #333;
}

.description {
  color: #666;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #555;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 10px;
}

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

.btn-primary:hover {
  background: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(72, 187, 120, 0.3);
}

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

.btn-secondary:hover {
  background: #4a5568;
}

.btn-danger {
  background: #f56565;
  color: white;
  padding: 6px 12px;
  font-size: 0.85rem;
}

.btn-danger:hover {
  background: #e53e3e;
}

.database-list {
  margin-top: 30px;
}

.database-list h3 {
  margin-bottom: 15px;
  color: #555;
}

#databasesContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.database-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.database-item .title {
  font-weight: 600;
  color: #333;
}

.database-item .id {
  font-size: 0.85rem;
  color: #888;
  font-family: monospace;
}

.columns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 30px;
}

.column-box {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e2e8f0;
}

.column-box h3 {
  margin-bottom: 15px;
  color: #555;
}

.column-list {
  max-height: 300px;
  overflow-y: auto;
}

.column-item {
  padding: 10px;
  background: white;
  margin-bottom: 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.column-item .name {
  font-weight: 600;
  color: #333;
}

.column-item .type {
  font-size: 0.8rem;
  color: #888;
  margin-left: 8px;
}

.mapping-section {
  background: #f7fafc;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.mapping-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: end;
  margin-bottom: 20px;
}

.arrow {
  font-size: 2rem;
  color: #667eea;
  padding-bottom: 12px;
}

.current-mappings {
  margin-top: 30px;
}

.current-mappings h3 {
  margin-bottom: 15px;
  color: #555;
}

.mapping-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.mapping-item .mapping-info {
  flex: 1;
}

.mapping-item .mapping-text {
  font-size: 0.95rem;
  color: #333;
}

.mapping-item .notion-prop {
  font-weight: 600;
  color: #667eea;
}

.mapping-item .monday-col {
  font-weight: 600;
  color: #764ba2;
}

.items-list {
  margin-top: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.item {
  padding: 15px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  margin-bottom: 10px;
}

.item .item-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

.item .item-meta {
  font-size: 0.85rem;
  color: #666;
}

.item .item-id {
  font-family: monospace;
  color: #888;
}

.loading {
  text-align: center;
  color: #888;
  padding: 20px;
}

.status-value-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #667eea;
  margin-bottom: 20px;
}

.status-mappings-list {
  margin-top: 20px;
}

.status-mappings-list h4 {
  margin-bottom: 15px;
  color: #555;
}

.status-mapping-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #f7fafc;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  margin-bottom: 8px;
}

.status-mapping-item .status-text {
  font-size: 0.9rem;
  color: #333;
}

.status-mapping-item .notion-status {
  font-weight: 600;
  color: #667eea;
}

.status-mapping-item .monday-status {
  font-weight: 600;
  color: #764ba2;
}

footer {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.status-indicator {
  font-size: 1.5rem;
}

.status-indicator.online {
  color: #48bb78;
}

.status-indicator.offline {
  color: #f56565;
}

@media (max-width: 768px) {
  .columns-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .arrow {
    transform: rotate(90deg);
    padding: 0;
    text-align: center;
  }

  header h1 {
    font-size: 2rem;
  }
}

