/**
 * CGUC - Estilos de Autenticación y Landing
 * Estándar de Diseño Premium - Cámara Ganadera Unidos del Caribe
 */

:root {
    --primary: #4C7531;
    --primary-dark: #3a5a26;
    --accent: #D4AF37;
    --ink: #0F172A;
    --slate: #64748B;
    --cream: #F8FAF5;
    --glass-white: rgba(255, 255, 255, 0.95);
    --shadow-premium: 0 30px 60px -12px rgba(0, 0, 0, 0.4);
    --border-radius-lg: 30px;
    --border-radius-md: 14px;
}

/* --- Estructura Global --- */
.auth-bg {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: #0b0f0a;
}

.auth-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(13, 24, 10, .95) 0%, rgba(13, 24, 10, .85) 45%, rgba(13, 24, 10, .95) 100%),
                url("../img/login/cover.avif");
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    width: 100%;
    max-width: 1100px;
    min-height: 680px;
    background: #fff;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-premium);
    position: relative;
    z-index: 10;
}

@media (max-width: 991px) {
    .auth-wrap {
        grid-template-columns: 1fr;
        max-width: 550px;
    }
    .brand-panel { display: none; }
}

/* --- Paneles --- */
.brand-panel {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(13, 24, 10, 0.9) 100%), 
                url("../img/login/cover.avif");
    background-size: cover;
    background-position: center;
    padding: 60px;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-panel {
    padding: 50px 60px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Tipografía y Títulos --- */
.headline-serif {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.1;
}

.auth-title {
    font-size: 2.2rem;
    color: var(--ink);
    margin-bottom: 30px;
}

/* --- Componentes de Formulario --- */
.form-group-custom {
    margin-bottom: 20px;
}

.label-custom {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--ink);
    margin-bottom: 8px;
    display: block;
}

.form-control-custom {
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    width: 100%;
}

.form-control-custom:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(76, 117, 49, 0.1);
    outline: none;
}

/* --- Botones --- */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px; 
    border-radius: var(--border-radius-md);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(76, 117, 49, 0.2);
    font-size: 0.9rem; /* Agregado para que no se vea "enorme" */
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(76, 117, 49, 0.35);
    color: white;
}

.btn-secondary-custom {
    background: #f1f5f9;
    color: var(--ink);
    border: 1px solid #e2e8f0;
    padding: 10px 24px; /* Ajustado de 12 a 10 */
    border-radius: var(--border-radius-md);
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem; /* Agregado */
}

.btn-secondary-custom:hover {
    background: #e2e8f0;
    color: var(--ink);
}

.invalid-feedback-custom {
    font-size: 0.75rem;
    font-weight: 600;
    color: #e53e3e;
    margin-top: 5px;
    display: block;
}

/* --- Tabs --- */
.nav-pills-auth {
    background: #f1f5f9;
    padding: 6px;
    border-radius: 16px;
    margin-bottom: 30px;
    border: none;
}

.nav-pills-auth .nav-link {
    color: var(--slate);
    font-weight: 700;
    border-radius: 12px;
    padding: 12px;
    border: none;
    transition: all 0.3s;
}

.nav-pills-auth .nav-link.active {
    background: white !important;
    color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Modals --- */
.modal-header-centered {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0;
}

.modal-header-centered .spacer {
    width: 40px;
}

.modal-header-centered .close {
    margin: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.modal-header-centered .close:hover {
    opacity: 1;
}

/* --- PIN Keyboard --- */
.pin-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 10px;
}

.pin-btn-custom {
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pin-btn-custom:active {
    transform: scale(0.9);
    background: var(--primary);
    color: white;
}

/* --- Helpers --- */
.text-gold { color: var(--accent); }
.italic { font-style: italic; }
.shadow-lg-custom { box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
