.deployments-page {
  padding: 2rem;
}

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

.new-deployment-btn {
  background: var(--primary-color, #2196f3);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s;
}

.deployment-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 800px;
  padding: 2rem;
}

.progress-bar {
  height: 4px;
  background: #eee;
  margin: 2rem 0;
  border-radius: 2px;
}

.progress {
  height: 100%;
  background: var(--primary-color, #2196f3);
  border-radius: 2px;
  transition: width 0.3s;
}

.step-1 { width: 33.33%; }
.step-2 { width: 66.66%; }
.step-3 { width: 100%; }

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.template-card {
  border: 2px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}

.template-card:hover {
  border-color: var(--primary-color, #2196f3);
}

.template-card.selected {
  border-color: var(--primary-color, #2196f3);
  background: var(--primary-color-light, #e3f2fd);
}

.template-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.deployments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.deployment-card {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1.5rem;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.deployment-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-dot.running { background: #4caf50; }
.status-dot.paused { background: #ff9800; }
.status-dot.failed { background: #f44336; }

.deployment-card footer {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: #f5f5f5;
}

.icon-btn.danger:hover {
  background: #ffebee;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  grid-column: 1 / -1;
}

.empty-state img {
  max-width: 200px;
  margin-bottom: 1rem;
}

.icon-btn[title="Edit"]:hover {
  background: #e3f2fd;
  color: #1976d2;
}

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

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background 0.2s;
}

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

.step {
  margin: 2rem 0;
}

.step h3 {
  margin-bottom: 1rem;
  color: #333;
}

input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.2s;
}

input[type="text"]:focus {
  border-color: var(--primary-color, #2196f3);
  outline: none;
}

.modal-content footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.modal-content footer button {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.modal-content footer button.primary {
  background: var(--primary-color, #2196f3);
  color: white;
  border: none;
}

.modal-content footer button:not(.primary) {
  background: none;
  border: 2px solid #eee;
}

.modal-content footer button:hover {
  opacity: 0.9;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.region-card {
  position: relative;
  border: 2px solid #eee;
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.region-card:hover {
  border-color: var(--primary-color, #2196f3);
  background: var(--primary-color-light, #e3f2fd);
}

.region-card.selected {
  border-color: var(--primary-color, #2196f3);
  background: var(--primary-color-light, #e3f2fd);
}

.region-selected-mark {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--primary-color, #2196f3);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.region-location {
  font-size: 0.8rem;
  color: #666;
}

.helper-text {
  color: #666;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.ha-notice {
  margin: 1rem 0;
  padding: 1rem;
  background: #f3f9ff;
  border-radius: 8px;
  border: 1px solid #bbdefb;
}

.ha-notice p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  color: #1976d2;
}

.ha-icon {
  font-size: 1.2rem;
}

.regions-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.region-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.8rem;
  color: #666;
}

.git-url {
  color: #666;
  font-family: monospace;
  font-size: 0.9rem;
  margin: 0;
}

.resources-config {
  margin-top: 2rem;
}

.resource-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

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

.input-group label {
  font-size: 0.9rem;
  color: #666;
}

.input-group select {
  padding: 0.75rem;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 1rem;
  background: white;
}

.domain-config {
  margin-bottom: 2rem;
}

.domain-toggle {
  margin: 1rem 0;
}

.domain-toggle label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.env-vars {
  margin-top: 2rem;
}

.add-env-btn {
  background: none;
  border: 2px dashed #ccc;
  padding: 0.75rem;
  border-radius: 8px;
  width: 100%;
  margin-bottom: 1rem;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.add-env-btn:hover {
  border-color: var(--primary-color, #2196f3);
  color: var(--primary-color, #2196f3);
}

.env-var-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  align-items: center;
}

.remove-env-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.remove-env-btn:hover {
  background: #ffebee;
  color: #f44336;
}

.step h4 {
  margin: 1.5rem 0 1rem;
  color: #666;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
}

.status-dot.running { 
  background: #4caf50; 
  box-shadow: 0 0 4px #4caf50;
}

.status-dot.paused { 
  background: #ff9800; 
  box-shadow: 0 0 4px #ff9800;
}

.status-dot.failed { 
  background: #f44336; 
  box-shadow: 0 0 4px #f44336;
}

.status-dot.deleted { 
  background: #666;
  box-shadow: 0 0 4px #666;
}

.deployment-card[data-status='paused'] {
  opacity: 0.8;
}

.deployment-card[data-status='deleted'] {
  opacity: 0.5;
} 