* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #f4ece3;
  --surface:     #ffffff;
  --surface2:    #faf6f1;
  --border:      #e8dfd5;
  --border-mid:  #d5cdc4;
  --primary:     #c8503a;
  --primary-h:   #b34431;
  --primary-dim: rgba(200,80,58,.10);
  --success:     #3a7d44;
  --success-dim: rgba(58,125,68,.10);
  --warning:     #a06010;
  --warning-dim: rgba(160,96,16,.10);
  --danger:      #c8503a;
  --danger-dim:  rgba(200,80,58,.10);
  --text:        #1c1917;
  --text-sub:    #78716c;
  --text-dim:    #b0a89e;
  --r:  12px;
  --rs: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,.07), 0 0 0 1px var(--border);
}

/* ── TICKER BANNER ── */
.ticker-wrap {
  overflow: hidden;
  background: linear-gradient(90deg, #fff8f0, #fff3eb);
  border-bottom: 1px solid #f0e4d8;
  padding: 5px 0;
  cursor: default;
}
.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  animation: ticker-scroll 32s linear infinite;
}
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
.ticker-seg {
  display: inline-block;
  font-size: 11.5px;
  color: #6b5e54;
  padding: 0 4px;
}
.t-ico {
  width: 12px; height: 12px;
  vertical-align: -2px;
  flex-shrink: 0;
}
.ticker-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.ticker-link:hover { text-decoration: underline; }
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

html, body {
  width: 400px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app { display: flex; flex-direction: column; }
.hidden { display: none !important; }

/* ── HEADER ── */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.header-left { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  width: 26px; height: 26px;
  background: var(--primary);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: #fff; font-weight: 700;
}
.logo-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 15px; font-weight: 600;
  color: var(--text); letter-spacing: -.2px;
}
.logo-name span { color: var(--primary); font-style: italic; }
.header-right { display: flex; align-items: center; gap: 8px; }

.proxy-pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
  font-size: 11px; color: var(--text-sub); transition: all .2s;
}
.proxy-pill.active { border-color: var(--success); color: var(--success); background: var(--success-dim); }
.proxy-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim); transition: background .2s; }
.proxy-pill.active .proxy-dot { background: var(--success); }
.version-badge {
  font-size: 10px; color: var(--text-dim);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 20px;
}

/* ── UPDATE BANNER ── */
.update-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff8f0; border-bottom: 1px solid #f0c8a0;
  padding: 9px 16px; animation: slideDown .2s ease;
}
.update-banner.hidden { display: none; }
.update-left { display: flex; align-items: center; gap: 9px; flex: 1; min-width: 0; }
.update-icon { font-size: 17px; flex-shrink: 0; }
.update-title { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 6px; }
.update-ver {
  background: var(--primary-dim); color: var(--primary);
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 20px;
}
.update-log { font-size: 11px; color: var(--text-sub); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.update-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.btn-update-dl {
  background: var(--primary); color: #fff; border: none; border-radius: var(--rs);
  padding: 5px 12px; font-size: 11.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: background .15s; white-space: nowrap;
}
.btn-update-dl:hover { background: var(--primary-h); }
.btn-update-dismiss {
  background: none; border: none; color: var(--text-dim);
  font-size: 14px; cursor: pointer; padding: 2px 4px; transition: color .15s;
}
.btn-update-dismiss:hover { color: var(--text); }

/* ── FB ACCOUNT CARD ── */
.fb-card {
  margin: 12px 14px 0;
  background: var(--surface);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  min-height: 58px;
  display: flex; align-items: center;
}
.fb-card-loading { display: flex; align-items: center; gap: 10px; color: var(--text-sub); font-size: 12px; width: 100%; }
.spinner {
  width: 16px; height: 16px;
  border: 2px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.fb-card-logged { display: flex; align-items: center; gap: 12px; width: 100%; }
.fb-avatar-wrap { position: relative; flex-shrink: 0; }
.fb-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); object-fit: cover; background: var(--surface2);
}
.fb-online-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 10px; height: 10px; background: var(--success);
  border: 2px solid var(--surface); border-radius: 50%;
}
.fb-info { flex: 1; min-width: 0; }
.fb-name { font-size: 14px; font-weight: 600; color: var(--text); font-family: 'Lora', Georgia, serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-status { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); margin-top: 2px; }
.fb-status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--success); }
.fb-card-noauth { display: flex; align-items: center; gap: 11px; width: 100%; }
.fb-noauth-icon { font-size: 20px; opacity: .6; flex-shrink: 0; }
.fb-noauth-title { font-size: 13px; font-weight: 600; color: var(--warning); }
.fb-noauth-sub   { font-size: 11px; color: var(--text-sub); margin-top: 2px; }
.fb-noauth-text  { flex: 1; }

