:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f3f4f6;
    --text-color: #1f2937;
    --white: rgba(255, 255, 255, 0.98);
    --error-color: #ef4444;
    --success-bg: #dcfce7;
    --success-text: #166534;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 1rem; /* Margen superior e inferior para que no pegue a los bordes */
}

.container {
    background-color: var(--white);
    padding: 2.5rem; /* Aumentamos el acolchado interno */
    border-radius: 1.25rem; /* Bordes más redondeados y modernos */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 550px; /* Tamaño "prudente" y más elegante para desktop */
    text-align: center;
    backdrop-filter: blur(10px); /* Efecto cristal si el fondo es imagen/gradiente */
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

@media (min-width: 640px) {
    .container {
        padding: 4rem 3rem; /* Más aire en pantallas grandes */
    }
}

.logo-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    /* El ancho es controlado dinámicamente desde PHP pero aseguramos que no se rompa */
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
    font-weight: 800;
}

@media (min-width: 640px) {
    h1 {
        font-size: 2.2rem; /* Título más imponente */
    }
}

p {
    line-height: 1.6;
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Botones específicos de marcas */
.btn-outlook { background: #0078d4 !important; }
.btn-outlook:hover { background: #005a9e !important; }

.btn-gmail { background: #ea4335 !important; }
.btn-gmail:hover { background: #c5221f !important; }

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    font-size: 1rem;
    background-color: #f9fafb;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.error-msg {
    color: var(--error-color);
    background-color: #fee2e2;
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid #fecaca;
}

.success-msg {
    color: var(--success-text);
    background-color: var(--success-bg);
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    border: 1px solid #bbf7d0;
}

/* Estilos para el panel de administración */
.admin-container {
    max-width: 1100px;
    align-self: flex-start;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.logout-link {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.logout-link:hover {
    color: var(--error-color);
    background-color: #fff1f2;
    border-color: #fecaca;
}
