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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #e8e8e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* -------------------------
   Navbar
------------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 2rem;
  background: #111;
  border-bottom: 1px solid #1e1e1e;
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  color: #f5f5f5;
  font-weight: 600;
  font-size: 1rem;
}
.nav-logo { height: 90px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-link {
  color: #777;
  text-decoration: none;
  font-size: .88rem;
  font-weight: 500;
  transition: color .15s;
}
.nav-link:hover, .nav-link.active { color: #F08E3F; }
.nav-user {
  font-size: .84rem;
  color: #555;
  border-left: 1px solid #2a2a2a;
  padding-left: 1.25rem;
}

/* -------------------------
   Main layout
------------------------- */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #f5f5f5;
}
.page-sub {
  font-size: .86rem;
  color: #555;
  margin-top: .2rem;
}
.page-header-actions { display: flex; gap: .75rem; }

/* -------------------------
   Auth / card layout
------------------------- */
.auth-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 2rem 1rem;
}
.card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.6);
  width: 100%;
  padding: 2.5rem;
}

/* Narrow card — auth forms, small dialogs */
.card-narrow {
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 120px;
  width: auto;
}
.divider { border: none; border-top: 1px solid #2a2a2a; margin-bottom: 1.5rem; }

h1 { font-size: 1.2rem; font-weight: 600; margin-bottom: .4rem; color: #f5f5f5; }
h3 { font-size: 1rem; font-weight: 600; color: #e0e0e0; margin-bottom: .75rem; }

p.sub { color: #777; font-size: .88rem; margin-bottom: 1.5rem; line-height: 1.55; }
label { display: block; font-size: .82rem; font-weight: 500; color: #aaa; margin-bottom: .3rem; }

input[type=text],
input[type=url],
input[type=password],
input[type=email],
input[type=number],
input[type=date] {
  width: 100%;
  padding: .65rem .9rem;
  background: #1e1e1e;
  border: 1px solid #2e2e2e;
  border-radius: 8px;
  font-size: .92rem;
  color: #f0f0f0;
  outline: none;
  transition: border .15s, box-shadow .15s;
  margin-bottom: 1rem;
}
input::placeholder { color: #444; }
input:focus { border-color: #F08E3F; box-shadow: 0 0 0 3px rgba(240,142,63,.15); }

.hint { font-size: .76rem; color: #555; margin-top: -.75rem; margin-bottom: 1rem; }

/* -------------------------
   Buttons
------------------------- */
.btn {
  display: inline-block;
  width: 100%;
  padding: .75rem !important;
  background: #F08E3F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s, opacity .15s;
  letter-spacing: .01em;
}
.btn:hover { background: #d97a2e; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn.secondary,
.btn-ghost {
  background: transparent;
  color: #F08E3F;
  border: 1.5px solid #F08E3F;
  width: auto;
  padding: .5rem 1rem;
  font-size: .88rem;
}
.btn-ghost:hover,
.btn.secondary:hover { background: rgba(240,142,63,.08); }

.btn-sm {
  width: auto;
  padding: .45rem .9rem;
  font-size: .84rem;
  border-radius: 6px;
}

.btn-danger {
  background: transparent;
  color: #f87171;
  border: 1.5px solid #f87171;
}
.btn-danger:hover { background: rgba(248,113,113,.1); }

/* -------------------------
   Status / alerts
------------------------- */
.status {
  padding: .65rem .9rem;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 1rem;
}
.status.ok  { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(52,211,153,.2); }
.status.err { background: rgba(239,68,68,.1);  color: #f87171; border: 1px solid rgba(248,113,113,.2); }

/* -------------------------
   Badges
------------------------- */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-active   { background: rgba(16,185,129,.15); color: #34d399; }
.badge-available { background: rgba(240,142,63,.15); color: #F08E3F; }
.badge-soon     { background: rgba(99,102,241,.15);  color: #a5b4fc; }
.badge-inactive { background: rgba(107,114,128,.15); color: #9ca3af; }

/* -------------------------
   Tools grid
------------------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.tool-card {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: border-color .15s;
}
.tool-card:hover { border-color: #3a3a3a; }
.tool-card.subscribed { border-color: rgba(240,142,63,.4); }

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tool-icon { font-size: 1.75rem; }
.tool-name { font-size: 1rem; font-weight: 600; color: #f0f0f0; }
.tool-desc { font-size: .84rem; color: #666; line-height: 1.5; flex: 1; }
.tool-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: auto; }

/* -------------------------
   Admin tables
------------------------- */
.admin-table-wrap {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table thead th {
  padding: .75rem 1rem;
  font-size: .78rem;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 1px solid #1e1e1e;
  text-align: left;
}
.admin-table tbody td {
  padding: .75rem 1rem;
  font-size: .88rem;
  border-bottom: 1px solid #1a1a1a;
  color: #ccc;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover td { background: #181818; }
.table-link { color: #F08E3F; text-decoration: none; }
.table-link:hover { text-decoration: underline; }

/* Admin detail */
.detail-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.detail-section {
  background: #141414;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.5rem;
}
.info-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.info-table th {
  padding: .4rem .6rem;
  color: #555;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  border-bottom: 1px solid #1e1e1e;
}
.info-table td {
  padding: .45rem .6rem;
  border-bottom: 1px solid #1a1a1a;
  color: #ccc;
}
.info-table td:first-child { color: #555; width: 35%; }

code {
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  padding: .2rem .45rem;
  border-radius: 4px;
  font-size: .82rem;
  color: #F08E3F;
}

.back-link {
  color: #555;
  text-decoration: none;
  font-size: .84rem;
  display: block;
  margin-bottom: .35rem;
}
.back-link:hover { color: #F08E3F; }

.check { font-size: 2.5rem; text-align: center; margin-bottom: 1rem; }

/* -------------------------
   Footer
------------------------- */
.footer {
  text-align: center;
  font-size: .75rem;
  color: #2a2a2a;
  padding: 1.5rem;
}


/* ============================================================
   ONBOARDING — Progress stepper, form, signature, DNS results
   ============================================================ */

.onboarding-card { margin-bottom: 1.25rem; }

/* Empty state */
.ob-empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
}
.ob-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.ob-empty-state h3 { font-size: 1.15rem; margin-bottom: 0.75rem; }
.ob-empty-state p { color: var(--color-muted, #777); max-width: 480px; margin: 0 auto 1.5rem; }

/* Progress stepper */
.ob-stepper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.ob-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  max-width: 110px;
}
.ob-stage-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid #333;
  background: #1e1e1e;
  color: #555;
  flex-shrink: 0;
}
.ob-stage-label {
  font-size: 0.72rem;
  color: #555;
  text-align: center;
  margin-top: 0.4rem;
  line-height: 1.3;
}
.ob-stage-complete .ob-stage-dot {
  background: #34d399;
  border-color: #34d399;
  color: #000;
}
.ob-stage-complete .ob-stage-label { color: #34d399; }
.ob-stage-active .ob-stage-dot {
  background: #F08E3F;
  border-color: #F08E3F;
  color: #000;
}
.ob-stage-active .ob-stage-label { color: #F08E3F; font-weight: 600; }
.ob-stage-rejected .ob-stage-dot {
  background: #f87171;
  border-color: #f87171;
  color: #000;
}
.ob-stage-rejected .ob-stage-label { color: #f87171; }

.ob-connector {
  height: 2px;
  flex: 1;
  min-width: 24px;
  background: #2a2a2a;
  margin-top: 17px;
  flex-shrink: 0;
}
.ob-connector-done { background: #34d399; }

.ob-status-msg {
  text-align: center;
  color: var(--color-muted, #777);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Summary grid */
.ob-summary-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.ob-summary-row {
  display: flex;
  gap: 1rem;
  font-size: 0.88rem;
  border-bottom: 1px solid #1e1e1e;
  padding-bottom: 0.5rem;
}
.ob-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.ob-summary-label { color: #777; min-width: 160px; flex-shrink: 0; }

/* Section titles in form */
.ob-section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: #e8e8e8;
  border-bottom: 1px solid #1e1e1e;
  padding-bottom: 0.6rem;
}

/* 2-column form grid */
.ob-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.25rem;
}
@media (max-width: 640px) {
  .ob-form-grid { grid-template-columns: 1fr; }
}
.ob-form-grid-2 { grid-template-columns: 1fr 1fr; }

/* Signature pad */
.ob-sig-container {
  border: 2px dashed #333;
  border-radius: 6px;
  background: #1a1a1a;
  overflow: hidden;
  cursor: crosshair;
}
.ob-sig-canvas {
  display: block;
  width: 100%;
  height: 180px;
  touch-action: none;
}
.ob-sig-actions { margin-top: 0.6rem; display: flex; gap: 0.5rem; }
.ob-sig-display { margin-top: 0.5rem; }
.field-error {
  color: #f87171;
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

/* Required asterisk */
.required { color: #f87171; margin-left: 2px; }

/* Alerts */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert strong { display: block; margin-bottom: 0.3rem; }
.alert-danger  { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: #f87171; }
.alert-success { background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.3);  color: #34d399; }
.alert-info    { background: rgba(96,165,250,0.1);  border: 1px solid rgba(96,165,250,0.3);  color: #60a5fa; }

/* DNS results table */
.ob-dns-table { margin-top: 0; }
.dns-ok { color: #34d399; }
.dns-fail { color: #f87171; }

/* Badge variants */
.badge-warning {
  background: rgba(251,191,36,0.15);
  color: #fbbf24;
  border: 1px solid rgba(251,191,36,0.3);
}
.badge-danger {
  background: rgba(248,113,113,0.15);
  color: #f87171;
  border: 1px solid rgba(248,113,113,0.3);
  font-size: 0.78rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* Modal overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-box {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 2rem;
  max-width: 520px;
  width: 100%;
}

/* Btn danger */
.btn-danger {
  background: #f87171 !important;
  color: #000 !important;
}
.btn-danger:hover { background: #ef4444 !important; }

/* ============================================================
   FORM UTILITY CLASSES (used by onboarding & admin templates)
   ============================================================ */

.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: .82rem; font-weight: 500; color: #aaa; margin-bottom: .3rem; }
.form-help   { font-size: .8rem; color: #666; margin-bottom: .5rem; line-height: 1.5; }
.form-input  {
  width: 100%;
  background: #1e1e1e;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #f5f5f5;
  padding: .55rem .75rem;
  font-size: .88rem;
  font-family: inherit;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: #F08E3F;
  outline: none;
  box-shadow: 0 0 0 3px rgba(240,142,63,.15);
}
.form-input option { background: #1e1e1e; }
.page-subtitle { font-size: .88rem; color: #666; margin-top: .25rem; }

/* Custom file input */
.file-input-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .4rem;
  cursor: pointer;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.file-input-name {
  font-size: .8rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}
