/* S Tech Solutions — DNS service UI
   Light, flat, product-grade. Inter, single accent, hairline borders. */

:root {
  --bg:        #ffffff;
  --bg-soft:   #f8fafc;
  --bg-mute:   #f1f5f9;
  --border:    #e2e8f0;
  --border-2:  #cbd5e1;
  --text:      #0f172a;
  --text-2:    #334155;
  --muted:     #64748b;
  --accent:    #2563eb;
  --accent-dk: #1d4ed8;
  --ok:        #047857;
  --ok-bg:     #ecfdf5;
  --err:       #b91c1c;
  --err-bg:    #fef2f2;
  --warn:      #92400e;
  --warn-bg:   #fffbeb;
  --radius:    12px;
  --shadow:    0 1px 2px rgba(15, 23, 42, 0.06);
  --mono:      ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- header ---------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand-name { font-size: 15px; }
.brand-light { color: var(--muted); font-weight: 500; }

.site-nav { display: flex; gap: 22px; }
.site-nav a {
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(40px, 7vw, 72px) 0 28px;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.text-accent { color: var(--accent); word-break: break-word; }

.hero-sub {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------- form panel ---------- */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin: 28px 0 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 110px minmax(0, 1.6fr) auto;
  gap: 14px;
  align-items: end;
}

.field { min-width: 0; }
.field-action { display: flex; }

.label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-2);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input::placeholder { color: #94a3b8; }

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8.5 2 4.5h8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}

.input-group { display: flex; }
.input-group input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: 0;
  min-width: 0;
}
.input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border-2);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  white-space: nowrap;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: 0;
}

.turnstile-row {
  margin: 16px 0 6px;
  min-height: 65px;
}

.cf-turnstile { line-height: 0; }

.hint {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.hint-ok { color: var(--ok); }
.hint-error { color: var(--err); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dk); border-color: var(--accent-dk); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }

.btn-quiet {
  background: var(--bg);
  border-color: var(--border-2);
  color: var(--text-2);
}
.btn-quiet:hover { background: var(--bg-soft); }

.btn-danger {
  background: var(--bg);
  border-color: #fecaca;
  color: var(--err);
}
.btn-danger:hover { background: var(--err-bg); }

.btn-xs { height: 32px; padding: 0 12px; font-size: 13px; font-weight: 500; }
.btn-block { width: 100%; }

/* ---------- alerts ---------- */
.alert {
  border: 1px solid;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin: 20px 0;
}
.alert-success { background: var(--ok-bg);   border-color: #a7f3d0; color: var(--ok); }
.alert-error   { background: var(--err-bg);  border-color: #fecaca; color: var(--err); }
.alert-warning { background: var(--warn-bg); border-color: #fde68a; color: var(--warn); }

/* ---------- sections ---------- */
.section { padding: 40px 0 0; }

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-mute);
  border-radius: 999px;
}

/* ---------- tables ---------- */
.table-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th {
  text-align: left;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }

.mono { font-family: var(--mono); font-size: 13px; }
.muted { color: var(--muted); }

.tag {
  display: inline-block;
  padding: 1px 7px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg-mute);
  border-radius: 5px;
}

.cell-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.cell-actions form { margin: 0; }
.th-actions { width: 1%; }

.empty {
  border: 1px dashed var(--border-2);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--bg-soft);
}
.empty p { margin: 0; }

/* ---------- steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: #eff6ff;
  border-radius: 6px;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.step p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- auth ---------- */
.auth { padding: clamp(36px, 6vw, 64px) 0; }

.auth-card {
  max-width: 400px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.auth-sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--muted);
}

.auth-card .field { margin-bottom: 14px; }

.auth-foot {
  margin: 16px 0 0;
  font-size: 13px;
  text-align: center;
}

/* ---------- admin ---------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(32px, 5vw, 52px) 0 4px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0;
  font-size: clamp(22px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-head form { margin: 0; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 20px 0 0;
}

.stat {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  background: var(--bg);
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.field-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.status-ok  { color: var(--ok); font-size: 15px; }
.status-bad { color: var(--err); font-size: 15px; }

/* ---------- faq ---------- */
.faq {
  border-top: 1px solid var(--border);
}

.faq-item {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.faq-item p {
  margin: 0;
  max-width: 72ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}

/* ---------- footer ---------- */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 28px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

.footer-inner { display: block; }

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 18px;
  margin-top: 12px;
}
.footer-links a { color: var(--text-2); }

.footer-note {
  margin: 16px 0 0;
  max-width: 640px;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field-grow { grid-column: 1 / -1; }
  .field-action { grid-column: 1 / -1; }
  .field-action .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .site-nav { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 32px; }
  .panel { padding: 16px; }
  .table-card { overflow-x: auto; }
  th, td { padding: 11px 12px; white-space: nowrap; }
  .cell-actions { justify-content: flex-start; }
  .site-footer { margin-top: 44px; }
}