.btn-icon-refresh {
  background: none; border: 1px solid var(--border); color: var(--text-sub);
  border-radius: var(--rs); width: 28px; height: 28px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .18s;
}
.btn-icon-refresh:hover { background: var(--surface2); color: var(--text); }

/* ── KILL SWITCH BANNER ── */
.kill-banner {
  display: flex; align-items: center; gap: 10px;
  background: #fff0ee; border-bottom: 1px solid #f5c4bb;
  padding: 9px 16px; animation: slideDown .2s ease;
}
.kill-banner.hidden { display: none; }
.kill-icon  { font-size: 17px; flex-shrink: 0; }
.kill-text  { flex: 1; min-width: 0; }
.kill-title { font-size: 12px; font-weight: 700; color: var(--primary); }
.kill-sub   { font-size: 11px; color: var(--text-sub); margin-top: 1px; }
.btn-kill-retry {
  background: var(--primary); color: #fff; border: none; border-radius: var(--rs);
  padding: 5px 12px; font-size: 11.5px; font-weight: 700;
  cursor: pointer; transition: background .15s; flex-shrink: 0;
}
.btn-kill-retry:hover { background: var(--primary-h); }

@keyframes slideDown { from { opacity:0; transform:translateY(-5px); } to { opacity:1; transform:translateY(0); } }

/* ── CONTENT ── */
.content {
  flex: 1; overflow-y: auto;
  padding: 12px 14px 24px;
  display: flex; flex-direction: column; gap: 10px;
}

/* ── SECTION LABEL ── */
.section-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: .8px;
  margin-bottom: 6px;
}

/* ── STEP CIRCLE (như CDKey portal) ── */
.step-circle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--primary); color: var(--primary);
  font-size: 10.5px; font-weight: 700; flex-shrink: 0;
  font-family: 'Inter', sans-serif;
}

/* ── STATUS ROW (IP + GPS) ── */
.status-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ── FLAG IMAGE ── */
.flag-img {
  width: 22px; height: auto; border-radius: 2px;
  flex-shrink: 0; vertical-align: middle; display: block;
  box-shadow: 0 0 0 1px rgba(0,0,0,.10);
}
.flag-fallback { font-size: 16px; line-height: 1; }

