@import url("./fonts.css");

/* ============================================================
   Auth Portal — login, registro
   Builds on background-img-auth.css:
     .fortra-bg / .fortra-bg-fullscreen / .fortra-bg .container
   Footer (.login-toolbar, .login-brand) styles live in
   background-img-auth.css and apply automatically when the
   footer is a direct child of .fortra-bg .container.
   ============================================================ */

/* Apply XuntaSans corporate font on auth pages.
   fonts.css only defines @font-face; the family must be applied
   explicitly (login.css used to do this for the old layout). */
.fortra-bg,
.fortra-bg .container {
    font-family: "XuntaSans-Regular", Roboto, sans-serif;
    color: #1f2937;
}

/* Narrow container for auth pages (override 125rem default) */
.fortra-bg .container.auth-portal {
       height: 100%;
       width: 66%;
    padding: 2rem;
    font-size: 1.75rem;
}

/* ---- Header row (logout button) ---- */
.auth-portal__header {
    display: flex;
    justify-content: flex-end;
    min-height: 2.5rem;
    margin-bottom: 0.25rem;
}

.auth-portal__logout {
    color: #c0392b !important;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s;
}

.auth-portal__logout:hover,
.auth-portal__logout:focus {
    background: rgba(192, 57, 43, 0.08);
    color: #a93226 !important;
    text-decoration: none;
}

/* ---- Hero ---- */
.auth-portal__hero {
    text-align: center;
    padding: 0.75rem 1rem 2rem;
}

.auth-portal__hero-title {
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    font-weight: 800;
    color: #007bc4;
    letter-spacing: -0.04em;
    margin: 0 0 0.5rem;
    line-height: 1;
}

.auth-portal__hero-subtitle {
   font-size: 1.5rem;
   color: #002b4a;
   margin: 0;
}

/* ---- Blocks grid ---- */
.auth-portal__blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Asymmetric grid for pages with a form on the left */
.auth-portal__blocks--form {
    grid-template-columns: 3fr 2fr;
    gap: 1.25rem;
    align-items: start;
}

/* Single block */
.auth-portal__block {
    border-radius: 0.875rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-portal__block--primary {
    border: 1.5px solid #1d71b8;
    background: rgba(0, 123, 196, 0.03);
}
.auth-portal__form-card-title,
.auth-portal__form-card .alert,
.auth-portal__form-card .btn.btn-primary,
.auth-portal__form-card label,
.auth-portal__form-card .form-control-static {
    font-size: inherit !important;
}

.auth-portal__block--secondary {
    border: 1px solid rgba(16, 39, 61, .14);
    background: rgba(16, 39, 61, .02);
    text-align: center;
    justify-content: center;
}

/* Form card (full-width, for registro.html) */
.auth-portal__form-card {
    font-size: 1.4rem;
    border-radius: 0.875rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    border: 1.5px solid #1d71b8;
    background: rgba(0, 123, 196, 0.03);
    margin-bottom: 1rem;
    width: 50%;
    justify-self: center;
}

.auth-portal__block-title,
.auth-portal__form-card-title {
    font-size: 3rem;
    font-weight: 700;
    color: #024C73;
    margin: 0;
    text-align: center;
}

.auth-portal__block-desc {
    font-size: 1.25rem;
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

/* ---- Alerts ---- */
.auth-portal__block .alert,
.auth-portal__form-card .alert,
.auth-portal .alert {
    border-radius: 0.625rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    margin: 0;
}

.auth-portal__block .alert-danger,
.auth-portal__form-card .alert-danger,
.auth-portal .alert-danger {
    background: #fde8e8;
    color: #b91c1c;
    border-color: #fca5a5;
}

.auth-portal__block .alert-info,
.auth-portal__form-card .alert-info,
.auth-portal .alert-info {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

/* ---- Buttons ---- */
.auth-portal__block .btn.btn-primary,
.auth-portal__form-card .btn.btn-primary,
.auth-portal .btn.btn-primary {
    background-color: #007bc4;
    border-color: #007bc4;
    color: #fff;
    border-radius: 0.625rem;
    padding: 0.625rem 1.5rem;
    font-weight: 700;
    display: inline-block;
    transition: background-color 0.15s, border-color 0.15s;
}

.auth-portal__block .btn.btn-primary:hover,
.auth-portal__block .btn.btn-primary:focus,
.auth-portal__form-card .btn.btn-primary:hover,
.auth-portal__form-card .btn.btn-primary:focus,
.auth-portal .btn.btn-primary:hover,
.auth-portal .btn.btn-primary:focus {
    background-color: #006cae;
    border-color: #006cae;
    color: #fff;
    text-decoration: none;
}

/* ---- Form fields ---- */
.auth-portal .form-control,
.auth-portal input[type="text"],
.auth-portal input[type="password"],
.auth-portal input[type="email"],
.auth-portal select.form-control {

    height: 2.625rem;
    border: 0.0625rem solid rgba(16, 39, 61, .18);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 1.4rem;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
}

.auth-portal .form-control:focus {
    border-color: rgba(0, 123, 196, .5);
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 196, .12);
    outline: none;
}

.auth-portal .control-label {
    font-weight: 600;
    color: #27455f;
    font-size: 0.9rem;
    padding-top: 0.6rem;
}

.auth-portal .checkbox-inline {
    color: #27455f;
    font-size: 0.875rem;
    user-select: none;
}

.auth-portal .form-group {
    margin-bottom: 0.875rem;
}

.auth-portal .help-block {
    font-size: 0.8rem;
    color: rgba(16, 39, 61, .6);
    margin-top: 0.25rem;
}

.auth-portal .text-danger {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 600;
}

.auth-portal .form-link {
    color: #007bc4;
    font-size: 0.875rem;
    margin-left: 0.75rem;
    text-decoration: none;
}

.auth-portal .form-link:hover {
    text-decoration: underline;
}

/* form-control-static for read-only fields */
.auth-portal .form-control-static {
    font-size: 0.9rem;
    color: #1f2d3d;
    padding-top: 0.5rem;
    min-height: 2.25rem;
}

/* ---- Mobile ---- */
@media (max-width: 640px) {
    .auth-portal__blocks,
    .auth-portal__blocks--form {
        grid-template-columns: 1fr;
    }

    .auth-portal__hero-title { font-size: 3.5rem; }
    .auth-portal__hero { padding-bottom: 1.25rem; }

    .auth-portal__block,
    .auth-portal__form-card {
        padding: 1.125rem;
    }

    .auth-portal .btn.btn-primary {
        width: 100%;
        text-align: center;
    }

    /* Collapse form-horizontal labels above fields */
    .auth-portal .form-horizontal .form-group {
        margin-left: 0;
        margin-right: 0;
    }

    .auth-portal .form-horizontal .control-label {
        float: none !important;
        width: 100% !important;
        text-align: left;
        padding-top: 0;
        margin-bottom: 0.375rem;
    }

    .auth-portal .form-horizontal [class*="col-sm-"] {
        float: none !important;
        width: 100% !important;
        padding-left: 0;
        padding-right: 0;
    }

    .auth-portal .form-horizontal .col-sm-offset-3 {
        margin-left: 0 !important;
    }

    .auth-portal .m-l-10 {
        display: inline-block;
        margin-left: 0;
        margin-top: 0.75rem;
    }
}

@media (max-width: 375px) {
    .auth-portal__hero-title { font-size: 2.75rem; }
}
