/* Asuerous — Domain Management Portal (Minimal / Clean) */

:root {
  --bg:          #f5f7fb;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e5e9f2;
  --border-2:    #edf1f7;
  --text:        #111827;
  --text-2:      #4b5563;
  --text-3:      #6b7280;
  --text-mute:   #9ca3af;
  --brand:       #2563eb;
  --brand-2:     #1d4ed8;
  --brand-soft:  #eff6ff;
  --success:     #10b981;
  --success-bg:  #ecfdf5;
  --warning:     #f59e0b;
  --warning-bg:  #fffbeb;
  --danger:      #ef4444;
  --danger-bg:   #fef2f2;
  --muted-bg:    #f1f5f9;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow-sm:   0 1px 2px rgba(17,24,39,.04);
  --shadow:      0 4px 20px rgba(17,24,39,.06);
  --shadow-lg:   0 20px 40px rgba(17,24,39,.08);
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.link { color: var(--brand); font-weight: 500; cursor: pointer; }
.link:hover { text-decoration: underline; }
.link--sm { font-size: 13px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .15s ease; font-family: inherit;
  text-decoration: none; white-space: nowrap;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-2); text-decoration: none; }
.btn--ghost   { background: transparent; color: var(--text-2); border-color: var(--border); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.btn--light   { background: #fff; color: var(--brand); }
.btn--light:hover { background: #f8fafc; text-decoration: none; }
.btn--block   { width: 100%; }
.btn--sm      { padding: 7px 12px; font-size: 13px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--muted   { background: var(--muted-bg);   color: var(--text-3); }
.badge--info    { background: var(--brand-soft); color: var(--brand); }
.pill {
  display: inline-block; padding: 4px 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; font-size: 13px; font-family: ui-monospace, Menlo, Consolas, monospace;
  margin: 3px 6px 3px 0; color: var(--text-2);
}
.brand-mark {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff; font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -.5px;
  box-shadow: 0 6px 14px rgba(37,99,235,.25);
}

/* ============ AUTH / LOGIN ============ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(124,58,237,.10), transparent 55%),
    var(--bg);
}
.auth { width: 100%; max-width: 440px; }
.auth__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 32px; box-shadow: var(--shadow-lg);
}
.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.auth__brand h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.auth__brand p  { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.auth__title    { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.auth__sub      { margin: 0 0 22px; color: var(--text-3); }
.auth__extras {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 20px; font-size: 13px;
}
.auth__foot {
  margin: 22px 0 0; padding-top: 18px;
  border-top: 1px solid var(--border-2);
  text-align: center; color: var(--text-3); font-size: 13px;
}

/* Forms */
.form .field { margin-bottom: 14px; }
.field__label {
  display: block; margin-bottom: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.field__input {
  width: 100%; padding: 10px 13px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.field__input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.field__with-suffix { position: relative; }
.field__with-suffix .field__input { padding-right: 72px; }
.field__suffix {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: none; background: transparent; color: var(--brand);
  font-weight: 600; font-size: 13px; cursor: pointer; padding: 6px 8px;
}
.checkbox {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-2); cursor: pointer; user-select: none;
}
.checkbox input { accent-color: var(--brand); }
.alert {
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 13px; margin-bottom: 16px; font-weight: 500;
}
.alert--error { background: var(--danger-bg); color: var(--danger); border: 1px solid #fecaca; }

/* ============ DASHBOARD ============ */
.dash-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 22px 16px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid var(--border-2); margin-bottom: 16px;
}
.sidebar__brand h1    { margin: 0; font-size: 17px; letter-spacing: -.3px; }
.sidebar__brand small { color: var(--text-3); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; }
.sidebar__nav { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; font-size: 14px;
  cursor: pointer; text-decoration: none; transition: all .12s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-item--active { background: var(--brand-soft); color: var(--brand-2); font-weight: 600; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.sidebar__foot {
  border-top: 1px solid var(--border-2); padding-top: 16px; margin-top: 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.user-chip__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
}
.user-chip strong { display: block; font-size: 13px; line-height: 1.2; }
.user-chip small  { color: var(--text-3); font-size: 12px; }

/* Main */
.main { padding: 24px 32px 40px; min-width: 0; max-width: 100%; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.topbar__right { display: flex; align-items: center; gap: 10px; }
.page-title { margin: 0 0 2px; font-size: 22px; font-weight: 700; letter-spacing: -.3px; }
.page-sub   { margin: 0; color: var(--text-3); }
.search { position: relative; }
.search__input {
  padding: 9px 14px 9px 34px; min-width: 240px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%236b7280" stroke-width="2" stroke-linecap="round"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>') no-repeat 11px 50%/16px 16px;
  font-size: 13px; font-family: inherit;
}
.search__input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.stat-card__label { color: var(--text-3); font-size: 13px; margin-bottom: 8px; }
.stat-card__value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.1; }
.stat-unit { font-size: 14px; font-weight: 500; color: var(--text-3); }
.stat-card__foot {
  margin-top: 10px; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; font-size: 12px; color: var(--text-3);
}
.stat-sub { font-size: 12px; }
.trend { font-weight: 700; }
.trend--up   { color: var(--success); }
.trend--down { color: var(--danger); }

/* Progress */
.progress {
  width: 100%; height: 8px; border-radius: 999px;
  background: var(--muted-bg); overflow: hidden;
}
.progress__fill {
  height: 100%; background: linear-gradient(90deg, var(--brand), #7c3aed);
  border-radius: 999px; transition: width .4s ease;
}

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); margin-bottom: 20px;
}
.card--primary {
  background: linear-gradient(135deg, var(--brand) 0%, #7c3aed 100%);
  color: #fff; border-color: transparent;
}
.card--primary h3 { color: #fff; }
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; gap: 12px;
}
.card__head h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.card__actions { display: flex; align-items: center; gap: 8px; }

/* Info grid (Domain Information section) */
.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 32px;
}
.info-row {
  display: grid; grid-template-columns: 180px 1fr;
  padding: 14px 0; border-bottom: 1px solid var(--border-2);
  align-items: center; gap: 16px;
}
.info-row:last-child, .info-row:nth-last-child(2) { border-bottom: none; }
.info-row--span { grid-column: 1 / -1; }
.info-label { color: var(--text-3); font-size: 13px; font-weight: 500; }
.info-value { color: var(--text); font-size: 14px; font-weight: 500; }
.info-value--strong { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }

/* Action grid (7 buttons) */
.action-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.action-btn {
  display: flex; align-items: flex-start; gap: 12px; text-align: left;
  padding: 16px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface);
  cursor: pointer; transition: all .15s ease; font-family: inherit;
}
.action-btn:hover {
  border-color: var(--brand); background: var(--brand-soft);
  transform: translateY(-1px); box-shadow: var(--shadow);
}
.action-icon {
  font-size: 22px; flex: 0 0 28px;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.action-btn strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 2px; }
.action-btn small  { color: var(--text-3); font-size: 12px; line-height: 1.4; }

/* Feature grid */
.feature-grid {
  display: grid; grid-template-columns: 2fr 2fr 1.2fr; gap: 20px;
}
.kv-list { list-style: none; padding: 0; margin: 0; }
.kv-list li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--border-2);
  font-size: 14px;
}
.kv-list li:last-child { border-bottom: none; }
.kv-list li span   { color: var(--text-3); }
.kv-list li strong { color: var(--text); font-weight: 600; }

.activity { list-style: none; padding: 0; margin: 0; }
.activity li {
  display: grid; grid-template-columns: 14px 1fr auto;
  gap: 10px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--border-2);
  font-size: 13.5px; color: var(--text-2);
}
.activity li:last-child { border-bottom: none; }
.activity__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-mute); flex: 0 0 8px; }
.activity__dot--ok   { background: var(--success); }
.activity__dot--warn { background: var(--warning); }
.activity .time { color: var(--text-mute); font-size: 12px; white-space: nowrap; }

