/* assets/css/main.css */

:root {
  --bg:        #0a0a0f;
  --bg-card:   #13131a;
  --bg-input:  #1c1c26;
  --border:    #2a2a3a;
  --accent:    #6c63ff;
  --accent2:   #00d4aa;
  --danger:    #ff4757;
  --warn:      #ffa502;
  --success:   #2ed573;
  --text:      #e8e8f0;
  --text-muted:#8888a8;
  --radius:    10px;
  --font:      'Space Grotesk', sans-serif;
  --mono:      'DM Mono', monospace;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ──────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -.02em;
}
.nav-links { display: flex; align-items: center; gap: 1.4rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: .9rem; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .18s;
  text-decoration: none;
}
.btn-primary  { background: var(--accent);  color: #fff; }
.btn-primary:hover  { background: #7d75ff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(108,99,255,.4); }
.btn-success  { background: var(--success); color: #000; }
.btn-success:hover  { background: #48ff8a; }
.btn-danger   { background: var(--danger);  color: #fff; }
.btn-danger:hover   { background: #ff6070; }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover    { background: var(--bg-input); color: var(--text); }
.btn-sm { padding: .35rem .8rem; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Flash ────────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 2rem;
  font-size: .9rem;
  font-weight: 500;
}
.flash-info    { background: rgba(108,99,255,.15); border-bottom: 1px solid var(--accent); }
.flash-success { background: rgba(46,213,115,.12); border-bottom: 1px solid var(--success); }
.flash-error   { background: rgba(255,71,87,.12);  border-bottom: 1px solid var(--danger); }
.flash-close   { background: none; border: none; color: inherit; cursor: pointer; font-size: 1rem; opacity: .6; }

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

/* ── Cards ────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

/* ── Forms ────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
label { font-size: .85rem; color: var(--text-muted); font-weight: 500; }
input, select, textarea {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: .95rem;
  padding: .6rem .9rem;
  width: 100%;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
input::placeholder { color: var(--text-muted); }

/* ── Tables ───────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; padding: .7rem 1rem; color: var(--text-muted); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: .75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }

/* ── Badges ───────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 4px;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-green  { background: rgba(46,213,115,.15); color: var(--success); }
.badge-red    { background: rgba(255,71,87,.15);  color: var(--danger); }
.badge-yellow { background: rgba(255,165,2,.15);  color: var(--warn); }
.badge-purple { background: rgba(108,99,255,.15); color: var(--accent); }
.badge-grey   { background: rgba(136,136,168,.1); color: var(--text-muted); }

/* ── Hero search (index.html) ─────────────────────── */
.hero {
  text-align: center;
  padding: 5rem 1rem 3rem;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }
.hero p { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 2.5rem; }

.search-bar {
  display: flex;
  max-width: 680px;
  margin: 0 auto 1rem;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  transition: border-color .2s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar input {
  flex: 1;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 1.05rem;
  padding: .85rem 1.2rem;
}
.search-bar button {
  border-radius: 0;
  padding: .85rem 1.8rem;
  font-size: 1rem;
}

.tld-pills { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.tld-pill {
  padding: .3rem .75rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: .8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  user-select: none;
}
.tld-pill.active { border-color: var(--accent); color: var(--accent); background: rgba(108,99,255,.1); }

/* ── Search results ───────────────────────────────── */
#results { margin-top: 2rem; }
.result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: .6rem;
  gap: 1rem;
  animation: fadeUp .3s ease both;
}
@keyframes fadeUp { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.result-domain { font-family: var(--mono); font-size: 1rem; font-weight: 500; }
.result-meta   { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.result-price  { font-weight: 600; color: var(--accent2); }
.result-unavail { color: var(--text-muted); font-size: .85rem; }

/* ── Checkout ─────────────────────────────────────── */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
@media (max-width: 760px) { .checkout-grid { grid-template-columns: 1fr; } }
.order-summary { position: sticky; top: 90px; }
.summary-line  { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.summary-total { font-weight: 700; font-size: 1.1rem; color: var(--accent2); }
#sq-card-container { min-height: 90px; margin: .5rem 0 1rem; }

/* ── Dashboard ────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card  { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 1.5rem; }
.stat-num   { font-size: 2rem; font-weight: 700; color: var(--accent); font-family: var(--mono); }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-header h2 { font-size: 1.1rem; font-weight: 600; }

/* ── DNS editor ───────────────────────────────────── */
.dns-row { display: grid; grid-template-columns: 80px 1fr 1fr 60px 40px; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.dns-row input, .dns-row select { font-size: .8rem; padding: .4rem .6rem; }

/* ── Auth pages ───────────────────────────────────── */
.auth-wrap { max-width: 440px; margin: 4rem auto; }
.auth-wrap h1 { font-size: 1.7rem; font-weight: 700; margin-bottom: .4rem; }
.auth-wrap p  { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ── Footer ───────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 2rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; max-width: 1100px; margin: 0 auto; }
.footer-links { display: flex; gap: 1.2rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ── Utilities ────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.mono          { font-family: var(--mono); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
