/* BASE PAGE */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.cfg-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* HEADER */
.cfg-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 20px;
}

.cfg-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cfg-logo img {
  max-height: 60px;
  height: auto;
  width: auto;
}

.cfg-header-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
}

/* MAIN */
.cfg-main {
  flex: 1;
  padding: 30px 20px 40px;
}

.cfg-main-inner {
  max-width: 900px;
  margin: 0 auto;
}

.cfg-page-title {
  font-size: 1.9rem;
  margin-bottom: 8px;
  color: #0f172a;
}

.cfg-page-subtitle {
  font-size: 0.98rem;
  color: #6b7280;
  margin-bottom: 22px;
}

/* ALERTS */
.cfg-alert {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.cfg-alert-success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.cfg-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* STEPS INDICATOR */
.cfg-steps-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cfg-step-dot {
  flex: 1;
  text-align: center;
  position: relative;
}

.cfg-step-dot-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2px solid #d1d5db;
  background: #ffffff;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 600;
}

.cfg-step-dot-label {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.cfg-step-dot.is-active .cfg-step-dot-number {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.cfg-step-dot.is-active .cfg-step-dot-label {
  color: #111827;
}

/* PROGRESS BAR */
.cfg-progress-bar {
  position: relative;
  width: 100%;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 20px;
}

.cfg-progress-fill {
  height: 4px;
  background: #2563eb;
  width: 0%;
  transition: width 0.25s ease;
}

/* FORM WIZARD CARD */
.cfg-form {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px 20px 26px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
}

.cfg-step {
  display: none;
}

.cfg-step.is-active {
  display: block;
}

.cfg-step-title {
  font-size: 1.3rem;
  margin-bottom: 18px;
  color: #0f172a;
}

.cfg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.cfg-form-field-full {
  grid-column: 1 / -1;
}

/* FIELDS */
.cfg-form-field label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: #374151;
}

.cfg-form-field input,
.cfg-form-field select,
.cfg-form-field textarea {
  width: 97%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 9px 11px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  background: #f9fafb;
}

.cfg-form-field input:focus,
.cfg-form-field select:focus,
.cfg-form-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
  background: #ffffff;
}

.cfg-form-field textarea {
  resize: vertical;
  min-height: 100px;
}

/* CHECKBOX */
.cfg-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: #4b5563;
}

.cfg-checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.cfg-form-footer {
  margin-top: 14px;
}

/* BUTTONS */
.cfg-btn {
  display: inline-block;
  padding: 9px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.05s ease;
}

.cfg-btn-primary {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.cfg-btn-primary:hover {
  background: #1d4ed8;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
}

.cfg-btn-primary:active {
  transform: translateY(1px);
}

.cfg-btn-secondary {
  background: transparent;
  color: #374151;
  border-color: #d1d5db;
}

.cfg-btn-secondary:hover {
  background: #f3f4f6;
}

.cfg-step-footer {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ERRORS */
.cfg-error {
  display: block;
  font-size: 0.78rem;
  color: #b91c1c;
  margin-top: 3px;
  min-height: 14px;
}

/* FOOTER */
.cfg-footer {
  background: #111827;
  color: #e5e7eb;
  padding: 30px 20px 20px;
}

.cfg-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.cfg-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.cfg-footer-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cfg-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.85rem;
}

.cfg-footer-list li {
  margin-bottom: 4px;
}

.cfg-footer-list a {
  color: #e5e7eb;
}

.cfg-footer-list a:hover {
  text-decoration: underline;
}

.cfg-footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 10px;
  font-size: 0.8rem;
  color: #9ca3af;
  text-align: center;
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .cfg-form-grid {
    grid-template-columns: 1fr;
  }
  .cfg-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .cfg-header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .cfg-main {
    padding: 20px 12px 30px;
  }
  .cfg-form {
    padding: 20px 16px;
  }
  .cfg-footer-grid {
    grid-template-columns: 1fr;
  }
}