.dash-foot {
  text-align: center; color: var(--text-mute); font-size: 12px;
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-2);
}

/* Toast */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 12px 18px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 9999;
  animation: toastIn .25s ease;
}
@keyframes toastIn { from { opacity:0; transform: translate(-50%, 10px); } to { opacity:1; transform: translate(-50%, 0); } }

/* Responsive */
@media (max-width: 1100px) {
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .action-grid   { grid-template-columns: repeat(2, 1fr); }
  .feature-grid  { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .dash-page { grid-template-columns: 1fr; }
  .sidebar {
    position: relative; height: auto;
    padding: 16px; border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .sidebar__nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar__foot { flex-direction: row; align-items: center; }
  .main { padding: 18px; }
  .info-grid { grid-template-columns: 1fr; }
  .info-row  { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; }
  .feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .auth__card  { padding: 22px; }
  .stats-grid  { grid-template-columns: 1fr; }
  .action-grid { grid-template-columns: 1fr; }
  .topbar__right .search { display: none; }
}

/* ═══════════════════════════════════════════════════════════
   Modal (Quick Action → Live Chat popup)
   ═══════════════════════════════════════════════════════════ */
.modal {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
.modal__dialog {
  position: relative;
  width: 100%; max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(17, 24, 39, 0.25);
  padding: 30px 28px 26px;
  animation: popIn .22s cubic-bezier(.2,.8,.2,1);
}
.modal__close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 8px;
  border: none; background: var(--surface-2);
  color: var(--text-3); cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: all .12s ease;
}
.modal__close:hover { background: var(--danger-bg); color: var(--danger); }
.modal__icon {
  width: 58px; height: 58px; border-radius: 16px;
  background: linear-gradient(135deg, #10b981, #2563eb);
  color: #fff; font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 16px;
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.25);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn  { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 520px) {
  .modal__dialog { padding: 24px 20px 20px; border-radius: 14px; }
  .modal__icon   { width: 50px; height: 50px; font-size: 24px; margin-bottom: 12px; }
}