:root {
  --bg: #060a09; --bg2: #0a100f90; --panel: #0d1413; --panel2: #131c1a; --border: #1d2a27;
  --text: #e8f1ef; --muted: #8ea6a0; --accent: #14b8a6; --accent2: #5eead4; --green: #34d399;
  --red: #f87171; --yellow: #fbbf24; --radius: 16px; --shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.6;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  background-image: radial-gradient(1200px 600px at 80% -10%, #14b8a622, transparent),
                    radial-gradient(900px 500px at -10% 10%, #22c55e14, transparent); }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #ffffff12; border: 1px solid #ffffff1a; padding: .1em .4em; border-radius: 6px; font-size: .9em; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; overflow-wrap: break-word; }
img, svg, video { max-width: 100%; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.spaced { margin-top: 40px; }
.huge { font-size: 6rem; margin: 0; background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.gradient { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text;
  background-clip: text; color: transparent; }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px); background: #060a09cc; border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 10px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav > a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-weight: 500; }
.nav > a:hover, .nav > a.active { color: var(--text); background: #ffffff0d; text-decoration: none; }
.nav-account { display: flex; gap: 6px; margin-left: 10px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text);
  border-radius: 10px; padding: 6px 12px; font-size: 1.2rem; cursor: pointer; }
.avatar-xs { width: 22px; height: 22px; border-radius: 50%; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
  font-weight: 600; border: 1px solid transparent; cursor: pointer; font-size: .95rem; color: var(--text);
  transition: transform .15s, background .15s, border-color .15s; font-family: inherit; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #22c55e); box-shadow: 0 6px 24px #14b8a655; }
.btn.ghost { background: #ffffff0a; border-color: var(--border); }
.btn.ghost:hover { border-color: #2a4a43; }
.btn.danger { background: #f8717122; border-color: #f8717166; color: #fecaca; }
.btn.success { background: #34d39922; border-color: #34d39966; color: #bbf7d0; }
.btn.small { padding: 6px 12px; font-size: .85rem; border-radius: 10px; }
.btn.big { padding: 14px 26px; font-size: 1.05rem; }

/* hero */
.hero { padding: 90px 0 60px; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 50px; align-items: center; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: #14b8a622; border: 1px solid #14b8a655;
  color: #99f6e4; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.lead { font-size: 1.15rem; color: #c3d6d1; max-width: 640px; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 14px; }
.hero-buttons.center { justify-content: center; }
.hero-visual { display: flex; align-items: center; gap: 16px; }
.mock-server { flex: 1; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.mock-server.backup { animation-delay: -3s; border-color: #34d39955; }
.mock-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; margin-bottom: 14px; }
.mock-line { height: 10px; border-radius: 6px; background: #ffffff14; margin: 10px 0; }
.mock-img { height: 70px; border-radius: 10px; background: linear-gradient(135deg, #14b8a655, #22c55e44); margin: 12px 0; }
.w80 { width: 80%; } .w70 { width: 70%; } .w60 { width: 60%; }
.mock-arrow { font-size: 2rem; color: var(--accent2); animation: pulse 2s infinite; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); }
.dot.green, .status-banner.ok .dot { background: var(--green); box-shadow: 0 0 12px var(--green); }
.status-banner.bad .dot { background: var(--red); }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes pulse { 50% { opacity: .4; } }

/* sections */
.section { padding: 70px 0; }
.section.tight { padding: 30px 0 70px; }
.section.alt { background: #ffffff05; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; }
.section-sub { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.page-head { padding: 60px 0 10px; }
.stats-strip { padding: 10px 0 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat { text-align: center; padding: 20px; }
.stats-grid .stat { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.stat-value { font-size: 2rem; font-weight: 800; background: linear-gradient(90deg, #fff, #99f6e4); -webkit-background-clip: text;
  background-clip: text; color: transparent; }
.stat-label { color: var(--muted); font-size: .9rem; }

/* grids and cards */
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid > *, .panel-grid > div > * { min-width: 0; }
.grid.guilds { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature:hover, .guild-card:hover { border-color: #2a4a43; transform: translateY(-2px); }
.feature, .guild-card { transition: transform .2s, border-color .2s; }
.feature-icon { font-size: 1.8rem; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px;
  background: #14b8a61f; margin-bottom: 14px; }
.steps { margin-bottom: 30px; }
.step { text-align: center; padding: 10px; }
.step-num { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); flex: none; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: center; }
.checks { list-style: none; padding: 0; }
.checks li { padding: 6px 0 6px 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.plain li { margin: 8px 0; color: #c3d6d1; }
.log-preview { font-size: .92rem; }
.log-title { font-weight: 700; color: var(--muted); margin-bottom: 12px; }
.log-line { padding: 8px 12px; border-left: 3px solid var(--accent); background: #ffffff06; border-radius: 6px; margin: 8px 0; }
.faq { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 16px 20px; margin: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 12px 0 0; }
.cta { background: linear-gradient(135deg, #14b8a618, #22c55e10); }
.table-card { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; }
.table tr:last-child td { border-bottom: 0; }
.prose ul { padding-left: 20px; } .prose li { margin: 6px 0; color: #c3d6d1; }

/* commands */
.search { width: 100%; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--panel);
  color: var(--text); font-size: 1rem; margin-bottom: 20px; font-family: inherit; }
.command-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.command-name { font-size: 1.05rem; background: #14b8a622; border-color: #14b8a644; }
.option { font-size: .9rem; margin: 4px 0; }
.badge { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge.admin, .badge.backup { background: #14b8a626; color: #99f6e4; }
.badge.manage, .badge.source { background: #22c55e22; color: #a7f3d0; }
.badge.everyone, .badge.ok { background: #34d39922; color: #bbf7d0; }
.badge.none { background: #ffffff10; color: var(--muted); }
.badge.warn { background: #fbbf2422; color: #fde68a; }
.badge.bad { background: #f8717122; color: #fecaca; }
.main-badge { font-size: .8rem; margin-left: 12px; vertical-align: middle; }

/* guide */
.guide-step { display: flex; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.guide-step .step-num { margin: 0; }

/* status */
.status-banner { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--border); font-weight: 600; font-size: 1.1rem; }
.status-banner.ok { border-color: #34d39966; } .status-banner.bad { border-color: #f8717166; }

/* dashboard */
.login-box { padding: 90px 20px; }
.login-logo { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.filters { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters .search { flex: 1; min-width: 220px; margin: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { background: #ffffff0a; border: 1px solid var(--border); color: var(--muted); padding: 7px 14px; border-radius: 999px;
  cursor: pointer; font-weight: 600; font-family: inherit; }
.chip.active { background: #14b8a633; color: var(--text); border-color: #14b8a688; }
.guild-card { display: flex; flex-direction: column; gap: 14px; }
.guild-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.guild-top > div { min-width: 0; }
.guild-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--panel2); display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; flex: none; object-fit: cover; }
.guild-icon.big { width: 76px; height: 76px; border-radius: 20px; font-size: 1.6rem; }
.guild-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.guild-card .btn { width: 100%; }
.skeleton { min-height: 150px; background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.skeleton.tall { min-height: 360px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.back { display: inline-block; margin-bottom: 18px; color: var(--muted); }
.guild-header { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.guild-header h1 { margin: 0; font-size: clamp(1.5rem, 6vw, 2rem); overflow-wrap: anywhere; }
.guild-header > div { min-width: 0; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel-grid > div { display: grid; gap: 18px; }
.flow { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.flow-item { min-width: 0; max-width: 100%; overflow-wrap: anywhere; display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--border);
  border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.flow-item img, .flow-item .guild-icon { width: 32px; height: 32px; border-radius: 10px; font-size: .8rem; }
.progress { height: 12px; border-radius: 999px; background: #ffffff10; overflow: hidden; margin: 10px 0 6px; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px;
  transition: width .6s; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.tile { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.tile b { display: block; font-size: 1.4rem; }
.tile span { color: var(--muted); font-size: .82rem; }
.tile b.tile-small, .stat-value.small-value { font-size: 1rem; padding: .35em 0; word-break: break-all; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.log-list { max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.log-item { display: flex; gap: 12px; padding: 9px 12px; background: #ffffff06; border-radius: 10px; font-size: .9rem; }
.log-item time { color: var(--muted); white-space: nowrap; font-size: .8rem; padding-top: 2px; }
.log-item div { white-space: pre-wrap; word-break: break-word; }
.report { white-space: pre-wrap; word-break: break-word; max-height: 460px; overflow: auto; background: #00000033;
  border: 1px solid var(--border); border-radius: 12px; padding: 16px; font-size: .88rem; margin: 0; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: 6px 0 6px 28px; position: relative; font-size: .92rem; }
.checklist li::before { position: absolute; left: 0; font-weight: 800; }
.checklist li.ok::before { content: "✓"; color: var(--green); }
.checklist li.bad::before { content: "✗"; color: var(--red); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: .9rem; color: var(--muted); min-width: 0; }
.form input[type=text], .form input[type=search], .form input[type=tel], .form input[type=email], .form input[type=password], .form select, .form textarea { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font: inherit; }
.form input[type=file] { color: var(--muted); font-size: .85rem; width: 100%; max-width: 100%; min-width: 0; }  /* (else its own width pushes the label out of a narrow card) */
.or { text-align: center; color: var(--muted); font-size: .85rem; }
.candidate-list { display: grid; gap: 8px; max-height: 300px; overflow: auto; }
.candidate { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--panel2); cursor: pointer; color: var(--text); font: inherit; text-align: left; }
.candidate.selected { border-color: var(--accent); background: #14b8a622; }
.candidate .guild-icon { width: 36px; height: 36px; border-radius: 10px; font-size: .85rem; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.partner { margin-top: -6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setting-switches { display: grid; gap: 14px; }
.flow-link { color: inherit; text-decoration: none; }
.progress-pct { text-align: center; font-weight: 700; margin-top: 8px; }
.flow-link .flow-item { transition: border-color .15s; }
.flow-link:hover .flow-item { border-color: var(--accent); }
.setting-own { display: flex; gap: 14px; align-items: flex-start; }
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; margin-top: 2px; }
.switch-input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: #ffffff1a; border: 1px solid var(--border); border-radius: 999px;
  cursor: pointer; transition: background .2s; }
.switch-slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 2px; top: 2px; background: #fff;
  border-radius: 50%; transition: transform .2s; }
.switch-input:checked + .switch-slider { background: linear-gradient(135deg, var(--accent), #22c55e); }
.switch-input:checked + .switch-slider::before { transform: translateX(20px); }
.switch-input:disabled + .switch-slider { opacity: .5; }

/* modal and toast */
.modal { position: fixed; inset: 0; background: #000a; display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; max-width: 440px;
  width: 100%; box-shadow: var(--shadow); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; position: relative; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent;
  color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.modal-x:hover { background: var(--panel2); color: var(--text); }
.modal-box h3[data-modal-title] { padding-right: 34px; }
.modal-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--border);
  padding: 12px 20px; border-radius: 12px; box-shadow: var(--shadow); z-index: 60; font-weight: 600; max-width: 90vw; }
.toast.error { border-color: #f8717188; } .toast.success { border-color: #34d39988; }

/* footer */
.footer { border-top: 1px solid var(--border); padding: 40px 0 24px; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { display: grid; grid-template-columns: repeat(3, auto); gap: 8px 30px; }
.footer-links a { color: var(--muted); }
.footer-bottom { margin-top: 26px; }

/* responsive */
@media (max-width: 900px) {
  .grid.guilds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-inner, .two-col, .panel-grid { grid-template-columns: 1fr; }
  .grid.three, .grid.four, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .grid.two { grid-template-columns: 1fr; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 12px 20px 20px; }
  .nav.open { display: flex; }
  .nav-account { margin: 10px 0 0; }
  .hero { padding: 50px 0 30px; }
}
@media (max-width: 560px) {
  .grid.guilds { grid-template-columns: 1fr; }
  .grid.three, .grid.four, .stats-grid, .tiles { grid-template-columns: 1fr 1fr; }
  .hero-visual { display: none; }
  .footer-links { grid-template-columns: repeat(2, auto); }
}

/* ===== app shell: fixed sidebar on the left, content on the right (every page, dashboard too) ===== */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh;
  background: linear-gradient(90deg, #070c0b 251px, var(--border) 251px, var(--border) 252px, transparent 252px); }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: #070c0b;
  border-right: 1px solid var(--border); padding: 22px 14px 18px; overflow-y: auto; z-index: 20; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-label { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #5b726c;
  padding: 16px 12px 6px; }
.side-nav > a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted);
  font-weight: 600; position: relative; }
.side-nav > a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.side-nav > a:hover { background: #ffffff08; color: var(--text); text-decoration: none; }
.side-nav > a.active { background: linear-gradient(90deg, #14b8a622, transparent); color: var(--text); }
.side-nav > a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); }
.side-nav > a.active svg { opacity: 1; color: var(--accent); }
.side-bottom { margin-top: auto; padding-top: 18px; display: grid; gap: 10px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--panel); font-weight: 600; min-width: 0; }
.side-user img { width: 28px; height: 28px; border-radius: 50%; }
.side-user span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user a { color: var(--muted); font-size: .82rem; font-weight: 600; }
.side-login { width: 100%; }
.side-legal { font-size: .76rem; color: #5b726c; padding: 0 8px; line-height: 1.5; }
.side-legal a { color: #7b928c; }
.content { min-width: 0; }
.content .wrap { max-width: 1240px; margin: 0; padding: 0 40px; }
.content .page-head { padding: 44px 0 6px; border-bottom: 0; }
.content .section { padding: 26px 0 60px; }
.content .section.tight { padding: 26px 0 60px; }
.kicker { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
.page-head h1 { margin-bottom: 10px; }
.page-head .lead { margin-bottom: 0; }
.page-head .hero-buttons { margin: 24px 0 0; }
.block-title { font-size: 1.35rem; margin: 44px 0 16px; }
.spaced-sm { margin-top: 18px; }
.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.tiles.four .tile b, .tiles.three .tile b { font-size: 1.7rem; }
.numbered { padding-left: 22px; margin: 6px 0 18px; display: grid; gap: 12px; }
.numbered li::marker { color: var(--accent); font-weight: 800; }
.numbered b, .numbered span { display: block; }
.term { margin: 0; background: #040807; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px;
  padding: 16px 18px; font: .88rem/1.7 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #99f6e4; white-space: pre-wrap; }
.faq-grid { align-items: start; gap: 12px 18px; }
.faq-grid .faq { margin: 0; }
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; gap: 6px; position: relative; padding: 26px; }
.plan h3 { font-size: 1.4rem; margin: 0; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 18px 50px #14b8a622; }
.plan-flag { position: absolute; top: -12px; right: 20px; background: var(--accent); color: #04221f; font-size: .75rem;
  font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 6px; }
.plan-price b { font-size: 2.6rem; line-height: 1; }
.plan-price span { color: var(--muted); }
.plan .checks { flex: 1; margin: 8px 0 18px; }
.plan .btn { width: 100%; }
.admin-table td { vertical-align: middle; }
.announce { display: flex; align-items: flex-start; gap: 12px; margin: 18px 40px 0; padding: 14px 18px; border-radius: 12px;
  background: #14b8a61a; border: 1px solid #14b8a666; font-weight: 600; }
.announce.warn { background: #fbbf2418; border-color: #fbbf2466; }
.announce[hidden] { display: none; }
.announce div { flex: 1; white-space: pre-wrap; }
.announce-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; padding: 0 4px; }
.announce-row { display: flex; flex-wrap: wrap; gap: 10px 26px; align-items: center; }
.form label.check, .form label.inline { display: flex; align-items: center; gap: 8px; color: var(--text); }
.form label.inline input { width: 90px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font: inherit; }
.form textarea { resize: vertical; }
.admin-table td:nth-child(-n+2) { min-width: 170px; }
.admin-table th, .admin-table td { padding: 12px 14px; }

.admin-guild { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-guild .guild-icon { width: 34px; height: 34px; border-radius: 10px; font-size: .75rem; }
.admin-actions { white-space: nowrap; text-align: right; }
.admin-actions .btn { margin-left: 4px; }
.plain-link { color: inherit; } .plain-link:hover { text-decoration: none; } .plain-link:hover b { color: var(--accent); }
.modal-box select { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font: inherit; }
.form input[type=date] { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font: inherit; color-scheme: dark; }
.plan .checks li.muted { padding-left: 0; font-style: italic; }
.plan .checks li.muted::before { content: none; }
.content .footer { display: none; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: sticky; height: auto; flex-direction: column; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .side-top { padding: 0; }
  .side-nav { display: none; padding-top: 10px; }
  .side-nav.open { display: flex; }
  .side-nav > a.active::before { left: 0; }
  .content .wrap { padding: 0 16px; }
  .announce { margin: 14px 16px 0; }
  .tiles.four, .tiles.three { grid-template-columns: repeat(2, 1fr); }
  .content .page-head { padding-top: 28px; }
}

.viewas-bar { margin: 18px 40px 0; padding: 12px 18px; border-radius: 12px; background: #f8717122; border: 1px solid #f8717188;
  font-weight: 600; }
.viewas-bar a { margin-left: 8px; }
@media (max-width: 900px) { .viewas-bar { margin: 14px 16px 0; } }

/* admin page */
.admin-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin: 6px 0 18px; }
.admin-head h1 { font-size: 2rem; margin-bottom: 4px; }
.admin-head p { margin: 0; }
.modal-box.wide { max-width: 620px; max-height: 90vh; overflow-y: auto; }
.modal-box select, .form select { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font: inherit; }
.form input[type=datetime-local], .form input[type=number] { width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel2); color: var(--text); font: inherit; color-scheme: dark; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.tiles.four .tile b { font-size: 1.5rem; }

/* plan limits on the dashboard */
.setting-own.locked { opacity: .6; }
.setting-own.locked a { color: var(--accent); }
.plan-usage { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 14px; margin: 6px 0 14px; border: 1px solid var(--border);
  border-radius: 10px; background: #ffffff08; font-size: .92rem; }
.plan-usage.full { border-color: #f59e0b88; background: #f59e0b14; }
.plan-usage .small { flex-basis: 100%; }

/* billing */
.billing-plan.paid { border-color: #14b8a688; box-shadow: 0 0 0 1px #14b8a644, 0 18px 50px #14b8a618; }
.billing-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.billing-head h2 { margin: 0; }
.billing-label { margin: 18px 0 2px; font-size: .85rem; }
.billing-date { font-weight: 700; font-size: 1.05rem; margin: 0 0 12px; }
.billing-row { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 16px; flex-wrap: wrap;
  padding: 10px 0; border-top: 1px solid var(--border); }
.billing-row b { text-align: right; }
.billing-row.inline { display: block; margin: 0; }  /* (plain text: the value right after its label, wrapping like a sentence) */
.billing-row.inline b { text-align: left; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; max-width: 460px; }
.cd-cell { background: var(--panel2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 6px; text-align: center; }
.cd-cell b { display: block; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cd-cell span { color: var(--muted); font-size: .78rem; }
.card-chip { display: inline-block; padding: 3px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border);
  font-size: .85rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.plan-bar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px 28px;
  padding: 16px 22px; margin-bottom: 20px; }
.plan-bar[hidden] { display: none; }
.plan-bar.paid { border-color: #14b8a688; }
.plan-bar-name > div { display: flex; align-items: center; gap: 8px; font-size: 1.25rem; }
.plan-bar-name > span, .plan-bar-use > span { display: block; }
.plan-bar-use b { font-size: 1.25rem; }
.live-left { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--accent); }

/* ===== phones and small tablets ===== */
@media (max-width: 900px) {
  .grid.plans { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; gap: 22px; }
  /* 100dvh: the visible height (100vh on phones counts the part behind the address bar too: the login button was below it) */
  .side-nav.open { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .side-bottom { padding-top: 12px; }
  .admin-site .side-top .badge { margin-left: 6px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .content .section, .content .section.tight { padding: 18px 0 40px; }
  .content .page-head { padding: 22px 0 4px; }
  .lead { font-size: 1.02rem; }
  .card { padding: 16px; border-radius: 14px; }
  .grid { gap: 12px; }
  .grid.two, .grid.three, .grid.four, .grid.guilds { grid-template-columns: minmax(0, 1fr); }
  .stats-grid, .tiles.four, .tiles.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tiles { gap: 8px; }
  .tile { padding: 10px 12px; }
  .tile b { font-size: 1.2rem; }
  .tiles.four .tile b, .tiles.three .tile b { font-size: 1.3rem; }
  .stat { padding: 14px 10px; } .stat-value { font-size: 1.5rem; }
  .hero { padding: 30px 0 20px; }
  .hero-buttons .btn, .page-head .hero-buttons .btn { flex: 1 1 100%; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .block-title { margin: 30px 0 12px; }
  .guide-step { gap: 14px; padding: 16px 0; }
  .step-num { width: 36px; height: 36px; }
  .faq { padding: 14px 16px; }
  .term { font-size: .8rem; padding: 12px 14px; overflow-x: auto; }
  .plan { padding: 20px; }
  .plan-price b { font-size: 2.2rem; }
  .table th, .table td { padding: 10px 12px; }

  /* feature cards: icon next to the title */
  .feature { display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .feature-icon { width: 40px; height: 40px; font-size: 1.3rem; border-radius: 12px; margin: 0; }
  .feature h3 { margin: 0; font-size: 1.05rem; }
  .feature p { grid-column: 1 / -1; margin: 8px 0 0; font-size: .92rem; }

  /* buttons fill the row, two side by side when they fit */
  .actions { gap: 8px; }
  .actions > .btn, .actions > a.btn { flex: 1 1 150px; }
  .btn.big { padding: 13px 20px; width: 100%; }
  .dash-head { align-items: stretch; }
  .dash-head > .btn { width: 100%; }
  .filters { gap: 10px; }
  .filters .search { min-width: 0; flex-basis: 100%; }
  .chips { gap: 6px; }
  .chip { padding: 6px 12px; font-size: .85rem; }
  .guild-icon { width: 48px; height: 48px; border-radius: 14px; }
  .guild-icon.big { width: 60px; height: 60px; border-radius: 16px; font-size: 1.3rem; }
  .guild-header { gap: 12px; margin-bottom: 18px; }

  /* main -> backup: one under the other */
  .flow { flex-direction: column; align-items: stretch; gap: 6px; }
  .flow-link, .flow-item { width: 100%; }
  .flow .mock-arrow { transform: rotate(90deg); align-self: center; font-size: 1.5rem; line-height: 1; }

  /* the log: time above the text */
  .log-list { max-height: 380px; }
  .log-item { flex-direction: column; gap: 2px; padding: 8px 10px; font-size: .86rem; }
  .log-item div { overflow-wrap: anywhere; }
  .report { font-size: .8rem; padding: 12px; max-height: 340px; }
  .setting-own { gap: 12px; }

  /* dialogs */
  .modal { padding: 12px; align-items: end; }
  .modal-box { padding: 18px; max-height: 92vh; overflow-y: auto; }
  .modal-buttons { flex-wrap: wrap; }
  .modal-buttons .btn { flex: 1 1 120px; }
  .toast { bottom: 14px; width: calc(100% - 32px); text-align: center; }

  .announce, .viewas-bar { font-size: .88rem; padding: 10px 14px; }
  .viewas-bar a { display: inline-block; margin: 4px 0 0; }

  /* admin tables: every row becomes a card, the column name on the left */
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .cd-cell b { font-size: 1.35rem; }
  .plan-bar { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; margin-bottom: 14px; }
  .plan-bar-time { grid-column: 1 / -1; grid-row: 2; }
  .plan-bar > .btn { grid-column: 1 / -1; width: 100%; }
  .billing-row b { text-align: left; }
  .admin-table thead { display: none; }
  .table-card:has(.admin-table) { overflow: visible; background: none; border: 0; padding: 0; }
  .admin-table tr { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 6px 14px; margin-bottom: 10px; }
  .admin-table td, .admin-table th { padding: 7px 0; border-bottom: 1px solid #ffffff0d; min-width: 0 !important; }
  .admin-table tr td:last-child { border-bottom: 0; }
  .admin-table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; color: var(--muted); font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
  .admin-table td.empty { text-align: center; }
  .admin-table .cell { min-width: 0; overflow-wrap: anywhere; }
  .admin-actions { white-space: normal; text-align: left; display: flex !important; flex-wrap: wrap; gap: 6px; padding-top: 10px !important; }
  .admin-actions .btn { margin: 0; flex: 1 1 auto; }
  .admin-head h1 { font-size: 1.6rem; }
  .admin-head > .btn { width: 100%; }
  .announce-row { gap: 10px 14px; }
  .form label.inline input { width: 72px; }
}
@media (max-width: 380px) {
  .content .wrap { padding: 0 12px; }
  .side { padding: 10px 12px; }
  .card { padding: 14px; }
  .tiles:not(.four):not(.three) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tile span { font-size: .74rem; }
  .brand { font-size: 1.05rem; }
}

/* ======================================================================================
   CloneSync design v2 - colours from the logo (teal -> green on green-tinted charcoal)
   ====================================================================================== */
:root {
  --brand: linear-gradient(135deg, #14b8a6 0%, #22c55e 100%);
  --surface: linear-gradient(180deg, #0f1817 0%, #0c1312 100%);
  --line: #1b2725; --line2: #2a4a43; --hi: inset 0 1px 0 #ffffff08;
}
body { font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background-color: #060a09; background-image: radial-gradient(1000px 520px at 78% -160px, #14b8a624, transparent 70%),
    radial-gradient(760px 420px at 18% -120px, #22c55e12, transparent 70%); background-repeat: no-repeat; }
h1, h2 { letter-spacing: -.035em; font-weight: 800; }
h3 { letter-spacing: -.015em; }
::selection { background: #14b8a655; color: #fff; }
.gradient { background: linear-gradient(90deg, #2dd4bf, #4ade80); -webkit-background-clip: text; background-clip: text; color: transparent; }
.content .wrap { max-width: 1180px; margin: 0 auto; padding: 0 48px; }

/* surfaces */
.card, .faq, .stats-grid .stat, .tile, .step3 { background: var(--surface); border-color: var(--line); box-shadow: var(--hi); }
.tile { background: #111a19; }
.card.feature:hover, .guild-card:hover { border-color: var(--line2); box-shadow: var(--hi), 0 18px 40px -22px #14b8a666; }
.table th, .table td { border-bottom-color: var(--line); }
.table th { color: #6f8983; }

/* buttons */
.btn { border-radius: 11px; letter-spacing: -.005em; }
.btn.primary { background: var(--brand); color: #03201a; box-shadow: inset 0 1px 0 #ffffff45, 0 8px 24px -8px #14b8a6cc; }
.btn.primary:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 #ffffff55, 0 12px 30px -8px #22c55ecc; }
.btn.ghost { background: #ffffff05; border-color: #22322f; }
.btn.ghost:hover { background: #ffffff0a; border-color: var(--line2); }
.search:focus, .form input:focus, .form select:focus, .form textarea:focus, .modal-box select:focus {
  outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px #14b8a62e; }

/* sidebar */
.side { background: #070c0b; border-right-color: #16211f; }
.app { background: linear-gradient(90deg, #070c0b 251px, #16211f 251px, #16211f 252px, transparent 252px); }
.brand { font-size: 1.12rem; letter-spacing: -.02em; }
.brand-logo { width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 6px 20px -6px #14b8a6bb; }
.side-label { color: #4f6661; }
.side-nav > a { color: #93aaa4; }
.side-nav > a:hover { background: #ffffff06; }
.side-nav > a.active { background: linear-gradient(90deg, #14b8a624, #14b8a605); color: #f0fdfa; box-shadow: inset 0 0 0 1px #14b8a62a; }
.side-nav > a.active::before { background: var(--brand); }
.side-user { background: #0d1413; border-color: var(--line); }

/* page heads */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #14b8a614;
  border: 1px solid #14b8a640; color: #5eead4; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 18px; }
.content .page-head { padding: 56px 0 8px; }
.page-head h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; flex: none; animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 #22c55e99; } 70% { box-shadow: 0 0 0 8px #22c55e00; } 100% { box-shadow: 0 0 0 0 #22c55e00; } }
.kicker { color: #2dd4bf; }

/* home: hero */
.hero2 { padding: 64px 0 30px; }
.hero2-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero2 h1 { font-size: clamp(2.4rem, 4vw, 3.5rem); line-height: 1.04; letter-spacing: -.045em; margin-bottom: 20px; }
.hero2 .lead { font-size: 1.12rem; }
.trust { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: #a9bfb9; font-size: .92rem; }
.trust li { display: flex; align-items: center; gap: 8px; }
.trust svg { width: 18px; height: 18px; color: #34d399; flex: none; }
.trust.col { flex-direction: column; margin-top: 18px; }

/* home: product window */
.mock { background: linear-gradient(180deg, #0e1716, #0a1110); border: 1px solid #1f2e2b; border-radius: 18px; overflow: hidden;
  box-shadow: 0 30px 80px -30px #000, 0 0 0 1px #ffffff05, 0 0 90px -20px #14b8a63a; }
.mk-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #1a2725; background: #0b1312; }
.mk-bar span { width: 11px; height: 11px; border-radius: 50%; background: #1f2e2b; }
.mk-bar b { margin-left: 10px; font-size: .8rem; color: #8ea6a0; font-weight: 600; }
.mk-body { display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr); padding: 18px 18px 14px; }
.mk-col { background: #0c1413; border: 1px solid #1a2725; border-radius: 14px; padding: 12px; min-width: 0; }
.mk-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .86rem; white-space: nowrap; }
.mk-head i { font-style: normal; width: 26px; height: 26px; border-radius: 8px; background: #14b8a633; color: #5eead4; display: grid;
  place-items: center; font-size: .64rem; flex: none; }
.mk-head i.b { background: #22c55e2b; color: #86efac; }
.mk-head em { font-style: normal; margin-left: auto; font-size: .62rem; padding: 2px 8px; border-radius: 99px; background: #14b8a622;
  color: #5eead4; text-transform: uppercase; letter-spacing: .06em; }
.mk-head em.b { background: #22c55e22; color: #86efac; }
.mk-chan { color: #5b726c; font-size: .74rem; margin: 10px 0 8px; font-weight: 700; }
.mk-chat { display: grid; gap: 10px; }
.mk-msg { display: flex; gap: 8px; font-size: .77rem; line-height: 1.4; min-width: 0; }
.mk-msg > div { min-width: 0; }
.mk-msg i { font-style: normal; flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  color: #04201a; font-weight: 800; font-size: .66rem; }
.mk-msg b { display: block; font-size: .73rem; color: #e8f1ef; }
.mk-msg span { color: #9fb5af; }
.mk-img { display: block; width: 100%; max-width: 130px; height: 52px; border-radius: 8px; margin-top: 3px;
  background: radial-gradient(circle at 30% 35%, #fef08a 0 6px, transparent 7px), linear-gradient(160deg, #14b8a666, #22c55e33 60%, #0c1413); }
.mk-chat.copy .mk-msg { animation: copyin 9s infinite both; }
.mk-chat.copy .mk-msg:nth-child(2) { animation-delay: .9s; }
.mk-chat.copy .mk-msg:nth-child(3) { animation-delay: 1.8s; }
@keyframes copyin { 0%, 6% { opacity: 0; transform: translateX(-12px); } 13%, 84% { opacity: 1; transform: none; } 92%, 100% { opacity: 0; transform: none; } }
.mk-sync { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; }
.mk-sync span { width: 18px; height: 3px; border-radius: 3px; background: var(--brand); animation: flow 1.2s infinite ease-in-out; }
.mk-sync span:nth-child(2) { animation-delay: .2s; } .mk-sync span:nth-child(3) { animation-delay: .4s; }
@keyframes flow { 0% { opacity: .15; transform: translateX(-7px); } 50% { opacity: 1; } 100% { opacity: .15; transform: translateX(7px); } }
.mk-foot { padding: 0 18px 18px; }
.mk-progress { height: 6px; border-radius: 6px; background: #ffffff0d; overflow: hidden; }
.mk-progress div { width: 100%; height: 100%; background: var(--brand); }
.mk-status { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: .8rem; font-weight: 700; color: #86efac; }
.mk-time { margin-left: auto; color: #5b726c; font-weight: 500; }

/* home: numbers, sections */
.stats-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--hi); }
.stats-bar > div { padding: 20px 24px; border-left: 1px solid var(--line); min-width: 0; }
.stats-bar > div:first-child { border-left: 0; }
.stats-bar b { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #f0fdfa, #5eead4); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stats-bar span { color: var(--muted); font-size: .85rem; }
.section-head { text-align: center; max-width: 680px; margin: 88px auto 30px; }
.section-head .kicker { display: block; margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); margin-bottom: 10px; }
.section-head p { margin: 0; }
.ficon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; color: #5eead4;
  background: linear-gradient(135deg, #14b8a62b, #22c55e12); border: 1px solid #14b8a640; box-shadow: inset 0 1px 0 #ffffff10; }
.ficon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.07rem; margin-bottom: 6px; }
.feature p { margin: 0; font-size: .94rem; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step3 { border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: relative; }
.step3-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #03201a;
  font-weight: 800; margin-bottom: 16px; box-shadow: 0 8px 20px -6px #14b8a6aa; }
.step3 h3 { font-size: 1.07rem; }
.step3 p { margin: 0; }
.step3:not(:last-child)::after { content: ""; position: absolute; top: 41px; right: -18px; width: 18px; height: 2px;
  background: linear-gradient(90deg, #14b8a6, #22c55e00); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 40px; align-items: center; padding: 36px; margin-top: 88px; }
.split h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.term { background: #040807; border-color: var(--line); border-left-color: #14b8a6; color: #c3d6d1; }
.t-dim { color: #5b726c; } .t-acc { color: #5eead4; } .t-ok { color: #86efac; }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: #5eead4; font-weight: 700; font-size: 1.25rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq[open] { border-color: var(--line2); }
.cta-band { margin-top: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; padding: 40px;
  border-radius: 20px; border: 1px solid #14b8a644; background: radial-gradient(600px 220px at 0% 0%, #14b8a633, transparent),
  radial-gradient(500px 220px at 100% 100%, #22c55e26, transparent), #0c1413; }
.cta-band h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-bottom: 8px; max-width: 560px; }
.cta-band p { margin: 0; }
.cta-band .hero-buttons { margin: 0; }

/* pricing */
.plan.featured { border-color: #14b8a6; box-shadow: 0 0 0 1px #14b8a6, 0 24px 60px -24px #14b8a688; }
.plan-flag { background: var(--brand); color: #03201a; }
.plan-price b { letter-spacing: -.04em; }

@media (max-width: 900px) {
  .content .wrap { padding: 0 16px; }
  .app { background: none; }
  .hero2 { padding: 34px 0 10px; }
  .hero2-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .steps3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .step3:not(:last-child)::after { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); padding: 22px; gap: 22px; }
}
@media (max-width: 640px) {
  .content .page-head { padding: 24px 0 4px; }
  .hero2 h1 { font-size: clamp(2.1rem, 10vw, 2.6rem); }
  .hero2 .lead { font-size: 1rem; }
  .trust { flex-direction: column; gap: 8px; }
  .stats-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-bar > div { padding: 14px 16px; }
  .stats-bar > div:nth-child(3) { border-left: 0; }
  .stats-bar > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .stats-bar b { font-size: 1.45rem; }
  .section-head { margin: 54px auto 20px; }
  .split, .cta-band { margin-top: 54px; }
  .cta-band { padding: 24px; }
  .cta-band > div, .cta-band .hero-buttons { width: 100%; }  /* (the buttons as wide as the box: in the middle, not to the left) */
  .cta-band .hero-buttons .btn { flex: 1 1 100%; }
  .feature .ficon { width: 40px; height: 40px; margin: 0; }
  .step3 { padding: 18px; }
  .mk-body { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); padding: 12px 12px 10px; }
  .mk-col { padding: 8px; border-radius: 10px; }
  .mk-head { font-size: .72rem; gap: 6px; }
  .mk-head i { width: 20px; height: 20px; font-size: .55rem; border-radius: 6px; }
  .mk-head em { display: none; }
  .mk-msg { font-size: .68rem; gap: 6px; }
  .mk-msg i { width: 18px; height: 18px; font-size: .55rem; }
  .mk-msg b { font-size: .66rem; }
  .mk-sync span { width: 12px; }
  .mk-foot { padding: 0 12px 12px; }
  .mk-bar b { font-size: .72rem; }
}
@media (max-width: 380px) {
  .content .wrap { padding: 0 12px; }
  .mk-time { display: none; }
}
.card.skeleton { background: linear-gradient(90deg, #0d1413 25%, #141e1c 50%, #0d1413 75%); background-size: 200% 100%; }
.hero2 .btn.big { padding: 13px 22px; font-size: 1rem; }
@media (max-width: 640px) {
  .eyebrow { font-size: .66rem; letter-spacing: .06em; padding: 5px 10px; }
  .mk-time { display: none; }
}
.form input[type=file]::file-selector-button { background: #ffffff08; border: 1px solid #22322f; color: var(--text); padding: 7px 12px;
  border-radius: 9px; font: inherit; font-size: .85rem; font-weight: 600; margin-right: 10px; cursor: pointer; }
.form input[type=file]::file-selector-button:hover { border-color: var(--line2); background: #ffffff0d; }
input[type=checkbox], input[type=radio] { accent-color: #14b8a6; }
.locked-card { border-style: dashed; }
.locked-card h3 { color: #c3d6d1; }

/* ======================================================================================
   Admin console v2
   ====================================================================================== */
.admin-site .content .wrap { max-width: 1320px; padding: 0 36px; }
.admin-page { padding: 26px 0 64px; }
.admin-site .side-nav > a { padding: 8px 12px; font-size: .93rem; }
.admin-site .side-label { padding-top: 14px; }
/* admin menu: only the number next to the item (no circle around it) */
.admin-site .nav-count { margin-left: auto; font-style: normal; font-size: .8rem; font-weight: 700; color: #a9bfb9; background: none; padding: 0;
  border-radius: 0; min-width: 0; height: auto; display: inline; }
.admin-site .nav-count.warn { color: #fde68a; }
.admin-site .nav-count.bad { color: #fca5a5; }
.admin-site .nav-count.alert { color: #fbbf24; font-size: 1rem; line-height: 1; }
.admin-site .nav-count[hidden] { display: none; }
.side-user small { display: block; color: var(--muted); font-size: .72rem; font-weight: 600; }

/* top bar */
.topbar2 { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 16px; padding: 12px 36px;
  background: #060a09d9; backdrop-filter: blur(12px); border-bottom: 1px solid #16211f; }
.tb-search { position: relative; flex: 1; max-width: 520px; }
.tb-search > svg { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: #6f8983; }
.tb-search input { width: 100%; padding: 9px 70px 9px 38px; border-radius: 10px; border: 1px solid var(--line); background: #0c1312;
  color: var(--text); font: inherit; font-size: .92rem; }
.tb-search input:focus { outline: none; border-color: #14b8a6; box-shadow: 0 0 0 3px #14b8a62e; }
.tb-search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-family: inherit; font-size: .7rem; font-weight: 600; line-height: 1; color: #6f8983;
  border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: #0a100f; }
.tb-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #0d1413; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 20px 50px -10px #000; padding: 6px; z-index: 30; max-height: 70vh; overflow-y: auto; }
.tb-results[hidden] { display: none; }
.sr-item { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; color: var(--text); }
.sr-item:hover, .sr-item:focus { background: #14b8a614; text-decoration: none; }
.sr-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-type { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #5eead4; }
.sr-empty { padding: 10px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.tb-status { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: #0c1312; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #6f8983; margin-right: 6px; vertical-align: middle; }
.tb-status .status-dot { margin: 0; }
.status-dot.ok { background: #34d399; box-shadow: 0 0 10px #34d39999; }
.status-dot.bad { background: #f87171; box-shadow: 0 0 10px #f8717199; }

/* page header, toolbar */
.page-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-header h1 { font-size: 1.75rem; margin: 0 0 4px; letter-spacing: -.03em; }
.page-header p { margin: 0; font-size: .93rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 22px 0 14px; }
.toolbar .search { margin: 0; max-width: 320px; padding: 9px 14px; font-size: .92rem; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: #0b1211; border: 1px solid var(--line); flex-wrap: wrap; }
.seg-btn { border: 0; background: none; color: #93aaa4; font: inherit; font-size: .86rem; font-weight: 600; padding: 6px 12px; border-radius: 8px;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-btn em { font-style: normal; font-size: .72rem; color: #6f8983; background: #ffffff0a; padding: 0 6px; border-radius: 99px; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: #14b8a61f; color: #f0fdfa; box-shadow: inset 0 0 0 1px #14b8a640; }
.seg-btn.active em { color: #99f6e4; background: #14b8a62a; }

/* KPI, panels */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi-sub { font-size: .8rem; color: #6f8983; overflow-wrap: anywhere; }  /* (e.g. "data/user_*/mentesek" in a narrow phone card) */
.kpi-sub.up { color: #6ee7b7; } .kpi-sub.down { color: #fca5a5; } .kpi-sub.warn { color: #fde68a; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.grid-1-1 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
.stack { display: grid; gap: 14px; min-width: 0; }
.panel { padding: 18px 20px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.panel-head h3 { margin: 0; font-size: 1rem; }
.empty-state { text-align: center; padding: 22px 10px; color: var(--muted); }
.empty-state p { margin: 6px 0 0; }
.empty-icon { width: 34px; height: 34px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: #14b8a61a; color: #5eead4; font-weight: 800; }

/* pills, plan tags, entities */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 99px;
  white-space: nowrap; background: #ffffff0d; color: #a9bfb9; margin: 0; }  /* (margin: the old hero pill above had 18px below) */
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.ok { background: #34d3991c; color: #6ee7b7; } .pill.warn { background: #fbbf241c; color: #fcd34d; }
.pill.bad { background: #f871711f; color: #fca5a5; } .pill.info { background: #2dd4bf1a; color: #5eead4; }
.plan-tag { display: inline-block; font-size: .74rem; font-weight: 800; padding: 3px 9px; border-radius: 7px; letter-spacing: .02em;
  border: 1px solid #ffffff14; color: #a9bfb9; white-space: nowrap; }
/* the plans: Free blue, Silver silver (a cool metal), Gold gold - one colour each, the same everywhere */
.plan-tag.free { color: #7dd3fc; border-color: #38bdf855; background: #38bdf814; }
.plan-tag.silver { color: #e5e7eb; border-color: #cbd5e166; background: linear-gradient(135deg, #e2e8f01f, #94a3b80f); }
.plan-tag.gold { color: #fcd34d; border-color: #f59e0b66; background: linear-gradient(135deg, #fbbf2426, #f59e0b0f); }
/* the plan's name in its own colour (like its tag): Pricing, Előfizetés, the plan bar of the dashboard */
.plan-name.free { color: #7dd3fc; }
.plan-name.silver { color: #e5e7eb; }
.plan-name.gold { color: #fcd34d; }
.plan-tag.expired { color: #fca5a5; border-color: #f8717140; }
.entity { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
a.entity:hover { text-decoration: none; } a.entity:hover b { color: #5eead4; }
.entity .guild-icon { width: 32px; height: 32px; border-radius: 9px; font-size: .7rem; }
.cell-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.cell-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mono-sm { font: .76rem ui-monospace, "Cascadia Mono", Consolas, monospace; }
.av { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; object-fit: cover;
  background: linear-gradient(135deg, #14b8a640, #22c55e26); color: #ccfbf1; font-weight: 800; font-size: .72rem; }
.av.xl { width: 64px; height: 64px; font-size: 1.3rem; }
.usage { display: flex; align-items: center; gap: 10px; }
.usage b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-progress { flex: 1; min-width: 60px; max-width: 120px; height: 6px; border-radius: 6px; background: #ffffff0d; overflow: hidden; }
.mini-progress div { height: 100%; background: #14b8a6; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.bad-text { color: #fca5a5; }
.ok-text { color: #6ee7b7; }
.warn-text { color: #fde68a; }
.auto-field { background: #ffffff08 !important; color: var(--text); cursor: default; border-style: dashed !important; }
.ban-cell { display: grid; gap: 2px; min-width: 150px; max-width: 240px; overflow-wrap: anywhere; }
.pair { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pair-arrow { color: #5eead4; font-weight: 700; flex: none; }
.chev { color: #4f6661; font-size: 1.3rem; line-height: 1; }

/* tables */
.admin-site .table th { font-size: .74rem; padding: 11px 16px; background: #0a100f; }
.admin-site .table td { padding: 12px 16px; vertical-align: middle; }
.admin-site .admin-table td:nth-child(-n+2) { min-width: 0; }
.row-link { cursor: pointer; }
.row-link:hover td { background: #14b8a60a; }
.admin-actions { white-space: nowrap; text-align: right; }
.admin-actions .btn { margin-left: 6px; }

/* charts */
.chart-wrap { width: 100%; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: #ffffff0f; stroke-width: 1; }
.chart .axis { stroke: #ffffff26; stroke-width: 1; }
.chart .tick { fill: #6f8983; font-size: 11px; font-family: inherit; }
.chart .bar { fill: #14b8a6; opacity: .75; }
.chart .bar.current { opacity: 1; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover { fill: #ffffff08; }
.chart-tip { position: fixed; z-index: 70; pointer-events: none; background: #0d1413; border: 1px solid var(--line2); border-radius: 10px;
  padding: 8px 12px; box-shadow: 0 12px 30px -8px #000; display: grid; gap: 2px; font-size: .85rem; }
.chart-tip[hidden] { display: none; }
.hbars { display: grid; gap: 16px; }
.hbar-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; font-size: .9rem; }
.hbar-top b { margin-left: auto; font-variant-numeric: tabular-nums; }
.hbar-top .muted { width: 40px; text-align: right; font-size: .8rem; }
.hbar-track { height: 8px; border-radius: 8px; background: #ffffff0a; overflow: hidden; }
.hbar-track div { height: 100%; background: #14b8a6; border-radius: 8px; }

/* alerts, feed, health */
.alert-list { display: grid; gap: 6px; }
.alert-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #ffffff05; color: var(--text);
  border: 1px solid transparent; font-size: .92rem; }
.alert-item:hover { text-decoration: none; border-color: var(--line2); }
.alert-item .chev { margin-left: auto; }
.alert-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.alert-item.bad .alert-dot { background: #f87171; } .alert-item.warn .alert-dot { background: #fbbf24; } .alert-item.info .alert-dot { background: #2dd4bf; }
.feed { display: grid; gap: 0; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #ffffff08; font-size: .9rem; }
.feed-item:last-child { border-bottom: 0; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; background: #6f8983; }
.feed-dot.payment { background: #34d399; } .feed-dot.audit { background: #2dd4bf; }
.health-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.health-item { display: grid; gap: 2px; padding: 4px 0; min-width: 0; }
.health-item b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.health-item b.ok { color: #6ee7b7; } .health-item b.bad { color: #fca5a5; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 16px; }
.tab { padding: 10px 14px; color: #93aaa4; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: #f0fdfa; border-bottom-color: #14b8a6; }
.tab em { font-style: normal; font-size: .72rem; padding: 0 7px; border-radius: 99px; background: #f8717126; color: #fecaca; }

/* user detail */
.detail-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px; margin-bottom: 14px; }
.detail-title { flex: 1; min-width: 200px; }
.detail-title h1 { font-size: 1.6rem; margin: 0 0 6px; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.icon-btn { background: #ffffff08; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; width: 30px; height: 30px; cursor: pointer;
  display: inline-grid; place-items: center; font: inherit; }
.icon-btn:hover { color: var(--text); border-color: var(--line2); }
.dl { display: grid; }
.dl-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid #ffffff08; font-size: .93rem; }
.dl-row:last-child { border-bottom: 0; }
.mirror-list, .mini-table { display: grid; gap: 8px; }
.mirror-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; padding: 12px 14px;
  border-radius: 12px; background: #ffffff04; border: 1px solid #ffffff08; }
.row-actions { display: flex; gap: 6px; }
.mini-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid #ffffff08; }
.mini-row:last-child { border-bottom: 0; }
.mini-table .mini-row:has(> :nth-child(2):last-child) { grid-template-columns: minmax(0, 1fr) auto; }
/* a label over / next to a long text (the :has() rule above would squeeze the label to 0 px) */
.mini-table .mini-row.preset-row:has(> b + :last-child) { grid-template-columns: minmax(130px, 180px) minmax(0, 1fr); align-items: start; }
@media (max-width: 640px) { .mini-table .mini-row.preset-row:has(> b + :last-child) { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* dialogs */
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.modal-head h3 { margin: 0; }
.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.admin-site .modal-buttons { margin-top: 18px; }

@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-1 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .admin-site .content .wrap { padding: 0 16px; }
  .topbar2 { padding: 10px 16px; top: 0; position: relative; }
  .tb-updated { display: none; }
  .tb-search kbd { display: none; }
  .tb-search input { padding-right: 12px; }
}
@media (max-width: 640px) {
  .admin-page { padding: 16px 0 40px; }
  .topbar2 { flex-wrap: wrap; gap: 10px; }
  .tb-search { max-width: none; flex-basis: 100%; order: 2; }
  .tb-right { margin-left: 0; }
  .page-header h1 { font-size: 1.45rem; }
  .page-actions { width: 100%; }
  .page-actions > .btn { flex: 1 1 auto; }
  .kpi { padding: 14px; } .kpi-value { font-size: 1.3rem; }
  .health-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { margin: 16px 0 12px; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .seg { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg-btn { white-space: nowrap; }
  .panel { padding: 16px; }
  .dl-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .mirror-row { grid-template-columns: minmax(0, 1fr); }
  .pair { flex-direction: column; align-items: flex-start; gap: 4px; }
  .pair-arrow { transform: rotate(90deg); margin-left: 10px; }
  .mini-row { grid-template-columns: minmax(0, 1fr) auto; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-head { padding: 16px; }
  .detail-head .page-actions .btn { flex: 1 1 140px; }
  .admin-actions .btn { margin: 0; }
  .admin-table .chev { display: none; }
}
.mirror-row .pair { flex: 1 1 100%; }
.mirror-row .usage { flex: 1 1 200px; }
.mirror-row .mini-progress { max-width: none; }
.admin-site .admin-table .cell { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 3px; min-width: 0; }
.admin-site .admin-table .cell > .entity, .admin-site .admin-table .cell > .usage, .admin-site .admin-table .cell > .pair { align-self: stretch; }
.admin-site .admin-table td.num, .admin-site .admin-table td:first-child > .cell > b { white-space: nowrap; }
.admin-site .admin-table td .cell > b, .admin-site .admin-table td .cell > span:only-child { white-space: nowrap; }
.wide-check { display: grid; gap: 4px; }
.wide-check .check { color: var(--text); }
.kpi-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.form-grid > label { align-content: start; }
.form input:disabled { opacity: .45; cursor: not-allowed; }
.legal { max-width: 900px; }
.legal h3 { margin-top: 28px; }
.legal .table { margin: 10px 0 6px; font-size: .9rem; }
.legal .table td { vertical-align: top; }
@media (max-width: 640px) { .legal .table, .legal .table tbody, .legal .table tr, .legal .table td { display: block; width: 100%; }
  .legal .table thead { display: none; } .legal .table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .legal .table td { border: 0; padding: 3px 0; } .legal .table td:first-child { font-weight: 700; } }

/* ---- phones: the header is only as tall as it needs, login pages fit the screen exactly ---- */
.app { min-height: 100dvh; }
.login-box code, .narrow code { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .app { grid-template-rows: auto 1fr; align-content: start; }
  .side { z-index: 20; }
  .content { display: flex; flex-direction: column; min-height: 0; }
  .content > main:has(> .login-box) { flex: 1; display: flex; flex-direction: column; justify-content: center; }
  .login-box { padding: 24px 20px 40px; margin: 0 auto; width: 100%; }
}
@media (max-width: 900px) { .app:has(.login-box) .side { border-bottom-color: transparent; } }

/* ---- sortable admin tables ---- */
.admin-table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.admin-table th.sortable:hover { color: var(--text); }
.admin-table th.sorted { color: var(--accent); }
.admin-table th .sort-mark { opacity: .45; font-size: .85em; }
.admin-table th.sorted .sort-mark { opacity: 1; }
.sort-select { display: none; }
@media (max-width: 640px) {
  .sort-select { display: block; flex-basis: 100%; width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border);
    background: var(--panel); color: var(--text); font: inherit; font-size: .92rem; }
}

/* ---- admin: one mirror in depth ---- */
.feed-dot.bad { background: #f87171; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 120px; max-width: 260px; overflow-wrap: break-word; }
.card.notice { padding: 14px 18px; margin: 14px 0; font-size: .92rem; }
.card.notice.warn { border-color: #f59e0b55; background: linear-gradient(90deg, #f59e0b14, transparent); }
.help-dl .dl-row { grid-template-columns: 230px minmax(0, 1fr); }
.admin-site .detail-head .detail-title .pair { flex-wrap: wrap; }
@media (max-width: 640px) { .help-dl .dl-row { grid-template-columns: minmax(0, 1fr); } .clamp { max-width: none; } }
.channel-actions { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px; justify-content: end; margin-left: auto; }
.channel-actions .btn { white-space: nowrap; }
.help-box { padding: 0; margin: 14px 0; }
.help-box > summary { cursor: pointer; padding: 16px 20px; font-weight: 700; list-style: none; }
.help-box > summary::-webkit-details-marker { display: none; }
.help-box > summary::after { content: " ▾"; color: var(--muted); }
.help-box[open] > summary::after { content: " ▴"; }
.help-box > .dl { padding: 0 20px 14px; }
.snap-jobs-box > :not(summary) { margin: 0 20px 16px; }
@media (max-width: 640px) { .channel-actions { display: flex; flex-wrap: wrap; justify-content: flex-start; } .clamp { min-width: 0; } }
.admin-site .table-card { overflow-x: auto; }

/* ---- admin: deeper debugging (diagnosis, log, channel inspection) ---- */
.tabs .tab-side { margin-left: auto; align-self: center; }
.sort-select.show { display: block; width: auto; flex-basis: auto; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font: inherit; font-size: .9rem; }
.checks { display: grid; gap: 10px; }
.check-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px;
  border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.check-row.bad { border-color: #f8717155; background: linear-gradient(90deg, #f8717112, var(--panel) 40%); }
.check-row.warn { border-color: #f59e0b44; background: linear-gradient(90deg, #f59e0b10, var(--panel) 40%); }
.check-icon { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }
.check-icon.ok { background: #10b98122; color: #34d399; } .check-icon.info { background: #38bdf822; color: #7dd3fc; }
.check-icon.warn { background: #f59e0b22; color: #fbbf24; } .check-icon.bad { background: #f8717122; color: #fca5a5; }
.check-body { min-width: 0; display: grid; gap: 4px; }
.check-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; align-items: center; }
.chip-sm { font-size: .78rem; padding: 2px 8px; border-radius: 999px; background: #ffffff0d; border: 1px solid var(--border); color: var(--muted); }
.log-box { padding: 8px 0; max-height: 70vh; overflow: auto; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; }
.log-line { display: grid; grid-template-columns: 74px 46px minmax(0, 1fr); gap: 10px; padding: 4px 16px; border-bottom: 1px solid #ffffff06; }
.log-line.bad { background: #f871710d; } .log-line.warn { background: #f59e0b0a; }
.log-time { color: var(--muted); } .log-level { font-weight: 700; } .log-level.bad { color: #fca5a5; } .log-level.warn { color: #fbbf24; }
.log-level.none { color: #5b726c; } .log-text { overflow-wrap: anywhere; white-space: pre-wrap; }
.clamp.wide { max-width: 340px; min-width: 0; }
@media (max-width: 640px) {
  .check-row { grid-template-columns: 30px minmax(0, 1fr); } .check-row > .btn { grid-column: 1 / -1; }
  .log-line { grid-template-columns: 64px minmax(0, 1fr); } .log-line .log-level { display: none; }
  .tabs { flex-wrap: wrap; } .tabs .tab-side { margin-left: 0; }
}

/* ==== admin on phones: compact cards, bottom navigation, one-line top bar ==== */
.bottom-nav { display: none; }
@media (max-width: 640px) {
  /* top bar: the search and the status next to each other */
  .admin-site .topbar2 { flex-wrap: nowrap; gap: 8px; padding: 8px 12px; }
  .admin-site .tb-search { order: 0; flex: 1 1 auto; flex-basis: auto; }
  .admin-site .tb-search input { padding: 8px 10px 8px 34px; font-size: .9rem; }
  .admin-site .tb-right { gap: 0; }
  .admin-site .tb-status { padding: 6px 9px; font-size: .78rem; }
  .admin-site .tb-updated { display: none; }

  /* every table row: a compact card - the first cell on top, the rest two by two, the buttons at the bottom */
  .admin-site .admin-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; row-gap: 10px;
    padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; }
  .admin-site .admin-table td { padding: 0; border: 0; width: auto; }
  .admin-site .admin-table td:first-child { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid #ffffff0d; }
  .admin-site .admin-table td:first-child::before { display: none !important; }
  .admin-site .admin-table td.admin-actions { grid-column: 1 / -1; padding-top: 2px !important; }
  .admin-site .admin-table td.admin-actions:not(:has(.btn)) { display: none !important; }
  .admin-site .admin-table td.is-empty { display: none !important; }
  .admin-site .admin-table td[data-label]:not([data-label=""])::before { font-size: .62rem; margin-bottom: 3px; letter-spacing: .06em; }
  .admin-site .admin-table td .cell { gap: 2px; }
  .admin-site .admin-table td .mini-progress { width: 100%; }
  .admin-site .admin-table tr.row-link { position: relative; }
  .admin-site .admin-table tr.row-link::after { content: "›"; position: absolute; right: 14px; top: 14px; color: #5b726c; font-size: 1.3rem; }
  .admin-site .admin-actions .btn { flex: 1 1 auto; }
  .channel-actions { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .channel-actions .btn { width: 100%; }

  /* bottom navigation */
  .admin-site .bottom-nav, .has-bottom-nav .bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: auto; justify-content: space-around; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: #070c0bf2; backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; border: 0; background: none;
    color: #7b928c; font: inherit; font-size: .66rem; font-weight: 600; text-decoration: none; border-radius: 10px; cursor: pointer; }
  .bottom-nav svg { width: 21px; height: 21px; }
  .bottom-nav a, .bottom-nav button { white-space: nowrap; min-width: 0; }  /* (each as wide as its label: „Felhasználók” fits a 320 px phone too) */
  .bottom-nav a.active { color: #5eead4; }
  .bottom-nav a.active svg { filter: drop-shadow(0 0 6px #14b8a666); }
  .admin-site .content, .has-bottom-nav .content { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .admin-site .toast, .has-bottom-nav .toast { bottom: calc(78px + env(safe-area-inset-bottom)); }

  /* smaller details */
  .admin-site .page-header { margin-bottom: 4px; }
  .admin-site .page-header p { font-size: .88rem; }
  .admin-site .kpi-grid { gap: 8px; }
  .admin-site .kpi-label { font-size: .72rem; }
  .admin-site .tabs { overflow-x: auto; flex-wrap: nowrap; }
  .admin-site .tabs .tab { white-space: nowrap; padding: 10px 10px; }
  .admin-site .tabs .tab-side { margin-left: 8px; white-space: nowrap; }
}
@media (max-width: 640px) {
  /* channel list of a mirror: a channel that is fine needs no buttons here (tap it: the inspection has them) */
  .admin-site .admin-table tr.state-ok td.admin-actions, .admin-site .admin-table tr.state-waiting td.admin-actions,
  .admin-site .admin-table tr.state-partial td.admin-actions { display: none !important; }
  .admin-site .admin-table tr[class*="state-"] td:first-child { padding-bottom: 8px; }
  /* label and value side by side in the detail cards */
  .admin-site .dl-row { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 10px; padding: 9px 0; }
  .admin-site .help-dl .dl-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .admin-site .detail-head .page-actions .btn { flex: 1 1 calc(50% - 6px); font-size: .82rem; padding: 8px 8px; }
}
@media (max-width: 640px) {
  .admin-site .entity .mono-sm, .admin-site .cell-text .mono-sm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
  .admin-site .entity .cell-text { min-width: 0; }
}

/* ---- dashboard server page on phones: tabs, one part at a time ---- */
.mob-tabs { display: none; }
@media (max-width: 640px) {
  .mob-tabs { display: flex; gap: 4px; padding: 4px; margin: 4px 0 14px; border-radius: 12px; background: #0b1211; border: 1px solid var(--line);
    position: sticky; top: 64px; z-index: 12; overflow-x: auto; }
  .mob-tab { flex: 1 0 auto; border: 0; background: none; color: #93aaa4; font: inherit; font-size: .86rem; font-weight: 700; padding: 9px 10px;
    border-radius: 9px; cursor: pointer; white-space: nowrap; }
  .mob-tab.active { background: #14b8a61f; color: #f0fdfa; box-shadow: inset 0 0 0 1px #14b8a640; }
  [data-guild-view][data-tab="state"] [data-tab]:not([data-tab="state"]),
  [data-guild-view][data-tab="log"] [data-tab]:not([data-tab="log"]),
  [data-guild-view][data-tab="settings"] [data-tab]:not([data-tab="settings"]),
  [data-guild-view][data-tab="profile"] [data-tab]:not([data-tab="profile"]) { display: none; }
  [data-guild-view] .panel-grid > div:empty { display: none; }
  .has-bottom-nav .side-bottom { padding-bottom: 8px; }
  /* the opened menu ends above the bottom bar, so scrolling it to its end shows Kilépés */
  .admin-site .side-nav.open, .has-bottom-nav .side-nav.open { max-height: calc(100dvh - 64px - 70px - env(safe-area-inset-bottom)); }
}
@media (max-width: 640px) {
  [data-guild-view] .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  [data-guild-view] .tiles .tile { padding: 10px; }
  [data-guild-view] .tiles .tile b { font-size: 1.1rem; }
  [data-guild-view] .tiles .tile span { font-size: .72rem; }
}

/* ---- admin: choosing users for a DM ---- */
.check-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.row-check { width: 18px; height: 18px; accent-color: #14b8a6; flex: none; cursor: pointer; }
.admin-table tr.chosen td { background: #14b8a60d; }
.select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 12px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.select-bar.on { border-style: solid; border-color: #14b8a655; background: #14b8a60d; }
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 640px) { .select-bar > .btn { flex: 1 1 auto; } }

/* ---- admin: support team, permissions, notes, "what to tell the customer" ---- */
.perm-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0 10px; }
.perm-head .row-actions { margin-left: auto; }
.perm-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; max-height: 52vh; overflow: auto; padding-right: 4px; }
.perm-group { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #0b1211; display: grid; gap: 6px; align-content: start; }
.perm-group-head { display: flex; align-items: center; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid #ffffff0d; cursor: pointer; }
.perm-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; align-items: start; cursor: pointer; padding: 3px 0; }
.perm-item span { display: grid; gap: 1px; } .perm-label { font-size: .9rem; color: var(--text); }
.perm-matrix input[type="checkbox"], .perm-group-head input { width: 16px; height: 16px; accent-color: #14b8a6; margin-top: 2px; }
.say-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; margin-top: 6px; padding: 10px 12px;
  border-radius: 10px; background: #14b8a60f; border: 1px solid #14b8a630; }
.say-label { grid-column: 1 / -1; font-size: .75rem; font-weight: 700; color: #5eead4; }
.say-text { font-size: .88rem; color: var(--text); }
.note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; align-items: end; }
.note-input { width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2, #0c1312); color: var(--text); font: inherit; resize: vertical; }
.admin-table tr.muted-row td { opacity: .55; }
@media (max-width: 640px) { .say-box { grid-template-columns: minmax(0, 1fr); } .note-form { grid-template-columns: minmax(0, 1fr); } .perm-matrix { max-height: none; } }

/* "Még nem léphetsz be": the account requirements a colleague does not meet yet */
.req-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 10px; text-align: left; }
.req-list li { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #ffffff04; }
.req-list b { color: #fca5a5; }
.row-actions.center { justify-content: center; flex-wrap: wrap; }
.row-actions.log-delete-row { justify-content: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.req-missing { color: #fcd34d; margin-top: 4px; max-width: 220px; }
.stack > p.req-missing { max-width: none; }  /* (a whole line in a card, e.g. a setting that does not work) */
.req-box { display: grid; gap: 4px; padding: 12px 14px; margin: 12px 0; border: 1px solid var(--border); border-radius: 12px; background: #ffffff04; }
.req-ok { color: #6ee7b7; } .req-bad { color: #fcd34d; }
@media (min-width: 641px) {
  .admin-actions.stacked { white-space: normal; width: 1%; }
  .admin-actions.stacked .btn { display: block; width: 100%; margin: 0 0 6px; }
  .admin-actions.stacked .btn:last-child { margin-bottom: 0; }
}
.private-head { display: grid; gap: 2px; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--border); }

/* personal messages from the team: the Üzenetek page is a mail client, the other pages show a bar */
.mail { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; min-height: 520px; border: 1px solid var(--border);
  border-radius: 18px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
.mail > .skeleton { grid-column: 1 / -1; margin: 0; border: 0; }
.mail-list { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--border); background: #0a100f; }
.mail-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 18px 12px; }
.mail-list-head h2 { margin: 0; font-size: 1.15rem; }
.mail-tabs { margin: 0 18px 12px; align-self: flex-start; }
.mail-items { display: flex; flex-direction: column; overflow-y: auto; max-height: 640px; border-top: 1px solid var(--border); }
.mail-none { padding: 18px; margin: 0; }
.mail-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.mail-item:hover { background: #ffffff06; }
.mail-item.active { background: #14b8a614; border-left-color: var(--accent); }
.mail-item-main { display: grid; gap: 2px; flex: 1; min-width: 0; }
.mail-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mail-from { font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-time { flex: none; font-size: .78rem; color: var(--muted); }
.mail-preview { font-size: .875rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item:not(.unread) .mail-avatar { opacity: .7; }
.mail-item.unread .mail-from { color: var(--text); font-weight: 800; }
.mail-item.unread .mail-preview { color: #c9dbd7; }
.mail-item.unread .mail-time { color: var(--accent2); font-weight: 700; }
.mail-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #14b8a626; }
.mail-avatar { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font-weight: 800;
  color: #04110f; background: var(--brand); }
.mail-avatar.big { width: 48px; height: 48px; font-size: 1.2rem; }
.mail-avatar.support { background: linear-gradient(135deg, #a855f7, #6366f1); color: #fff; }
.mail-reader { display: flex; flex-direction: column; min-width: 0; padding: 28px 32px; overflow-wrap: anywhere; }
.mail-reader-head { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.mail-reader-from { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.05rem; }
.mail-role { font-size: .72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #14b8a626; color: #99f6e4; }
.mail-role.support { background: #a855f726; color: #d8b4fe; }
.mail-body { flex: 1; padding: 22px 0; font-size: 1rem; line-height: 1.7; }
.mail-reader-foot { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.mail-back { display: none; align-self: flex-start; margin-bottom: 16px; padding: 0; border: 0; background: none; color: var(--accent2);
  font: inherit; font-weight: 700; cursor: pointer; }
.mail-placeholder { align-items: center; justify-content: center; text-align: center; }
.mail-placeholder h3, .mail-empty h3 { margin: 10px 0 4px; }
.mail-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; }
.mail-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font-size: 1.8rem;
  background: #14b8a61a; color: var(--accent2); border: 1px solid #14b8a64d; }
@media (max-width: 860px) {
  .mail { grid-template-columns: 1fr; min-height: 0; }
  .mail-list { border-right: 0; }
  .mail-items { max-height: none; }
  .mail-placeholder { display: none; }
  .mail.reading .mail-list { display: none; }
  .mail-back { display: inline-block; }
  .mail-reader { padding: 20px 18px; }
}
.inbox-bar { display: flex; align-items: center; gap: 12px; margin: 18px 40px 0; padding: 12px 16px; border-radius: 12px;
  border: 1px solid #14b8a666; background: #14b8a614; color: var(--text); text-decoration: none; }
.inbox-bar:hover { text-decoration: none; background: #14b8a61f; }
.inbox-bar[hidden] { display: none; }
.inbox-bar > div { flex: 1; min-width: 0; }
.inbox-open { color: var(--accent); font-weight: 700; white-space: nowrap; }
@media (max-width: 900px) { .inbox-bar { margin: 12px 16px 0; } }
@media (min-width: 641px) { .dm-text-cell { min-width: 240px; } }

/* Előfizetés page: deleting the account */
.danger-zone { display: grid; gap: 10px; border-color: #f8717140; }
.danger-zone h2 { margin: 0; font-size: 1.1rem; color: #fca5a5; }
.danger-zone p { margin: 0; }
.danger-confirm { display: grid; gap: 6px; max-width: 360px; font-size: .9rem; color: var(--muted); }
.danger-zone .btn { justify-self: start; }
.kept-json { max-height: 60vh; overflow: auto; padding: 12px 14px; border-radius: 12px; background: #050908; border: 1px solid var(--border);
  font-size: .8rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* admin login: Discord or user name + password */
.login-or { display: flex; align-items: center; gap: 12px; margin: 22px auto; max-width: 340px; color: var(--muted); font-size: .85rem; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.password-login { max-width: 340px; margin: 0 auto; text-align: left; display: grid; gap: 12px; }
.password-login .btn { width: 100%; justify-content: center; }
.password-login [data-login-error] { color: #fca5a5; margin: 0; }
.admin-row .row-actions { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
  .mini-table .mini-row.admin-row:has(> .row-actions) { grid-template-columns: minmax(0, 1fr); }
  .admin-row .row-actions { justify-content: flex-start; }
}
/* Ügyfélszolgálati napló: the whole detail text, wrapped (not cut off) */
.log-details { white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; color: var(--muted); font-size: .85rem; line-height: 1.5; }
@media (min-width: 641px) { .log-details-cell { min-width: 280px; width: 40%; } }

/* Support (customer service) accounts: their own colour everywhere */
.badge.support::before { background: #c084fc; }
.renew-card { display: grid; gap: 10px; }
.renew-card h3 { margin: 0; }
.renew-card p { margin: 0; }
/* unread personal messages next to the "Üzenetek" menu item */
body:not(.admin-site) .nav-count { font-style: normal; margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: #14b8a6; color: #04201c; font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.bottom-nav a { position: relative; }
body:not(.admin-site) .bottom-nav .nav-count { position: absolute; top: 4px; left: calc(50% + 6px); margin: 0; min-width: 17px; height: 17px; font-size: .66rem; }
/* Tükrözések: the 4 buttons 2 x 2, and the main / backup pair under each other - the row fits without scrolling */
.btn-grid { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px; justify-content: end; }
.btn-grid .btn { margin: 0; justify-content: center; }
.admin-actions.grid2 { width: 1%; }
@media (max-width: 640px) { .btn-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } }
/* Tükrözések: main above its backup, everything centred, compact cells - the row fits with its buttons */
@media (min-width: 641px) {
  .mirrors-table .admin-table th, .mirrors-table .admin-table td { text-align: center; padding-left: 8px; padding-right: 8px; }
  .mirrors-table .admin-table .cell { justify-content: center; align-items: center; }
  .mirrors-table .pair { flex-direction: column; align-items: flex-start; gap: 2px; display: inline-flex; text-align: left; }
  .mirrors-table .pair-arrow { transform: rotate(90deg); margin-left: 10px; line-height: 1; }
  .mirrors-table .entity { text-align: left; }
  .mirrors-table .btn-grid { justify-content: center; }
  .mirrors-table .admin-actions { text-align: center; }
}
@media (min-width: 641px) {
  .mirrors-table .admin-table th { letter-spacing: .03em; font-size: .68rem; }
  .mirrors-table .btn-grid .btn { padding-left: 10px; padding-right: 10px; }
}
/* a narrower screen: the buttons under each other and long names wrap, so it still fits */
@media (min-width: 641px) and (max-width: 1200px) {
  .mirrors-table .btn-grid { grid-template-columns: max-content; }
  .mirrors-table .btn-grid .btn { width: 100%; }
  .mirrors-table .pair { max-width: 190px; }
  .mirrors-table .cell-text b, .mirrors-table .cell-text span { white-space: normal; overflow-wrap: anywhere; }
}

/* a colleague's own page (Csapat és jogok → name) */
.req-box.plain { border: 0; padding: 0; margin: 0; background: none; }
.inline-editor { display: grid; gap: 12px; margin-bottom: 14px; }
.inline-editor .modal-buttons { justify-content: flex-end; }
/* the plan tag and the status pill next to each other: the same height, on one line */
.detail-meta .plan-tag, .detail-meta .pill, .detail-meta .badge { display: inline-flex; align-items: center; height: 26px; line-height: 1; box-sizing: border-box; padding-top: 0; padding-bottom: 0; }
.inline-editor .perm-matrix { max-height: none; overflow: visible; }

/* Csomagok: the three plans next to each other (under each other on a phone) */
.plan-editors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.plan-editor .form { display: grid; gap: 10px; }
.plan-editor .form > b { margin-top: 6px; color: var(--text); }
.plan-options { display: grid; gap: 4px; }
@media (max-width: 1100px) { .plan-editors { grid-template-columns: minmax(0, 1fr); } }
.pending-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.plan-editor label[hidden] { display: none; }

/* Pricing: the plan cards more compact (less space between the lines) */
.plan { padding: 22px; gap: 4px; }
.plan .checks { display: grid; gap: 0; margin: 6px 0 14px; }
.plan .checks li { padding: 3px 0 3px 24px; line-height: 1.4; font-size: .93rem; }
.plan-price { margin: 6px 0 2px; }

/* team page: two equal cards side by side; collapsible cards (closed until clicked) */
.grid-1-1.equal { align-items: stretch; }
.grid-1-1.folds { align-items: start; }
.grid-1-1.folds:not(:has(.fold.open)) { align-items: stretch; }  /* both closed: exactly the same size */
.grid-1-1.folds:not(:has(.fold:not(.open))) { align-items: stretch; }  /* both open: the same height too */
@media (min-width: 930px) {  /* side by side: the descriptions take the same room, so the inputs are (about) in one line */
  .grid-1-1.folds .fold-body > .stack > p.muted.small:first-child { min-height: 4.9em; }
}
.grid-1-1.folds > .fold { margin: 0; }
/* side by side, open: the buttons at the bottom of the card (in line with the other card's) */
.grid-1-1.folds > .fold.open { display: flex; flex-direction: column; }
.grid-1-1.folds > .fold.open > .fold-body { flex: 1; display: flex; flex-direction: column; }
.grid-1-1.folds > .fold.open > .fold-body > .stack { flex: 1; display: flex; flex-direction: column; }
.grid-1-1.folds > .fold.open > .fold-body > .stack > .row-actions:last-child { margin-top: auto; }
.grid-1-1.equal > .card { height: 100%; margin: 0; }
.fold-head { width: 100%; background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fold:not(.open) .fold-head { margin-bottom: 0; }
.fold-head:hover h3 { color: var(--accent, inherit); }
.fold-arrow { display: inline-block; width: 1em; }
.fold-body[hidden] { display: none !important; }
.fold.open .fold-body { margin-top: 12px; }
.fold-head { user-select: none; }
.fold-head:focus-visible { outline: 2px solid var(--accent, #7c5cff); outline-offset: 4px; border-radius: 6px; }
/* Csapat és jogok: the whole row opens the colleague's profile */
.click-row { cursor: pointer; }
.click-row:hover td { background: var(--hover, rgba(127, 127, 127, .07)); }
/* cards directly on an admin page never touch each other */
[data-admin-root] > .card { margin-bottom: 14px; }
[data-admin-root] > .fold { margin-bottom: 10px; }
@media (max-width: 600px) { .fold-head > span.muted { display: none; } }

/* Kitiltások: the rules */
.bans-settings h4 { margin: 10px 0 0; font-size: .95rem; }
.ban-steps { display: grid; gap: 8px; }
.ban-step { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ban-step-n { min-width: 110px; color: var(--muted); font-size: .9rem; }
.length-input { display: inline-flex; gap: 8px; align-items: center; }
.length-input input { width: 110px; }
.limit-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: end; }
@media (max-width: 700px) { .limit-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .limit-row > b { grid-column: 1 / -1; } }
.ban-steps.form { gap: 8px; }
.ban-step .length-input input[type=number] { width: 110px; padding: 8px 10px; }
.ban-step .length-input select { width: auto; padding: 8px 10px; }
.never-list { display: grid; gap: 6px; }
.never-list:empty::before { content: "Üres – most minden cím a szabályok szerint működik."; color: var(--muted); font-size: .85rem; }
.never-row { display: grid; grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.never-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.never-add input[type=text] { flex: 1 1 200px; width: auto; }
@media (max-width: 600px) { .never-row { grid-template-columns: minmax(0, 1fr) auto; } .never-row > span { grid-column: 1 / -1; grid-row: 2; } }

/* Pricing: every plan has the same rows (✓ in it, ✗ not in it), so they can be compared row by row */
.plan .checks { align-content: start; }
.plan .checks li.no { color: var(--muted); opacity: .55; }
.plan .checks li.no::before { content: "✗"; color: var(--muted); }
.form [hidden] { display: none !important; }  /* (a label is a grid: the hidden attribute alone would not hide it) */

/* Backup indítása: keep or empty what is on the backup server */
.start-modes { display: grid; gap: 10px; margin: 12px 0 4px; text-align: left; }
.start-mode { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.start-mode input { margin-top: 3px; }
.start-modes .check[hidden] { display: none; }
.fold.fold-warn { border-color: #f8717188; box-shadow: 0 0 0 1px #f8717133 inset; }
.fold.fold-warn .fold-head h3 { color: #fca5a5; }
.reminder-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reminder-row input[type=number] { width: 90px; }
.kept-view h4 { margin: 16px 0 6px; font-size: .95rem; }
.kept-view h4:first-child { margin-top: 4px; }
.kept-raw { margin-top: 14px; }
.kept-raw summary { cursor: pointer; }
/* Előfizetés: the payments in a card with its title; the account deletion right under the grid */
.table-card-title { margin: 0; padding: 18px 20px 6px; font-size: 1.05rem; }
.table-card-empty { margin: 0; padding: 6px 20px 20px; }
.content .section.tight.billing-top { padding-bottom: 18px; }
.content .section.tight.billing-delete { padding-top: 0; }
.plan .plan-note { margin: 6px 0 0; text-align: center; }
.plan.current { outline: 2px solid #34d39955; outline-offset: -2px; }
/* Dashboard: the search not so wide; the list refresh on the right, apart from the filters */
.filters .search[data-guild-search] { flex: 0 1 300px; min-width: 200px; }
.filters .refresh-guilds { margin-left: auto; }
@media (max-width: 700px) { .filters .search[data-guild-search] { flex-basis: 100%; } .filters .refresh-guilds { margin-left: 0; } }

/* Csapat és jogok → Jogok áttekintése: permissions × colleagues / templates */
/* Jogok / Kollégák jogai: one clean permission table */
.pm-card { padding: 0; overflow: hidden; }
.pm-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pm-search { max-width: 300px; }
.pm-hint { color: var(--muted); font-size: .8rem; }
.pm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; padding: 12px 18px;
  border-bottom: 1px solid var(--border); background: #14b8a60f; }
.pm-bar-text { display: grid; gap: 2px; }
.pm-bar-text span { color: var(--muted); font-size: .8rem; }
.pm-bar-actions { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pm-act { border: 0; background: transparent; color: var(--text); font: inherit; font-size: .84rem; padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.pm-act:hover { background: #ffffff0d; }
.pm-act:disabled { color: var(--muted); opacity: .45; cursor: default; background: transparent; }
.pm-wrap { overflow: auto; max-height: calc(100vh - 220px); }
.perm-overview { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: .9rem; }
.perm-overview col.pm-col-perm { width: 280px; }
.perm-overview th, .perm-overview td { padding: 0 14px; height: 44px; border-bottom: 1px solid #ffffff0a; vertical-align: middle; }
.perm-overview thead th { position: sticky; background: var(--panel); z-index: 2; font-weight: 500; }
.perm-overview .pm-kinds th { top: 0; height: 30px; padding-top: 10px; font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); text-align: left; border-bottom: 0; }
.perm-overview .pm-kinds th { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }  /* (one colleague alone: a narrow column under „KOLLÉGÁK”) */
.perm-overview .pm-heads th { top: 30px; height: 56px; border-bottom: 1px solid var(--border); }
.perm-overview .pm-perm { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; overflow: hidden; }
.perm-overview thead .pm-perm { z-index: 3; }
.perm-overview .pm-col { text-align: center; padding: 0 4px; }
.pm-colbtn { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; justify-items: center; width: 100%; padding: 8px 6px; border: 0; border-radius: 8px; background: transparent;
  color: var(--text); font: inherit; cursor: pointer; }
.pm-colbtn:hover { background: #ffffff0a; }
.pm-colname { font-weight: 600; font-size: .86rem; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-colsub { font-size: .72rem; color: var(--muted); font-weight: 400; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-overview .pm-sep { border-left: 1px solid var(--border); }
.perm-overview .pm-off { opacity: .5; }
.perm-overview .pm-group td { height: 38px; padding-top: 14px; border-bottom: 0; font-size: .68rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); }
.perm-overview .pm-group td span { position: sticky; left: 14px; }
.perm-overview .pm-row:hover td { background-color: #ffffff05; }
.perm-overview .pm-row:hover .pm-perm { background-color: var(--panel2); }
.perm-overview .pm-cell { text-align: center; }
.perm-overview .pm-editing { background-color: #14b8a612 !important; }
.perm-overview th.pm-editing .pm-colname { color: var(--accent2); }
.perm-overview thead th.pm-editing { background-color: var(--panel) !important; background-image: linear-gradient(#14b8a612, #14b8a612); }  /* (opaque: the rows do not show through while scrolling) */
.perm-overview th.pm-editing { box-shadow: inset 0 -2px 0 var(--accent); }
.pm-yes { color: #4ade80; font-weight: 900; font-size: 1.15rem; line-height: 1; text-shadow: 0 0 10px #4ade8055; }
.pm-no { color: #f43f5e; font-weight: 900; font-size: 1.05rem; line-height: 1; text-shadow: 0 0 10px #f43f5e44; }
.pm-check { width: 17px; height: 17px; accent-color: #14b8a6; cursor: pointer; vertical-align: middle; }
.perm-overview .pm-label { display: flex; align-items: center; gap: 8px; }
.pm-help { color: var(--muted); font-size: .76rem; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.perm-overview .pm-row td.pm-perm { padding-top: 6px; padding-bottom: 6px; }
.pm-renamed { font-size: .66rem; padding: 1px 6px; border-radius: 99px; background: #ffffff10; color: var(--muted); }
.pm-rename { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0 4px; opacity: 0; transition: opacity .12s; }
.perm-overview .pm-row:hover .pm-rename, .pm-rename:focus { opacity: .8; }
.pm-none { text-align: center; color: var(--muted); height: 80px !important; }
.preset-row .btn { margin-left: auto; }
.preview-bar { background: #60a5fa22; border-color: #60a5fa88; }
.preview-bar .preview-exit { display: block; width: fit-content; margin: 6px 0 0; }  /* (on its own line) */
@media (max-width: 700px) {
  .perm-overview col.pm-col-perm { width: 170px; }
  .pm-help, .pm-hint { display: none; }
  .pm-search { max-width: none; }
  .pm-wrap { max-height: none; }
}

/* Admin → Szövegek */
.texts-group { margin-bottom: 18px; }
.texts-group .block-title { margin: 18px 0 10px; }
.text-changed { margin-left: 8px; font-size: .72rem; vertical-align: middle; }
.text-editor textarea, .text-editor input[type="text"] { box-sizing: border-box; }
.text-editor textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; line-height: 1.45; }
.text-field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; }
.text-rows { display: flex; flex-direction: column; gap: 12px; }
.text-row { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.text-row-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.text-options { display: flex; flex-direction: column; gap: 6px; }
.text-option { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
@media (max-width: 700px) { .text-option { grid-template-columns: 1fr; } }
.text-editor .ph { margin: 0 3px; }
.text-default pre { white-space: pre-wrap; max-height: 300px; overflow: auto; }

/* Előfizetés → Kuponkód (a compensation for someone whose plan ran out meanwhile) */
.coupon-card { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.coupon-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.coupon-code { display: inline-block; margin-top: 4px; font-size: .9rem; letter-spacing: .04em; }
.coupon-form { display: flex; gap: 8px; }
.coupon-form input { flex: 1; min-width: 0; }
.admin-site td.credit-cell { max-width: 200px; white-space: normal; }
.admin-site .coupon-code { font-size: .9rem; letter-spacing: .04em; }

/* toolbars: a group of filters on the left (search, date range, sort), the actions on the right */
.filter-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex: 1; min-width: 0; }
.filter-group .search { flex: 1 1 220px; }
.toolbar .row-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.log-toolbar { margin: 0 0 14px; }
.date-range { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--panel); font-size: .9rem; }
.date-range.set { border-color: var(--line2); }
.date-range-label { color: var(--muted); font-size: .82rem; margin-right: 2px; }
.date-range input[type="date"] { border: 0; background: transparent; color: var(--text); font: inherit; font-size: .88rem; padding: 4px 2px;
  color-scheme: dark; width: auto; min-width: 0; }
.date-range input[type="date"]:focus { outline: none; }
.date-range:focus-within { border-color: var(--accent); }
.date-range-clear { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 2px 6px; border-radius: 6px; font-size: .8rem; }
.date-range-clear:hover { color: var(--text); background: #ffffff10; }
@media (max-width: 640px) {
  .filter-group, .date-range { width: 100%; }
  .date-range input[type="date"] { flex: 1; }
  .toolbar .row-actions { margin-left: 0; }
}

/* the download dialog (⬇ Letöltés…): what, which rows, which data, the format */
.export-what { display: grid; gap: 6px; margin: 4px 0 14px; font-size: .9rem; }
.export-section { border-top: 1px solid var(--line); padding: 14px 0 4px; }
.export-section h4 { margin: 0 0 10px; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.export-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.export-section-head h4 { margin: 0; }
.export-columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 14px; margin-top: 10px; font-size: .9rem; }
.export-columns .check { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.export-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 12px 14px; margin: 10px 0 16px;
  border-radius: 10px; background: #14b8a612; border: 1px solid #14b8a633; }
.seg + .filter-group { justify-content: flex-end; }

/* the period of the download dialog: one row (ettől – eddig) */
.date-pair { display: flex; align-items: center; gap: 10px; }
.date-pair input[type=date] { flex: 1; min-width: 0; }
.sort-select.show.set { border-color: var(--accent); }
.nowrap { white-space: nowrap; }

/* Napló: the logs in a row on top (in groups, left to right), the chosen one under them */
.log-layout { display: grid; gap: 18px; margin-top: 8px; }
.log-nav { display: flex; flex-wrap: wrap; gap: 14px 26px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--panel); }
.log-nav-group { display: grid; gap: 6px; align-content: start; }
.log-nav-title { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-left: 2px; }
.log-nav-group-items { display: flex; flex-wrap: wrap; gap: 6px; }
.log-nav-item { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 10px; color: var(--text); text-decoration: none;
  border: 1px solid var(--border); background: var(--panel2); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.log-nav-item:hover { border-color: var(--line2); }
.log-nav-item.active { background: #14b8a61c; border-color: #14b8a666; color: var(--accent2); }
.log-main { min-width: 0; }
.log-main-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.log-main-head h2 { margin: 0; font-size: 1.25rem; }
.log-main-head p { margin: 0; }
.log-main .log-toolbar { margin: 12px 0 0; }
.log-main .table-card { margin-top: 14px; }
.log-count { margin-top: 10px; }
@media (max-width: 640px) {
  .log-nav { gap: 12px; padding: 12px; }
  .log-nav-group { width: 100%; }
}

/* Csapat → Sablonok: name | the permissions (wrapping, readable) | Előnézet; on a phone the permissions go under them */
.mini-table .mini-row.preset-row { grid-template-columns: minmax(130px, 180px) minmax(0, 1fr) auto; align-items: start; }
.mini-table .mini-row.preset-row > span { line-height: 1.5; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .mini-table .mini-row.preset-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; }
  .mini-table .mini-row.preset-row > span { grid-column: 1 / -1; grid-row: 2; }
}
/* Napló: its buttons under the description, on the left */
.page-actions.log-actions { justify-content: flex-start; margin: -8px 0 4px; }
.page-actions.log-actions:empty { display: none; }

/* Mentések (the website): the old rules are at the end of the file (Mentések, redesigned) */
.progress.full > div { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.snap-restore .snap-parts { display: grid; gap: 6px 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.snap-restore .snap-parts > span { grid-column: 1 / -1; }
.snap-restore .check, .snap-parts .check { display: flex; gap: 8px; align-items: center; font-size: .92rem; }
.snap-details { display: grid; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.snap-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.snap-tag { font-size: .8rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: #ffffff08; }
.snap-channels { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; max-height: 320px; overflow: auto; }
.snap-channels li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 8px; border-radius: 8px; background: #ffffff05; }
.snap-errors { margin-top: 8px; }
.snap-errors ul { margin: 6px 0 0; padding-left: 18px; max-height: 200px; overflow: auto; }
/* Mentések: the saved messages of a channel (as they were, pictures and videos in their original quality) */
.snap-channels li.clickable { cursor: pointer; }
.snap-channels li.clickable:hover, .snap-channels li.active { background: #14b8a61c; }
.snap-viewer { border: 1px solid var(--border); border-radius: 12px; padding: 14px; display: grid; gap: 10px; background: #00000022; }
.snap-messages { display: grid; gap: 14px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.snap-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
.snap-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #ffffff10; }
.snap-msg-body { display: grid; gap: 4px; min-width: 0; }
.snap-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.snap-text.forwarded { border-left: 3px solid var(--border); padding-left: 8px; color: var(--muted); }
.snap-embed { border-left: 3px solid var(--accent); padding: 6px 10px; background: #ffffff08; border-radius: 6px; }
.snap-files { display: flex; flex-wrap: wrap; gap: 8px; }
.snap-file { display: grid; gap: 4px; max-width: 360px; }
.snap-file img, .snap-file video { max-width: 100%; max-height: 320px; border-radius: 8px; background: #ffffff08; }
.snap-file.spoiler img, .snap-file.spoiler video { filter: blur(24px); cursor: pointer; }
.snap-file.missing { color: var(--muted); font-size: .85rem; }
.snap-sticker { width: 120px; height: 120px; object-fit: contain; }
.snap-reactions { display: flex; flex-wrap: wrap; gap: 6px; }
.snap-reaction { font-size: .85rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); background: #ffffff08; }

/* Napló → Mentések (admin): the timeline / grouped by snapshot */
.savelog-kpis { margin-bottom: 4px; }
.savelog-groups { display: grid; gap: 12px; }
.savelog-group { padding: 16px 18px; }
.savelog-group-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.savelog-steps { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: grid; gap: 8px; }
.savelog-steps li { position: relative; display: grid; grid-template-columns: 150px auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: .88rem; }
.savelog-steps li::before { content: ""; position: absolute; left: -20px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--muted); }
.savelog-steps li.tone-ok::before { border-color: #6ee7b7; } .savelog-steps li.tone-bad::before { border-color: #fca5a5; }
.savelog-steps li.tone-warn::before { border-color: #fcd34d; } .savelog-steps li.tone-info::before { border-color: #5eead4; }
.savelog-time { color: var(--muted); white-space: nowrap; }
.savelog-details { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 720px) { .savelog-steps li { grid-template-columns: minmax(0, 1fr); gap: 4px; } .savelog-group-head { flex-wrap: wrap; } }

/* a template's settings (the dialog; its questions are asked inside it) */
.modal[data-modal] { z-index: 60; }  /* a question always comes over the other dialogs */
.ps { display: grid; gap: 18px; }
.ps-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ps-head h3 { margin: 2px 0 0; font-size: 1.2rem; overflow-wrap: anywhere; }
.ps-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ps-close { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.5rem;
  line-height: 1; cursor: pointer; }
.ps-close:hover { background: var(--panel2); color: var(--text); }
.ps-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: .84rem; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.ps-facts b { color: var(--text); }
.ps-group { display: grid; gap: 10px; }
.ps-group-title { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ps-group.danger .ps-group-title { color: #fca5a5; }
.ps-name { display: flex; gap: 8px; }
.ps-input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2); color: var(--text); font: inherit; }
.ps-input:focus { outline: none; border-color: var(--accent); }
.ps-note { margin: 0; color: var(--muted); font-size: .78rem; }
.ps-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 12px; background: #ffffff03; }
.ps-group.danger .ps-row { border-color: #f8717133; background: #f8717108; }
.ps-row-text { display: grid; gap: 2px; min-width: 0; }
.ps-row-text b { font-size: .9rem; font-weight: 600; }
.ps-row-text span { color: var(--muted); font-size: .8rem; }
.ps-row-controls { flex: none; }
.ps-question { margin: 0; line-height: 1.55; }
.ps-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
@media (max-width: 560px) { .ps-row, .ps-name { flex-direction: column; align-items: stretch; } .ps-foot .btn { flex: 1; } }

/* Felhasználók → Ügyfélszolgálat / Admin: the same column widths with or without rows (long names do not push them) */
.team-table .admin-table { table-layout: fixed; }
.team-table .admin-table th:nth-child(1) { width: 40%; }
.team-table .admin-table th:nth-child(2) { width: 20%; }
.team-table .admin-table th:nth-child(3) { width: 25%; }
.team-table .admin-table th:nth-child(4) { width: 15%; }
.team-table .admin-table td:first-child { overflow: hidden; text-overflow: ellipsis; }

/* Jogok / Kollégák jogai: scrolled to the bottom, the table ends just above the bottom of the page (no empty band under it) */
.admin-page:has(.pm-card) { padding-bottom: 12px; }
[data-admin-root] > .pm-card { margin-bottom: 0; }

/* Csapat: a white line over the Support and the Adminok titles, the width of the page */
.team-section-title { border-top: 1px solid #fff; padding-top: 16px; }
.team-section-line { border-top: 1px solid #fff; padding-top: 16px; margin-top: 22px; }  /* (over the Napló Discordon is card too) */

/* a colleague's editor (the colleague's page and the Új kolléga dialog): sections, switches */
.modal-box[data-form-box]:has(> .se) { max-width: 780px; }
.se { display: grid; gap: 0; }
.se-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.se-head h3 { margin: 2px 0 0; font-size: 1.25rem; }
.se-kicker { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.se-close { width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.se-close:hover { background: var(--panel2); color: var(--text); }
.se-section { display: grid; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.se-section:last-of-type { border-bottom: 0; }
.inline-editor.se > .se-section:first-child { padding-top: 4px; }
.se-section-head h4 { margin: 0; font-size: .95rem; }
.se-section-head p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; }
.se-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; align-items: start; margin-top: 4px; }
.se-field { display: grid; gap: 5px; min-width: 0; }
.se-field.wide { grid-column: 1 / -1; }
.se-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.se-field input, .se-preset select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--panel2);
  color: var(--text); font: inherit; }
.se-field input:focus, .se-preset select:focus { outline: none; border-color: var(--accent); }
.se-field input:disabled { opacity: .6; }
.se-help { color: var(--muted); font-size: .76rem; line-height: 1.4; }
.se-switch-row, .se-perm { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.se-switch-row { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #ffffff03; }
.se-perm-text { display: grid; gap: 2px; min-width: 0; }
.se-switch-row .switch, .se-perm .switch { margin-top: 0; }
.se-perms-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.se-perms-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.se-count { font-size: .8rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #14b8a61f; color: #99f6e4; white-space: nowrap; }
.se-preset { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); }
.se-preset select { width: auto; min-width: 200px; padding: 7px 10px; }
.se-link { border: 0; background: transparent; color: var(--accent2); font: inherit; font-size: .8rem; font-weight: 600; padding: 4px 6px; border-radius: 7px; cursor: pointer; }
.se-link:hover { background: #14b8a61a; }
.se-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; align-items: start; }
.se-group { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #ffffff03; }
.se-group-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: #ffffff05; }
.se-group-head b { font-size: .88rem; }
.se-group-count { font-size: .72rem; color: var(--muted); }
.se-group-links { margin-left: auto; display: flex; gap: 2px; }
.se-perm { padding: 10px 14px; }
.se-perm + .se-perm { border-top: 1px solid #ffffff0a; }
.se-perm:hover { background: #ffffff05; }
.se-perm .perm-label { font-size: .88rem; }
.se-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.modal-box .se-foot { position: sticky; bottom: -26px; margin: 0 -26px -26px; padding: 14px 26px; background: var(--panel); }
@media (max-width: 640px) {
  .se-grid { grid-template-columns: minmax(0, 1fr); }
  .se-preset select { min-width: 0; }
  .modal-box .se-foot { bottom: -18px; margin: 0 -18px -18px; padding: 12px 18px; }
}
/* the Új kolléga dialog: the permissions as chips, a line per group */
.se-chipgroups { display: grid; gap: 4px; }
.se-chipgroup { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid #ffffff0d; }
.se-chipgroup:first-child { border-top: 0; padding-top: 2px; }
.se-chipgroup-head { display: flex; align-items: center; gap: 8px; }
.se-chipgroup-head b { font-size: .74rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.se-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.se-chip { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 9px; border-radius: 99px; border: 1px solid var(--border);
  background: transparent; color: var(--muted); font-size: .83rem; cursor: pointer; user-select: none; transition: background .12s, border-color .12s, color .12s; }
.se-chip:hover { border-color: #2dd4bf66; color: var(--text); }
.se-chip-input { position: absolute; opacity: 0; width: 0; height: 0; }
.se-chip-mark { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; display: grid; place-items: center; font-size: .62rem; line-height: 1; }
.se-chip.on { background: #14b8a624; border-color: #2dd4bf88; color: #ccfbf1; }
.se-chip.on .se-chip-mark { background: #2dd4bf; border-color: #2dd4bf; color: #04201c; }
.se-chip.on .se-chip-mark::before { content: "✓"; font-weight: 900; }
.se-chip-input:focus-visible + .se-chip-mark { outline: 2px solid var(--accent); outline-offset: 2px; }
.se-access.off { border-color: #f8717155; background: #f871710d; }
.se-access.off .perm-label { color: #fca5a5; }
.access-card { padding: 6px; margin-bottom: 10px; }
.access-card .se-switch-row { border: 0; background: transparent; }
.access-card .se-access.off { background: #f871710d; }

/* the Owner */
.owner-text { color: #f87171; }
.se-role { width: fit-content; }
.se-section[hidden] { display: none; }
.admin-also { border-color: #fbbf2466; background: #fbbf2410; margin-bottom: 14px; }

/* The team: Support, Admin, Owner - one colour each, the same on every page (plan tag, status pill, website badge) */
.plan-tag.support, .pill.support, .badge.support, .badge.role-support { color: #d8b4fe; background: #a855f724; border-color: #a855f766; }
.plan-tag.admin, .pill.admin, .badge.role-admin { color: #fdba74; background: #fb923c24; border-color: #fb923c66; }  /* (orange: not the Gold colour) */
.plan-tag.owner, .pill.owner, .badge.role-owner { color: #fca5a5; background: #ef444424; border-color: #ef444466; }
.badge.support::before, .badge.role-support::before { background: #d8b4fe; }
.badge.role-admin::before { background: #fdba74; }
.badge.role-owner::before { background: #fca5a5; }

/* a phone: the ID on its own line, the role and the state side by side under it */
@media (max-width: 640px) { .detail-meta > .mono-sm:first-child { flex-basis: 100%; } }
.btn > svg { width: 1.15em; height: 1.15em; flex: none; }

/* ===== Mentések (the website), redesigned: hero with the plan's numbers, one card per server with its timeline ===== */
[data-snapshots] { display: grid; gap: 18px; padding-top: 8px; }
.snap-hero { padding: 26px; display: grid; gap: 22px; background: radial-gradient(120% 140% at 100% 0%, #14b8a61a 0%, transparent 55%), var(--surface, var(--panel)); }
.snap-hero-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.snap-hero-head h1 { margin: 10px 0 6px; font-size: clamp(1.6rem, 3.2vw, 2.2rem); letter-spacing: -.02em; }
.snap-hero-head p { margin: 0; max-width: 560px; }
.snap-new { flex-shrink: 0; }
.snap-tiles { display: grid; gap: 12px; grid-template-columns: 1.4fr repeat(3, 1fr); }
.snap-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #ffffff06;
  border: 1px solid var(--border); min-width: 0; }
.snap-tile-label { color: var(--muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.snap-tile-value { font-size: 1.35rem; letter-spacing: -.01em; }
.snap-tile-value .muted { font-size: .9rem; font-weight: 500; }
.snap-tile-sub { color: var(--muted); font-size: .8rem; }
.snap-usage-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.snap-usage .progress { height: 8px; margin: 6px 0 2px; }
.progress.full > div { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.snap-upsell { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; border: 1px dashed var(--line2, var(--border)); }
.snap-upsell p { margin: 0; color: var(--muted); }

.snap-jobs { display: grid; gap: 12px; }
.snap-job.running { border-color: #fbbf2455; background: linear-gradient(90deg, #fbbf240d, transparent 60%), var(--panel); }
.snap-job-head { display: flex; align-items: center; gap: 12px; }
.snap-job-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.snap-job-step { margin: 0; }

.snap-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.snap-section-head h2 { margin: 0; font-size: 1.2rem; }
.snap-server { padding: 0; overflow: hidden; }
.snap-server-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 14px; }
.guild-icon.snap-icon, img.snap-icon { width: 48px; height: 48px; border-radius: 14px; font-size: .85rem; flex-shrink: 0; object-fit: cover; }
.snap-server-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.snap-server-title h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; overflow-wrap: break-word; }
.snap-server-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 20px 16px; padding: 12px 14px;
  border-radius: 12px; background: #14b8a60d; border: 1px solid #14b8a626; }
.snap-next { display: flex; align-items: center; gap: 12px; min-width: 0; }
.snap-next > div { display: grid; gap: 1px; min-width: 0; }
.snap-next b { font-size: .92rem; color: var(--accent2); }
.snap-next.off { opacity: .9; }
.snap-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #14b8a62a; flex-shrink: 0; }
.snap-keep { display: grid; grid-template-columns: auto auto; justify-content: end; align-items: baseline; gap: 0 8px; flex-shrink: 0; }
.snap-keep b { font-size: 1rem; }
.snap-keep .progress { grid-column: 1 / -1; width: 110px; height: 5px; margin: 6px 0 0; }
.snap-server .snap-list { border-top: 1px solid var(--border); }
.snap-list { display: grid; }
.snap { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 16px 20px; position: relative; }
.snap + .snap { border-top: 1px solid var(--border); }
.snap::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: transparent; }
.snap.newest::before { background: var(--brand, var(--accent)); }
.snap.broken { background: repeating-linear-gradient(135deg, #f871710a 0 10px, transparent 10px 20px); }
.snap-when { display: grid; gap: 6px; }
.snap-when b { font-size: .95rem; }
.snap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.snap-chip { font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.snap-chip.auto { color: var(--accent2); border-color: #14b8a655; background: #14b8a614; }
.snap-chip.newest { color: #bbf7d0; border-color: #22c55e55; background: #22c55e14; }
.snap-body { min-width: 0; display: grid; gap: 8px; }
.snap-name { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.snap-note { margin: 0; }
.snap-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.snap-stat { display: inline-flex; align-items: baseline; gap: 5px; font-size: .8rem; padding: 3px 9px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--border); }
.snap-stat b { font-size: .86rem; }
.snap-stat span { color: var(--muted); }
.snap-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.snap-actions .snap-delete { color: #fca5a5; }

.snap-empty { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 22px; }
.snap-empty h2 { margin: 0; }
.snap-empty > p { margin: 0; }
.snap-empty-icon { font-size: 2.4rem; }
.snap-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; width: 100%; max-width: 760px; margin: 10px 0 6px; text-align: left; }
.snap-step { display: grid; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid var(--border); background: #ffffff05; }
.snap-step p { margin: 0; }
.snap-step-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem;
  color: #04110f; background: var(--brand, var(--accent)); }

.snap-info { padding: 0; }
.snap-info > summary { cursor: pointer; padding: 16px 20px; font-weight: 700; }
.snap-info > ul { margin: 0; padding: 0 20px 16px 38px; display: grid; gap: 6px; }

@media (max-width: 1100px) { .snap-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .snap { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .snap-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .snap-actions { justify-content: flex-start; }
  .snap-server-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .snap-keep { grid-template-columns: auto 1fr; justify-content: stretch; }
  .snap-keep b { justify-self: end; }
  .snap-keep .progress { width: 100%; }
  .snap-steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .snap-hero { padding: 18px; gap: 16px; }
  .snap-hero-head { flex-direction: column; align-items: stretch; }
  .snap-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .snap-usage { grid-column: 1 / -1; }
  .snap-tile { padding: 12px; }
  .snap-tile-value { font-size: 1.1rem; }
  .snap-job-head { flex-wrap: wrap; }
  .snap-server-head, .snap { padding: 14px 16px; }
  .snap-server-bar { margin: 0 16px 14px; }
}

/* language chooser (EN | HU) at the top of the website's sidebar / phone header */
.lang-switch { display: inline-flex; margin-left: auto; padding: 3px; gap: 2px; border-radius: 10px; border: 1px solid var(--border);
  background: #ffffff06; flex-shrink: 0; }
.lang-switch a { padding: 4px 9px; border-radius: 7px; font-size: .75rem; font-weight: 800; letter-spacing: .04em; color: var(--muted); }
.lang-switch a:hover { color: var(--text); text-decoration: none; background: #ffffff0a; }
.lang-switch a.active { color: #04110f; background: var(--brand, var(--accent)); }
@media (max-width: 900px) { .lang-switch { margin-right: 10px; } .side-top .menu-toggle { margin-left: 0; } }

/* after the first login: which language (the website and the bot) */
.lang-choose { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: #000000b8;
  backdrop-filter: blur(4px); }
.lang-choose-box { width: min(520px, 100%); padding: 26px; border-radius: 18px; background: var(--panel); border: 1px solid var(--border);
  box-shadow: var(--shadow); display: grid; gap: 10px; text-align: center; }
.lang-choose-box h2 { margin: 0 0 4px; font-size: 1.3rem; }
.lang-choose-box p { margin: 0; }
.lang-choose-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 420px) { .lang-choose-buttons { grid-template-columns: 1fr; } }
/* the logo and EN | HU never overlap: a gap between them. On the website (not the admin page) the desktop sidebar is a bit
   wider (288px), so the chooser fits next to the logo, on the right */
.side-top { gap: 10px; }
.side-top .brand { min-width: 0; }
@media (min-width: 901px) {
  body:not(.admin-site) .app { grid-template-columns: 288px minmax(0, 1fr);
    background: linear-gradient(90deg, #070c0b 287px, #16211f 287px, #16211f 288px, transparent 288px); }
  .side-top .lang-switch { padding: 2px; }
  .side-top .lang-switch a { padding: 4px 8px; font-size: .72rem; }
}

/* admin tables: a long server / user name wraps onto more lines inside its column instead of pushing the table to the
   right (the column has an upper limit; on phones the rows are cards anyway) */
.admin-table .entity .cell-text b { overflow-wrap: anywhere; word-break: break-word; }
@media (min-width: 641px) {
  .admin-table td:has(> .cell > .entity), .admin-table td:has(> .entity) { max-width: 300px; }
}

/* ---- admin: Mentések, one row per server (its newest save), a click opens the rest ---- */
.snap-srv-list { padding: 0; overflow: hidden; }
.snap-srv-list > .empty { padding: 18px 20px; margin: 0; }
.snap-srv + .snap-srv { border-top: 1px solid var(--border); }
.snap-srv-head { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: grid; align-items: center; gap: 14px;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.4fr) minmax(0, .7fr) minmax(0, 1fr) max-content; padding: 12px 20px; }
.snap-srv-head:hover, .snap-srv.open > .snap-srv-head { background: var(--panel2); }
.snap-srv-head:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.snap-srv-name, .snap-srv-cell { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; font-size: .93rem; }
.snap-srv-state { display: flex; align-items: center; gap: 10px; justify-self: end; }
.snap-srv-arrow { color: var(--muted); }
.snap-srv-detail { padding: 4px 20px 18px; background: #ffffff04; }
.snap-srv-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
@media (max-width: 760px) {
  .snap-srv-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; padding: 12px 16px; }
  .snap-srv-name { grid-column: 1 / -1; }
  .snap-srv-state { grid-column: 1 / -1; justify-self: start; }
  .snap-srv-detail { padding: 4px 16px 16px; }
}
.snap-srv-sub { margin: 14px 0 6px; font-size: .95rem; color: var(--muted); }
.snap-checks { display: grid; gap: 6px; }
.snap-check { display: grid; grid-template-columns: 26px minmax(0, 1fr) max-content; gap: 10px; align-items: start; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.snap-check.bad { border-color: #f8717155; } .snap-check.warn, .snap-check.run { border-color: #fbbf2455; }
.snap-check-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.snap-check-icon.ok { background: #34d39922; color: var(--green); } .snap-check-icon.warn { background: #fbbf2422; color: var(--yellow); }
.snap-check-icon.bad { background: #f8717122; color: var(--red); }
.snap-check-text { min-width: 0; overflow-wrap: anywhere; font-size: .93rem; }
.snap-events { margin-top: 12px; } .snap-events > summary { cursor: pointer; color: var(--muted); font-weight: 600; }
@media (max-width: 640px) { .snap-check { grid-template-columns: 26px minmax(0, 1fr); } .snap-check-fix { grid-column: 2; } }
.info-modal-body { max-height: 65vh; overflow: auto; }
.info-modal-body pre.trace { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .8rem; background: var(--panel2); padding: 10px; border-radius: 8px; }
.btn-pair { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.snap-rules { margin: 0 0 4px; }

/* ---- ticking rows to delete one or several at once (Tranzakciók, a user's page) ---- */
.pick-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; }
.pick-bar .check { margin: 0; }
.pick-box { width: 18px; height: 18px; flex: none; margin: 2px 10px 0 0; accent-color: var(--accent); cursor: pointer; }
.pick-cell { display: flex; align-items: flex-start; }
.mini-row > .pick-box { margin-top: 4px; }
.feed-item > .pick-box { margin-top: 3px; }
.perm-overview .pm-admin .pm-colname { color: #fdba74; }  /* (the admins' columns: the Admin colour) */

/* ---- website Mentések: a partial restore (channels to choose) and Mi változott? ---- */
.snap-mode { margin-top: 4px; }
.snap-chans { display: grid; gap: 4px; max-height: 240px; overflow: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; margin: 6px 0 10px; }
.snap-chans .check { margin: 0; }
.snap-diff { display: grid; gap: 10px; max-height: 60vh; overflow: auto; }
.snap-diff-part ul { margin: 4px 0 0; padding-left: 18px; }
.snap-diff-part li { overflow-wrap: anywhere; }

/* Pricing: every row of a card on one line (the same rows on every card, side by side) */
.plan .checks li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Napló: the list of logs (closed on a phone at first), the chips of a log, the clickable "ki" ---- */
.log-nav-box > summary { display: none; }
.log-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; }
.log-chips-title { margin-right: 4px; }
a.log-who { color: var(--accent2); text-decoration: none; border-bottom: 1px dotted currentColor; }
@media (max-width: 760px) {
  .page-actions.log-actions { margin: 6px 0 10px; flex-wrap: wrap; }  /* (not into the text above it) */
  .page-actions.log-actions .btn { flex: 1 1 auto; }
  .log-nav-box { border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); margin-bottom: 12px; }
  .log-nav-box > summary { display: block; cursor: pointer; padding: 12px 14px; list-style: none; }
  .log-nav-box > summary::-webkit-details-marker { display: none; }
  .log-nav-box[open] > summary { border-bottom: 1px solid var(--border); }
  .log-nav-box > .log-nav { border: 0; margin: 0; }
}

/* Pricing: the currency of the prices (from the visitor's country) and a choice of another one */
.currency-pick { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; margin-top: 18px; text-align: center; }
.currency-pick select { margin-left: 6px; width: auto; padding: 4px 8px; }
.plan-local { line-height: 1.6; }
