:root {
      --primary: #6c5ce7; --secondary: #a29bfe;
      --text: #2d3436; --muted: #636e72;
      --border: rgba(0,0,0,0.08); --error: #ff7675; --success: #00b894;
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Outfit', sans-serif;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      min-height: 100vh;
      display: flex; align-items: center; justify-content: center;
      padding: 20px;
    }
    .auth-wrapper { width: 100%; max-width: 440px; }
    .auth-logo { text-align: center; margin-bottom: 24px; }
    .auth-logo img { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
    .auth-logo h1 { color: #fff; font-size: 1.5rem; font-weight: 800; margin-top: 12px; }
    .auth-logo p { color: rgba(255,255,255,.75); font-size: .9rem; }
    .auth-card { background: #fff; border-radius: 20px; padding: 36px; box-shadow: 0 20px 60px rgba(0,0,0,.2); }

    .tab-switcher { display: flex; background: #f1f0f7; border-radius: 12px; padding: 4px; margin-bottom: 28px; }
    .tab-btn { flex: 1; padding: 10px; border: none; background: none; border-radius: 9px; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .95rem; color: var(--muted); cursor: pointer; transition: all .2s; }
    .tab-btn.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,.1); }

    .form-section { display: none; }
    .form-section.active { display: block; animation: fadeIn .2s ease; }
    @keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

    .form-group { margin-bottom: 18px; }
    .form-group label { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: .88rem; color: var(--text); margin-bottom: 7px; }
    .forgot-link { font-size: .8rem; font-weight: 600; color: var(--primary); cursor: pointer; }
    .forgot-link:hover { text-decoration: underline; }

    .input-wrap { position: relative; }
    .input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .9rem; pointer-events: none; }
    .toggle-pw { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); font-size: .88rem; cursor: pointer; padding: 4px; border-radius: 4px; transition: color .2s; }
    .toggle-pw:hover { color: var(--primary); }

    .form-control {
      width: 100%; padding: 12px 42px 12px 40px;
      border: 1.5px solid var(--border); border-radius: 10px;
      font-family: 'Outfit', sans-serif; font-size: .95rem; color: var(--text);
      transition: border-color .2s, box-shadow .2s; outline: none;
    }
    .form-control.no-right { padding-right: 14px; }
    .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,92,231,.12); }
    .form-control.is-invalid { border-color: var(--error); box-shadow: 0 0 0 3px rgba(255,118,117,.1); }
    .form-control.is-valid   { border-color: var(--success); }

    .field-hint { font-size: .76rem; margin-top: 5px; display: none; }
    .field-hint.show { display: block; }
    .field-hint.err  { color: var(--error); }
    .field-hint.ok   { color: var(--success); }

    /* OTP field dengan tombol GET */
    .otp-wrap { display: flex; gap: 8px; align-items: stretch; }
    .otp-wrap .form-control { flex: 1; letter-spacing: 6px; font-size: 1.1rem; font-weight: 700; text-align: center; padding-left: 14px; padding-right: 14px; }
    .btn-get-otp {
      flex-shrink: 0; padding: 0 16px; border-radius: 10px; border: none;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      color: #fff; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .85rem;
      cursor: pointer; transition: all .2s; white-space: nowrap;
    }
    .btn-get-otp:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,.3); }
    .btn-get-otp:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }
    .otp-countdown { font-size: .76rem; color: var(--muted); margin-top: 5px; display: none; }
    .otp-countdown.show { display: block; }
    .otp-countdown span { color: var(--primary); font-weight: 700; }

    /* Password strength */
    .pw-strength { margin-top: 8px; display: none; }
    .pw-strength.show { display: block; }
    .pw-bars { display: flex; gap: 4px; margin-bottom: 4px; }
    .pw-bar  { flex: 1; height: 4px; border-radius: 99px; background: #e0e0e0; transition: background .3s; }
    .pw-bar.weak   { background: var(--error); }
    .pw-bar.medium { background: #fdcb6e; }
    .pw-bar.strong { background: var(--success); }
    .pw-label { font-size: .74rem; color: var(--muted); }

    .btn-submit {
      width: 100%; padding: 13px;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      color: #fff; border: none; border-radius: 10px;
      font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700;
      cursor: pointer; transition: all .2s; margin-top: 6px;
      display: flex; align-items: center; justify-content: center; gap: 8px;
    }
    .btn-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(108,92,231,.35); }
    .btn-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; box-shadow: none; }

    .alert { padding: 12px 16px; border-radius: 10px; font-size: .88rem; margin-bottom: 18px; display: none; gap: 10px; align-items: flex-start; line-height: 1.55; }
    .alert-error   { background: #fff5f5; color: var(--error);   border: 1px solid rgba(255,118,117,.3); }
    .alert-success { background: #f0fff8; color: var(--success); border: 1px solid rgba(0,184,148,.3); }
    .alert.show { display: flex; }

    .forgot-header { margin-bottom: 20px; }
    .forgot-header h2 { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 5px; }
    .forgot-header p  { font-size: .86rem; color: var(--muted); line-height: 1.6; }
    .back-btn { background: none; border: none; color: var(--primary); font-family: 'Outfit', sans-serif; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 0; display: flex; align-items: center; gap: 6px; margin-bottom: 18px; }
    .back-btn:hover { text-decoration: underline; }

    .back-home { text-align: center; margin-top: 20px; }
    .back-home a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .9rem; transition: color .2s; }
    .back-home a:hover { color: #fff; }

    .spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0; }
    @keyframes spin { to { transform: rotate(360deg); } }