/* ============================================================
   WIREGUARD — (tách từ style.css, dòng 349-456)
   ============================================================ */

  /* ---------- WireGuard card (flat, chuyên nghiệp) ---------- */
  .wg-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 18px;
    max-width: 560px;
    margin: 0 auto;
  }
  .wg-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; padding-bottom: 14px;
  }
  .wg-title { font-size: 15px; font-weight: 700; color: var(--text-main); letter-spacing: .2px; margin-bottom: 4px; }
  .wg-status { font-size: 12.5px; color: var(--text-dim); line-height: 1.5; }

  /* Công tắc bật/tắt — thay nút Bật/Tắt */
  .wg-switch {
    flex: 0 0 auto;
    width: 46px; height: 26px;
    border-radius: 999px;
    border: none;
    background: rgba(255,255,255,0.12);
    cursor: pointer;
    position: relative;
    transition: background .18s ease;
    padding: 0;
  }
  .wg-switch[aria-checked="true"] { background: var(--cyan); }
  .wg-switch:disabled { opacity: .55; cursor: wait; }
  .wg-switch-knob {
    position: absolute; top: 3px; left: 3px;
    width: 20px; height: 20px; border-radius: 50%;
    background: #fff;
    transition: transform .18s ease;
  }
  .wg-switch[aria-checked="true"] .wg-switch-knob { transform: translateX(20px); }

  /* 2 slot config */
  .wg-slots { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hairline); }
  @container (max-width: 520px) { .wg-slots { grid-template-columns: 1fr; } }
  .wg-slot {
    padding: 14px 4px 4px;
    display: flex; flex-direction: column; gap: 12px;
    border-radius: var(--radius-sm);
  }
  .wg-slot + .wg-slot { border-left: 1px solid var(--hairline); padding-left: 16px; margin-left: 16px; }
  @container (max-width: 520px) {
    .wg-slot + .wg-slot { border-left: none; border-top: 1px solid var(--hairline); padding-left: 4px; margin-left: 0; margin-top: 4px; padding-top: 14px; }
  }
  .wg-slot.active {
    outline: 1px solid rgba(113,112,255,0.45);
    outline-offset: -1px;
    background: rgba(113,112,255,0.06);
    border-radius: var(--radius-sm);
    padding-left: 10px; padding-right: 10px;
  }
  .wg-slot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
  .wg-slot-name { font-size: 13px; font-weight: 700; color: var(--text-main); }
  .wg-slot-badge { font-size: 10.5px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
  .wg-slot-badge.used { color: var(--cyan); }
  .wg-slot-badge.empty { color: var(--text-faint); }

  .wg-slot-actions { display: flex; gap: 6px; }
  .wg-btn {
    flex: 1;
    padding: 7px 10px;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: filter .15s, background .15s;
    border: none;
  }
  .wg-btn:disabled { opacity: .45; cursor: default; }
  .wg-btn-ghost { background: rgba(255,255,255,0.06); color: var(--text-main); }
  .wg-btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.1); }
  .wg-btn-use { background: transparent; color: var(--cyan); border: 1px solid rgba(113,112,255,0.4); }
  .wg-btn-use:hover:not(:disabled) { background: rgba(113,112,255,0.12); }

  /* Khu sửa config */
  .wg-editor {
    border-top: 1px solid var(--hairline);
    padding-top: 14px; margin-top: 14px;
    display: flex; flex-direction: column; gap: 10px;
  }
  .wg-editor-title { font-size: 12px; font-weight: 700; color: var(--text-dim); letter-spacing: .3px; }
  .wg-editor textarea {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: var(--font-mono);
    font-size: 11.5px;
    line-height: 1.5;
    padding: 10px 12px;
    resize: vertical;
    outline: none;
  }
  .wg-editor textarea:focus { border-color: rgba(113,112,255,0.5); }
  .wg-editor-actions { display: flex; gap: 8px; justify-content: flex-end; }
  .wg-editor-actions .btn-primary { padding: 8px 18px; font-size: 13px; border-radius: var(--radius-sm); }

  /* Chọn kiểu kết nối (WireGuard / OpenVPN) */
  .wg-mode { display: flex; gap: 6px; background: var(--bg-deep); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 4px; }
  .wg-mode-btn {
    flex: 1; padding: 8px 10px; border: none; border-radius: var(--radius-xs, 6px);
    background: transparent; color: var(--text-dim); font-family: var(--font); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s, color .15s;
  }
  .wg-mode-btn:hover:not(.active) { color: var(--text-main); }
  .wg-mode-btn.active { background: var(--bg-card); color: var(--text-main); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

