/* ERP Elitse — login.css
   Pantalla d'accés a doble panell. Només es carrega des de login.html. */

.login-page {
    height: 100vh;
    overflow: hidden;
}

.login-wrap {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

/* ============ PANELL ESQUERRE ============ */
.login-left {
    width: 44%;
    flex: 0 0 44%;
    background: rgba(78, 128, 114, 0.12);
    border-right: 0.5px solid rgba(78, 128, 114, 0.2);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 40px 48px;
}

.login-left .deco-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(78, 128, 114, 0.06);
    border: none;
    z-index: 0;
}

.login-left .deco-circle-1 {
    width: 340px;
    height: 340px;
    top: -90px;
    right: -110px;
}

.login-left .deco-circle-2 {
    width: 220px;
    height: 220px;
    bottom: 30px;
    left: -80px;
}

.login-logo {
    width: 130px;
    height: auto;
    position: relative;
    z-index: 1;
}

.login-left-mid {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.login-headline {
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2c;
    line-height: 1.3;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 380px;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9999px;
    background: rgba(78, 128, 114, 0.1);
    color: #3a6057;
    font-size: 12px;
    font-weight: 500;
}

.feature-pill i {
    font-size: 16px;
}

.login-tagline {
    font-size: 11px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* ============ PANELL DRET ============ */
.login-right {
    flex: 1 1 auto;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-wrap {
    width: 100%;
    max-width: 320px;
}

.login-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c2c2c;
}

.login-form-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Selector de rol */
.role-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.role-btn {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.role-btn i {
    font-size: 20px;
}

.role-btn:hover {
    border-color: var(--primary-light);
}

.role-btn.active {
    border-color: #4e8072;
    background: rgba(78, 128, 114, 0.08);
    color: #3a6057;
}

/* Camps amb icona */
.login-field {
    margin-bottom: 16px;
}

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #2c2c2c;
}

.input-icon {
    position: relative;
}

.input-icon .field-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-icon input {
    width: 100%;
    height: 40px;
    padding: 0 38px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-icon input:focus {
    outline: none;
    border-color: #4e8072;
    box-shadow: 0 0 0 3px rgba(78, 128, 114, 0.12);
}

.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
}

.pw-toggle:hover {
    color: var(--primary);
}

.pw-toggle i {
    font-size: 18px;
}

/* Fila recorda'm / oblidat */
.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
    font-size: 12px;
}

.login-row .remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

.login-row .remember input {
    width: auto;
    height: auto;
    margin: 0;
    accent-color: #4e8072;
}

.login-row .forgot-link {
    color: #4e8072;
    font-weight: 500;
}

.login-row .forgot-link:hover {
    text-decoration: underline;
}

/* Botó accedir */
.btn-login {
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4e8072;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-login:hover {
    background: #3a6057;
}

.btn-login i {
    font-size: 18px;
}

.login-help {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 20px;
}

.login-alert {
    margin-bottom: 16px;
}

/* Responsiu: amaga el panell esquerre en pantalles petites */
@media (max-width: 820px) {
    .login-left {
        display: none;
    }
}
