/* WEB PANEL PROXY public CSS */
* { margin: 0; padding: 0; box-sizing: border-box; }
  
  :root {
    --primary: #4f46e5;
    --primary-dark: #3730a3;
    --accent: #06b6d4;
    --text: #1e293b;
    --text-light: #64748b;
    --bg-light: #f8fafc;
    --border: #e2e8f0;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    background: #fff;
    color: var(--text);
  }

  /* ===== Левая панель (бренд) ===== */
  .brand-panel {
    flex: 1;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
    color: white;
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
  }

  .brand-panel::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    top: -150px; right: -150px;
    border-radius: 50%;
  }

  .brand-panel::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    border-radius: 50%;
  }

  .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    z-index: 1;
  }

  .logo-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.3);
  }

  .hero {
    z-index: 1;
    max-width: 480px;
  }

  .hero h1 {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
  }

  .hero p {
    font-size: 17px;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 36px;
  }

  .features {
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 1;
  }

  .feature {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 15px;
  }

  .feature-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
  }

  /* ===== Правая панель (форма) ===== */
  .auth-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: var(--bg-light);
  }

  .auth-container {
    width: 100%;
    max-width: 420px;
  }

  .auth-header {
    margin-bottom: 32px;
  }

  .auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
  }

  .auth-header p {
    color: var(--text-light);
    font-size: 15px;
  }

  /* Блок ошибки */
  .error-alert {
    display: none;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    border-radius: 10px;
    margin-bottom: 20px;
    color: #991b1b;
    font-size: 14px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
  }

  .error-alert.show { display: flex; }

  .error-alert svg {
    flex-shrink: 0;
    color: var(--error);
    margin-top: 1px;
  }

  .error-alert strong { display: block; margin-bottom: 2px; }

  .error-alert .error-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #991b1b;
    cursor: pointer;
    padding: 0;
    opacity: 0.6;
  }

  .error-alert .error-close:hover { opacity: 1; }

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

  /* Тряска формы при ошибке */
  @keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
  }

  .shake { animation: shake 0.4s; }

  /* Форма */
  .form-group {
    margin-bottom: 18px;
  }

  .form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
  }

  .input-wrap {
    position: relative;
  }

  .input-wrap svg.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color 0.2s;
  }

  .form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s;
    font-family: inherit;
  }

  .form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79,70,229,0.1);
  }

  .form-input.input-error {
    border-color: var(--error);
    background: var(--error-bg);
  }

  .form-input.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
  }

  .input-wrap:has(.input-error) svg.input-icon {
    color: var(--error);
  }

  .toggle-pass {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
  }

  .form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    font-size: 14px;
  }

  .checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
  }

  .checkbox-wrap input {
    width: 16px; height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
  }

  .forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
  }

  .forgot-link:hover { text-decoration: underline; }

  .submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(79,70,229,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79,70,229,0.4);
  }

  .submit-btn:active:not(:disabled) { transform: translateY(0); }

  .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
  }

  .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
  }

  .submit-btn.loading .spinner { display: block; }
  .submit-btn.loading .btn-text { opacity: 0.8; }

  @keyframes spin { to { transform: rotate(360deg); } }

  .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--text-light);
    font-size: 13px;
  }

  .divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  .social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .social-btn {
    padding: 11px;
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
  }

  .social-btn:hover {
    border-color: var(--primary);
    background: #fafaff;
  }

  .footer-text {
    text-align: center;
    margin-top: 28px;
    font-size: 13px;
    color: var(--text-light);
  }

  .attempts-info {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-light);
  }

  /* Адаптив */
  @media (max-width: 900px) {
    body { flex-direction: column; }
    .brand-panel { padding: 40px 30px; }
    .hero h1 { font-size: 30px; }
    .features { display: none; }
    .auth-panel { padding: 30px 20px; }
  }