@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --brand-primary: #005a6e;
  --brand-accent: #2b8dbe;
  --brand-highlight: #6fc2ce;
  --brand-warm: #f6c343;
  --brand-danger: #c85151;
  --text-color: #08292e;
  --muted-text: rgba(8, 41, 46, 0.72);
  --panel-bg: #ffffff;
  --panel-alt: rgba(255, 255, 255, 0.85);
  --border-color: rgba(0, 90, 110, 0.16);
  --shadow-color: rgba(0, 41, 54, 0.18);
  --pill-bg: rgba(43, 141, 190, 0.15);
  --input-bg: #ffffff;
  --input-border: rgba(0, 90, 110, 0.22);
  --input-focus-ring: rgba(43, 141, 190, 0.35);
  --success-bg: rgba(0, 149, 167, 0.12);
  --success-text: #005a6e;
  --warning-bg: rgba(246, 195, 67, 0.18);
  --warning-text: #7a4a00;
  --info-bg: rgba(43, 141, 190, 0.12);
  --info-text: #0b4c5b;
  --danger-bg: rgba(200, 81, 81, 0.16);
  --danger-text: #a73636;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at 15% 20%, rgba(43, 141, 190, 0.25), transparent 55%),
    radial-gradient(circle at 85% 10%, rgba(111, 194, 206, 0.35), transparent 45%),
    linear-gradient(140deg, #021d26, #024051 48%, #0c6a7f 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
}

.onboarding-container {
  max-width: 980px;
}

.language-switcher {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
  position: relative;
}

.language-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--panel-bg);
  color: var(--text-color);
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  cursor: pointer;
}

.language-trigger:hover {
  background: var(--panel-alt);
}

.language-active-label {
  font-size: 0.95rem;
}

.language-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  display: none;
  min-width: 190px;
  z-index: 5;
}

.language-switcher.open .language-menu {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.language-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--text-color);
  width: 100%;
  text-align: left;
  border-radius: 10px;
  cursor: pointer;
}

.language-option:hover,
.language-option:focus-visible {
  background: var(--pill-bg);
  outline: none;
}

.language-option[aria-selected="true"] {
  background: var(--success-bg);
  color: var(--text-color);
}

.flag-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  vertical-align: middle;
}


.login-card {
  background: var(--panel-bg);
  border-radius: 18px;
  padding: 2.5rem 2rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 28px 55px var(--shadow-color);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  backdrop-filter: blur(6px);
}

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

.brand-logo {
  width: 72px;
  height: auto;
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.85rem;
  color: var(--text-color);
}

.brand-copy .subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted-text);
  font-size: 0.95rem;
}

.brand-meta {
  display: flex;
  justify-content: center;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  background: var(--pill-bg);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-color);
}

.language-picker {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.language-picker label {
  font-size: 0.85rem;
  color: var(--muted-text);
}

.language-picker select {
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
  background: var(--input-bg);
}

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

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

.form-label {
  font-weight: 600;
  color: var(--text-color);
}

.field-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.form-input {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--input-bg);
  color: var(--text-color);
}

.form-input.multiline {
  min-height: 120px;
  resize: vertical;
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  font-weight: 600;
}

.btn.primary {
  background: var(--brand-primary);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(0, 90, 110, 0.25);
}

.btn.primary:hover {
  background: #007088;
}

.btn.secondary {
  background: var(--brand-highlight);
  color: var(--text-color);
  border: 1px solid rgba(0, 90, 110, 0.2);
}

.btn.secondary:hover {
  background: var(--brand-accent);
  color: #ffffff;
}

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  font-size: 0.95rem;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.flash-danger {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.flash-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.flash-info {
  background: var(--info-bg);
  color: var(--info-text);
}

.error {
  font-size: 0.85rem;
  color: var(--danger-text);
}

.divider {
  display: flex;
  align-items: center;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-text);
  gap: 0.75rem;
}

