<!DOCTYPE html>
<html lang="id">
<head>
  <meta charset="UTF-8"/>
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>HIDROGENZ FARM</title>
  <link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🍈</text></svg>">
  <style>
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: 'Segoe UI', sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }
    .topbar {
      background: #1a3a22;
      color: #fff;
      text-align: center;
      padding: 12px;
      font-size: 14px;
      font-weight: 700;
      letter-spacing: .08em;
    }
    .bg-wrap {
      flex: 1;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 40px 16px;
    }
    .bg-wrap::before {
      content: '';
      position: absolute;
      inset: 0;
      background: url('{{ asset("images/melon-bg.jpg") }}') center/cover no-repeat;
      filter: brightness(.75);
    }
    .card {
      position: relative;
      z-index: 2;
      background: #fff;
      border-radius: 12px;
      padding: 36px 32px 30px;
      width: 100%;
      max-width: 360px;
      text-align: center;
      box-shadow: 0 8px 40px rgba(0,0,0,.3);
    }

    /* === FIX: logo had no size rule, so it rendered at native
       resolution and broke out of the card. === */
    .farm-logo {
      display: block;
      width: 96px;
      height: 96px;
      object-fit: contain;
      margin: 0 auto 14px;
    }

    .card-title {
      font-size: 17px;
      font-weight: 700;
      color: #1a3a22;
      margin-bottom: 24px;
      line-height: 1.4;
    }
    .alert-error {
      background: #fee2e2;
      border: 1px solid #fca5a5;
      color: #b91c1c;
      border-radius: 6px;
      padding: 9px 12px;
      font-size: 13px;
      margin-bottom: 14px;
      text-align: left;
    }
    .input-wrap {
      position: relative;
      margin-bottom: 12px;
    }
    .input-icon {
      position: absolute;
      left: 12px;
      top: 50%;
      transform: translateY(-50%);
      color: #aaa;
      font-size: 15px;
    }
    .form-input {
      width: 100%;
      padding: 11px 12px 11px 36px;
      border: 1px solid #ccc;
      border-radius: 6px;
      font-size: 14px;
      color: #333;
      outline: none;
      background: #f9f9f9;
      transition: border-color .2s;
    }
    .form-input:focus { border-color: #2d7a3a; background: #fff; }
    .form-input::placeholder { color: #aaa; }
    .btn-register {
      width: 100%;
      padding: 12px;
      background: #2d7a3a;
      color: #fff;
      border: none;
      border-radius: 6px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 6px;
      transition: background .2s;
    }
    .btn-register:hover { background: #245f2d; }
    .link-login {
      margin-top: 14px;
      font-size: 13px;
      color: #555;
    }
    .link-login a {
      color: #2d7a3a;
      font-weight: 600;
      text-decoration: none;
    }
    .link-login a:hover { text-decoration: underline; }
    @media (max-width: 400px) {
      .card { padding: 20px 16px; }
      .farm-logo { width: 72px; height: 72px; }
      .card-title { font-size: 15px; }
      .btn-register { font-size: 14px; padding: 10px; }
    }
  </style>
</head>
<body>
  <div class="topbar">HIDROGENZ FARM</div>
  <div class="bg-wrap">
    <div class="card">

      <img class="farm-logo" src="{{ asset('images/logo.png') }}" alt="Hidrogenz Farm Logo"/>

      <div class="card-title">Daftar Akun Baru</div>

      @if ($errors->any())
        <div class="alert-error">
          @foreach ($errors->all() as $error)
            <div>{{ $error }}</div>
          @endforeach
        </div>
      @endif

      <form method="POST" action="{{ route('register') }}">
        @csrf
        <div class="input-wrap">
          <span class="input-icon">👤</span>
          <input class="form-input" type="text" name="name" placeholder="Nama Lengkap" value="{{ old('name') }}" required autofocus/>
        </div>
        <div class="input-wrap">
          <span class="input-icon">✉️</span>
          <input class="form-input" type="email" name="email" placeholder="Email" value="{{ old('email') }}" required/>
        </div>
        <div class="input-wrap">
          <span class="input-icon">🔒</span>
          <input class="form-input" type="password" name="password" placeholder="Password" required/>
        </div>
        <div class="input-wrap">
          <span class="input-icon">🔒</span>
          <input class="form-input" type="password" name="password_confirmation" placeholder="Konfirmasi Password" required/>
        </div>
        <button class="btn-register" type="submit">Register</button>
      </form>

      <div class="link-login">
        Sudah punya akun? <a href="{{ route('login') }}">Login</a>
      </div>
    </div>
  </div>
</body>
</html>