/* ========================================
   Regivo — Professional Design System
   ======================================== */

/* --- Variables --- */
:root {
  --primary: #5c6ac4;
  --primary-dark: #4959b8;
  --primary-light: #e8eaff;
  --primary-gradient: linear-gradient(135deg, #5c6ac4, #7c6ac4);
  --accent: #f49342;
  --success: #50b83c;
  --success-bg: #f0fdf4;
  --warning: #eeb22a;
  --warning-bg: #fffbeb;
  --danger: #d82c0d;
  --danger-bg: #fef2f2;
  --text: #212b35;
  --text-secondary: #637381;
  --text-muted: #96a7b6;
  --bg-light: #f6f9fc;
  --bg-white: #ffffff;
  --border: #dfe4e8;
  --border-light: #edf0f2;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.1);
  --max-width: 1200px;
  --transition: all .2s ease;
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--text);
  background: var(--bg-white); -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Top Bar --- */
.topbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 1000;
}
.topbar-logo {
  font-size: 22px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px; letter-spacing: -.5px;
}
.topbar-logo svg { width: 32px; height: 32px; flex-shrink: 0; }
.topbar-nav { display: flex; align-items: center; gap: 28px; }
.topbar-nav a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 4px 0;
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.topbar-nav a:hover, .topbar-nav a.active {
  color: var(--text); border-bottom-color: var(--primary);
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap; font-family: inherit; line-height: 1.5;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--primary-gradient); color: #fff; box-shadow: 0 2px 8px rgba(92,106,196,.3); }
.btn-primary:hover { box-shadow: 0 4px 16px rgba(92,106,196,.4); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-light); color: var(--text); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #3da42c; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c0240a; color: #fff; }
.btn-white { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.btn-white:hover { box-shadow: var(--shadow-md); }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 10px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; transform: none !important; }

/* --- Sections --- */
.section { padding: 80px 0; }
.section-gray { background: var(--bg-light); };
.section > .container { max-width: var(--max-width); }
.section-label {
  display: inline-block; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin-bottom: 12px;
}
.section-title {
  font-size: 32px; font-weight: 800; text-align: center; margin-bottom: 12px;
  letter-spacing: -.5px; color: var(--text);
}
.section-sub {
  text-align: center; color: var(--text-secondary); font-size: 17px;
  margin-bottom: 48px; line-height: 1.6; max-width: 560px;
  margin-left: auto; margin-right: auto;
}

/* --- Hero --- */
.hero {
  padding: 100px 0 80px; text-align: center;
  background: linear-gradient(180deg, #f0eeff 0%, #f6f9fc 40%, #fff 100%);
}
.hero > .container { max-width: 780px; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--primary); font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 100px; margin-bottom: 24px;
  border: 1px solid rgba(92,106,196,.15);
  box-shadow: 0 1px 4px rgba(92,106,196,.08);
}
.hero-badge::before { content: '✦'; font-size: 14px; color: var(--accent); }
.hero h1 {
  font-size: 48px; font-weight: 800; line-height: 1.1;
  color: var(--text); margin: 0 auto 16px; letter-spacing: -1px; max-width: 700px;
}
.hero h1 .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p {
  font-size: 18px; color: var(--text-secondary); max-width: 500px;
  margin: 0 auto 36px; line-height: 1.6;
}

/* --- Domain Search --- */
.domain-search { max-width: 600px; margin: 0 auto; }
.domain-search-box {
  display: flex; background: #fff; border: 2px solid var(--border);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-md);
  transition: all .3s ease;
}
.domain-search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(92,106,196,.08), var(--shadow-md);
}
.domain-search-box input {
  flex: 1; border: none; padding: 18px 24px; font-size: 16px;
  outline: none; color: var(--text); background: transparent; font-family: inherit;
}
.domain-search-box input::placeholder { color: var(--text-muted); }
.domain-search-box .btn { border-radius: 8px; margin: 6px; padding: 14px 28px; font-size: 16px; }

