/* Reset y configuracin base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--sibal-bg-1) 0%, var(--sibal-bg-2) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* ===== HEADER STYLES ===== */
.header {
    background: linear-gradient(135deg, var(--sibal-bg-2) 0%, var(--sibal-bg-1) 100%);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(58, 139, 212, 0.2);
    position: relative;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-svg {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    color: var(--sibal-text);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logo-subtitle {
    color: var(--sibal-muted);
    font-size: 0.8rem;
    font-weight: 400;
    margin-top: 2px;
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.header-btn {
    background: linear-gradient(135deg, var(--sibal-accent) 0%, var(--sibal-accent-2) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(58, 139, 212, 0.3);
    position: relative;
    overflow: hidden;
}

    .header-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s;
    }

    .header-btn:hover::before {
        left: 100%;
    }

    .header-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(58, 139, 212, 0.4);
    }

    .header-btn:active {
        transform: translateY(0);
    }

    .header-btn i {
        font-size: 1rem;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--sibal-accent) 0%, var(--sibal-accent-2) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #34495E 0%, #2C3E50 100%);
    box-shadow: 0 4px 12px rgba(52, 73, 94, 0.3);
}

    .btn-secondary:hover {
        box-shadow: 0 6px 20px var(--sibal-card);
    }

/* ===== LOGIN STYLES ===== */
/* Contenedor principal */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    z-index: 1;
}

/* Panel de Login (Izquierda) */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 2;
}