/* ── IP CHECK ── */
.ip-check-row {
  display: flex; flex-direction: column; gap: 5px;
  background: var(--surface); border-radius: var(--rs);
  box-shadow: var(--shadow); padding: 9px 11px;
}
.ip-top-row { display: flex; align-items: center; justify-content: space-between; }
.ip-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .7px; }
.ip-top-right { display: flex; align-items: center; gap: 5px; }
.ip-ticker { font-size: 10px; color: var(--text-dim); }
.ip-check-left { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ip-check-idle { font-size: 12px; color: var(--text-dim); }
.ip-check-loading { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-sub); }
.spinner-sm {
  width: 10px; height: 10px; flex-shrink: 0;
  border: 1.5px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.ip-check-result { display: flex; align-items: center; gap: 5px; min-width: 0; }
.ip-addr { font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.ip-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.ip-loc-text { font-size: 10px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── PING BADGE ── */
.ping-badge {
  font-size: 9.5px; font-weight: 600; font-family: 'Courier New', monospace;
  padding: 1px 6px; border-radius: 99px; flex-shrink: 0;
  white-space: nowrap;
}
.ping-badge.hidden { display: none; }
.ping-good { background: var(--success-dim); color: var(--success); }
.ping-ok   { background: var(--warning-dim); color: var(--warning); }
.ping-slow { background: var(--danger-dim);  color: var(--danger);  }
.ip-via-badge {
  font-size: 9.5px; padding: 1px 6px; flex-shrink: 0; border-radius: 99px; font-weight: 600;
  background: var(--success-dim); color: var(--success); border: 1px solid rgba(58,125,68,.2);
}
.ip-via-badge.ip-via-killed { background: var(--danger-dim); color: var(--danger); border-color: rgba(200,80,58,.2); }
.btn-refresh-sm {
  background: none; border: none; color: var(--text-dim); font-size: 13px;
  cursor: pointer; padding: 0; line-height: 1; transition: color .15s; flex-shrink: 0;
}
.btn-refresh-sm:hover { color: var(--primary); }

/* ── GPS CARD ── */
.gps-card {
  background: var(--surface); border-radius: var(--rs);
  box-shadow: var(--shadow); padding: 9px 11px;
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.gps-top { display: flex; align-items: center; justify-content: space-between; }
.gps-label { font-size: 10px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: .7px; }
.gps-ticker { font-size: 10px; color: var(--text-dim); }
.gps-body { display: flex; align-items: center; gap: 7px; min-width: 0; }
.gps-flag { display: flex; align-items: center; flex-shrink: 0; }
.gps-info { display: flex; flex-direction: column; min-width: 0; }
.gps-loc    { font-size: 11.5px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gps-coords { font-size: 10px; color: var(--text-dim); font-family: 'Courier New', monospace; margin-top: 1px; }
.gps-dim    { font-size: 11px; color: var(--text-dim); }
.gps-note   { font-size: 10px; color: var(--text-dim); display: flex; align-items: flex-start; gap: 5px; }

/* ── PANE HEADER ── */
.pane-header { display: flex; align-items: center; justify-content: space-between; }
.pane-title { font-size: 14px; font-weight: 600; color: var(--text); font-family: 'Lora', Georgia, serif; }

/* ── STEP ROW ── */
.step-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.step-title { font-size: 12px; font-weight: 600; color: var(--text); font-family: 'Lora', Georgia, serif; font-style: italic; }

/* ── CARD LIST ── */
.card-list { display: flex; flex-direction: column; gap: 7px; max-height: 200px; overflow-y: auto; }

/* ── PROXY CARD (compact 2-row) ── */
.proxy-card {
  background: var(--surface); border-radius: var(--rs);
  box-shadow: var(--shadow); padding: 8px 10px;
  transition: box-shadow .18s;
}
.proxy-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.1), 0 0 0 1px var(--border-mid); }

/* Row 1: host + delete btn */
.pc-row1 { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.pc-host { font-family: 'Courier New', monospace; font-size: 12px; font-weight: 700; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-del-btn {
  flex-shrink: 0; margin-left: 6px;
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 5px; width: 22px; height: 22px; cursor: pointer; font-size: 10px;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.pc-del-btn:hover { background: var(--danger-dim); border-color: var(--primary); color: var(--primary); }

/* Row 2: flag + tags + location + coords */
.pc-row2 { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.pc-type-tag {
  font-size: 9.5px; font-weight: 700; letter-spacing: .3px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-sub);
}
.pc-name-tag {
  font-size: 10.5px; color: var(--text-sub);
  max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pc-loc-inline { font-size: 11px; color: var(--text-sub); font-weight: 500; }
.pc-loc-dim    { font-size: 10.5px; color: var(--text-dim); font-style: italic; }
.pc-gps-inline { font-size: 10px; color: var(--text-dim); margin-left: auto; }

/* legacy — keep for safety */
.pc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.pc-meta   { display: flex; align-items: center; gap: 5px; }
.pc-tags   { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; }
.pc-loc    { font-size: 11px; color: var(--text-sub); }
.pc-gps    { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.expiry-warn { font-size: 10px; color: var(--warning); margin-top: 3px; }

/* ── FORM GPS SECTION ── */
.form-gps-section { margin-bottom: 10px; }
.btn-gps-detect {
  width: 100%; padding: 8px 10px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--text-sub);
  background: var(--surface2); border: 1.5px dashed var(--border-mid);
  border-radius: var(--rs); cursor: pointer; transition: all .15s;
}
.btn-gps-detect:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.btn-gps-detect:disabled { opacity: .55; cursor: not-allowed; }

.form-gps-preview {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 7px 10px; margin-top: 6px; border-radius: var(--rs);
  font-size: 11.5px; min-height: 32px;
}
.form-gps-preview.loading { background: var(--surface2); color: var(--text-dim); }
.form-gps-preview.gps-ok  { background: var(--success-dim); color: var(--success); }
.form-gps-preview.gps-err { background: var(--danger-dim);  color: var(--primary); }
.fgps-loc   { font-weight: 600; flex: 1; }
.fgps-coord { font-size: 10.5px; color: inherit; opacity: .75; }

.gps-spinner {
  display: inline-block; width: 10px; height: 10px;
  border: 1.5px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .6s linear infinite;
}

/* Inline delete confirm */
.pc-confirming { border: 1px solid var(--primary) !important; box-shadow: 0 0 0 2px var(--primary-dim) !important; }
.pc-confirm-row {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; padding-top: 7px;
  border-top: 1px solid var(--border);
}
.pc-confirm-label { font-size: 11.5px; color: var(--text-sub); flex: 1; }
.btn-confirm-yes {
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 5px; cursor: pointer;
}
.btn-confirm-yes:hover { background: var(--primary-h); }
.btn-confirm-no {
  font-size: 11px; padding: 3px 10px;
  background: none; color: var(--text-sub);
  border: 1px solid var(--border); border-radius: 5px; cursor: pointer;
}
.btn-confirm-no:hover { background: var(--surface2); }
.expiry-ok   { font-size: 10px; color: var(--text-dim); margin-top: 3px; }

.tag { font-size: 9.5px; padding: 2px 7px; border-radius: 99px; font-weight: 600; }
.tag-http   { background: var(--surface2); color: var(--text-sub); border: 1px solid var(--border); }
.tag-socks5 { background: #f0ebff; color: #7c3aed; }
.tag-socks4 { background: #ede9fe; color: #6d28d9; }
.tag-v4     { background: var(--primary-dim); color: var(--primary); }
.tag-v6     { background: var(--warning-dim); color: var(--warning); }
.tag-label  { background: var(--surface2); color: var(--text-sub); border: 1px solid var(--border); }

/* ── ACTIVE PROXY ── */
.section-divider { height: 1px; background: var(--border); margin: 2px 0; }
.active-proxy-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: var(--rs);
  box-shadow: var(--shadow); padding: 9px 12px;
  margin-bottom: 8px; font-size: 12px; transition: all .2s;
}
.active-proxy-card.active-on { border: 1px solid rgba(58,125,68,.4); background: var(--success-dim); }
.ap-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; transition: background .2s; }
.active-proxy-card.active-on .ap-dot { background: var(--success); }
.ap-text { color: var(--text-sub); }
.active-proxy-card.active-on .ap-text { color: var(--success); font-weight: 600; }
.ap-detail { font-size: 11px; color: var(--text-dim); margin-left: auto; }
.active-proxy-card.killed { border: 1px solid rgba(200,80,58,.3); background: var(--danger-dim); }
.active-proxy-card.killed .ap-dot { background: var(--primary); }
.active-proxy-card.killed .ap-text { color: var(--primary); }
.ap-kill-badge {
  font-size: 9.5px; font-weight: 700; background: var(--primary); color: #fff;
  padding: 2px 7px; border-radius: 99px; margin-left: 4px;
}
.proxy-actions { display: flex; gap: 6px; align-items: center; }
.proxy-select {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--rs); padding: 8px 10px; font-size: 12px;
  outline: none; cursor: pointer; font-family: inherit;
}
.proxy-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }

/* ── SLIDE FORM ── */
.slide-form {
  background: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 14px; margin-top: 4px;
}
.form-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  margin-bottom: 12px; padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-family: 'Lora', Georgia, serif;
}
.form-group { margin-bottom: 9px; }
.form-group-sm { max-width: 90px; }
.form-group label { display: block; font-size: 10.5px; color: var(--text-sub); margin-bottom: 4px; font-weight: 600; letter-spacing: .2px; }
.label-optional { font-weight: 400; color: var(--text-dim); }
.form-group input,
.form-group select {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--rs); padding: 8px 10px; font-size: 12px;
  outline: none; transition: border-color .18s; font-family: inherit;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.form-group input::placeholder { color: var(--text-dim); }
.form-row   { display: flex; gap: 7px; justify-content: flex-end; margin-top: 12px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gps-note {
  font-size: 10.5px; color: var(--text-dim); display: flex; align-items: flex-start;
  gap: 5px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 7px 9px; margin-bottom: 9px;
}

/* ── EMPTY STATE ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px 20px; color: var(--text-dim); text-align: center;
}
.empty-icon { margin-bottom: 7px; opacity: .35; color: var(--text-sub); }
.empty-text { font-size: 12px; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--primary); color: #fff; border: none; border-radius: var(--rs);
  padding: 8px 16px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-primary:hover { background: var(--primary-h); }
.btn-primary.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-ghost {
  background: none; color: var(--text-sub); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 8px 16px; font-size: 12.5px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }
.btn-ghost.btn-sm { padding: 5px 12px; font-size: 12px; }

.btn-success {
  background: var(--success); color: #fff; border: none; border-radius: var(--rs);
  padding: 8px 14px; font-size: 12px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
.btn-success:hover { background: #2d6234; }

.btn-danger-ghost {
  background: none; color: var(--primary); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 8px 12px; font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.btn-danger-ghost:hover { background: var(--danger-dim); border-color: var(--primary); }

.icon-btn {
  background: none; border: 1px solid var(--border); color: var(--text-sub);
  border-radius: var(--rs); width: 25px; height: 25px; cursor: pointer; font-size: 11px;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.icon-btn:hover { background: var(--surface2); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-dim); border-color: var(--primary); color: var(--primary); }

/* ── HEALTH ROW ── */
.health-row {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 7px 10px; margin-bottom: 8px; font-size: 11.5px;
}
.health-row.hidden { display: none; }
.health-item { display: flex; align-items: center; gap: 5px; flex: 1; }
.health-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); flex-shrink: 0; transition: background .3s; }
.health-dot.ok      { background: var(--success); }
.health-dot.fail    { background: var(--primary); }
.health-dot.checking{ background: var(--warning); animation: pulse .8s infinite; }
.health-label { font-size: 11.5px; color: var(--text); font-weight: 500; }
.health-sub   { font-size: 10.5px; color: var(--text-dim); }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.4; } }

/* ── GROUP RECOMMENDATIONS ── */
.group-recs-list { display: flex; flex-direction: column; gap: 5px; max-height: 160px; overflow-y: auto; }
.group-rec-item {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--rs); padding: 8px 11px;
  cursor: pointer; text-decoration: none; transition: all .15s;
}
.group-rec-item:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-dim); }
.group-rec-icon { font-size: 14px; flex-shrink: 0; }
.group-rec-text { flex: 1; min-width: 0; }
.group-rec-name { font-size: 12px; font-weight: 500; color: var(--text); }
.group-rec-q    { font-size: 10.5px; color: var(--text-sub); margin-top: 1px; }
.group-rec-arrow{ color: var(--text-dim); font-size: 12px; flex-shrink: 0; }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 14px; left: 50%;
  transform: translateX(-50%);
  background: var(--text); color: #fff;
  padding: 8px 18px; border-radius: 99px; font-size: 12px; font-weight: 500;
  z-index: 999; white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.18);
  animation: toastIn .18s ease;
}
.toast.hidden  { display: none; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--primary); }
@keyframes toastIn {
  from { opacity:0; transform:translateX(-50%) translateY(7px); }
  to   { opacity:1; transform:translateX(-50%) translateY(0); }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 99px; }
