<!doctype html>
<html lang="pt-BR">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="Diógenes Augusto da Silva">
    <title></title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link rel="stylesheet" href="{{ asset('assets/admin/compiled/css/app.css') }}">
    <style>
        html, body {
            height: 100%;
        }

        body {
            display: flex;
            align-items: center;
            justify-content: center;
            padding-top: 40px;
            padding-bottom: 40px;
            background-repeat: no-repeat;
            background-size: cover;
            background-image: linear-gradient(rgb(255, 255, 255), rgba(255, 255, 255, 0.685)),
                url({{ asset('assets/admin/img/background.png') }});
        }

        .form-signin {
            width: 100%;
            max-width: 400px;  /* Ajustado para maior largura */
            padding: 15px;
            margin: auto;
            background-color: rgba(0, 0, 0, 0.4);
            border-radius: 15px;
        }

        .form-signin h1 {
            color: #fff;
        }

        .form-signin .checkbox {
            font-weight: 400;
        }

        .form-signin .form-control {
            position: relative;
            box-sizing: border-box;
            height: auto;
            padding: 10px;
            font-size: 16px;
        }

        .form-signin .form-control:focus {
            z-index: 2;
        }

        .form-signin input[type="email"] {
            margin-bottom: -1px;
            border-bottom-right-radius: 0;
            border-bottom-left-radius: 0;
        }

        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }

        .form-signin p a {
            color: #fff;
            text-decoration: none;
        }

        .form-signin p a:hover {
            color: #ffa500;
        }

        .form-signin .invalid-feedback {
            display: block;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>
</head>

<body class="text-center">
    <form method="POST" action="{{ route('loginEntidadeAction') }}" class="form-signin">
        @csrf
        <img class="mb-4" src="{{ asset('assets/site/uploads/'.$entidade->id_tce.'/img/logo/logo.png') }}" alt="logo" width="300">
        <h1 class="h3 mb-3 font-weight-normal">Administrador</h1>

        <!-- Exibindo erros gerais -->
        @if ($errors->any())
            <div class="alert alert-danger">
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
        @endif

        <!-- Campo de email -->
        <label for="inputEmail" class="sr-only">e-Mail</label>
        <input type="email" name="email" class="form-control @error('email') is-invalid @enderror" placeholder="e-Mail" required autofocus>
        @error('email')
            <div class="invalid-feedback">{{ $message }}</div>
        @enderror
        <br>

        <!-- Campo de senha -->
        <label for="inputPassword" class="sr-only">Senha</label>
        <input type="password" name="password" class="form-control @error('password') is-invalid @enderror" placeholder="Senha" required>
        @error('password')
            <div class="invalid-feedback">{{ $message }}</div>
        @enderror

        <button class="btn btn-lg btn-primary btn-block" type="submit">Entrar</button>

        <p class="mt-5 mb-3 text-muted">
            &copy; {{ date('Y') }} - Todos os direitos reservados<br>
            <a href="https://api.whatsapp.com/send?phone=5583999663000&text=Ol%C3%A1%2C%20preciso%20de%20suporte%20para%20o%20site da: {{$entidade->entidade}}-{{$entidade->uf}}%20" target="_blank">
                <i class="fab fa-whatsapp"></i> Suporte: (83)999663000
            </a><br>
            <a href="/">Voltar para o site</a>
        </p>
    </form>

    <!-- Scripts -->
    <script src="{{ asset('assets/admin/compiled/js/app.js') }}"></script>
    <script src="{{ asset('assets/admin/compiled/js/jquery-3.7.0.js') }}"></script>
</body>

</html>