/* --- Marquee --- */
.marquee-wrap {
  overflow: hidden; background: var(--text); position: relative; padding: 0;
}
.marquee-wrap::before, .marquee-wrap::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 40px; z-index: 2; pointer-events: none;
}
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--text), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(270deg, var(--text), transparent); }
.marquee-track {
  display: flex; animation: marquee-scroll 30s linear infinite; padding: 10px 0;
}
.marquee-track span {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 18px; font-size: 13px; font-weight: 500; flex-shrink: 0;
}
.marquee-track .tld-name { color: #fff; font-weight: 700; }
.marquee-track .tld-price { color: var(--success); font-weight: 600; }
@keyframes marquee-scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* --- Stats Row --- */
.stats-row {
  display: flex; justify-content: center; gap: 64px; padding: 48px 0; flex-wrap: wrap;
}
.stat-block { text-align: center; }
.stat-value {
  font-size: 42px; font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.1;
}
.stat-label { font-size: 14px; color: var(--text-muted); font-weight: 500; margin-top: 6px; }

/* --- Features Grid --- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.feature-card {
  background: #fff; border-radius: 12px; padding: 32px 28px;
  border: 1px solid var(--border-light); transition: var(--transition);
}
.feature-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border);
}
.feature-icon {
  width: 48px; height: 48px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px;
}
.feature-icon.blue { background: #eef0ff; } .feature-icon.green { background: #edfdf3; }
.feature-icon.orange { background: #fff8f0; } .feature-icon.purple { background: #f4f0ff; }
.feature-icon.pink { background: #fdf0f6; }
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.feature-card p { color: var(--text-secondary); font-size: 14px; line-height: 1.65; }

/* --- TLD Grid --- */
.tld-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
}
.tld-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 10px;
  padding: 16px; text-align: center; transition: var(--transition); cursor: pointer;
}
.tld-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.tld-card .tld { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.tld-card .price { font-size: 12px; color: var(--success); font-weight: 700; }

/* --- Trusted Banner --- */
.trusted-banner {
  text-align: center; padding: 28px 0;
  border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
}
.trusted-banner p {
  font-size: 13px; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
}

/* --- Testimonials --- */
.testimonial-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.testimonial-card {
  background: #fff; border-radius: 12px; padding: 28px;
  border: 1px solid var(--border-light); transition: var(--transition);
}
.testimonial-card:hover { box-shadow: var(--shadow-md); }
.testimonial-card .t-quote { font-size: 15px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 14px; }
.testimonial-card .t-author { font-weight: 700; font-size: 15px; color: var(--text); }
.testimonial-card .t-role { font-size: 13px; color: var(--text-muted); }

/* --- CTA Banner --- */
.cta-banner {
  background: var(--primary-gradient); border-radius: 16px;
  padding: 56px 40px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.cta-banner p { font-size: 16px; opacity: .85; margin-bottom: 28px; line-height: 1.6; max-width: 480px; margin-left: auto; margin-right: auto; }

/* --- FAQ --- */
.faq-list { max-width: 700px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border-light); border-radius: 10px; margin-bottom: 10px;
  overflow: hidden; transition: var(--transition);
}
.faq-q {
  width: 100%; padding: 18px 24px; text-align: left; font-size: 15px;
  font-weight: 600; color: var(--text); background: none; border: none;
  cursor: pointer; display: flex; justify-content: space-between; align-items: center;
  font-family: inherit; transition: background .15s;
}
.faq-q:hover { background: var(--bg-light); }
.faq-q::after { content: '+'; font-size: 20px; color: var(--text-muted); transition: transform .3s; }
.faq-item.open .faq-q::after { content: '\2212'; transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .3s, padding .3s;
  padding: 0 24px; font-size: 14px; color: var(--text-secondary); line-height: 1.7;
}
.faq-item.open .faq-a { max-height: 300px; padding: 0 24px 18px; }

/* --- Cards (generic) --- */
.card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 24px; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 17px; font-weight: 700; color: var(--text); }

/* --- Forms --- */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-input {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: 8px; font-size: 15px; color: var(--text); transition: var(--transition);
  background: #fff; font-family: inherit;
}
.form-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(92,106,196,.08); }
.form-input::placeholder { color: var(--text-muted); }
textarea.form-input { min-height: 100px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Tables --- */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--border-light); border-radius: 10px;
  box-shadow: var(--shadow-sm);
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 12px 16px; background: var(--bg-light);
  color: var(--text-secondary); font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--border-light);
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--border-light); color: var(--text-secondary); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--bg-light); }

