/* public/css/login.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-dark: #070a13;
    --card-bg: rgba(15, 23, 42, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: rgba(255, 255, 255, 0.03);
    --input-border: rgba(255, 255, 255, 0.08);
    
    /* Default Accent Color (Grupo T-Soluciona Orange) */
    --accent-color: #FE5502;
    --accent-glow: rgba(254, 85, 2, 0.25);
    --accent-gradient: linear-gradient(135deg, #FE5502, #d84301);
    
    --transition-speed: 0.4s;
}

/* Light Theme Overrides */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.82);
    --card-border: rgba(203, 213, 225, 0.6);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: rgba(241, 245, 249, 0.7);
    --input-border: rgba(203, 213, 225, 0.8);
    --accent-glow: rgba(254, 85, 2, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 30px 15px;
    position: relative;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* Floating Abstract Background Shapes */
.bg-decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    mix-blend-mode: screen;
    animation: float 25s infinite alternate ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(254, 85, 2, 0.4) 0%, rgba(0,0,0,0) 70%);
    top: -10%;
    left: -10%;
    animation-duration: 20s;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(56, 78, 130, 0.4) 0%, rgba(0,0,0,0) 70%);
    bottom: -15%;
    right: -10%;
    animation-duration: 30s;
}

.shape-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.3) 0%, rgba(0,0,0,0) 70%);
    top: 40%;
    left: 60%;
    animation-duration: 25s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    50% {
        transform: translate(80px, 50px) rotate(180deg) scale(1.15);
    }
    100% {
        transform: translate(-40px, -60px) rotate(360deg) scale(0.9);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 10;
}

.login-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 40px 35px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: box-shadow var(--transition-speed), border-color var(--transition-speed);
}

.login-card:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Logos Header */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-wrapper {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-img {
    max-height: 100%;
    max-width: 240px;
    object-fit: contain;
    transition: transform var(--transition-speed) ease;
}

.login-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.5px;
    margin-bottom: 5px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Company Selectors (Pills) */
.company-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
    padding-left: 2px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.3s ease;
    width: 18px;
    height: 18px;
}

.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px 14px 48px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.form-input:focus + .input-icon {
    color: var(--accent-color);
}

.password-toggle {
    position: absolute;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--text-main);
}

/* Extra Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: var(--text-muted);
}

.remember-me input {
    display: none;
}

.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.02);
}

.remember-me input:checked + .custom-checkbox {
    background: var(--accent-color);
    border-color: var(--accent-color);
    box-shadow: 0 0 8px var(--accent-glow);
}

.remember-me input:checked + .custom-checkbox::after {
    content: "✓";
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.forgot-password {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    background: var(--accent-gradient);
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
    filter: brightness(1.1);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner Loader */
.spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.submit-btn.loading .spinner {
    display: block;
}

.submit-btn.loading .btn-text {
    opacity: 0.8;
}

/* Alerts and Messages */
.alert-box {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    display: none;
    align-items: center;
    gap: 10px;
    animation: shake 0.4s ease;
}

.alert-box.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #a7f3d0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Footer / Copy */
.login-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-footer p {
    margin-bottom: 5px;
}

.login-footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--text-main);
}

/* Floating Theme Switcher Button (Bottom Right) */
.theme-toggle-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle-btn:hover {
    box-shadow: 0 12px 40px var(--accent-glow);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.theme-toggle-btn i {
    width: 22px;
    height: 22px;
    transition: transform 0.4s ease;
}

/* Media Queries para pantallas pequeñas y laptops con poca altura */
@media (max-height: 720px) {
    .login-card {
        padding: 25px 25px;
    }
    .login-header {
        margin-bottom: 20px;
    }
    .logo-wrapper {
        height: 70px;
        margin-bottom: 12px;
    }
    .form-group {
        margin-bottom: 15px;
    }
    .form-actions {
        margin-bottom: 18px;
    }
    .login-footer {
        margin-top: 18px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
    }
    .login-title {
        font-size: 1.4rem;
    }
    .theme-toggle-btn {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}


