:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f1b2d;
  --ink-soft: #475569;
  --line: #dde4ec;

  /* WEBHOSTING márkaszínek */
  --brand-green: #6fae3e;
  --brand-purple: #6e4e8e;

  --primary: #6e4e8e;        /* márkalila – gombok, linkek, fókusz */
  --primary-dark: #573e72;
  --accent: #6fae3e;         /* márkazöld – kiemelések */

  /* Eszkalációs állapot-színek (a folyamat fokozatai) */
  --ok: #16a34a;
  --r1: #2563eb;
  --r2: #d97706;
  --r3: #ea580c;
  --r4: #dc2626;
  --susp: #7f1d1d;

  --radius: 10px;
  --shadow: 0 1px 2px rgba(15,27,45,.06), 0 4px 16px rgba(15,27,45,.06);
  --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--sans); background: var(--bg); color: var(--ink);
  line-height: 1.5; font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Fejléc ---- */
.topbar {
  background: #fff; color: var(--ink); display: flex; align-items: center;
  justify-content: space-between; padding: 0 22px; height: 60px;
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(15,27,45,.04);
}
.topbar .brand { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); }
.topbar .brand:hover { text-decoration: none; }
.topbar .brand .logo { height: 30px; width: auto; display: block; }
.topbar .brand .app-name {
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  padding-left: 14px; border-left: 1px solid var(--line);
}
.topbar nav { display: flex; align-items: center; gap: 4px; }
.topbar nav a {
  color: var(--ink-soft); padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 500;
}
.topbar nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.topbar nav a.active { background: rgba(110,78,142,.10); color: var(--primary); }
.topbar form { margin: 0; }
.btn-logout {
  background: transparent; border: 1px solid var(--line); color: var(--ink-soft);
  padding: 7px 14px; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.btn-logout:hover { background: var(--surface-2); color: var(--ink); }

/* ---- Tartalom ---- */
.wrap { max-width: 1180px; margin: 24px auto; padding: 0 20px; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 28px 0 12px; }
.subtitle { color: var(--ink-soft); margin: 0 0 20px; font-size: 14px; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px;
}

/* ---- Eszkalációs csővezeték (signature elem) ---- */
.pipeline { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.stage {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px;
  background: var(--surface-2); position: relative; overflow: hidden;
}
.stage::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background: var(--line); }
.stage .num { font-size: 28px; font-weight: 700; line-height: 1; }
.stage .lbl { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
.stage.s-ok::before   { background: var(--ok); }
.stage.s-r1::before   { background: var(--r1); }
.stage.s-r2::before   { background: var(--r2); }
.stage.s-r3::before   { background: var(--r3); }
.stage.s-r4::before   { background: var(--r4); }
.stage.s-susp::before { background: var(--susp); }
.stage.s-forsale::before { background: #7c3aed; }
.stage.stage-clickable { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.stage.stage-clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.08); }

/* ---- Kiemelt számok ---- */
.kpis { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.kpi { flex: 1; min-width: 150px; }
.kpi .v { font-size: 24px; font-weight: 700; }
.kpi .sub { font-size: 12px; color: var(--ink-soft); margin-top: 1px; }
.kpi .k { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.amount-sub { font-size: 11px; color: var(--ink-soft); white-space: nowrap; }
.phone { font-size: 12px; color: var(--ink-soft); }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--primary); }
th.sortable .sort-ind { color: var(--primary); font-size: 11px; }

/* Kattintható sorok */
.row-click { cursor: pointer; transition: background .12s; }
.row-click:hover { background: var(--surface-2); }
.row-click .client-name { color: var(--primary); font-weight: 600; }
.row-click:hover .client-name { text-decoration: underline; }

/* Nettó/Bruttó kapcsoló */
.amount-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #c8d2dd; border-radius: 24px; transition: .2s; }
.switch .slider:before { content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider:before { transform: translateX(18px); }
.amount-toggle .t-net { color: var(--ink); font-weight: 600; }
.amount-toggle .t-gross { color: var(--ink-soft); font-weight: 600; }
body.show-gross .amount-toggle .t-net { color: var(--ink-soft); }
body.show-gross .amount-toggle .t-gross { color: var(--ink); }

/* Az összegek nettó/bruttó megjelenítése a kapcsoló szerint */
.amt-gross { display: none; }
body.show-gross .amt-net { display: none; }
body.show-gross .amt-gross { display: inline; }

/* ---- Táblázat ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
/* Hosszú, vesszővel elválasztott e-mail-láncok (több címzett egy cellában)
   a böngészőnek egyetlen törhetetlen "szónak" számítanak, és emiatt a
   táblázat kinyújtja magát a kártyán túlra - itt kényszerítjük a tördelést,
   és fix layout-tal biztosítjuk, hogy a többi oszlop ettől ne csússzon el.
   Csak az ügyféltáblázatra vonatkozik, más táblázatokat (admin, kliens
   oldal) nem érint. */
#clientsTable { table-layout: fixed; }
#clientsTable th { white-space: normal; }
#clientsTable th:nth-child(1), #clientsTable td:nth-child(1) { width: 7%; }
#clientsTable th:nth-child(2), #clientsTable td:nth-child(2) { width: 12%; }
#clientsTable th:nth-child(3), #clientsTable td:nth-child(3) { width: 16%; }
#clientsTable th:nth-child(4), #clientsTable td:nth-child(4) { width: 9%; }
#clientsTable th:nth-child(5), #clientsTable td:nth-child(5) { width: 10%; }
#clientsTable th:nth-child(6), #clientsTable td:nth-child(6) { width: 6%; text-align: center; }
#clientsTable th:nth-child(7), #clientsTable td:nth-child(7) { width: 6%; text-align: center; }
#clientsTable th:nth-child(8), #clientsTable td:nth-child(8) { width: 34%; }
#clientsTable td:nth-child(4), #clientsTable td:nth-child(5) { white-space: nowrap; }
#clientsTable .badge { white-space: normal; text-align: center; line-height: 1.3; }
.badge.micro { background: #f59e0b; color: #fff; font-size: 10px; padding: 2px 6px; }
.note-badge {
  display: inline-block; background: #ede9fe; color: #6d28d9;
  font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 10px;
  cursor: help; white-space: nowrap;
}
.next-step-inline { margin-top: 4px; font-size: 12px; color: var(--ink-soft); }
.email-cell { overflow-wrap: break-word; word-break: break-word; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---- Állapot-címke ---- */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 600; color: #fff; white-space: nowrap;
}
.badge.s-ok   { background: var(--ok); }
.badge.s-r1   { background: var(--r1); }
.badge.s-r2   { background: var(--r2); }
.badge.s-r3   { background: var(--r3); }
.badge.s-r4   { background: var(--r4); }
.badge.s-susp { background: var(--susp); }
.badge.s-forsale { background: #7c3aed; }
.badge.hold   { background: #64748b; }

/* ---- Gombok ---- */
.btn {
  display: inline-block; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 9px 16px; border-radius: 8px; cursor: pointer;
  font-size: 14px; font-family: inherit;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.success { background: var(--brand-green); border-color: var(--brand-green); color: #fff; }
.btn.success:hover { filter: brightness(0.93); }
.btn.danger { background: var(--r4); border-color: var(--r4); color: #fff; }
.btn.danger:hover { background: var(--susp); }
.btn.warn { background: var(--r2); border-color: var(--r2); color: #fff; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Űrlap ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=email], textarea, select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px;
  font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
textarea { font-family: var(--mono); font-size: 13px; min-height: 90px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary); outline-offset: 0; border-color: var(--primary); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: auto; }

fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 0 0 20px; }
legend { font-weight: 600; padding: 0 8px; color: var(--ink); }

/* ---- Beállítások: kétoszlopos elrendezés + ugró tartalomjegyzék ---- */
.settings-layout { display: grid; grid-template-columns: 232px 1fr; gap: 30px; align-items: start; }
.settings-main { min-width: 0; }   /* megakadályozza a túlcsordulást */

.settings-nav {
  position: sticky; top: 16px; align-self: start;
  max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 0 4px 12px 0;
  scrollbar-width: thin;
  scrollbar-color: #7c3aed transparent;
}
.settings-nav::-webkit-scrollbar { width: 4px; }
.settings-nav::-webkit-scrollbar-track { background: transparent; }
.settings-nav::-webkit-scrollbar-thumb { background: #7c3aed; border-radius: 4px; }
.settings-nav::-webkit-scrollbar-thumb:hover { background: #6d28d9; }
.settings-nav .nav-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--ink-soft); font-weight: 700; margin: 0 0 6px 14px;
  padding-top: 4px;
}
.settings-nav ul { list-style: none; margin: 0; padding: 0; }
.settings-nav li { margin: 0; list-style: none; }
.settings-nav a {
  display: block; padding: 5px 12px; font-size: 13px; color: var(--ink-soft);
  border-left: 3px solid transparent; line-height: 1.3; transition: all .15s;
}
.settings-nav a:hover { color: var(--ink); background: var(--surface-2); text-decoration: none; }
.settings-nav a.active {
  color: #7c3aed; border-left-color: #7c3aed; font-weight: 600;
  background: rgba(124,58,237,.07);
}

/* Hogy a sticky fejléc ne takarja el az ugrási célt */
.settings-main fieldset[id],
.settings-main .card[id] { scroll-margin-top: 80px; }

/* Mindig elérhető „Beállítások mentése" sáv az ablak alján */
.sticky-save {
  position: sticky; bottom: 0; z-index: 10;
  background: var(--surface); padding: 14px 0 12px; margin-top: 8px;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 18px -10px rgba(15,27,45,.18);
}

/* ---- Üzenetek ---- */
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; border: 1px solid; }
.flash.info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.flash.error   { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash.warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.test-result { font-size: 13px; padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.test-result.ok { background: #ecfdf5; color: #065f46; }
.test-result.fail { background: #fef2f2; color: #991b1b; }

/* ---- Toast (buborék értesítés) ---- */
#toast-root {
  position: fixed; top: 16px; right: 16px; z-index: 1000;
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto; min-width: 240px; max-width: 360px; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-left: 4px solid var(--primary);
  border-radius: 10px; box-shadow: 0 8px 28px rgba(15,27,45,.18);
  padding: 12px 16px; font-size: 14px; line-height: 1.4;
  opacity: 0; transform: translateX(14px); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast.ok      { border-left-color: var(--ok); }
.toast.error   { border-left-color: var(--r4); }
.toast.warning { border-left-color: var(--r2); }
.toast.info    { border-left-color: var(--primary); }
@media (max-width: 560px) {
  #toast-root { left: 12px; right: 12px; }
  .toast { max-width: none; }
}

.dry-banner {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  padding: 10px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
}

.logitem { font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; gap: 12px; }
.logitem .ts { color: var(--ink-soft); white-space: nowrap; font-family: var(--mono); font-size: 12px; }
.logitem.warning .act { color: var(--r2); font-weight: 600; }
.logitem.error .act { color: var(--r4); font-weight: 600; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--ink); padding: 20px; }
.login-card { background: #fff; border-radius: 14px; padding: 36px; width: 100%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-card .login-brand img { height: 36px; width: auto; display: block; }
.login-card .login-app { font-weight: 700; font-size: 16px; margin: 16px 0 4px; }
.login-card .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.login-card .brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.login-card p.sub { color: var(--ink-soft); font-size: 13px; margin: 0 0 24px; }

/* ---- Felfüggesztési oldal ---- */
/* ---- Felfüggesztési és eladási landing oldalak ---- */
.susp-page { background: #0f1b2d; min-height: 100vh; padding: 24px 16px; box-sizing: border-box; }
.susp-card { background: #fff; border-radius: 16px; max-width: 560px; width: 100%; margin: 0 auto;
             padding: 28px 36px 22px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.forsale-card { max-width: 860px !important; }
.susp-logo { margin-bottom: 16px; }
.susp-logo-img { max-width: 180px; height: auto; }
.susp-divider { height: 1px; background: #e5e7eb; margin: 0 0 18px 0; }
.susp-card h1 { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: #111; }
.susp-title-en { font-size: 17px; font-weight: 700; margin: 0 0 10px; color: #111; }
.susp-card .msg { color: #6b7280; white-space: pre-line; margin-bottom: 14px; font-size: 14px; line-height: 1.6; text-align: center; }
.susp-msg-en { color: #6b7280; margin-bottom: 14px; font-size: 14px; line-height: 1.6; text-align: center; }
.susp-contact { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 10px;
                padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; text-align: left; }
.susp-contact-center { text-align: center; align-items: center; }
.susp-contact div { font-size: 13px; color: #374151; }
.susp-contact a { font-weight: 600; color: #2563eb; text-decoration: none; }
.susp-contact a:hover { text-decoration: underline; }
.susp-footer { border-top: 1px solid #e5e7eb; padding-top: 14px; display: flex;
               align-items: center; justify-content: center; gap: 10px; color: #9ca3af; font-size: 12px; }
.susp-footer a { display: flex; align-items: center; }
.susp-footer-logo { max-width: 80px; height: auto; opacity: .75; transition: opacity .2s; }
.susp-footer-logo:hover { opacity: 1; }
/* Eladási oldal kétoszlopos */
.forsale-domain-badge { background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: 10px; padding: 8px 20px; margin: 0 0 16px; display: inline-block; }
.forsale-domain-name { color: #fff; font-size: 20px; font-weight: 700; font-family: var(--mono); letter-spacing: 0.5px; }
.forsale-cols { display: flex; gap: 0; margin-bottom: 16px; align-items: flex-start; }
.forsale-col { flex: 1; padding: 0 20px; display: flex; flex-direction: column; align-items: center; }
.forsale-col:first-child { padding-left: 0; }
.forsale-col:last-child { padding-right: 0; }
.forsale-col-divider { width: 1px; background: #e5e7eb; flex-shrink: 0; align-self: stretch; }
.forsale-col h1 { font-size: 18px; font-weight: 700; margin: 0 0 10px; color: #111; }
.forsale-col h2 { font-size: 17px; font-weight: 700; margin: 0 0 10px; color: #111; }
.forsale-col .msg { font-size: 13px; margin-bottom: 0; text-align: center; }

@media (max-width: 900px) {
  .settings-layout { grid-template-columns: 1fr; gap: 16px; }
  .settings-nav {
    position: static; top: auto; margin-bottom: 8px;
    max-height: none; overflow: visible; padding-right: 0;
  }
  .settings-nav ul {
    display: flex; flex-wrap: wrap; gap: 4px; border-left: none;
    border: 1px solid var(--line); border-radius: var(--radius); padding: 8px;
    background: var(--surface);
  }
  .settings-nav a { border-left: none; margin-left: 0; border-radius: 6px; padding: 6px 10px; }
  .settings-nav a.active { background: rgba(110,78,142,.10); }
}

@media (max-width: 760px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px; }
  .topbar .brand .app-name { display: none; }
  .topbar nav a { padding: 8px 10px; }
  table { font-size: 13px; }
  th:nth-child(3), td:nth-child(3) { display: none; }
}

.search-bar-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.client-search { flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; font-family: var(--sans); outline: none; background: var(--surface); color: var(--ink); transition: border-color .15s; }
.client-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.search-count { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.dns-zone-unreadable { padding: 8px 14px; color: #6b7280; font-size: 12px; font-style: italic; margin: 0; }

/* DNS állapot kártyák */
.dns-zones { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.dns-zone-block { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.dns-zone-ok   { border-left: 4px solid #22c55e; }
.dns-zone-blocked { border-left: 4px solid #ef4444; }
.dns-zone-hdr { display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--surface-2); flex-wrap: wrap; }
.dns-zone-name { font-weight: 700; font-size: 14px; color: var(--ink); text-decoration: none; }
.dns-zone-name:hover { color: var(--primary); text-decoration: underline; }
.dns-zone-domains { font-size: 12px; color: var(--ink-soft); flex: 1; }
.dns-zone-badge { margin-left: auto; }
.dns-recs { display: flex; flex-wrap: wrap; gap: 0; padding: 0; }
.dns-rec-group { display: flex; align-items: flex-start; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--border); min-width: 280px; flex: 1; }
.dns-rec-group + .dns-rec-group { border-left: 1px solid var(--border); }
.dns-rec-type-label { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--surface-2); border-radius: 4px; padding: 2px 6px; margin-top: 2px; min-width: 28px; text-align: center; }
.dns-rec-table { border-collapse: collapse; font-size: 13px; flex: 1; }
.dns-rec-table tr:not(:last-child) td { padding-bottom: 3px; }
.dns-rec-name { color: var(--ink-soft); padding-right: 6px; white-space: nowrap; }
.dns-rec-name a { color: var(--ink-soft); text-decoration: none; }
.dns-rec-name a:hover { color: var(--primary); text-decoration: underline; }
.dns-rec-arrow { color: var(--ink-soft); padding: 0 4px; font-size: 11px; }
.dns-rec-val { color: var(--ink); white-space: nowrap; }
.dns-val-blocked { color: #ef4444; font-weight: 600; }
.dns-zone-err { padding: 8px 14px; color: #ef4444; font-size: 13px; margin: 0; }
.dns-zone-empty { padding: 6px 14px; color: var(--ink-soft); font-size: 13px; margin: 0; }
.dns-nozone-hint { font-size: 12px; color: var(--ink-soft); margin: 8px 0 4px 0; }
.dns-legend { font-size: 11px; color: var(--ink-soft); margin: 4px 0 0 0; }
.whis-id a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.whis-id a:hover { color: var(--primary); text-decoration: underline; }

/* Jelszó mező szemikon */
.pw-wrap { position: relative; display: flex; align-items: center; }
.pw-wrap .pw-input { flex: 1; padding-right: 38px; }
.pw-wrap .pw-eye { position: absolute; right: 8px; background: none; border: none;
  cursor: pointer; font-size: 16px; opacity: .5; padding: 0; line-height: 1;
  transition: opacity .15s; }
.pw-wrap .pw-eye:hover { opacity: 1; }

.btn.btn-forsale { background: #0891b2 !important; color: #fff !important; border-color: #0891b2 !important; }
.btn.btn-forsale:hover { background: #0e7490 !important; border-color: #0e7490 !important; }

.ops-row { flex-wrap: nowrap; overflow-x: auto; }
.ops-row .btn { font-size: 13px; padding: 6px 10px; white-space: nowrap; flex-shrink: 0; }

.dns-check-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; }
.dns-check-table th { text-align: left; padding: 6px 10px; border-bottom: 2px solid var(--border); color: var(--ink-soft); font-size: 11px; text-transform: uppercase; }
.dns-check-table td { padding: 5px 10px; border-bottom: 1px solid var(--border); }
.dns-check-ok td { background: #f0fdf4; }
.dns-check-fail td { background: #fff7ed; }

/* Eszkalációs állapot-kártyára kattintva felugró ügyféllista */
.stage-modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 27, 45, .45);
  align-items: flex-start; justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
}
.stage-modal-overlay.open { display: flex; }
.stage-modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(15, 27, 45, .25);
  width: 100%; max-width: min(1200px, 95vw);
  max-height: calc(100vh - 96px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.stage-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.stage-modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 16px; color: var(--ink-soft); padding: 4px 8px;
  border-radius: 6px; line-height: 1;
}
.stage-modal-close:hover { background: var(--surface-2); color: var(--ink); }
.stage-modal-body { padding: 8px 20px 20px; overflow-y: auto; overflow-x: auto; }
.stage-modal-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.stage-modal-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .02em;
  color: var(--ink-soft); padding: 8px 10px; border-bottom: 2px solid var(--line);
}
.stage-modal-table th.num { text-align: right; }
.stage-modal-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.stage-modal-table tr:last-child td { border-bottom: none; }
.stage-modal-table tr.row-click { cursor: pointer; }
.stage-modal-table tr.row-click:hover { background: var(--surface-2); }
/* Fix oszlopszélességek (JS által épített sorrend: 1=Ügyfél, 2=E-mail,
   3=Legkorábbi lejárat, 4=Tartozás, 5=Következő lépés) - így egyik
   oszlop (pl. egy hosszú, több címes e-mail) sem tolja le a többit,
   és minden fér görgetés nélkül. */
.stage-modal-table th:nth-child(1), .stage-modal-table td:nth-child(1) { width: 14%; }
.stage-modal-table th:nth-child(2), .stage-modal-table td:nth-child(2) { width: 22%; overflow-wrap: break-word; word-break: break-word; }
.stage-modal-table th:nth-child(3), .stage-modal-table td:nth-child(3) { width: 11%; }
.stage-modal-table th:nth-child(4), .stage-modal-table td:nth-child(4) { width: 11%; }
.stage-modal-table th:nth-child(5), .stage-modal-table td:nth-child(5) { width: 6%; text-align: center; }
.stage-modal-table th:nth-child(6), .stage-modal-table td:nth-child(6) { width: 6%; text-align: center; }
.stage-modal-table th:nth-child(7), .stage-modal-table td:nth-child(7) { width: 30%; }
.stage-modal-table td:nth-child(3), .stage-modal-table td:nth-child(4) { white-space: nowrap; }
.stage-modal-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.stage-modal-table .badge { white-space: normal; text-align: center; line-height: 1.3; }
.stage-modal-table td:nth-child(7) .countdown { white-space: normal; }

/* Kintlévőség év szerinti bontása a dashboardon */
.year-breakdown { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.year-breakdown-title { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .02em; margin-bottom: 10px; }
.year-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.year-chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px;
  min-width: 130px;
}
.year-chip-year { font-weight: 700; font-size: 15px; color: var(--ink); }
.year-chip-amt { font-size: 13px; margin-top: 4px; line-height: 1.5; }
.year-chip-count { font-size: 11px; color: var(--ink-soft); margin-top: 4px; }

/* Automatizmus (ütemező) állapot-panel a dashboard tetején */
.automation-status { padding: 14px 18px; }
.automation-status-row { display: flex; align-items: center; gap: 12px; }
.automation-status-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--ok);
}
.automation-stalled .automation-status-dot { background: #dc2626; }
.automation-status-title { font-weight: 700; font-size: 14px; }
.automation-stalled .automation-status-title { color: #dc2626; }
.automation-status-detail { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.countdown { font-variant-numeric: tabular-nums; }
/* A fokozat-kártyák alatti kis visszaszámláló mindig rövid (D:H:M:S),
   ott jó, ha egy sorban marad - de a táblázatokban (ahol az "esedékes /
   folyamatban" hosszabb szöveg is előfordulhat) engedjük a sortörést. */
.stage-countdown.countdown { white-space: nowrap; }

/* Visszaszámláló az eszkalációs fokozat-kártyák alatt */
.stage-countdown {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* Domain-állapot jelölés a kliens oldalon (aktív/inaktív/folyamatban a
   WHIS-ben tárolt status_id alapján) - hasonló színkódolással, mint a
   WHIS saját felületén. */
.domain-tag {
  display: inline-block; padding: 2px 8px; border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; margin: 2px 0;
}
.domain-active   { background: #e6f4ea; color: #1e7e34; font-weight: 600; }
.domain-inactive { background: #f3f4f6; color: #6b7280; text-decoration: line-through; }
.domain-pending  { background: #e0f2fe; color: #0369a1; font-weight: 600; }
.domain-other    { background: #f3f4f6; color: #374151; }

/* Jegyzet művelet-gombok (Szerkesztés/Törlés) egyforma szélessége */
.note-action-btn { min-width: 92px; text-align: center; }

/* A WHIS saját customer_active=2 (felfüggesztett) jelölése - független
   attól, hogy nálunk a domain ténylegesen fel van-e függesztve. */
.badge.whis-susp {
  background: #fef3c7; color: #92400e; font-size: 10px;
  padding: 2px 6px; font-weight: 600; white-space: normal;
}

/* Külön, jól látható jelzés a WHIS-ben felfüggesztett (behajthatatlan)
   ügyfelek tartozásáról - hogy ne keveredjen a fő összesítővel. */
.whis-susp-note {
  margin-top: 12px; padding: 10px 14px;
  background: #fef3c7; border: 1px solid #fbbf24; border-radius: var(--radius);
  font-size: 13px; color: #92400e;
}

/* Késleltetett (2 mp-es) tooltip-buborék a manuális művelet-gombokhoz */
.action-tip-bubble {
  position: absolute;
  max-width: 280px;
  background: #1f2937;
  color: #fff;
  font-size: 12.5px;
  line-height: 1.4;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
  z-index: 2000;
  pointer-events: none;
  animation: action-tip-fade .12s ease-out;
}
@keyframes action-tip-fade {
  from { opacity: 0; transform: translateY(-3px); }
  to   { opacity: 1; transform: translateY(0); }
}
