:root {
      --orange: #9665C7;
      --orange-hover: #7108a1cc;
      --bg-dark: rgba(0, 0, 0, 0.75);
      --input-bg: #333;
      --input-focus-bg: #444;
      --text-muted: #b3b3b3;
      --text-white: #fff;
      --border-radius: 4px;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: "Roboto", sans-serif;
    }

    body {
      background: #000;
      min-height: 100vh;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      opacity: 0.5;
      background: url(img/bg_login.png) center/cover no-repeat;
      z-index: 0;
    }

    /* ── NAV ── */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      padding: 25px 60px;
      z-index: 10;
      display: flex;
      align-items: center;
    }

    nav a img {
      width: 167px;
    }

    /* ── CARD ── */
    .form-wrapper {
      position: relative;
      z-index: 1;
      margin: 0 auto;
      margin-top: 60px;
      margin-bottom: 60px;
      border-radius: var(--border-radius);
      padding: 60px 68px 40px;
      width: 450px;
      background: var(--bg-dark);
    }

    .form-wrapper h2 {
      color: var(--text-white);
      font-size: 2rem;
      margin-bottom: 6px;
    }

    .form-wrapper .subtitle {
      color: var(--text-muted);
      font-size: 0.95rem;
      margin-bottom: 24px;
    }

    /* ── TABS ── */
    .tabs {
      display: flex;
      gap: 0;
      margin-bottom: 28px;
      border-bottom: 2px solid #444;
    }

    .tab-btn {
      flex: 1;
      padding: 10px 0;
      background: transparent;
      border: none;
      outline: none;
      color: var(--text-muted);
      font-size: 1rem;
      font-weight: 500;
      cursor: pointer;
      position: relative;
      transition: color 0.2s;
    }

    .tab-btn::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 0;
      height: 2px;
      background: var(--orange);
      transition: width 0.25s ease;
    }

    .tab-btn.active {
      color: var(--text-white);
    }

    .tab-btn.active::after {
      width: 100%;
    }

    /* ── PANELS ── */
    .panel {
      display: none;
      animation: fadeIn 0.3s ease;
    }

    .panel.active {
      display: block;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(6px); }
      to   { opacity: 1; transform: translateY(0); }
    }

    /* ── FORM CONTROLS ── */
    form {
      margin-bottom: 20px;
    }

    .form-control {
      height: 50px;
      position: relative;
      margin-bottom: 16px;
    }

    .form-control input {
    height: 100%;
    width: 100%;
    background: var(--input-bg);
    border: none;
    outline: none;
    border-radius: var(--border-radius);
    color: var(--text-white);
    font-size: 1rem;
    padding: 0 20px;
    transition: background 0.15s, padding 0.15s;
    }

    .form-control input::placeholder {
    color: transparent;
    }

    .form-control label {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    color: #8c8c8c;
    transition: all 0.15s ease;
    }

    .form-control input:focus,
    .form-control input:not(:placeholder-shown) {
    background: var(--input-focus-bg);
    padding: 20px 20px 0;
    }

    .form-control input:focus ~ label,
    .form-control input:not(:placeholder-shown) ~ label {
    font-size: 0.76rem;
    transform: translateY(-140%); 
    }

    .form-control input:focus ~ label {
    color: var(--orange);
    }

    .server-message {
    display: none;
    background: rgba(229, 9, 20, 0.15);
    color: #ff5252;
    border-left: 4px solid #ff5252;
    padding: 12px 15px;
    font-size: 0.88rem;
    font-family: "Roboto", sans-serif;
    font-weight: 500;
    line-height: 1.4;
    min-height: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    word-break: break-word;
    animation: fadeIn 0.3s ease;
    }

    /* Estado de desativado para o botão (Modificação 2) */
    form .btn-submit:disabled {
    background: #555 !important;
    cursor: not-allowed;
    opacity: 0.8;
    filter: grayscale(1);
    }

    /* ── password toggle (olho animado) ── */
    .toggle-pw {
      position: absolute; right: 12px; top: 50%;
      transform: translateY(-50%);
      background: none; border: none; outline: none;
      cursor: pointer; padding: 4px;
      display: flex; align-items: center; justify-content: center;
    }

    .eye-svg { width: 22px; height: 22px; overflow: visible; }

    .lid-path {
      transition: d 0.35s cubic-bezier(.4,0,.2,1);
    }
    .pupil {
      transition: r 0.3s ease, opacity 0.3s ease;
      transform-origin: 11px 11px;
    }
    .slash {
      transition: opacity 0.25s ease;
    }

    /* olho ABERTO — senha visível */
    .eye-open .lid-path {
      d: path("M1 11 C4 5, 18 5, 21 11 C18 17, 4 17, 1 11 Z");
    }
    .eye-open .pupil  { r: 3.5; opacity: 1; }
    .eye-open .slash  { opacity: 0; }

    /* olho FECHADO — senha oculta */
    .eye-closed .lid-path {
      d: path("M1 11 C4 9.5, 18 9.5, 21 11 C18 12.5, 4 12.5, 1 11 Z");
    }
    .eye-closed .pupil { r: 0; opacity: 0; }
    .eye-closed .slash { opacity: 1; }

    /* piscar ao clicar */
    @keyframes blink {
      0%  { transform: translateY(-50%) scaleY(1); }
      30% { transform: translateY(-50%) scaleY(0.05); }
      60% { transform: translateY(-50%) scaleY(1); }
    }
    .eye-blink { animation: blink 0.35s ease forwards; }

    /* ── SUBMIT BUTTON ── */
    form .btn-submit {
      width: 100%;
      padding: 16px 0;
      font-size: 1rem;
      background: var(--orange);
      color: var(--text-white);
      font-weight: 600;
      border-radius: var(--border-radius);
      border: none;
      outline: none;
      margin: 20px 0 12px;
      cursor: pointer;
      transition: background 0.15s ease;
    }

    form .btn-submit:hover {
      background: var(--orange-hover);
    }

    /* ── FORM HELP ── */
    .form-help {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .remember-me {
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .remember-me input {
      accent-color: var(--text-muted);
    }

    .form-help label,
    .form-help a {
      font-size: 0.88rem;
      color: var(--text-muted);
    }

    /* ── DIVIDER ── */
    .divider {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 22px 0 18px;
      color: #555;
      font-size: 0.85rem;
    }

    .divider::before,
    .divider::after {
      content: "";
      flex: 1;
      height: 1px;
      background: #444;
    }

    /* ── SOCIAL BUTTONS ── */
    .social-btns {
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 20px;
    }

    .btn-social {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px 20px;
      border-radius: var(--border-radius);
      border: 1px solid #555;
      background: transparent;
      color: var(--text-white);
      font-size: 0.95rem;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }

    .btn-social:hover {
      background: rgba(255,255,255,0.07);
      border-color: #777;
    }

    .btn-social i {
      font-size: 1.1rem;
      width: 20px;
      text-align: center;
    }

    .btn-social .social-text {
      flex: 1;
      text-align: center;
    }

    /* ── FOOTER COPY ── */
    .form-footer {
      color: var(--text-muted);
      font-size: 0.9rem;
      margin-top: 16px;
    }

    .form-footer a {
      color: var(--text-white);
      text-decoration: none;
    }

    .form-footer a:hover {
      text-decoration: underline;
    }

    .form-wrapper small {
      display: block;
      margin-top: 14px;
      color: var(--text-muted);
      font-size: 0.8rem;
      line-height: 1.5;
    }

    .form-wrapper small a {
      color: #0071eb;
      text-decoration: none;
    }

    .form-wrapper small a:hover {
      text-decoration: underline;
    }

    /* ── TERMS (cadastro) ── */
    .terms {
      color: var(--text-muted);
      font-size: 0.78rem;
      line-height: 1.5;
      margin-top: 14px;
    }

    .terms a {
      color: #0071eb;
      text-decoration: none;
    }

    .strength-bar {
      display: flex;
      gap: 4px;
      margin-top: 6px;
      margin-bottom: 4px;
    }

    .strength-bar span {
      flex: 1;
      height: 3px;
      border-radius: 2px;
      background: #555;
      transition: background 0.3s;
    }

    .strength-label {
      font-size: 0.72rem;
      color: var(--text-muted);
      margin-bottom: 10px;
    }

    /* ══ RESPONSIVE ══════════════════════════════════════════ */

    /* ── Tablet landscape / small desktop (max 1024px) ── */
    @media (max-width: 1024px) {
      nav { padding: 20px 40px; display: flex; align-items: center; }

      .form-wrapper {
        width: 420px;
        padding: 50px 50px 36px;
        margin-top: 100px;
      }
    }

    /* ── Tablet portrait (max 768px) ── */
    @media (max-width: 768px) {
      nav { padding: 18px 30px; display: flex; align-items: center; }
      nav a img { width: 148px; }

      .form-wrapper {
        width: 88%;
        padding: 46px 40px 32px;
        margin-top: 90px;
        margin-bottom: 40px;
      }

      .form-wrapper h2 { font-size: 1.75rem; }

      form .btn-submit { padding: 14px 0; }
    }

    /* ── Mobile (max 480px) ── */
    @media (max-width: 480px) {
      body::before { display: none; }

      #main-nav {
        padding: 0;
        background: rgba(0,0,0,0.85);
        display: flex;
        justify-content: center;
        align-items: center;
        height: 64px;
      }
      #main-nav a {
        display: flex;
        justify-content: center;
        align-items: center;
      }
      #main-nav a img { width: 110px; }

      /* container ocupa a tela toda */
      div[style] {
        padding-top: 60px !important;
        align-items: stretch !important;
      }

      .form-wrapper {
        width: 100%;
        min-height: calc(100vh - 64px);
        border-radius: 0;
        padding: 36px 20px 28px;
        margin: 0;
        background: rgba(0,0,0,0.92);
      }

      .form-wrapper h2 { font-size: 1.55rem; }
      .form-wrapper .subtitle { font-size: 0.88rem; margin-bottom: 18px; }

      .tabs { margin-bottom: 20px; }
      .tab-btn { font-size: 0.92rem; padding: 9px 0; }

      .form-control { height: 48px; margin-bottom: 13px; }
      .form-control input { font-size: 0.95rem; }

      form .btn-submit {
        padding: 14px 0;
        font-size: 0.97rem;
        margin: 16px 0 10px;
      }

      .form-help a { font-size: 0.82rem; }

      .btn-social { padding: 10px 14px; font-size: 0.88rem; }

      .form-footer { font-size: 0.82rem; }
      .terms       { font-size: 0.75rem; }

      .form-wrapper small { font-size: 0.75rem; }
    }

    /* ── Very small phones (max 360px) ── */
    @media (max-width: 360px) {
      .form-wrapper { padding: 28px 16px 24px; }
      .form-wrapper h2 { font-size: 1.4rem; }
      .form-control { height: 46px; }
    }

    /* ── ESQUECI MINHA SENHA (NOVO) ── */
    .forgot-header {
      text-align: center;
      margin-bottom: 25px;
    }

    .forgot-header i.fa-scissors {
      font-size: 2.5rem;
      color: var(--text-white);
      margin-bottom: 15px;
      display: inline-block;
      transform: rotate(-45deg); /* Rotação estilosa parecida com a logo */
    }

    .forgot-header h2 {
      font-size: 2.2rem;
      color: var(--text-white);
      margin-bottom: 6px;
    }

    .forgot-header p {
      color: var(--text-muted);
      font-size: 1rem;
    }

    /* Ícone de carta dentro do input */
    .form-control .input-icon {
      position: absolute;
      right: 18px;
      top: 50%;
      transform: translateY(-50%);
      color: #666;
      font-size: 1.1rem;
      pointer-events: none;
    }

    .back-link {
      display: inline-block;
      color: var(--text-muted);
      text-decoration: none;
      font-size: 0.95rem;
      transition: color 0.15s;
    }

    .back-link:hover {
      color: var(--text-white);
    }

    .back-link i {
      margin-right: 5px;
    }

    /* Helper Class para esconder o header padrão (Abas, Título) */
    .d-none {
      display: none !important;
    }

    .reset-error {
        color: #ff5252;
        background: rgba(229, 9, 20, 0.12);
        border-left: 3px solid #ff5252;
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 4px;
        margin-bottom: 12px;
    }