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

}
html, body {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(149, 76, 233, 0.22), transparent 32%),
        radial-gradient(circle at top right, rgba(109, 40, 217, 0.18), transparent 28%),
        linear-gradient(135deg, #0b0714 0%, #140a22 40%, #0a0612 100%) !important;
    color: #f5f3ff !important;
}

/* Main login area */
.login-ui {
    min-height: 100vh;
    background: transparent !important;
}

/* Login card */
.login-ui .login-dialog {
    width: 420px;
    max-width: calc(100vw - 2rem);
    margin: 7vh auto 1rem auto !important;
    padding: 2rem 2rem 1.6rem 2rem !important;
    border-radius: 22px !important;
    border: 1px solid rgba(196, 181, 253, 0.16) !important;
    background: rgba(18, 10, 31, 0.78) !important;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(168, 85, 247, 0.08),
        0 0 40px rgba(124, 58, 237, 0.18) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

/* Hide default logo if present */
.login-ui .login-dialog .logo,
.login-ui .login-dialog .guac-logo,
.login-ui .login-dialog img {
    display: none !important;
}

/* Add branded heading above form */
.login-ui .login-dialog::before {
    content: "GU.PIS";
    display: block;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: #f5f3ff;
    margin-bottom: 0.35rem;
    text-shadow: 0 0 24px rgba(168, 85, 247, 0.28);
}

.login-ui .login-dialog::after {
    content: "Dark Purple Access Portal";
    display: block;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #c4b5fd;
    margin-bottom: 1.35rem;
}

/* Inputs */
.login-ui .login-dialog input[type="text"],
.login-ui .login-dialog input[type="password"],
.login-ui .login-dialog input:not([type]),
.login-ui .login-dialog .form-control {
    background: rgba(11, 7, 20, 0.82) !important;
    color: #f5f3ff !important;
    border: 1px solid rgba(167, 139, 250, 0.22) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

.login-ui .login-dialog input::placeholder {
    color: #b8a8e6 !important;
}

/* Buttons */
.login-ui .login-dialog button,
.login-ui .login-dialog input[type="submit"],
.login-ui .login-dialog .button,
.login-ui .login-dialog .login-button {
    border: 0 !important;
    border-radius: 14px !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 50%, #7c3aed 100%) !important;
    box-shadow:
        0 12px 30px rgba(109, 40, 217, 0.35),
        inset 0 1px 0 rgba(255,255,255,0.12) !important;
}

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

/* Labels / misc text */
.login-ui .login-dialog label,
.login-ui .login-dialog .title,
.login-ui .login-dialog .caption,
.login-ui .login-dialog .version,
.login-ui .login-dialog .info,
.login-ui .login-dialog .username,
.login-ui .login-dialog .password {
    color: #ddd6fe !important;
}

/* Error messages */
.login-ui .login-dialog .error,
.login-ui .login-dialog .login-error {
    border-radius: 12px !important;
    background: rgba(127, 29, 29, 0.32) !important;
    border: 1px solid rgba(248, 113, 113, 0.20) !important;
    color: #fecaca !important;
}

/* Custom brand panel injected below login dialog */
.gupis-brand-panel {
    width: 420px;
    max-width: calc(100vw - 2rem);
    margin: 0 auto 5vh auto;
    padding: 1.25rem 1.4rem;
    text-align: center;
    border-radius: 20px;
    background: rgba(16, 9, 29, 0.58);
    border: 1px solid rgba(196, 181, 253, 0.10);
    box-shadow: 0 12px 50px rgba(0,0,0,0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gupis-brand-logo {
    width: 74px;
    height: 74px;
    display: block;
    margin: 0 auto 0.8rem auto;
    filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.28));
}

.gupis-brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: #f5f3ff;
    margin-bottom: 0.35rem;
}

.gupis-brand-subtitle {
    font-size: 0.95rem;
    color: #c4b5fd;
}

/* Mobile */
@media (max-width: 640px) {
    .login-ui .login-dialog {
        width: auto;
        margin-top: 3vh !important;
        padding: 1.4rem !important;
        border-radius: 18px !important;
    }

    .gupis-brand-panel {
        width: auto;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .login-ui .login-dialog::before {
        font-size: 1.7rem;
    }
}
