/* JPS Custom Theme - Mayan EDMS */

:root {
    --font-main: 'Inter', sans-serif;
    --color-text: #2F2D28;
    --color-heading: #0A0B0F;
    --color-accent: #30A46C;
    --color-primary: #83191C;
    --color-primary-hover: #9E161A;
    --color-primary-active: #CE181E;
    --border-gray: rgba(0, 0, 0, 0.09);
    --shadow-light: 0px 1px 1px 0px rgba(0, 0, 0, 0.05);
    --border-input: #DCE4EC;
    --border-container: rgba(0, 0, 0, 0.0902);
}

/* Header y navegación */
.navbar {
    background: #83191C !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-default {
    background: #83191C !important;
    border-color: #83191C !important;
}

.navbar-brand {
    color: white !important;
    font-weight: bold;
}

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: white !important;
}

/* Login y Reset Password Styles */
body {
    font-family: var(--font-main);
    background-color: #f5f5f5;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#body-plain{
    margin:0;
}

.reset-container{
    margin:1rem;
    background: white;
    padding: 16px 16px 48px 16px ;
    width:60rem;
    border-radius: 4px;
    border: 1px solid var(--border-gray);
}

.reset-header {
    margin:0;
}

.reset-header h3 {
    font-family: var(--font-main);
    color: var(--color-primary-hover);
    font-size: 26px;
    font-weight: 600 !important;
    line-height: 18.7px;
    margin: 0;
    width: 100%;
}

.reset-body {
    margin-top:14px;
}

.reset-btn:focus,
.reset-btn:active {
    background: var(--color-primary-active);
    border-color: var(--color-primary-active);
    outline: none;
    box-shadow: none;
}

.reset-btn {
    padding:11px 17px;
    margin-top:14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.90);
    font-size: 15px;
    font-weight: 500;
    line-height: 19.5px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-main);
}

.reset-btn:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

input#id_email.form-control{
    border: 1px solid var(--border-gray);
}

input#id_email.form-control:active,
input#id_email.form-control:focus{
    border: 1px solid var(--border-gray);
    box-shadow: 0 0 0 0px transparent;
}

.back-to-login{
    display:flex;
    color: var(--color-primary) !important;
    justify-content:space-around;
    margin:15px 0 0 !important;
}

.reset-description{
    font-family:var(--font-main) !important;
    margin:15px 0;
}

.group > .form-group {
    font-size: 15px;
    color: var(--color-text);
    font-weight: 400;
}

/*  Fin de Reset Password Styles  */

.login-container{
    margin:10px;
    display: flex;
    /* flex-direction: column; */
    /* align-items: center; */
}

.login-header {
    margin:0 0 30px 0;
    align-self: stretch;
    display:flex;
    flex-direction: column;
    gap:4px 0 0;
}

.login-header h3{
    color: var(--color-primary);
    font-size: 26px;
    font-weight: 400;
    line-height: 18.7px;
    margin: 0;
    text-align: center;
    width: 100%;
}

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-brand img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.login-body{
    padding: 15px;
    width: 80%;
}

.form-group {
    margin-bottom:0 !important;
}

.form-group label {
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    line-height: 21.43px;
    margin-bottom: 6px;
    color: var(--color-text);
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #DCE4EC;
    border-radius: 4px;
    font-size: 16px;
    font-family: var(--font-main);
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(131, 25, 28, 0.1);
}

