/* ===== DomainVault Main Styles ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; background: #f7f6f3; color: #1a1a1a; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* Nav */
.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px; background: #fff;
  border-bottom: 1px solid #e8e6e0;
  position: sticky; top: 0; z-index: 100;
}
.logo { font-size: 18px; font-weight: 600; letter-spacing: -.5px; color: #1a1a1a; }
.logo em { color: #0d7a5f; font-style: normal; }
.nav-links { display: flex; gap: 24px; font-size: 14px; color: #666; }
.nav-links a:hover { color: #0d7a5f; }

/* Hero */
.hero { background: #fff; border-bottom: 1px solid #e8e6e0; padding: 44px 32px 30px; }
.hero h1 { font-size: 30px; font-weight: 600; letter-spacing: -1px; margin-bottom: 6px; }
.hero p  { color: #666; font-size: 15px; margin-bottom: 22px; }
.search-row { display: flex; gap: 10px; max-width: 580px; }
.search-box {
  flex: 1; display: flex; align-items: center; gap: 10px;
  background: #f7f6f3; border: 1.5px solid #e8e6e0;
  border-radius: 10px; padding: 0 14px; transition: border-color .15s;
}
.search-box:focus-within { border-color: #0d7a5f; background: #fff; }
.search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; font-family: 'DM Sans', sans-serif;
  padding: 12px 0; color: #1a1a1a;
}
.search-box input::placeholder { color: #aaa; }
.search-icon { color: #aaa; flex-shrink: 0; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; border-radius: 8px; padding: 10px 20px; font-size: 14px; font-weight: 500; cursor: pointer; font-family: 'DM Sans', sans-serif; transition: background .15s, color .15s; }
.btn-primary   { background: #0d7a5f; color: #fff; }
.btn-primary:hover { background: #0a6350; }
.btn-outline   { background: #fff; color: #0d7a5f; border: 1.5px solid #0d7a5f; }
.btn-outline:hover { background: #f0faf6; }
.btn-sm        { padding: 7px 14px; font-size: 13px; }
.btn-danger    { background: #e53e3e; color: #fff; }
.btn-danger:hover { background: #c53030; }
.btn-full      { width: 100%; }
.btn-search    { height: 46px; padding: 0 22px; white-space: nowrap; }

/* Filter bar */
.filter-bar {
  padding: 14px 32px; background: #fff;
  border-bottom: 1px solid #e8e6e0;
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-label { font-size: 12px; color: #999; margin-right: 4px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.chip {
  font-size: 12px; padding: 5px 13px; border-radius: 20px;
  border: 1px solid #e8e6e0; cursor: pointer;
  background: #fff; color: #555; transition: all .15s; white-space: nowrap;
}
.chip:hover  { border-color: #0d7a5f; color: #0d7a5f; }
.chip.active { background: #0d7a5f; color: #fff; border-color: #0d7a5f; }

/* Sort / results bar */
.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px; font-size: 13px; color: #888;
}
.results-bar strong { color: #1a1a1a; }
.sort-select {
  border: 1px solid #e8e6e0; border-radius: 6px;
  padding: 5px 10px; font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  background: #fff; color: #444; cursor: pointer; outline: none;
}
.sort-select:focus { border-color: #0d7a5f; }

/* Domain grid */
.grid-wrap { padding: 0 32px 40px; }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px,1fr)); gap: 14px; margin-bottom: 28px; }
.domain-card {
  background: #fff; border: 1px solid #e8e6e0;
  border-radius: 12px; padding: 18px; cursor: pointer;
  transition: all .15s; display: block;
}
.domain-card:hover { border-color: #0d7a5f; box-shadow: 0 4px 16px rgba(13,122,95,.1); transform: translateY(-1px); }
.card-name { font-family: 'DM Mono', monospace; font-size: 13px; font-weight: 500; color: #1a1a1a; margin-bottom: 10px; word-break: break-all; line-height: 1.4; }
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag      { font-size: 11px; padding: 2px 8px; border-radius: 12px; background: #f0faf6; color: #0a6350; font-weight: 500; }
.tag.tld  { background: #f0f0f0; color: #555; }
.tag.sold { background: #fee2e2; color: #b91c1c; }
.card-price { font-size: 17px; font-weight: 600; color: #0d7a5f; letter-spacing: -.5px; }
.card-offer { font-size: 11px; color: #aaa; margin-top: 2px; }

/* Pagination */
.pagination { display: flex; gap: 6px; justify-content: center; padding: 8px 0 24px; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid #e8e6e0; background: #fff;
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #555; transition: all .12s; font-family: 'DM Sans', sans-serif;
}
.page-btn:hover   { border-color: #0d7a5f; color: #0d7a5f; }
.page-btn.active  { background: #0d7a5f; color: #fff; border-color: #0d7a5f; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

/* Domain detail page */
.detail-page { max-width: 720px; margin: 0 auto; padding: 32px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #666; margin-bottom: 24px; }
.back-link:hover { color: #0d7a5f; }
.detail-name { font-family: 'DM Mono', monospace; font-size: 34px; font-weight: 500; color: #1a1a1a; letter-spacing: -1px; margin-bottom: 12px; word-break: break-all; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-tag { font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.detail-tag.cat { background: #e8f7f2; color: #0a6350; border: 1px solid #b5e4d5; }
.detail-tag.tld { background: #f0f0f0; color: #555; border: 1px solid #ddd; }

/* Price block */
.price-block {
  background: #f7f6f3; border: 1px solid #e8e6e0; border-radius: 14px;
  padding: 20px 24px; margin-bottom: 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.price-num { font-size: 34px; font-weight: 600; color: #0d7a5f; letter-spacing: -1px; }
.price-sub { font-size: 13px; color: #888; margin-top: 2px; }
.price-ctas { display: flex; gap: 10px; }

/* Detail sections */
.detail-section { margin-bottom: 24px; }
.detail-section h3 { font-size: 11px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.detail-section p  { font-size: 15px; color: #444; line-height: 1.75; }

.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.stat-box   { background: #f7f6f3; border-radius: 10px; padding: 14px; text-align: center; }
.stat-val   { font-size: 20px; font-weight: 600; color: #1a1a1a; font-family: 'DM Mono', monospace; }
.stat-lbl   { font-size: 11px; color: #aaa; margin-top: 3px; }

/* Offer form */
.offer-form { background: #fff; border: 1px solid #e8e6e0; border-radius: 14px; padding: 24px; margin-top: 28px; }
.offer-form h3 { font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; color: #888; margin-bottom: 5px; font-weight: 500; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; border: 1px solid #e8e6e0; border-radius: 8px;
  padding: 10px 13px; font-size: 14px;
  font-family: 'DM Sans', sans-serif; color: #1a1a1a;
  background: #fff; transition: border-color .15s; outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: #0d7a5f; }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.escrow-note { font-size: 12px; color: #aaa; margin-top: 12px; display: flex; align-items: center; gap: 5px; }
.alert { padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: #e8f7f2; color: #0a6350; border: 1px solid #b5e4d5; }
.alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* How it works */
.how-section { padding: 48px 32px; max-width: 900px; margin: 0 auto; }
.how-section h2 { font-size: 22px; font-weight: 600; margin-bottom: 28px; letter-spacing: -.5px; }
.steps { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr)); gap: 20px; }
.step { background: #fff; border: 1px solid #e8e6e0; border-radius: 12px; padding: 20px; }
.step-num { font-size: 24px; font-weight: 700; color: #0d7a5f; margin-bottom: 10px; }
.step h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.step p  { font-size: 13px; color: #666; line-height: 1.6; }

/* Footer */
.sitefooter { border-top: 1px solid #e8e6e0; background: #fff; padding: 20px 32px; margin-top: 20px; }
.footer-inner { display: flex; gap: 24px; justify-content: center; font-size: 13px; color: #888; flex-wrap: wrap; }
.footer-inner a:hover { color: #0d7a5f; }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #aaa; }
.empty-state h3 { font-size: 18px; font-weight: 500; color: #555; margin-bottom: 8px; }

/* ===== Admin ===== */
.admin-body { background: #f0f0ee; }
.admin-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: #1a1a1a; color: #fff;
}
.admin-logo { font-size: 16px; font-weight: 600; }
.admin-logo span { color: #4ade80; }
.admin-nav-links { display: flex; gap: 20px; font-size: 13px; }
.admin-nav-links a { color: #aaa; }
.admin-nav-links a:hover { color: #fff; }
.admin-nav-links a.active { color: #4ade80; }

.admin-wrap { max-width: 1200px; margin: 0 auto; padding: 28px; }
.admin-page-title { font-size: 22px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.5px; }
.admin-page-sub { font-size: 14px; color: #666; margin-bottom: 24px; }

.admin-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 14px; margin-bottom: 28px; }
.admin-stat { background: #fff; border: 1px solid #e8e6e0; border-radius: 10px; padding: 16px 18px; }
.admin-stat-val { font-size: 26px; font-weight: 600; color: #1a1a1a; }
.admin-stat-lbl { font-size: 12px; color: #888; margin-top: 4px; }

.admin-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.admin-toolbar input, .admin-toolbar select {
  border: 1px solid #e8e6e0; border-radius: 8px; padding: 8px 12px;
  font-size: 13px; font-family: 'DM Sans', sans-serif;
  background: #fff; color: #1a1a1a; outline: none;
}
.admin-toolbar input:focus, .admin-toolbar select:focus { border-color: #0d7a5f; }
.admin-toolbar input { flex: 1; min-width: 200px; }

/* Table */
.admin-table-wrap { background: #fff; border: 1px solid #e8e6e0; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { background: #f7f6f3; padding: 10px 14px; text-align: left; font-weight: 600; color: #555; border-bottom: 1px solid #e8e6e0; white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #fafaf9; }
.admin-table .mono { font-family: 'DM Mono', monospace; font-size: 12px; }

.status-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 500; }
.status-active  { background: #e8f7f2; color: #0a6350; }
.status-sold    { background: #fee2e2; color: #b91c1c; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-review  { background: #f0f0f0; color: #555; }

/* Admin form page */
.admin-form-card { background: #fff; border: 1px solid #e8e6e0; border-radius: 12px; padding: 28px; max-width: 720px; }
.admin-form-card h2 { font-size: 18px; font-weight: 600; margin-bottom: 22px; }
.admin-form-card .form-group { margin-bottom: 18px; }
.admin-form-card label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 5px; }
.admin-form-card input,
.admin-form-card textarea,
.admin-form-card select {
  width: 100%; border: 1px solid #e8e6e0; border-radius: 8px;
  padding: 10px 13px; font-size: 14px;
  font-family: 'DM Sans', sans-serif; color: #1a1a1a;
  background: #fff; outline: none; transition: border-color .15s;
}
.admin-form-card input:focus,
.admin-form-card textarea:focus,
.admin-form-card select:focus { border-color: #0d7a5f; }
.admin-form-card textarea { resize: vertical; min-height: 120px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }

/* Login page */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #1a1a1a; }
.login-card { background: #fff; border-radius: 16px; padding: 36px; width: 100%; max-width: 380px; }
.login-logo { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.login-logo em { color: #0d7a5f; font-style: normal; }
.login-sub { font-size: 13px; color: #888; margin-bottom: 28px; }

/* Offers table */
.offer-amount { font-weight: 600; color: #0d7a5f; }
.offer-new td { background: #f0faf6; }

/* Responsive */
@media (max-width: 640px) {
  .topnav, .hero, .filter-bar, .results-bar, .grid-wrap { padding-left: 16px; padding-right: 16px; }
  .hero h1 { font-size: 22px; }
  .domain-grid { grid-template-columns: 1fr 1fr; }
  .detail-page { padding: 20px 16px; }
  .detail-name { font-size: 22px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .price-block { flex-direction: column; align-items: flex-start; }
  .admin-wrap { padding: 16px; }
}
