/* ────────────────────────────────────────────
   AUTH
──────────────────────────────────────────── */
    #view-auth.active {
      display: block;
      overflow-y: auto;
      height: 100vh;
      -webkit-overflow-scrolling: touch;
    }

    #view-auth {
      background:
        radial-gradient(ellipse at 30% 20%, rgba(200, 75, 47, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 80%, rgba(192, 125, 42, 0.06) 0%, transparent 50%),
        var(--cream);
    }

    .auth-hero {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: calc(48px + env(safe-area-inset-top)) 28px 400px;
      text-align: center;
    }

    .auth-logo {
      width: 88px;
      height: 88px;
      border-radius: 22px;
      margin-bottom: 24px;
      box-shadow: 0 8px 32px rgba(26, 22, 18, 0.2);
      flex-shrink: 0;
    }

    .auth-logo img {
      width: 100%;
      height: 100%;
      object-fit: contain;
      display: block;
      border-radius: 22px;
    }

    .auth-headline {
      font-family: var(--serif);
      font-size: 38px;
      font-weight: 700;
      line-height: 1.1;
      letter-spacing: -1px;
      color: var(--ink);
      margin-bottom: 12px;
    }

    .auth-headline em {
      font-style: italic;
      color: var(--rust);
    }

    .auth-sub {
      font-size: 15px;
      color: var(--ink3);
      font-weight: 400;
      line-height: 1.5;
    }

    .auth-sheet {
      background: var(--white);
      border-radius: 28px 28px 0 0;
      padding: 28px 24px calc(40px + env(safe-area-inset-bottom));
      box-shadow: 0 -8px 40px rgba(26, 22, 18, 0.1);
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 10;
      touch-action: manipulation;
    }

    .auth-tabs {
      display: flex;
      background: var(--cream2);
      border-radius: var(--radius-full);
      padding: 4px;
      margin-bottom: 24px;
    }

    .auth-tab {
      flex: 1;
      padding: 10px;
      border: none;
      background: transparent;
      color: var(--ink3);
      font-family: var(--sans);
      font-size: 14px;
      font-weight: 600;
      border-radius: var(--radius-full);
      cursor: pointer;
      transition: all 0.2s;
      touch-action: manipulation;
      -webkit-user-select: none;
      user-select: none;
    }

    .auth-tab.active {
      background: var(--white);
      color: var(--ink);
      box-shadow: var(--shadow-sm);
    }

    .field {
      margin-bottom: 14px;
    }

    .field-label {
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: var(--ink3);
      margin-bottom: 6px;
      display: block;
    }

    .field-input {
      width: 100%;
      background: var(--cream);
      border: 1.5px solid var(--cream3);
      border-radius: 14px;
      padding: 13px 16px;
      color: var(--ink);
      font-family: var(--sans);
      font-size: 15px;
      outline: none;
      transition: border-color 0.2s, background 0.2s;
    }

    .field-input:focus {
      border-color: var(--rust);
      background: var(--white);
    }

    .field-input::placeholder {
      color: var(--ink4);
    }

    /* ── Password wrapper + eye toggle ── */
    .pass-wrap {
      position: relative;
    }

    .pass-wrap .field-input {
      padding-right: 48px;
      box-sizing: border-box;
      width: 100%;
    }

    .eye-btn {
      position: absolute;
      right: 12px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      cursor: pointer;
      padding: 6px;
      color: var(--ink3);
      line-height: 0;
      user-select: none;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 8px;
      transition: color .15s, background .15s;
    }

    .eye-btn:hover {
      color: var(--rust);
      background: var(--rust-light);
    }

    .eye-btn:active {
      background: var(--cream3);
    }

    .eye-btn svg {
      display: block;
      pointer-events: none;
    }

    /* ── Phone input with country-code prefix ── */
    .phone-wrap {
      display: flex;
      align-items: center;
      background: var(--cream);
      border: 1.5px solid var(--cream3);
      border-radius: 14px;
      overflow: hidden;
      transition: border-color 0.2s, background 0.2s;
    }

    .phone-wrap:focus-within {
      border-color: var(--rust);
      background: var(--white);
    }

    .phone-prefix {
      padding: 0 10px 0 16px;
      font-size: 15px;
      font-weight: 500;
      color: var(--ink3);
      white-space: nowrap;
      user-select: none;
      flex-shrink: 0;
      border-right: 1.5px solid var(--cream3);
    }

    .phone-wrap .field-input {
      border: none;
      border-radius: 0;
      background: transparent;
      padding-left: 12px;
      flex: 1;
      min-width: 0;
    }

    .phone-wrap .field-input:focus {
      background: transparent;
    }

    /* ── Inline field hint (password strength / match) ── */
    .field-hint {
      font-size: 11px;
      margin-top: 5px;
      padding-left: 4px;
      min-height: 14px;
      transition: color .2s;
    }

    .field-hint.ok {
      color: var(--green);
    }

    .field-hint.err {
      color: var(--rust);
    }

    .btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border: none;
      font-family: var(--sans);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      text-decoration: none;
      touch-action: manipulation;
      -webkit-user-select: none;
      user-select: none;
    }

    .btn-primary {
      width: 100%;
      padding: 15px 24px;
      background: var(--ink);
      color: var(--cream);
      border-radius: var(--radius-full);
      font-size: 15px;
    }

    .btn-primary:hover {
      background: var(--ink2);
      transform: translateY(-1px);
      box-shadow: var(--shadow);
    }

    .btn-primary:active {
      transform: none;
    }

    .btn-secondary {
      background: var(--cream2);
      color: var(--ink);
      border-radius: var(--radius-full);
      padding: 11px 20px;
      font-size: 13px;
    }

    .btn-danger {
      background: rgba(200, 75, 47, 0.1);
      color: var(--rust);
      border-radius: var(--radius-full);
      padding: 11px 20px;
      font-size: 13px;
    }

    .btn-ghost {
      background: transparent;
      color: var(--ink3);
      border: 1.5px solid var(--cream3);
      border-radius: var(--radius-full);
      padding: 11px 20px;
      font-size: 13px;
    }

    .btn-success {
      background: var(--green-light);
      color: var(--green);
      border-radius: var(--radius-full);
      padding: 11px 20px;
      font-size: 13px;
    }

    .auth-error {
      background: rgba(200, 75, 47, 0.08);
      border: 1px solid rgba(200, 75, 47, 0.2);
      border-radius: 12px;
      padding: 11px 14px;
      font-size: 13px;
      color: var(--rust);
      margin-bottom: 14px;
    }