/* Contenedor del login */
.login-container {
    background: var(--sibal-card);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Panel de Noticias (Derecha) */
.news-panel {
    flex: 1;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    overflow-y: auto;
}

.news-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

    .news-header h2 {
        font-size: 2rem;
        font-weight: 700;
        margin-bottom: 10px;
        color: #fff;
    }

        .news-header h2 i {
            color: var(--sibal-accent);
            margin-right: 10px;
        }

    .news-header p {
        color: #ccc;
        font-size: 1rem;
    }

.news-container {
    flex: 1;
    overflow-y: auto;
}

.news-item {
    display: flex;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

    .news-item:hover {
        background: rgba(255, 255, 255, 0.1);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    margin-right: 20px;
    padding: 10px;
    background: linear-gradient(135deg, var(--sibal-accent) 0%, var(--sibal-accent-2) 100%);
    border-radius: 10px;
    text-align: center;
}

    .news-date .day {
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 1;
    }

    .news-date .month {
        font-size: 0.8rem;
        opacity: 0.9;
        text-transform: uppercase;
    }

.news-content {
    flex: 1;
}

    .news-content h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 8px;
        color: #fff;
    }

    .news-content p {
        color: #ccc;
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 12px;
    }

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .tag.update {
        background: linear-gradient(135deg, #4CAF50, #45a049);
        color: white;
    }

    .tag.feature {
        background: linear-gradient(135deg, #2196F3, #1976D2);
        color: white;
    }

    .tag.maintenance {
        background: linear-gradient(135deg, #FF9800, #F57C00);
        color: white;
    }

    .tag.security {
        background: linear-gradient(135deg, #F44336, #D32F2F);
        color: white;
    }

    .tag.protocol {
        background: linear-gradient(135deg, #9C27B0, #7B1FA2);
        color: white;
    }

    .tag.lab {
        background: linear-gradient(135deg, #00BCD4, #0097A7);
        color: white;
    }

    .tag.training {
        background: linear-gradient(135deg, #FF5722, #E64A19);
        color: white;
    }

    .tag.event {
        background: linear-gradient(135deg, #795548, #5D4037);
        color: white;
    }

    .tag.improvement {
        background: linear-gradient(135deg, #607D8B, #455A64);
        color: white;
    }

    .tag.report {
        background: linear-gradient(135deg, #8BC34A, #689F38);
        color: white;
    }

.news-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.view-all-news {
    background: linear-gradient(135deg, var(--sibal-accent) 0%, var(--sibal-accent-2) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .view-all-news:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(58, 139, 212, 0.3);
    }

/* Header del login */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

    .logo i {
        font-size: 2.5rem;
        color: var(--sibal-accent);
        margin-right: 15px;
    }

    .logo h1 {
        color: var(--sibal-text);
        font-size: 2rem;
        font-weight: 700;
    }

.login-header p {
    color: var(--sibal-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Formulario */
.login-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: var(--sibal-text);
        font-weight: 600;
        font-size: 0.9rem;
    }

        .form-group label i {
            margin-right: 8px;
            color: var(--sibal-accent);
        }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group input.form-control {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid var(--sibal-control-border);
        border-radius: 10px;
        font-size: 1rem;
        transition: all 0.3s ease;
        background: var(--sibal-control-bg);
        color: var(--sibal-text);
        caret-color: var(--sibal-text);
        color-scheme: inherit;
    }

    .form-group input::placeholder {
        color: var(--sibal-muted-2);
        opacity: 1;
    }

    .form-group input:focus {
        outline: none;
        border-color: var(--sibal-accent);
        background: var(--sibal-control-bg);
        color: var(--sibal-text);
        box-shadow: 0 0 0 3px rgba(58, 139, 212, 0.1);
    }

    .form-group input:-webkit-autofill,
    .form-group input:-webkit-autofill:hover,
    .form-group input:-webkit-autofill:focus {
        -webkit-text-fill-color: var(--sibal-text);
        caret-color: var(--sibal-text);
        box-shadow: 0 0 0 1000px var(--sibal-control-bg) inset;
        border-color: var(--sibal-control-border);
        transition: background-color 99999s ease-out;
    }

/* Campo de contrasea */
.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--sibal-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

    .toggle-password:hover {
        color: var(--sibal-accent);
    }

/* Checkbox personalizado */
.remember-me {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--sibal-muted);
}

    .checkbox-label input[type="checkbox"] {
        display: none;
    }

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--sibal-control-border);
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--sibal-accent);
    border-color: var(--sibal-accent);
}

    .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
        content: '\f00c';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: white;
        font-size: 0.7rem;
    }

/* Botn de login */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--sibal-accent) 0%, var(--sibal-accent-2) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(58, 139, 212, 0.3);
    }

    .login-btn:active {
        transform: translateY(0);
    }

/* Footer del formulario */
.form-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-password {
    color: var(--sibal-accent);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

    .forgot-password:hover {
        color: var(--sibal-accent-2);
        text-decoration: underline;
    }

/* Footer del login */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

    .login-footer p {
        color: var(--sibal-muted);
        font-size: 0.8rem;
    }

/* Decoraciones de fondo */
.background-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 150px;
    height: 150px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.circle-3 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Mensajes de error/xito */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
    animation: slideIn 0.3s ease;
}

    .message.success {
        background: linear-gradient(135deg, #4CAF50, #45a049);
    }

    .message.error {
        background: linear-gradient(135deg, #f44336, #d32f2f);
    }

    .message.hidden {
        display: none;
    }

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE STYLES ===== */
/* Header Responsive */
@media (max-width: 768px) {
    .header {
        padding: 12px 20px;
    }

    .logo-title {
        font-size: 1.4rem;
    }

    .logo-subtitle {
        font-size: 0.7rem;
    }

    .header-buttons {
        gap: 10px;
    }

    .header-btn {
        padding: 10px 15px;
        font-size: 0.8rem;
    }

        .header-btn span {
            display: none;
        }

        .header-btn i {
            font-size: 1.1rem;
        }
}

@media (max-width: 480px) {
    .header {
        padding: 10px 15px;
    }

    .logo-svg {
        width: 40px;
        height: 40px;
    }

    .logo-title {
        font-size: 1.2rem;
    }

    .header-buttons {
        gap: 8px;
    }

    .header-btn {
        padding: 8px 12px;
    }
}

/* Login Responsive */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }

    .login-panel {
        flex: none;
        width: 100%;
        min-height: auto;
        padding: 20px;
    }

    .news-panel {
        flex: none;
        width: 100%;
        min-height: 400px;
        padding: 30px 20px;
    }

    .news-header h2 {
        font-size: 1.5rem;
    }

    .news-item {
        flex-direction: column;
        text-align: center;
    }

    .news-date {
        margin-right: 0;
        margin-bottom: 15px;
        align-self: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 10px;
        padding: 25px 15px;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .news-panel {
        padding: 20px 15px;
    }

    .news-header h2 {
        font-size: 1.3rem;
    }

    .news-item {
        padding: 15px;
        margin-bottom: 20px;
    }

    .news-content h3 {
        font-size: 1rem;
    }

    .news-content p {
        font-size: 0.85rem;
    }

    .message {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ===== ANIMATIONS ===== */
/* Header Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header {
    animation: fadeInDown 0.6s ease-out;
}

.header-btn {
    animation: fadeInDown 0.6s ease-out;
}

    .header-btn:nth-child(1) {
        animation-delay: 0.1s;
    }

    .header-btn:nth-child(2) {
        animation-delay: 0.2s;
    }

/* Efectos de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

    .loading .login-btn {
        position: relative;
    }

        .loading .login-btn::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            border: 2px solid transparent;
            border-top: 2px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Validacin de campos */
.form-group.valid input {
    border-color: #4CAF50;
    background: var(--sibal-control-bg);
    color: var(--sibal-text);
}

.form-group.invalid input {
    border-color: #f44336;
    background: var(--sibal-control-bg);
    color: var(--sibal-text);
}

.error-message {
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .error-message::before {
        content: '\f071';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.7rem;
    }

/* Animaciones para validacin */
.form-group input {
    transition: all 0.3s ease;
}

.form-group.valid input:focus {
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group.invalid input:focus {
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}
