/* WEB PANEL PROXY public CSS */
* { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background-color: #e6e6e6;
    font-family: "Tahoma", "Verdana", sans-serif;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
  }

  .card {
    background-color: #ffffff;
    width: 420px;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border: 1px solid #d4d4d4;
    overflow: hidden;
    position: relative;
  }

  /* ===== Шапка ===== */
  .card-header {
    background: linear-gradient(to bottom, #b98ee0, #8e5cc4);
    color: #fff;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-bottom: 1px solid #7a4aad;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
  }

  .shield-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
  }

  .card-header .subtitle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: normal;
    opacity: 0.7;
    text-shadow: none;
  }

  .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* ===== Поля ввода ===== */
  .input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  label {
    font-size: 11px;
    color: #666;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }

  label .opt {
    color: #999;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    font-size: 10px;
  }

  input[type="text"] {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #bdc7d8;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #fff;
  }

  input[type="text"]:focus {
    border-color: #8e5cc4;
    box-shadow: 0 0 4px rgba(142, 92, 196, 0.35);
  }

  input[type="text"]::placeholder {
    color: #aaa;
  }

  /* ===== Область капчи ===== */
  .captcha-area {
    display: flex;
    gap: 10px;
    align-items: stretch;
  }

  .captcha-canvas-wrap {
    flex: 1;
    position: relative;
    border: 1px solid #bdc7d8;
    border-radius: 4px;
    background: #f4f4f4;
    overflow: hidden;
    height: 82px;
  }

  #captchaCanvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
  }

  .captcha-badge {
    position: absolute;
    top: 4px;
    left: 6px;
    font-size: 9px;
    color: #8e5cc4;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.65;
    pointer-events: none;
    background: rgba(255,255,255,0.7);
    padding: 1px 5px;
    border-radius: 3px;
  }

  .refresh-btn {
    width: 82px;
    padding: 6px;
    border: 1px solid #999;
    border-radius: 4px;
    font-family: inherit;
    font-weight: bold;
    font-size: 10px;
    cursor: pointer;
    color: #333;
    background: linear-gradient(to bottom, #f6f7f8, #dde1e6);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .refresh-btn:hover {
    background: linear-gradient(to bottom, #efeff1, #cfd5dc);
  }

  .refresh-btn:active {
    background: #dde1e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
  }

  .refresh-btn .reload-ic {
    width: 18px;
    height: 18px;
  }

  /* ===== Кнопки действий ===== */
  .btn-group {
    display: flex;
    gap: 10px;
    margin-top: 2px;
  }

  button {
    flex: 1;
    padding: 9px 15px;
    border: 1px solid #999;
    border-radius: 4px;
    font-family: inherit;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    color: #333;
    background: linear-gradient(to bottom, #f6f7f8, #dde1e6);
    box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.1s;
  }

  button:active {
    background: #dde1e6;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
  }

  button.primary {
    color: #fff;
    border-color: #7a4aad;
    background: linear-gradient(to bottom, #a878d4, #8e5cc4);
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  }

  button.primary:hover {
    background: linear-gradient(to bottom, #9d6ecb, #7a4aad);
  }

  button.primary:active {
    background: #7a4aad;
  }

  /* ===== Индикатор статуса ===== */
  .status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    background: #f4f4f4;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    min-height: 34px;
  }

  .status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #bbb;
    flex-shrink: 0;
    transition: background 0.2s;
  }

  .status-dot.ok {
    background: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  }

  .status-dot.err {
    background: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.2);
  }

  .status-dot.wait {
    background: #f1c40f;
    box-shadow: 0 0 0 3px rgba(241, 196, 15, 0.2);
    animation: blink 1s infinite;
  }

  @keyframes blink {
    50% { opacity: 0.4; }
  }

  /* ===== Поле вывода токена ===== */
  .output-wrapper {
    position: relative;
  }

  #outputToken {
    background-color: #fafafa;
    color: #6b3fa0;
    font-family: "Consolas", "Courier New", monospace;
    letter-spacing: 0.5px;
    font-weight: bold;
    font-size: 12px;
    padding-right: 70px;
    cursor: text;
  }

  .copy-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    flex: none;
    padding: 3px 8px;
    background: none;
    border: 1px solid #ccc;
    box-shadow: none;
    font-size: 10px;
    color: #666;
    font-weight: bold;
    border-radius: 3px;
  }

  .copy-btn:hover {
    color: #333;
    background: #e1e4e8;
  }

  /* ===== Статистика ===== */
  .stats {
    display: flex;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    font-size: 10px;
  }

  .stat {
    flex: 1;
    padding: 8px 6px;
    text-align: center;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
  }

  .stat:last-child { border-right: none; }

  .stat .n {
    font-size: 14px;
    font-weight: bold;
    color: #8e5cc4;
    font-family: "Consolas", monospace;
    line-height: 1.1;
  }

  .stat .l {
    font-size: 9px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 2px;
  }

  /* ===== Футер ===== */
  .card-footer {
    background-color: #f7f7f7;
    padding: 10px;
    text-align: center;
    border-top: 1px solid #ddd;
    font-size: 11px;
    color: #777;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .card-footer .brand {
    font-weight: bold;
    color: #8e5cc4;
  }

  .card-footer a {
    color: #8e5cc4;
    text-decoration: none;
  }

  .card-footer a:hover {
    text-decoration: underline;
  }

  /* ===== Toast ===== */
  #toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 10px 14px;
    position: fixed;
    z-index: 1000;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
  }

  #toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
  }

  /* ===== Версия ===== */
  .version-tag {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    font-family: monospace;
    letter-spacing: 0.5px;
  }

[data-wpp-style="wpp-0"]{margin-top: 4px;}