.divider:before,
.divider:after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.footer-note {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.auth-links {
  text-align: center;
}

.auth-links a {
  color: var(--brand-accent);
  text-decoration: none;
  font-weight: 600;
}

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

.verification-card {
  gap: 1.5rem;
}

.temporary-password-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(111, 194, 206, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.temporary-password-label {
  font-weight: 600;
  color: var(--text-color);
}

.temporary-password-value {
  font-family: 'Courier New', Courier, monospace;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem;
  background: var(--panel-bg);
  border-radius: 8px;
  border: 1px dashed rgba(43, 141, 190, 0.4);
  color: var(--text-color);
}

.verification-helper {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.verification-actions {
  display: flex;
  justify-content: center;
}

.onboarding-card {
  padding: 3rem 2.75rem;
}

.onboarding-meta {
  margin: 1rem 0;
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(111, 194, 206, 0.08);
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.onboarding-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.35rem 0;
}

.onboarding-meta dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-text);
}

.onboarding-meta dd {
  margin: 0;
  font-weight: 600;
  color: var(--text-color);
}

.logo-helper {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.onboarding-success {
  border: 1px solid rgba(111, 194, 206, 0.4);
  background: rgba(111, 194, 206, 0.18);
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  gap: 0.35rem;
  margin: 1rem 0;
}

.status-header {
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--muted-text);
}

.status-state {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.status-explainer {
  margin: 0;
  color: var(--muted-text);
}

.extra-action {
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted-text);
}

.extra-action a {
  color: var(--brand-accent);
  font-weight: 600;
  text-decoration: none;
}

.extra-action a:hover {
  text-decoration: underline;
}

.onboarding-wizard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.progress-step {
  position: relative;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.65);
  font-weight: 600;
  color: var(--muted-text);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.progress-step.is-active {
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(43, 141, 190, 0.18);
}

.progress-step.is-complete {
  background: rgba(111, 194, 206, 0.2);
  border-color: rgba(111, 194, 206, 0.45);
  color: var(--brand-primary);
}

.onboarding-steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.onboarding-step {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.onboarding-step.is-active {
  display: flex;
  box-shadow: 0 20px 45px var(--shadow-color);
}

.step-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.step-header .eyebrow {
  margin: 0;
  text-transform: uppercase;
  color: var(--muted-text);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.step-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.step-lede {
  margin: 0;
  color: var(--muted-text);
  max-width: 60ch;
}

.step-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1.5rem;
}

.onboarding-step[data-onboarding-step="2"] .step-columns {
  grid-template-columns: 1fr;
}

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

.step-callout {
  border: 1px dashed rgba(43, 141, 190, 0.35);
  border-radius: 12px;
  padding: 1rem;
  background: rgba(111, 194, 206, 0.15);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.step-callout h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-color);
}

.step-callout ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted-text);
  font-size: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.callout-link {
  color: var(--brand-accent);
  font-weight: 600;
  text-decoration: none;
}

.callout-link:hover {
  text-decoration: underline;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.palette-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem;
  background: var(--panel-bg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.palette-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

.palette-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.palette-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--swatch-color, #f5f5f5);
}

.palette-field span {
  font-size: 0.9rem;
  color: var(--text-color);
}

.color-input {
  width: 52px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--panel-bg);
  cursor: pointer;
}

.wizard-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.wizard-spacer {
  flex: 1;
}

.btn.is-hidden {
  display: none;
}

.is-hidden {
  display: none !important;
}

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

  .wizard-actions {
    flex-wrap: wrap;
  }

  .wizard-spacer {
    display: none;
  }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2rem 1.5rem;
  }

  .brand-header {
    flex-direction: column;
    text-align: center;
  }

  .brand-meta {
    justify-content: center;
  }
}
.dns-table-container {
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  width: 100%;
  box-sizing: border-box;
}

[data-dns-table-wrapper] {
  grid-column: 1 / -1;
}

.dns-records-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: white;
  table-layout: fixed;
}

.dns-records-table thead {
  background: rgba(43, 141, 190, 0.08);
  border-bottom: 2px solid var(--border-color);
}

.dns-records-table th {
  padding: 0.75rem;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
  white-space: nowrap;
}

.dns-records-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s ease;
}

.dns-records-table tbody tr:hover {
  background: rgba(43, 141, 190, 0.04);
}