/* --- Badges --- */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 100px;
  font-size: 12px; font-weight: 600;
}
.badge-success { background: var(--success-bg); color: #166534; }
.badge-warning { background: var(--warning-bg); color: #92400e; }
.badge-danger { background: var(--danger-bg); color: #991b1b; }
.badge-info { background: var(--primary-light); color: #3730a3; }
.badge-gray { background: var(--bg-light); color: var(--text-secondary); }

/* --- Alerts --- */
.alert { padding: 14px 18px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; }
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: var(--primary-light); color: #3730a3; border: 1px solid #c7d2fe; }

/* --- Auth Pages --- */
.auth-page {
  min-height: calc(100vh - 64px); display: flex; align-items: center;
  justify-content: center; background: linear-gradient(180deg, #f0eeff, #f6f9fc 50%, #fff);
  padding: 40px 20px;
}
.auth-card {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 40px; width: 100%; max-width: 440px; border: 1px solid var(--border-light);
}
.auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; color: var(--text); }
.auth-card .subtitle { color: var(--text-secondary); font-size: 14px; margin-bottom: 28px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }

/* --- Footer --- */
.footer {
  background: #1a1d2e; color: #8892a4; padding: 60px 0 28px; margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
}
.footer h4 { color: #fff; font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.footer a { color: #8892a4; font-size: 14px; display: block; margin-bottom: 8px; transition: var(--transition); }
.footer a:hover { color: #fff; padding-left: 4px; }
.footer p { font-size: 14px; line-height: 1.7; }
.footer-bottom {
  max-width: var(--max-width); margin: 40px auto 0; padding: 24px 24px 0;
  border-top: 1px solid rgba(255,255,255,.06); font-size: 13px;
  text-align: center; color: #5d6880;
}

/* --- Domain Results --- */
#searchResults { max-width: 600px; margin: 0 auto; text-align: left; }
.domain-results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.domain-card {
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 14px; text-align: center; transition: var(--transition);
}
.domain-card.available { border-color: #bbf7d0; background: #f9fffb; }
.domain-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.domain-name { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; word-break: break-all; }
.domain-price { font-size: 13px; font-weight: 700; color: var(--success); margin-bottom: 8px; }
.domain-card .badge { margin-bottom: 4px; }
.domain-card .btn { display: block; width: 100%; margin-bottom: 2px; }

/* --- Dashboard --- */
.dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
  background: #fff; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 24px; transition: var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 28px; margin-bottom: 10px; }
.stat-card .stat-value-duo { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card .stat-label-duo { font-size: 13px; color: var(--text-muted); margin-top: 6px; font-weight: 500; }

/* --- DNS Editor --- */
.dns-row { display: grid; grid-template-columns: 100px 160px 1fr 100px 80px 60px; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border-light); }
.dns-row select, .dns-row input { padding: 8px 12px; border: 1.5px solid var(--border); border-radius: 6px; font-size: 14px; width: 100%; font-family: inherit; }
.dns-row select:focus, .dns-row input:focus { outline: none; border-color: var(--primary); }

/* --- Modal --- */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 2000; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 32px; width: 90%; max-width: 520px; max-height: 85vh; overflow-y: auto;
}
.modal h3 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 28px; }
.pagination a, .pagination span {
  padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 7px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary); transition: var(--transition);
}
.pagination a:hover { background: var(--bg-light); border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 600; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { font-size: 18px; color: var(--text-secondary); font-weight: 700; margin-bottom: 6px; }
.empty-state p { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }

/* --- Spinner --- */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2.5px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .6s linear infinite; margin-right: 8px; vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Cart Bar --- */
#cartBar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--text); color: #fff; padding: 12px 24px;
  z-index: 1500; display: none; align-items: center; justify-content: space-between;
  gap: 16px; box-shadow: 0 -4px 20px rgba(0,0,0,.2);
}
#cartBar .cart-info { display: flex; align-items: center; gap: 12px; font-size: 14px; }
#cartBar .cart-info strong { color: var(--primary-light); font-size: 16px; }

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 32px; } .hero p { font-size: 16px; }
  .section-title { font-size: 24px; } .section { padding: 56px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-stats { grid-template-columns: 1fr 1fr; }
  .stats-row { gap: 32px; }
  .dns-row { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-nav { display: none; }
  .container { padding: 0 16px; }
}
