/* =========================================================
   Cibernetica Cloud Labs - Guacamole login branding
   Basado en la estructura real de guacamole-client 1.6.0:
   .login-ui > .login-dialog-middle > .login-dialog > form
   (el header, las etiquetas de campo, la ayuda y el footer
   se insertan vía parches HTML en html/patches.html)
   ========================================================= */

html, body {
    height: 100%;
}

/* -------------------------------------------------------
   Fondo general
   ------------------------------------------------------- */
.login-ui {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(6,12,26,0.55) 0%, rgba(6,12,26,0.75) 100%),
        url("app/ext/cibernetica-theme/images/background.svg") center center / cover no-repeat,
        #0a1730 !important;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding-bottom: 140px; /* deja espacio para el footer fijo */
    box-sizing: border-box;
}

/* Ocultamos el logo y el bloque de versión que Guacamole
   pone por defecto dentro de la tarjeta: usamos los nuestros
   en el header de marca insertado arriba */
.login-ui .login-dialog .logo,
.login-ui .login-dialog .version {
    display: none !important;
}

/* -------------------------------------------------------
   Header de marca (insertado antes de .login-dialog-middle)
   ------------------------------------------------------- */
.cib-brand-header {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 56px;
    padding-bottom: 24px;
}

.cib-logo {
    width: 84px;
    height: 84px;
    background: url("app/ext/cibernetica-theme/images/logo.svg") no-repeat center / contain;
    margin-bottom: 12px;
}

.cib-brand-name {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
}

.cib-brand-main {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
}

.cib-brand-sub {
    color: #3b82f6;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 2px;
}

.cib-portal-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 0.5px;
}

.cib-portal-subtitle {
    color: #c7d2e3;
    font-size: 14px;
    margin-top: 4px;
    text-align: center;
}

/* -------------------------------------------------------
   Tarjeta central del formulario
   ------------------------------------------------------- */
.login-ui .login-dialog-middle {
    display: flex;
    justify-content: center;
    padding: 0 16px;
}

.login-ui .login-dialog {
    position: relative;
    background: #f5f6fa !important;
    border: none !important;
    border-radius: 16px !important;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45) !important;
    padding: 36px 32px !important;
    width: 100%;
    max-width: 420px;
    z-index: 5;
}

.login-ui .login-dialog .login-form {
    display: block;
}

/* -------------------------------------------------------
   Campos de usuario / contraseña
   ------------------------------------------------------- */
/* .login-fields es estático (siempre existe en login.html);
   los <input> reales los inserta Angular dinámicamente vía
   guac-form, por lo que las etiquetas se posicionan aquí con
   coordenadas fijas en vez de depender de "antes del input". */
.login-fields {
    position: relative;
    padding-top: 26px; /* espacio reservado para la etiqueta de usuario */
    margin-top: 4px;
}

.cib-field-label {
    position: absolute;
    left: 0;
    right: 0;
    height: 20px;
    line-height: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #1e2430;
}

.cib-label-username {
    top: 0;
}

/* 26px (reservado arriba) + 46px (alto del campo de usuario) + 18px (espacio) */
.cib-label-password {
    top: 90px;
}

.login-fields input[type="text"],
.login-fields input[type="password"] {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    height: 46px !important;
    background: #ffffff !important;
    border: 1px solid #d7dbe3 !important;
    border-radius: 8px !important;
    padding: 0 14px !important;
    font-size: 15px !important;
    color: #1e2430 !important;
    margin-bottom: 18px !important;
}

/* El primer campo (usuario) necesita más espacio debajo para
   que la etiqueta de contraseña quepa antes del segundo campo */
.login-fields input[type="text"]:first-of-type,
.login-fields input:first-of-type {
    margin-bottom: 44px !important;
}

.login-fields input[type="text"]:focus,
.login-fields input[type="password"]:focus {
    border-color: #2563eb !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

/* -------------------------------------------------------
   Botón principal
   ------------------------------------------------------- */
.login-ui .login-dialog .buttons {
    margin-top: 8px;
}

.login-ui .login-dialog input[type="submit"] {
    width: 100%;
    background: linear-gradient(90deg, #1d4ed8, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: filter 0.15s ease;
}

.login-ui .login-dialog input[type="submit"]::before {
    content: "→  ";
}

.login-ui .login-dialog input[type="submit"]:hover {
    filter: brightness(1.1);
}

/* -------------------------------------------------------
   Sección de ayuda (insertada después de .buttons)
   ------------------------------------------------------- */
.cib-help {
    margin-top: 22px;
}

.cib-help-divider {
    border-top: 1px solid #e2e5ec;
    margin-bottom: 16px;
}

.cib-help-text {
    text-align: center;
    font-size: 13px;
    color: #4b5568;
}

.cib-help-title {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e2430;
}

.cib-help-email {
    color: #2563eb;
    text-decoration: none;
}

.cib-help-email:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------
   Mensajes de error
   ------------------------------------------------------- */
.login-ui .login-error {
    text-align: center;
    color: #fca5a5;
    max-width: 420px;
    margin: 0 auto 12px;
    position: relative;
    z-index: 5;
}

/* -------------------------------------------------------
   Footer (insertado después de .login-ui, fijo al fondo)
   ------------------------------------------------------- */
.cib-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #050c1a;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.cib-footer-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 18px 24px 12px;
}

.cib-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #ffffff;
    min-width: 140px;
}

.cib-feature-title {
    font-weight: 700;
    font-size: 14px;
}

.cib-feature-sub {
    font-size: 12px;
    color: #9fb0cc;
}

.cib-footer-bottom {
    display: flex;
    justify-content: space-between;
    padding: 10px 24px 14px;
    font-size: 12px;
    color: #7f8ca8;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
    gap: 8px;
}
/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/* Label/tag denoting the user that shared a connection */
.jdbc-share-tag {

    background: #0095ff;
    padding: 0.25em;

    -moz-border-radius:    0.25em;
    -webkit-border-radius: 0.25em;
    -khtml-border-radius:  0.25em;
    border-radius:         0.25em;

    color: white;
    font-size: 0.75em;
    font-weight: bold;

}
