import { AuthRedirect } from '@/components/auth/AuthRedirect';

export default function AuthLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <AuthRedirect>
    <div
      className="auth-layout"
      data-no-nav
      style={{
        minHeight: '100vh',
        display: 'grid',
        gridTemplateColumns: '1fr minmax(0, 520px)',
      }}
    >
      {/* Левая колонка — пустая, фон как у body */}
      <div
        className="auth-layout-logo"
        style={{
          minHeight: '100vh',
          display: 'flex',
          justifyContent: 'center',
          alignItems: 'center',
        }}
        aria-hidden
      >
        <img 
          src="/logo/logo.svg" 
          alt="Uchill Logo" 
          style={{ 
            width: '240px', 
            height: 'auto',
            opacity: 0.8
          }} 
        />
      </div>

      {/* Правая колонка — форма на белом фоне */}
      <div
        className="auth-layout-form"
        style={{
          minHeight: '100vh',
          background: '#fff',
          display: 'flex',
          flexDirection: 'column',
          justifyContent: 'center',
          alignItems: 'center',
          padding: '24px 32px',
          boxSizing: 'border-box',
        }}
      >
        <div style={{ marginBottom: '32px', textAlign: 'center' }}>
          <img 
            src="/logo/logo.svg" 
            alt="Uchill Logo" 
            style={{ width: '120px', height: 'auto' }} 
          />
        </div>
        {children}
      </div>
    </div>
    </AuthRedirect>
  );
}
