/* ===========================================================
   GYMSA Industrial - Login (index.php)
   =========================================================== */

:root {
    --gs-brand: #1a90cc;
    --gs-brand-light: #4db3e6;
    --gs-brand-dark: #0b4a6b;
    --gs-brand-darker: #072f44;
    --gs-ink: #14202b;
    --gs-muted: #64748b;
    --gs-border: #e2e8f0;
    --gs-bg-panel: #f7f9fc;
    --gs-danger: #e5484d;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--gs-ink);
    background: var(--gs-bg-panel);
}

a {
    text-decoration: none;
}

/* ---------- Layout ---------- */
.gs-auth-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------- Left brand panel ---------- */
.gs-auth-brand {
    position: relative;
    flex: 1 1 46%;
    display: none;
    min-height: 100vh;
    padding: 56px 64px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--gs-brand-darker) 0%, var(--gs-brand-dark) 45%, var(--gs-brand) 100%);
}

.gs-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../inventario/img/fondo_login3.png');
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    mix-blend-mode: luminosity;
}

.gs-auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 15%, rgba(255, 255, 255, 0.12), transparent 45%),
        linear-gradient(160deg, rgba(7, 47, 68, 0.75) 0%, rgba(26, 144, 204, 0.55) 100%);
}

.gs-auth-brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #fff;
}

.gs-auth-logo {
    width: 190px;
    filter: brightness(0) invert(1);
    opacity: 0.96;
}

.gs-auth-brand-copy {
    margin-top: auto;
    margin-bottom: auto;
    max-width: 440px;
}

.gs-auth-brand-copy h1 {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 16px;
}

.gs-auth-brand-copy p {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.gs-auth-features {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gs-auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.88);
}

.gs-auth-features svg {
    flex: none;
    width: 18px;
    height: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    padding: 4px;
    box-sizing: content-box;
}

.gs-auth-brand-footer {
    position: relative;
    z-index: 1;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.02em;
}

/* ---------- Right form panel ---------- */
.gs-auth-panel {
    flex: 1 1 54%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #ffffff;
}

.gs-auth-form-wrap {
    width: 100%;
    max-width: 480px;
    animation: gsFadeUp 0.6s ease;
}

.gs-auth-mobile-logo {
    display: block;
    text-align: center;
    margin-bottom: 28px;
}

.gs-auth-mobile-logo img {
    width: 150px;
}

.gs-business-units {
    margin-bottom: 26px;
}

.gs-bu-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gs-muted);
    margin-bottom: 12px;
}

.gs-bu-logos {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    padding-bottom: 22px;
    margin: 0 -2px;
    padding-left: 2px;
    padding-right: 2px;
    border-bottom: 1px solid var(--gs-border);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gs-bu-logos::-webkit-scrollbar {
    display: none;
}

.gs-bu-logos img {
    flex: none;
    height: 24px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.gs-bu-logos img:hover {
    opacity: 0.95;
}

.gs-auth-form-wrap h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--gs-ink);
}

.gs-auth-subtitle {
    color: var(--gs-muted);
    font-size: 0.95rem;
    margin: 0 0 32px;
}

/* ---------- Form fields ---------- */
.gs-field {
    margin-bottom: 20px;
}

.gs-field label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--gs-ink);
    margin-bottom: 7px;
}

.gs-input {
    position: relative;
}

.gs-input input {
    width: 100%;
    display: block;
    background: var(--gs-bg-panel);
    border: 1.5px solid var(--gs-border);
    border-radius: 12px;
    outline: none;
    padding: 13px 14px 13px 44px;
    font-size: 0.95rem;
    color: var(--gs-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.gs-input input:focus {
    border-color: var(--gs-brand);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 144, 204, 0.14);
}

.gs-input.gs-has-toggle input {
    padding-right: 44px;
}

.gs-input .gs-icon {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gs-muted);
    pointer-events: none;
}

.gs-input:focus-within .gs-icon {
    color: var(--gs-brand);
}

.gs-input input::placeholder {
    color: #a0aec0;
}

.gs-input input.border-danger {
    border-color: var(--gs-danger) !important;
}

.gs-toggle-pass {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    border: none;
    background: transparent;
    color: var(--gs-muted);
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 8px;
}

.gs-toggle-pass:hover {
    color: var(--gs-brand);
}

.al-lo {
    min-height: 4px;
    margin-bottom: 8px;
}

.al-lo:empty {
    min-height: 0;
    margin-bottom: 0;
}

/* ---------- Alert de login ---------- */
.gs-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 13px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.85rem;
    line-height: 1.35;
    margin-bottom: 14px;
    animation: gsAlertIn .2s ease;
}

.gs-alert-ic {
    flex: 0 0 auto;
    margin-top: 1px;
}

.gs-alert-body {
    flex: 1 1 auto;
}

.gs-alert-body strong {
    display: block;
    font-weight: 600;
    margin-bottom: 1px;
}

.gs-alert-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    padding: 0 2px;
    margin-left: 2px;
    line-height: 1;
    font-size: 1.15rem;
    color: inherit;
    opacity: .5;
    cursor: pointer;
}

.gs-alert-close:hover {
    opacity: 1;
}

.gs-alert-danger {
    color: #8a1c20;
    background: #fdecec;
    border-color: #f5c2c3;
}

.gs-alert-warning {
    color: #8a5a00;
    background: #fff6e6;
    border-color: #f7e0a8;
}

@keyframes gsAlertIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

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

.gs-forgot-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 22px;
}

.gs-forgot-row a {
    font-size: 0.85rem;
    color: var(--gs-brand);
    font-weight: 500;
}

.gs-forgot-row a:hover {
    text-decoration: underline;
}

/* ---------- Button ---------- */
.btn-glass {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gs-brand) 0%, var(--gs-brand-dark) 100%);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    box-shadow: 0 8px 20px rgba(26, 144, 204, 0.32);
}

.btn-glass:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(26, 144, 204, 0.4);
}

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

.gs-auth-footer {
    text-align: center;
    color: var(--gs-muted);
    font-size: 0.8rem;
    margin-top: 30px;
}

/* ---------- Animations ---------- */
@keyframes gsFadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes gsShake {

    10%,
    90% {
        transform: translateX(-1px);
    }

    20%,
    80% {
        transform: translateX(2px);
    }

    30%,
    50%,
    70% {
        transform: translateX(-4px);
    }

    40%,
    60% {
        transform: translateX(4px);
    }
}

.gs-shake {
    animation: gsShake 0.5s;
}

/* ---------- Responsive ---------- */
@media (min-width: 992px) {
    .gs-auth-brand {
        display: flex;
    }

    .gs-auth-mobile-logo {
        display: none;
    }

    .gs-auth-panel {
        padding: 40px 64px;
    }
}
