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

}
/* =========================================================
   Vlcode Remote App – Clean Theme
   ========================================================= */

:root {
    --vl-navy:    #0a2744;
    --vl-navy-2:  #1e4976;
    --vl-accent:  #f59e0b;
    --vl-bg:      #f1f5f9;
    --vl-surface: #ffffff;
    --vl-text:    #0f172a;
    --vl-muted:   #64748b;
    --vl-border:  #e2e8f0;
    --vl-danger:  #dc2626;
    --vl-success: #16a34a;
    --vl-radius:  10px;
    --vl-shadow:  0 1px 4px rgba(15,23,42,.08), 0 4px 16px rgba(15,23,42,.05);
}

/* ── Reset base ─────────────────────────────────────────── */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    color: var(--vl-text);
}

/* ── Inner pages: light background ──────────────────────── */
body.home, body.settings, body.manage, body.client, body.view {
    background: var(--vl-bg) !important;
}

/* ── Login page ─────────────────────────────────────────── */
.login-ui, html body.login {
    background: var(--vl-bg) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-ui .login-dialog {
    background: var(--vl-surface);
    border-radius: 16px;
    padding: 44px 40px 36px;
    box-shadow: 0 8px 32px rgba(10,39,68,.14);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--vl-border);
}

.login-ui .login-dialog .logo {
    background-image: url('/app/ext/vlcode/images/logo.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    height: 64px;
    width: 100%;
    margin: 0 0 32px;
}

.login-ui .login-dialog h1,
.login-ui .login-dialog h2,
.login-ui .login-dialog h3,
.login-ui .login-dialog .welcome h1 {
    color: var(--vl-navy);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 4px;
}

.login-ui .login-dialog .welcome p,
.login-ui .login-dialog .version {
    color: var(--vl-muted);
    text-align: center;
    font-size: 13px;
    margin-bottom: 24px;
}

/* inputs */
.login-ui .login-dialog input[type="text"],
.login-ui .login-dialog input[type="password"],
.login-ui .login-dialog input.field {
    background: #fff;
    border: 1.5px solid var(--vl-border);
    border-radius: 8px;
    color: var(--vl-text);
    padding: 11px 14px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
    margin-bottom: 12px;
}

.login-ui .login-dialog input:focus {
    outline: none;
    border-color: var(--vl-navy-2);
    box-shadow: 0 0 0 3px rgba(30,73,118,.12);
}

/* submit button */
.login-ui .login-dialog .buttons input[type="submit"],
.login-ui .login-dialog .buttons button {
    width: 100%;
    background: var(--vl-navy) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 13px 22px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-shadow: none !important;
    letter-spacing: .3px;
    transition: background .15s;
    margin-top: 4px;
}

.login-ui .login-dialog .buttons input[type="submit"]:hover {
    background: var(--vl-navy-2) !important;
}

/* footer tag */
.login-ui .login-dialog::after {
    content: "Powered by Vlcode Soluções";
    display: block;
    text-align: center;
    color: var(--vl-muted);
    font-size: 11px;
    margin-top: 22px;
    letter-spacing: .3px;
}

/* ── Top header bar ──────────────────────────────────────── */
.header, .page-header, .top {
    background: var(--vl-surface) !important;
    color: var(--vl-text) !important;
    border-bottom: 1px solid var(--vl-border) !important;
    box-shadow: 0 1px 4px rgba(15,23,42,.06) !important;
}

.header .logo, .page-header .logo {
    background-image: url('/app/ext/vlcode/images/logo.svg') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: left center !important;
    min-width: 160px;
    height: 38px;
}

.header a, .header .menu-dropdown .menu-title,
.header .user-menu .username {
    color: var(--vl-navy) !important;
    font-weight: 500;
}

.header .menu-dropdown:hover,
.header .menu-dropdown.open {
    background: var(--vl-bg) !important;
}

/* ── Generic buttons ─────────────────────────────────────── */
button, input[type="button"], input[type="submit"] {
    background: var(--vl-navy);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-shadow: none;
    transition: background .15s;
}

button:hover, input[type="button"]:hover, input[type="submit"]:hover {
    background: var(--vl-navy-2);
}

button.danger, input.danger       { background: var(--vl-danger); }
button.cancel, input.cancel       { background: #94a3b8; }

/* ── Home page – banner com logo ─────────────────────────── */
body.home .connection-list {
    padding: 24px 28px;
}

body.home .connection-list > h2:first-of-type {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--vl-navy);
    font-size: 15px;
    font-weight: 700;
    padding: 10px 0 10px;
    margin: 0 0 20px;
    border-bottom: 2px solid var(--vl-border);
    text-transform: uppercase;
    letter-spacing: .5px;
}

body.home .connection-list > h2:first-of-type::before {
    content: '';
    display: inline-block;
    width: 160px;
    height: 36px;
    background: url('/app/ext/vlcode/images/logo.svg') no-repeat left center;
    background-size: contain;
    flex-shrink: 0;
}

body.home .connection-list > h2 {
    color: var(--vl-navy);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    padding: 6px 0;
    margin: 28px 0 14px;
    border-bottom: 1px solid var(--vl-border);
}

/* ── Connection tiles ────────────────────────────────────── */
.connection-group {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.connection {
    background: var(--vl-surface);
    border: 1px solid var(--vl-border);
    border-radius: 14px;
    box-shadow: var(--vl-shadow);
    transition: box-shadow .2s, border-color .2s, transform .15s;
    overflow: hidden;
    width: 186px !important;
    min-height: 160px !important;
    cursor: pointer;
    display: flex !important;
    flex-direction: column !important;
    position: relative;
}

.connection::before {
    content: '';
    display: block;
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, var(--vl-navy) 0%, var(--vl-navy-2) 100%);
    flex-shrink: 0;
}

.connection:hover {
    border-color: var(--vl-navy-2);
    box-shadow: 0 8px 24px rgba(10,39,68,.16);
    transform: translateY(-3px);
}

/* thumbnail area – ícone de servidor */
.connection .thumbnail-container,
.connection div.thumbnail {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f8 100%);
    min-height: 96px;
    position: relative;
    overflow: hidden;
}

