/* ==========================================================================
   CEASA CE — Tela de Login (Área Administrativa)
   ========================================================================== */

/* Background Criativo "Verde Ceasa Mesh Gradient & Dynamic Glows" */
.login-wrapper {
    position: relative;
    min-height: 100vh;
    background-color: #072417;
    background-image:
        radial-gradient(at 10% 15%, rgba(34, 197, 94, 0.25) 0px, transparent 55%),
        radial-gradient(at 90% 85%, rgba(245, 158, 11, 0.20) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(22, 82, 51, 0.85) 0px, transparent 70%),
        radial-gradient(at 80% 20%, rgba(13, 148, 136, 0.20) 0px, transparent 45%);
    background-attachment: fixed;
    overflow: hidden;
}

/* Pattern SVG de Grade Logística Orgânica */
.login-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.035'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Esferas de Luz Flutuantes Animadas */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 1;
    animation: floatOrb 18s ease-in-out infinite alternate;
}

.glow-orb-1 {
    width: 380px;
    height: 380px;
    background: rgba(34, 197, 94, 0.22);
    top: -80px;
    left: -80px;
}

.glow-orb-2 {
    width: 420px;
    height: 420px;
    background: rgba(245, 158, 11, 0.16);
    bottom: -100px;
    right: -100px;
    animation-delay: -9s;
}

.glow-orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.18);
    top: 40%;
    left: 65%;
    animation-duration: 22s;
}

@keyframes floatOrb {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(40px, -50px) scale(1.12);
    }
    100% {
        transform: translate(-30px, 30px) scale(0.95);
    }
}

/* Card com Efeito Glassmorphic Premium */
.login-glass-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.28),
        0 1px 3px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-glass-card:hover {
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.32),
        0 2px 6px rgba(0, 0, 0, 0.10);
}

/* Header com Gradiente Verde Ceasa */
.login-card-header {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%) !important;
    border-bottom: 3px solid #f59e0b;
}

/* Custom Input Controls */
.login-input-group .input-group-text {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    font-size: 1.15rem;
    padding: 0.75rem 1rem;
}

.login-input-group .form-control {
    border-color: #cbd5e1;
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
}

.login-input-group .form-control:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 0.25rem rgba(32, 107, 66, 0.18);
}

/* Botão de Entrar e Submissões */
.btn-login-submit {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 14px rgba(9, 55, 34, 0.35);
    transition: all 0.25s ease;
}

.btn-login-submit:hover, .btn-login-submit:focus {
    background: linear-gradient(135deg, #052014 0%, #0f4026 100%);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(9, 55, 34, 0.45);
}

/* Botões de Seleção Inicial (Já tenho conta / Quero me cadastrar) */
.btn-choice-login {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%);
    color: #ffffff !important;
    border: 1px solid #093722;
    box-shadow: 0 4px 14px rgba(9, 55, 34, 0.30);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-choice-login:hover, .btn-choice-login:focus {
    background: linear-gradient(135deg, #041910 0%, #0c3620 100%);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 55, 34, 0.45);
}

.btn-choice-cadastro {
    background: #ffffff;
    color: #093722 !important;
    border: 2px solid #093722;
    box-shadow: 0 4px 14px rgba(9, 55, 34, 0.12);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-choice-cadastro:hover, .btn-choice-cadastro:focus {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%);
    color: #ffffff !important;
    border-color: #093722;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(9, 55, 34, 0.40);
}

.btn-choice-cadastro:hover .icon-wrapper-cad {
    background-color: rgba(255, 255, 255, 0.25) !important;
}

.btn-choice-cadastro:hover .icon-cad {
    color: #ffffff !important;
}

.btn-choice-cadastro:hover .title-cad {
    color: #ffffff !important;
}

.btn-choice-cadastro:hover .desc-cad {
    color: rgba(255, 255, 255, 0.9) !important;
}

.btn-choice-cadastro:hover .arrow-cad {
    color: #ffffff !important;
}

/* ==========================================================================
   Pin Input (Ativação de Conta / Confirmação 2FA)
   ========================================================================== */
.pin-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 1.5rem 0;
}
.pin-digit {
    width: 48px;
    height: 56px;
    font-size: 1.75rem;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    border: 2px solid #cbd5e1;
    background-color: #ffffff;
    color: #093722;
    transition: all 0.2s ease-in-out;
    font-family: monospace;
}
.pin-digit:focus {
    border-color: #16a34a;
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.15);
    outline: none;
    background-color: #f0fdf4;
}
.pin-digit.filled {
    border-color: #16a34a;
    background-color: #f0fdf4;
}

