@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ===== GLOBAL FONT ===== */
.login-ui,
.login-ui *,
.login-ui .login-dialog,
.login-ui .login-dialog .login-form,
.login-ui .login-dialog .login-form .login-fields input,
.login-ui .login-dialog .login-form .buttons input[type="submit"],
.login-ui .login-dialog .login-form .login-fields .labeled-field .field-header label,
.login-ui .login-dialog .login-form .login-fields .labeled-field .form-field input {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== BACKGROUND ===== */
div.login-ui,
.login-ui {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

/* ===== DIALOG MIDDLE WRAPPER ===== */
.login-ui .login-dialog-middle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
}

/* ===== LOGIN DIALOG CARD ===== */
.login-ui .login-dialog,
.login-ui .login-dialog-middle .login-dialog,
.login-ui .login-dialog.notification {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4),
                0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(226, 232, 240, 0.6) !important;
    padding: 2.5rem 2rem 2rem !important;
    max-width: 400px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ===== LOGO ===== */
.login-ui .login-dialog .logo,
.login-ui .login-dialog .login-form .logo {
    background-image: url('app/ext/interdecima-branding/images/logo.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 220px !important;
    height: 88px !important;
    margin: 0 auto 1.5rem !important;
    display: block !important;
}

/* ===== APP NAME / TITLE (inside .version) ===== */
.login-ui .login-dialog .version {
    text-align: center !important;
    margin-bottom: 1.5rem !important;
}

.login-ui .login-dialog .version .app-name {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    letter-spacing: -0.01em !important;
    margin: 0 !important;
    padding: 0 !important;
}

.login-ui .login-dialog .version .version-number {
    display: none !important;
}

/* ===== FORM FIELDS CONTAINER ===== */
.login-ui .login-dialog .login-fields,
.login-ui .login-dialog .login-form .login-fields {
    margin-top: 0.5rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

/* ===== LABELED FIELD WRAPPER ===== */
.login-ui .login-fields .labeled-field,
.login-ui .login-dialog .login-fields .labeled-field,
.login-ui .login-dialog .login-form .login-fields .labeled-field {
    margin-bottom: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ===== FIELD-HEADER: Override Guacamole's absolute/behind-input positioning =====
   Guacamole positions .field-header absolutely with z-index:-1 and opacity:0.5
   so it acts as a placeholder behind the transparent input.
   We override to make it a normal block above the input. */
.login-ui .login-fields .labeled-field .field-header,
.login-ui .login-fields .labeled-field.empty .field-header,
.login-ui .login-dialog .login-fields .labeled-field .field-header,
.login-ui .login-dialog .login-fields .labeled-field.empty .field-header,
.login-ui .login-dialog .login-form .login-fields .labeled-field .field-header,
.login-ui .login-dialog .login-form .login-fields .labeled-field.empty .field-header {
    display: block !important;
    position: static !important;
    z-index: auto !important;
    opacity: 1 !important;
    overflow: visible !important;
    margin: 0 0 0.375rem 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* ===== LABEL inside field-header ===== */
.login-ui .login-fields .labeled-field .field-header label,
.login-ui .login-fields .labeled-field.empty .field-header label,
.login-ui .login-dialog .login-fields .labeled-field .field-header label,
.login-ui .login-dialog .login-fields .labeled-field.empty .field-header label,
.login-ui .login-dialog .login-form .login-fields .labeled-field .field-header label,
.login-ui .login-dialog .login-form .login-fields .labeled-field.empty .field-header label {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    display: block !important;
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: normal !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===== INPUT FIELDS =====
   Override transparent background on .empty inputs */
.login-ui .login-fields .labeled-field input,
.login-ui .login-fields .labeled-field.empty input,
.login-ui .login-fields .labeled-field .form-field input,
.login-ui .login-fields .labeled-field.empty .form-field input,
.login-ui .login-dialog .login-fields .labeled-field input,
.login-ui .login-dialog .login-fields .labeled-field.empty input,
.login-ui .login-dialog .login-fields .labeled-field .form-field input,
.login-ui .login-dialog .login-fields .labeled-field.empty .form-field input,
.login-ui .login-dialog .login-form .login-fields .labeled-field input,
.login-ui .login-dialog .login-form .login-fields .labeled-field.empty input,
.login-ui .login-dialog .login-form .login-fields .labeled-field .form-field input,
.login-ui .login-dialog .login-form .login-fields .labeled-field.empty .form-field input {
    background-color: #f8fafc !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 0.625rem 0.875rem !important;
    font-size: 0.875rem !important;
    color: #1e293b !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    outline: none !important;
    height: auto !important;
    line-height: normal !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.login-ui .login-fields .labeled-field input:focus,
.login-ui .login-fields .labeled-field .form-field input:focus,
.login-ui .login-dialog .login-fields .labeled-field input:focus,
.login-ui .login-dialog .login-fields .labeled-field .form-field input:focus {
    border-color: #94a3b8 !important;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15) !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.login-ui .login-dialog .login-fields input::placeholder,
.login-ui .login-dialog .login-form .login-fields input::placeholder {
    color: #94a3b8 !important;
    font-weight: 400 !important;
}

/* ===== BUTTONS WRAPPER ===== */
.login-ui .login-dialog .buttons,
.login-ui .login-dialog .login-form .buttons {
    margin-top: 1.5rem !important;
}

/* ===== SUBMIT BUTTON (input[type="submit"] inside .buttons) ===== */
.login-ui .login-dialog .buttons input[type="submit"],
.login-ui .login-dialog .login-form .buttons input[type="submit"],
.login-ui .login-dialog .buttons input.login,
.login-ui .login-dialog .login-form .buttons input.login,
.login-ui .login-dialog input[type="submit"],
.login-ui .login-dialog .login-form input[type="submit"] {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.625rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: normal !important;
    height: auto !important;
    margin-top: 0 !important;
}

/* ===== HIDE DEFAULT GUACAMOLE TOTP HEADER ===== */
.login-ui .login-dialog .header,
.login-ui .login-dialog .login-form .header {
    display: none !important;
}

/* ===== TOTP MESSAGE (injected by JS on TOTP page) ===== */
.login-ui .login-dialog .totp-message {
    text-align: center !important;
    font-size: 0.8125rem !important;
    color: #475569 !important;
    margin: 0 0 1rem 0 !important;
    padding: 0.625rem 0.875rem !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    border-radius: 8px !important;
    line-height: 1.4 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== CONTINUE BUTTON (TOTP authentication page only) ===== */
/* Hide by default on the main login page */
.login-ui .login-dialog .buttons input.continue-login {
    display: none !important;
}

/* Show only when the TOTP code field is present (data attribute set by JS) */
.login-ui .login-dialog.totp-active .buttons input.continue-login {
    display: block !important;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0.625rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    width: 100% !important;
    letter-spacing: 0.01em !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    line-height: normal !important;
    height: auto !important;
    margin-top: 0.5rem !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.login-ui .login-dialog .buttons input.continue-login:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.login-ui .login-dialog .buttons input.continue-login:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

.login-ui .login-dialog .buttons input[type="submit"]:hover,
.login-ui .login-dialog .login-form .buttons input[type="submit"]:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15) !important;
    transform: translateY(-1px) !important;
}

.login-ui .login-dialog .buttons input[type="submit"]:active,
.login-ui .login-dialog .login-form .buttons input[type="submit"]:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12) !important;
}

/* ===== ERROR MESSAGES ===== */
.login-ui .login-dialog .notification.error,
.login-ui .login-error,
.login-ui p.login-error {
    background-color: #fef2f2 !important;
    border: 1px solid #fecaca !important;
    border-radius: 8px !important;
    color: #991b1b !important;
    font-size: 0.8125rem !important;
    padding: 0.625rem 0.875rem !important;
    margin-bottom: 1rem !important;
}

/* ===== BOTTOM BAR / COPYRIGHT ===== */
.login-ui .login-dialog .footer,
.login-ui .login-dialog .disclaimer,
.login-ui .login-dialog .login-form .footer {
    font-size: 0.75rem !important;
    color: #94a3b8 !important;
    text-align: center !important;
    margin-top: 1.5rem !important;
    border-top: 1px solid #f1f5f9 !important;
    padding-top: 1rem !important;
}

/* ===== LINKS ===== */
.login-ui .login-dialog a {
    color: #475569 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.15s ease !important;
}

.login-ui .login-dialog a:hover {
    color: #1e293b !important;
}

/* ===== SCROLLBAR (login page) ===== */
.login-ui ::-webkit-scrollbar {
    width: 6px !important;
}

.login-ui ::-webkit-scrollbar-track {
    background: transparent !important;
}

.login-ui ::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 3px !important;
}
/*
 * 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;

}
/*
 * 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;

}
/*
 * 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;

}
.totp-enroll p,.totp-details{font-size:.8em}.totp-qr-code{text-align:center}.totp-qr-code img{margin:1em;border:1px solid rgba(0,0,0,0.25);box-shadow:1px 1px 2px rgba(0,0,0,0.25);cursor:pointer}h3.totp-details-header{font-size:.8em}h3.totp-details-header::before{content:'▸ '}.totp-details-visible h3.totp-details-header::before{content:'▾ '}.totp-details,.totp-hide-details{display:none}.totp-details-visible .totp-details{display:table}.totp-details-visible .totp-hide-details{display:inline}.totp-details-visible .totp-show-details{display:none}.totp-hide-details,.totp-show-details{color:blue;text-decoration:underline;cursor:pointer;margin:0 .25em;font-weight:normal}.totp-details{margin:0 auto}.totp-details th{padding-right:.25em;text-align:left}.totp-details td{font-family:monospace}.totp-detail{display:inline-block;margin:0 .25em}