/* ==========================================================================
   ABS GROUP — HORIZON THEME (FINAL ZERO-FLICKER)
   ========================================================================== */

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #1e3a5f !important;
    background-image: 
        radial-gradient(ellipse at 50% 85%, rgba(234, 179, 120, 0.45) 0%, transparent 65%),
        url('app/ext/abs-branding/images/bg.jpg'),
        linear-gradient(180deg, #1b365d 0%, #3a6073 55%, #c9936c 100%) !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

.login-ui,
.login-dialog-middle {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Полная невидимость для окна без полей ввода (на случай таймаута) */
.login-dialog:not(:has(input)) {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Основная карточка авторизации */
.login-dialog {
    background: #ffffff !important;
    border: none !important;
    border-radius: 14px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    padding: 38px 36px 34px 36px !important;
    width: 420px !important;
    max-width: 92% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    text-align: center !important;
    transition: opacity 0.15s ease-in-out !important;
}

.login-dialog .logo {
    display: block !important;
    background-image: url('app/ext/abs-branding/images/logo.png') !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    height: 95px !important;
    width: 100% !important;
    margin: 0 auto 16px auto !important;
    filter: brightness(0) opacity(0.88) !important;
}

.login-dialog .login-fields::before {
    content: "Корпоративный портал удаленного доступа";
    display: block;
    text-align: center;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.login-dialog .labeled-field .field-header,
.login-dialog .labeled-field .caption,
.login-ui .version,
.login-ui .copyright,
.login-ui .gallery {
    display: none !important;
}

.login-dialog .form-field {
    text-align: left !important;
    margin-bottom: 16px !important;
}

.login-dialog .form-field:has(input[type="text"]:not([name*="totp"]))::before {
    content: "Имя пользователя (доменный логин)";
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-dialog .form-field:has(input[type="password"])::before {
    content: "Пароль";
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-dialog .form-field:has(input[name*="totp"])::before {
    content: "Код подтверждения (2FA)";
    display: block;
    color: #334155;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.login-dialog input[type="text"],
.login-dialog input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    height: 44px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
}

.login-dialog input[type="text"]:focus,
.login-dialog input[type="password"]:focus {
    background-color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.18) !important;
}

.login-dialog button,
.login-dialog input[type="submit"] {
    width: 100% !important;
    margin-top: 10px !important;
    background-color: #0284c7 !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    height: 44px !important;
    cursor: pointer !important;
    transition: background-color 0.15s !important;
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.3) !important;
}

.login-dialog button:hover,
.login-dialog input[type="submit"]:hover {
    background-color: #0369a1 !important;
}

/* Модальное окно RDP-параметров */
.client-status-modal,
.guac-modal {
    background-color: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(6px) !important;
}

.guac-modal .notification,
form.notification {
    background: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    width: 420px !important;
    max-width: 92% !important;
    margin: 0 auto !important;
    padding: 36px 34px 30px 34px !important;
    color: #0f172a !important;
    box-sizing: border-box !important;
}

.guac-modal .notification::before,
form.notification::before {
    content: "";
    display: block;
    background-image: url('app/ext/abs-branding/images/logo.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    height: 80px;
    width: 100%;
    margin: 0 auto 20px auto;
    filter: brightness(0) opacity(0.88);
}

.notification .parameters,
.notification .fields,
.notification .field,
.notification .form-field,
.notification .labeled-field,
.notification table,
.notification tbody,
.notification tr,
.notification td,
.notification th {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: left !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

.notification .form-field,
.notification .labeled-field,
.notification tr {
    margin-bottom: 16px !important;
}

.notification .field-header,
.notification label,
.notification th {
    display: block !important;
    width: 100% !important;
    color: #334155 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    margin-bottom: 6px !important;
    white-space: nowrap !important;
}

.notification input[type="text"],
.notification input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    height: 44px !important;
    outline: none !important;
    box-shadow: none !important;
}

.notification .buttons {
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    margin-top: 20px !important;
}

.notification .buttons button,
.notification .buttons input[type="submit"] {
    flex: 1 !important;
    height: 44px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    background-color: #0284c7 !important;
    color: #ffffff !important;
    border: none !important;
}

.notification .buttons button:nth-child(2) {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Внутренние страницы */
.view,
.settings-view,
.manage-view,
.home-view {
    background-color: #f1f5f9 !important;
}

.header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.header h2 {
    color: #0f172a !important;
    font-weight: 700 !important;
    font-size: 15px !important;
}

.user-menu .menu-dropdown {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.user-menu .menu-dropdown .menu-title {
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

.user-menu .menu-dropdown .menu-title:hover {
    background-color: #f1f5f9 !important;
    border-radius: 6px !important;
}

.user-menu .menu-dropdown .menu-contents {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.15) !important;
    padding: 6px 0 !important;
}

.user-menu .menu-dropdown .menu-contents li a {
    color: #0f172a !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    padding: 8px 16px 8px 36px !important;
}

.user-menu .menu-dropdown .menu-contents li a:hover {
    background-color: #f1f5f9 !important;
    color: #0284c7 !important;
}

.recent-connections {
    display: none !important;
}

.all-connections {
    padding: 20px 28px !important;
}

.all-connections .connection-list .connection,
.all-connections .group-list-page > .list-item {
    display: inline-block !important;
    vertical-align: top !important;
    width: 260px !important;
    margin: 10px 14px 10px 0 !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05) !important;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s !important;
}

.all-connections .connection-list .connection:hover,
.all-connections .group-list-page > .list-item:hover {
    border-color: #0284c7 !important;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.15) !important;
    transform: translateY(-2px) !important;
}

.all-connections .home-connection,
.all-connections .list-item a {
    display: flex !important;
    align-items: center !important;
    padding: 18px 20px !important;
    color: #0f172a !important;
    text-decoration: none !important;
}

.all-connections .caption {
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

.page-tabs .page-list {
    background-color: #ffffff !important;
    border-bottom: 1px solid #cbd5e1 !important;
    padding: 0 16px !important;
}

.page-tabs .page-list li a {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 12px 16px !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.page-tabs .page-list li a:hover {
    color: #0284c7 !important;
    background-color: #f8fafc !important;
}

.page-tabs .page-list li a[class*="current"],
.page-tabs .page-list li.active a {
    color: #0284c7 !important;
    border-bottom: 2px solid #0284c7 !important;
    background-color: transparent !important;
}

.settings .section,
.manage-user,
.manage-connection,
.manage-group {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 24px !important;
    margin: 20px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.filter input {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #0f172a !important;
    height: 36px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    outline: none !important;
}

table.sorted {
    width: 100% !important;
    border-collapse: collapse !important;
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    margin-top: 12px !important;
}

table.sorted th {
    background-color: #f8fafc !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 12px 16px !important;
    border: 1px solid #cbd5e1 !important;
    text-align: left !important;
}

table.sorted td {
    padding: 12px 16px !important;
    color: #0f172a !important;
    font-size: 14px !important;
    border: 1px solid #e2e8f0 !important;
}

table.sorted tr:hover td {
    background-color: #f1f5f9 !important;
}

.settings input[type="text"],
.settings input[type="password"],
.settings input[type="number"],
.settings select,
.manage-view input[type="text"],
.manage-view input[type="password"],
.manage-view select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    color: #0f172a !important;
    padding: 6px 10px !important;
    min-height: 34px !important;
}

button,
.button,
a.button {
    border-radius: 6px !important;
    font-weight: 600 !important;
    padding: 8px 16px !important;
}

.connection-warning {
    display: none !important;
}

/* Блок ссылки скачивания нативного клиента в карточке входа */
.abs-download-wrapper {
    margin-top: 20px !important;
    padding-top: 18px !important;
    border-top: 1px solid #e2e8f0 !important;
    text-align: center !important;
}

.abs-download-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #0284c7 !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    background-color: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    transition: all 0.15s ease !important;
}

.abs-download-btn:hover {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border-color: #7dd3fc !important;
}

.abs-download-hint {
    font-size: 11.5px !important;
    color: #64748b !important;
    margin-top: 6px !important;
    text-align: center !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;

}
.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}