/* ==========================================================================
   Utilitários e Ajustes de Inputs de Autenticação
   ========================================================================== */
.text-legible {
    color: #4b5563 !important;
}
.help-text-custom {
    color: #6b7280 !important;
    font-size: 0.8rem;
    line-height: 1.2;
}
.help-text-custom ul {
    margin-bottom: 0;
    padding-left: 1.2rem;
}
.help-text-custom li {
    margin-bottom: 0.1rem;
}
.cadastro-input-group .input-group-text,
.cadastro-input-group .form-control {
    padding: 0.375rem 0.75rem;
}
.recovery-input-group .input-group-text,
.recovery-input-group .form-control {
    padding: 0.5rem 0.85rem;
}

/* ==========================================================================
   Botões de Seleção das Unidades (Login)
   ========================================================================== */
.btn-unidade-tab {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    color: #1e293b;
    padding: 0.85rem 0.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    display: block;
    width: 100%;
    outline: none;
}

/* Mesma cor do botão "Já tenho conta" quando hover */
.btn-unidade-tab:hover {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%) !important;
    border-color: #093722 !important;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(9, 55, 34, 0.35) !important;
}

.btn-unidade-tab:hover .unidade-name,
.btn-unidade-tab:hover .ti-building {
    color: #ffffff !important;
}

.btn-unidade-tab:hover .badge-unidade-count {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
}

/* Card Ativo com a mesma cor e identidade do Já Tenho Conta */
.btn-unidade-tab.active {
    background: linear-gradient(135deg, #093722 0%, #175e38 100%) !important;
    border-color: #093722 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(9, 55, 34, 0.30) !important;
    transform: translateY(-2px);
}

.btn-unidade-tab.active .unidade-name,
.btn-unidade-tab.active .ti-building {
    color: #ffffff !important;
}

.btn-unidade-tab .unidade-name {
    font-size: 0.95rem;
    letter-spacing: -0.2px;
    line-height: 1.25;
    color: #0f172a;
    transition: color 0.2s ease;
}

.btn-unidade-tab .ti-building {
    color: #475569;
    transition: all 0.2s ease;
}

.btn-unidade-tab:hover .ti-building {
    transform: scale(1.12);
}

/* Badge com espaçamento interno adequado */
.btn-unidade-tab .badge-unidade-count {
    display: inline-block !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 5px 12px !important; /* Espaçamento interno com respiro vertical e lateral */
    border-radius: 50rem !important;
    margin-top: 0.4rem !important;
    line-height: 1.25 !important;
    letter-spacing: 0.2px !important;
    transition: all 0.2s ease;
}

.btn-unidade-tab:not(.active) .badge-has-editais {
    background-color: #ecfdf5 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.btn-unidade-tab:not(.active) .badge-zero {
    background-color: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
}

.btn-unidade-tab.active .badge-unidade-count {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
}

/* Accordion de Chamadas no Modal */
.chamada-header-toggle {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.chamada-header-toggle:hover {
    background-color: #f1f5f9 !important;
}

.chamada-chevron {
    transition: transform 0.25s ease;
}

.chamada-header-toggle[aria-expanded="true"] .chamada-chevron {
    transform: rotate(180deg);
}

/* ==========================================================================
   Card de Aviso aos Participantes e Unidades (Login)
   ========================================================================== */
.login-aviso-card {
    background-color: #fffbeb !important;
    border-left: 5px solid #f59e0b !important;
    border-radius: 12px;
}

.login-aviso-card .aviso-titulo {
    color: #0f172a !important;
    font-weight: 700;
}

.login-aviso-card .aviso-texto {
    color: #334155 !important;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 500;
}

.login-aviso-card .aviso-texto.small {
    font-size: 0.875rem !important;
}