.dns-records-table tbody tr.row-verified {
  background: rgba(0, 149, 167, 0.08);
}

.dns-records-table td {
  padding: 0.75rem;
  vertical-align: middle;
}

.dns-app {
  font-weight: 500;
  color: var(--text-color);
}

.dns-type {
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.cname {
  background: rgba(43, 141, 190, 0.2);
  color: #0b4c5b;
}

.badge.txt {
  background: rgba(246, 195, 67, 0.2);
  color: #7a4a00;
}

.dns-name,
.dns-value {
  max-width: 300px;
}

.dns-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  background: #f9fafb;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.4;
  word-break: break-all;
  box-sizing: border-box;
}

.dns-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(43, 141, 190, 0.1);
}

.field-with-copy {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.copy-btn.tiny {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  padding: 0;
}

.dns-copy-col {
  text-align: center;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.copy-btn:hover {
  background: rgba(43, 141, 190, 0.1);
  border-color: var(--brand-accent);
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.98);
}

.copy-btn.copy-success {
  background: rgba(0, 149, 167, 0.15);
  border-color: #005a6e;
}

.copy-icon {
  display: block;
}

.dns-status-col {
  text-align: center;
  font-size: 1.2rem;
}

.status-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  line-height: 28px;
  text-align: center;
  font-weight: 700;
  border-radius: 50%;
  transition: all 0.2s ease;
  cursor: help;
  position: relative;
}

.status-icon:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--text-color);
  color: white;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 200px;
  word-break: break-word;
  white-space: normal;
  text-align: center;
}

.status-icon:hover::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 0px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text-color);
  z-index: 1000;
}

.status-icon[data-status="pending"] {
  color: #9ca3af;
}

.status-icon.verified {
  color: #059669;
  background: rgba(5, 150, 105, 0.15);
}

.status-icon.failed {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.15);
}

.verification-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.verification-item {
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: rgba(43, 141, 190, 0.05);
}

.verification-item h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-color);
}

.verification-detail {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  color: var(--muted-text);
}

.verification-detail .status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.verification-detail .status.success {
  background: rgba(0, 149, 167, 0.2);
  color: #005a6e;
}

.verification-detail .status.error {
  background: rgba(200, 81, 81, 0.2);
  color: #a73636;
}

.verification-detail .error-msg {
  display: block;
  font-size: 0.85rem;
  color: var(--danger-text);
  margin-left: 2rem;
  font-style: italic;
}

[data-dns-verify-btn] {
  margin-top: 1rem;
}

[data-dns-verification-status] p {
  padding: 0.75rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

[data-dns-verification-status] p.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(0, 149, 167, 0.3);
}

[data-dns-verification-status] p.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(200, 81, 81, 0.3);
}

/* Domain Binding Styles */
[data-dns-binding-section] {
  margin-top: 1.5rem;
  padding: 1rem;
  background: rgba(43, 141, 190, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

[data-dns-binding-section] h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--text-color);
}

[data-dns-binding-section] p {
  margin: 0.25rem 0 1rem 0;
  font-size: 0.95rem;
  color: var(--muted-text);
}

[data-dns-bind-btn] {
  margin-top: 0.5rem;
}

[data-domain-binding-status] p {
  padding: 0.75rem;
  border-radius: 6px;
  margin: 0.5rem 0;
  font-size: 0.95rem;
}

[data-domain-binding-status] p.success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgba(0, 149, 167, 0.3);
}

[data-domain-binding-status] p.error {
  background: var(--danger-bg);
  color: var(--danger-text);
  border: 1px solid rgba(200, 81, 81, 0.3);
}

.binding-results {
  margin-top: 1rem;
  padding: 1rem;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.binding-results h4 {
  margin: 0 0 0.75rem 0;
  font-size: 1rem;
  color: var(--text-color);
}

.binding-results ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.binding-results li {
  padding: 0.5rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border-color);
  line-height: 1.5;
}

.binding-results li:last-child {
  border-bottom: none;
}

.binding-results li:before {
  content: attr(data-status) ' ';
  font-weight: 700;
  margin-right: 0.5rem;
}