/* Estilos para el texto "requerido" al lado del label */
.form-group .help-text,
.form-group .required {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

/* Contenedor para label y texto requerido */
.form-group .field-label {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.login-btn{
    width: 100%;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: rgba(255, 255, 255, 0.90);
    font-size: 16px;
    font-weight: 500;
    line-height: 19.5px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-main);
}

.login-btn:hover{
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.login-btn:focus,
.login-btn:active{
    background: var(--color-primary-active);
    border-color: var(--color-primary-active);
    outline: none;
    box-shadow: none;
}

.back-to-login {
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 400;
    line-height: 21.43px;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 20px;
}

.forgot-password-link a,
.back-to-login a {
    color: var(--color-primary);
    text-decoration: none;
}

.forgot-password-link a:hover,
.back-to-login a:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.success-message {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* --- Estilos personalizados para login (JPS) --- */
body {
    background: #fff;
    font-family: 'Inter', sans-serif;
}
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-header {
    text-align: center;
    margin-bottom: 18px;
}
.login-title {
    font-family: var(--font-main);
    color: var(--color-primary-hover) !important;
    font-size: 2.1rem;
    font-weight: 600 !important;
}
.login-brand {
    color: var(--color-primary-hover) !important;
    font-size: 17px;
    font-weight: 400;
    margin-top: 4px;
}
.login-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    padding: 15px 15px 48px 15px;
    width: 50rem;
}
.login-form-label {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 7px;
    color: #222;
    display: block;
}
.login-form-label span {
    font-size: 15px;
    color: #969696;
    font-weight: 400;
}
.login-form-input {
    width: 100%;
    font-size: 1.10rem;
    padding: 12px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    margin-bottom: 21px;
    background: #fff;
    margin-top: 2px;
}
.login-btn {
    width: 100%;
    background: #8A181B;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    padding: 12px 0px;
    margin-bottom: 18px;
    cursor: pointer;
}
.login-btn:active {
    background: #661216;
}
.o-divider {
    text-align: center;
    color: #999;
    font-size: 15px;
    margin: 0 0 14px 0;
}
.microsoft-login-link {
    text-align: center;
    margin-bottom: 14px;
}
.microsoft-login-btn {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #222;
    padding: 11px 0px;
    text-decoration: none;
    transition: box-shadow 0.12s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    font-family: Segoe UI;
}
.microsoft-login-btn:hover {
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.microsoft-logo {
    height: 20px;
    margin-right: 10px;
}
.forgot-password-link {
    text-align: right;
    margin-top: 14px;
}
.forgot-password-link-text {
    font-size: 15px;
    color: #189370;
    text-decoration: none;
}
.forgot-password-link-text:hover {
    text-decoration: underline;
}
.error-message {
    background: #ffeaea;
    color: #a94442;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 9px 11px;
    margin-bottom: 16px;
    font-size: 1.05rem;
    text-align: left;
}
.success-message {
    background: #e7f7ed;
    color: #247c52;
    border: 1px solid #b7e3c3;
    border-radius: 4px;
    padding: 9px 11px;
    margin-bottom: 16px;
    font-size: 0.98rem;
    text-align: left;
}
@media (max-width: 450px) {
    .login-card { width: 98vw; padding: 18px 4vw 14px 4vw; }
}

#id_username {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    margin-top: 2px;
}

#id_password {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    margin-top: 2px;
}

form .form-group,
form label,
form input,
form button {
    margin-bottom: 14px;
}

#reset-done, 
#password-reset-complete {
    margin: 0; 
    padding: 16px;
}

#reset-done .col-lg-offset-4,
#password-reset-complete .col-lg-offset-4 {
    width: 100%;
    border: 2px solid rgba(0, 0, 0, 0.09);
    border-radius: 6px;
    padding: 16px;
    padding-bottom: 40px;
    margin: 0;
}

#reset-done .col-lg-offset-4 .alert-success,
#password-reset-complete .col-lg-offset-4 .alert-success {
    background: none;
    border: none;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    color: var(--color-text);
    padding: 0;
    max-width: 40ch;
    text-align: center;
}

#reset-done .text-center a,
#password-reset-complete .text-center a {
    color: var(--color-primary-hover);
    text-decoration: underline;
    text-align: "center";
    font-weight: 400;
    line-height: 21.43px;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
    text-underline-position: from-font;
}

#reset-done .text-center a:hover,
#password-reset-complete .text-center a:hover {
    color: var(--color-primary);
    text-decoration: underline;
}

@media  (max-width: 500px) {
    #reset-done .col-lg-offset-4,
    #password-reset-complete .col-lg-offset-4 {
        border: none;
    }
}

.reset-title{
    color: var(--color-primary-hover);
    font-size: 26px;
    font-weight: 600;
    font-family: var(--font-main);
    margin-top: 3px;
    margin-bottom: 14px;
}

#password-reset .form-group {
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
}

#password-reset .panel-primary {
    border: 2px solid var(--border-container);
}

#password-reset .form-group input{
    border: 2px solid var(--border-input);
    font-weight: 500;
}

#password-reset .form-group input:focus{
    border: 2px solid var(--color-heading);
    box-shadow: none;
}

#password-reset .form-group ul{
    max-width: 52ch;
    font-weight: 500;
}

#body-plain:has(#password-reset) {
    margin: 0;
}

#body-plain .btn-primary{
    background-color: var(--color-primary);
    border: none;
}

#body-plain .btn-primary:hover {
    background-color: var(--color-primary-hover);
}   

@media (max-width: 500px) {

   #password-reset .panel-primary {
    border: 2px solid white;
    }
}