/* Migration & Import Dashboard Styles */

:root {
  --color-bg: #0b0813;
  --color-card-bg: rgba(22, 17, 36, 0.7);
  --color-border: rgba(147, 51, 234, 0.15);
  --color-accent-purple: #a855f7;
  --color-accent-green: #22c55e;
  --color-accent-red: #ef4444;
  --color-text: #f3f4f6;
  --color-text-muted: #9ca3af;
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  margin: 0;
  padding: 0;
  background-image: radial-gradient(circle at 10% 20%, rgba(147, 51, 234, 0.08) 0%, transparent 40%),
                    radial-gradient(circle at 90% 80%, rgba(34, 197, 94, 0.05) 0%, transparent 45%);
  background-attachment: fixed;
}

.layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, #f3f4f6 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--color-text-muted);
  font-size: 1.1rem;
  margin: 0;
}

.tech-rule-badge {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid var(--color-accent-purple);
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-accent-purple);
  letter-spacing: 0.05em;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.15);
  animation: pulse-purple 3s infinite alternate;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.card-full {
  grid-column: span 2;
}

.card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: 0 12px 40px 0 rgba(147, 51, 234, 0.08);
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: #fff;
  border-left: 4px solid var(--color-accent-purple);
  padding-left: 0.75rem;
}

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

.area-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.area-card.has-items {
  border-color: rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.02);
}

.area-card.review-needed {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.02);
}

.area-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
  text-transform: capitalize;
}

.area-count {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-accent-purple);
  margin-bottom: 0.25rem;
}

.area-status {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.area-card.has-items .area-count {
  color: var(--color-accent-green);
}

.area-card.review-needed .area-count {
  color: #f59e0b;
}

.warnings-box, .audit-log, .backups-list {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 1rem;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.no-data, .loading {
  color: var(--color-text-muted);
  text-align: center;
  padding: 2rem 0;
  font-style: italic;
}

.conflict-item {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.05);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.conflict-item.warning {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.conflict-item.info {
  border-left-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.conflict-item-msg {
  color: #fff;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.conflict-item-details {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.btn {
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 0.75rem;
}

.btn-primary {
  background: var(--color-accent-purple);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(168, 85, 247, 0.4);
}

.btn-primary:hover {
  background: #b975f9;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: var(--color-accent-red);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.4);
}

.btn-danger:hover:not(:disabled) {
  background: #f87171;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.action-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  user-select: none;
  line-height: 1.3;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--color-accent-purple);
  border-color: var(--color-accent-purple);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.backup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0;
  font-size: 0.9rem;
}

.backup-item:last-child {
  border-bottom: 0;
}

.backup-time {
  font-weight: 600;
  color: #fff;
}

.backup-areas {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.audit-item {
  font-family: monospace;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.audit-item.dryRun {
  color: #a855f7;
}

.audit-item.apply {
  color: #22c55e;
}

.audit-item.error {
  color: #ef4444;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
}

.modal-content {
  background-color: #161124;
  border: 1px solid var(--color-border);
  margin: 15% auto;
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-content h3 {
  font-family: 'Outfit', sans-serif;
  margin-top: 0;
  font-size: 1.5rem;
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

@keyframes pulse-purple {
  0% {
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.1);
  }
  100% {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
  }
}