.connection .thumbnail-container::after,
.connection div.thumbnail:empty::after {
    content: '';
    display: block;
    width: 52px;
    height: 40px;
    background: var(--vl-navy);
    border-radius: 6px 6px 2px 2px;
    position: relative;
    box-shadow: 0 4px 10px rgba(10,39,68,.18);
}
.connection .thumbnail-container::before,
.connection div.thumbnail:empty::before {
    content: '';
    width: 72px;
    height: 6px;
    background: var(--vl-navy-2);
    border-radius: 0 0 6px 6px;
    position: absolute;
    top: calc(50% + 18px);
    left: calc(50% - 36px);
}

/* screen blink dots */
.connection div.thumbnail:empty {
    position: relative;
}
.connection div.thumbnail:empty > * { display:none; }

/* caption */
.connection .caption {
    padding: 10px 12px 12px;
    background: var(--vl-surface);
    border-top: 1px solid var(--vl-border);
    text-align: center;
}

.connection .caption .name,
.connection-group .caption .name {
    color: var(--vl-navy);
    font-weight: 700;
    font-size: 13px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.connection .caption .protocol {
    color: var(--vl-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: 2px;
    display: block;
}

/* badge RDP / SSH / VNC */
.connection::after {
    content: 'RDP';
    position: absolute;
    top: 12px;
    right: 10px;
    background: var(--vl-accent);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .8px;
    padding: 2px 6px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* ── Tables ──────────────────────────────────────────────── */
table.list, table.sortable {
    background: var(--vl-surface);
    border-collapse: collapse;
    width: 100%;
    border-radius: var(--vl-radius);
    overflow: hidden;
    box-shadow: var(--vl-shadow);
}

table.list thead th, table.sortable thead th {
    background: var(--vl-bg);
    color: var(--vl-muted);
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid var(--vl-border);
}

table.list tbody tr:hover { background: #f8fafc; }

table.list tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--vl-border);
    color: var(--vl-text);
}

/* ── Tabs ────────────────────────────────────────────────── */
.tabs .tab {
    background: transparent;
    color: var(--vl-muted);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    transition: color .12s, border-color .12s;
}

.tabs .tab.current, .tabs .tab:hover {
    color: var(--vl-navy);
    border-bottom-color: var(--vl-accent);
}

/* ── Notifications ───────────────────────────────────────── */
.notification {
    background: var(--vl-surface);
    border-left: 4px solid var(--vl-navy-2);
    border-radius: 8px;
    box-shadow: var(--vl-shadow);
}

.notification.error   { border-left-color: var(--vl-danger); }
.notification.success { border-left-color: var(--vl-success); }

/* ── Links & misc ────────────────────────────────────────── */
a { color: var(--vl-navy-2); }
a:hover { color: var(--vl-navy); text-decoration: underline; }

hr { border: none; border-top: 1px solid var(--vl-border); }

.copyright, .footer {
    color: var(--vl-muted);
    text-align: center;
    font-size: 11px;
    padding: 10px;
}


