/* ================================================
   eGestiune - Login Page Corporate Design
   Data: 2025-10-29
   ================================================ */

/* === LAYOUT ASCUNDE SIDEBAR ȘI TOPBAR === */
.login-page {
    margin: 0 !important;
    padding: 0 !important;
}

.login-page #sidebar,
.login-page #topbar,
.login-page .sidebar,
.login-page nav.navbar {
    display: none !important;
}

.login-page #main-content {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

.login-page .container-fluid {
    margin: 0 !important;
    padding: 0 !important;
}

.login-page .d-flex {
    margin: 0 !important;
    padding: 0 !important;
}

/* === BACKGROUND GRADIENT === */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #e8f5f3 0%, #d4ede8 50%, #c1e5dd 100%);
    background-attachment: fixed;
    position: relative;
    overflow-x: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(17, 153, 142, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(17, 153, 142, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

/* === CONTAINER CENTRAT === */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* === CARD PRINCIPAL === */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0,0,0,0.15),
        0 0 0 1px rgba(255,255,255,0.1);
    max-width: 1000px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === SPLIT LAYOUT === */
.login-card-body {
    display: flex;
    flex-wrap: wrap;
}

/* === SECȚIUNE FORMULAR (STÂNGA) === */
.login-form-section {
    flex: 1;
    min-width: 400px;
    padding: 60px 50px;
    position: relative;
}

/* === SECȚIUNE BRANDING (DREAPTA) === */
.login-branding-section {
    flex: 1;
    min-width: 400px;
    background: linear-gradient(135deg, #11998e 0%, #0f8075 50%, #0d6b62 100%);
    padding: 60px 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-branding-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.branding-content {
    position: relative;
    z-index: 1;
}

.branding-logo {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.branding-tagline {
    font-size: 1.3rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.95;
}

.branding-features {
    list-style: none;
    padding: 0;
    margin: 40px 0 0 0;
}

.branding-features li {
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.branding-features li i {
    margin-right: 10px;
    font-size: 1.3rem;
}

/* === LOGO FORMULAR === */
.login-logo {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
}

/* === FORMULAR === */
.login-form {
    margin-top: 30px;
}

.login-form-group {
    margin-bottom: 25px;
    position: relative;
}

.login-form-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.login-input-wrapper {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #11998e;
    font-size: 1.1rem;
    z-index: 2;
}

.login-form-control {
    width: 100%;
    padding: 14px 15px 14px 45px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-form-control:focus {
    outline: none;
    border-color: #11998e;
    background: white;
    box-shadow: 0 0 0 4px rgba(17, 153, 142, 0.1);
}

/* === REMEMBER ME === */
.login-remember {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.login-remember input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #11998e;
}

.login-remember label {
    margin: 0;
    cursor: pointer;
    user-select: none;
    color: #495057;
}

/* === BUTON AUTENTIFICARE === */
.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #11998e 0%, #0f8075 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17, 153, 142, 0.4);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* === LOADING STATE === */
.login-btn.loading {
    pointer-events: none;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === LINK FORGOT PASSWORD === */
.login-forgot {
    text-align: center;
    margin-top: 20px;
}

.login-forgot a {
    color: #11998e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-forgot a:hover {
    color: #0d7a6f;
    text-decoration: underline;
}

/* === ALERT MESSAGES === */
.login-alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.login-alert i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.login-alert-danger {
    background: #fee;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.login-alert-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

/* === RECAPTCHA === */
#recaptcha-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* === VERSIUNE === */
.login-version {
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
    .login-branding-section {
        display: none;
    }
    
    .login-form-section {
        min-width: 100%;
    }
    
    .login-card {
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    .login-form-section {
        padding: 40px 30px;
        min-width: auto;
    }
    
    .login-logo-text {
        font-size: 2rem;
    }
    
    .login-version {
        position: static;
        text-align: center;
        margin-top: 20px;
        background: transparent;
    }
}

/* === ANIMAȚII SUPLIMENTARE === */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* === VALIDATION ERRORS === */
.text-danger {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

.form-control.is-invalid {
    border-color: #dc3545;
}

/* === DARK MODE === */
.dark-mode .login-container {
    background: linear-gradient(135deg, #1a2332 0%, #243447 50%, #2d4057 100%);
}

.dark-mode .login-card {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.dark-mode .login-form-section {
    background: #1e293b;
}

.dark-mode .login-logo-text {
    color: #e2e8f0;
}

.dark-mode .login-subtitle {
    color: #94a3b8;
}

.dark-mode .form-label,
.dark-mode .login-form-label {
    color: #e2e8f0; /* Mai deschis pentru vizibilitate mai bună */
}

.dark-mode .login-remember label {
    color: #e2e8f0; /* Același ton pentru consistență */
}

.dark-mode .form-control {
    background: #0f172a;
    border-color: rgba(19, 179, 166, 0.3);
    color: #e2e8f0;
}

.dark-mode .form-control:focus {
    background: #0f172a;
    border-color: #13b3a6;
    color: #e2e8f0;
    box-shadow: 0 0 0 0.2rem rgba(19, 179, 166, 0.25);
}

.dark-mode .form-control::placeholder {
    color: #64748b;
}

.dark-mode .input-icon {
    color: #13b3a6;
}

.dark-mode .login-btn {
    background: linear-gradient(135deg, #13b3a6 0%, #0f8075 50%, #0d6b62 100%);
    box-shadow: 0 4px 15px rgba(19, 179, 166, 0.3);
}

.dark-mode .login-btn:hover {
    background: linear-gradient(135deg, #0f8075 0%, #0d6b62 50%, #0a5550 100%);
    box-shadow: 0 6px 20px rgba(19, 179, 166, 0.4);
}

.dark-mode .login-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.dark-mode .login-branding-section {
    background: linear-gradient(135deg, #0d6b62 0%, #0a5550 50%, #084440 100%);
}

.dark-mode .branding-title {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode .branding-description {
    color: rgba(255, 255, 255, 0.95);
}

.dark-mode .feature-icon {
    background: rgba(255, 255, 255, 0.15);
    color: #13b3a6;
}

.dark-mode .feature-text h6 {
    color: #ffffff;
}

.dark-mode .feature-text p {
    color: rgba(255, 255, 255, 0.85);
}

.dark-mode .login-version {
    background: rgba(19, 179, 166, 0.15);
    color: #13b3a6;
}

.dark-mode .text-danger {
    color: #f87171;
}

.dark-mode .form-control.is-invalid {
    border-color: #f87171;
}
