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

}
/* ILLUTECH Console – dunkles Theme fuer Apache Guacamole 1.6 */
:root {
  --ic-bg: #070a14;
  --ic-bg2: #0b1020;
  --ic-panel: rgba(17, 24, 43, 0.72);
  --ic-panel-solid: #111a2e;
  --ic-line: rgba(148, 163, 184, 0.16);
  --ic-text: #e2e8f0;
  --ic-muted: #94a3b8;
  --ic-cyan: #22d3ee;
  --ic-violet: #a78bfa;
  --ic-grad: linear-gradient(135deg, #22d3ee 0%, #818cf8 55%, #a78bfa 100%);
  --ic-danger: #f87171;
  --ic-radius: 14px;
  --ic-font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

html, body {
  background: var(--ic-bg) !important;
  color: var(--ic-text) !important;
  font-family: var(--ic-font) !important;
}

/* ---------- Login ---------- */
.login-ui {
  background:
    radial-gradient(60vmax 60vmax at 10% 0%, rgba(34, 211, 238, 0.16), transparent 60%),
    radial-gradient(55vmax 55vmax at 100% 100%, rgba(167, 139, 250, 0.18), transparent 60%),
    var(--ic-bg) !important;
  overflow: hidden;
}
.login-ui::before {
  content: "";
  position: absolute; inset: -50%;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  transform: perspective(600px) rotateX(55deg) translateY(-10%);
  animation: ic-grid 18s linear infinite;
  pointer-events: none;
  mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
}
@keyframes ic-grid { to { background-position: 0 44px, 44px 0; } }
@media (prefers-reduced-motion: reduce) { .login-ui::before { animation: none; } }

.login-ui .login-dialog-middle { position: relative; z-index: 1; }

.login-ui .login-dialog {
  background: var(--ic-panel) !important;
  border: 1px solid var(--ic-line) !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(34, 211, 238, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  padding: 2.2em 2em 1.8em !important;
  max-width: 360px !important;
  width: calc(100vw - 32px) !important;
  box-sizing: border-box;
  color: var(--ic-text) !important;
}

.login-ui .login-dialog .logo {
  background-image: url("app/ext/illutech-branding/images/logo.svg") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 84px !important; height: 84px !important;
  margin: 0 auto 0.6em !important;
  filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.35));
}

.login-ui .login-dialog .version { text-align: center; margin-bottom: 1.4em; }
.login-ui .login-dialog .version .app-name {
  font-size: 1.45em !important; font-weight: 700 !important; letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ic-grad); -webkit-background-clip: text; background-clip: text;
  color: transparent !important;
}
.login-ui .login-dialog .version .version-number { display: none !important; }

.login-ui .field-header label,
.login-ui .login-dialog p { color: var(--ic-muted) !important; font-size: 0.85em; }

.login-ui .login-fields .labeled-field { margin-bottom: 0.9em; }

.login-ui input[type=text],
.login-ui input[type=password],
.login-ui input[type=number] {
  background: rgba(7, 10, 20, 0.7) !important;
  color: var(--ic-text) !important;
  border: 1px solid var(--ic-line) !important;
  border-radius: 10px !important;
  padding: 0.75em 0.9em !important;
  font-size: 1em !important;
  width: 100% !important; box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.login-ui input:focus {
  outline: none !important;
  border-color: var(--ic-cyan) !important;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.18) !important;
}
.login-ui .toggle-password { filter: invert(0.8); opacity: .6; }

.login-ui .buttons input[type=submit] {
  width: 100% !important;
  margin: 0.6em 0 0 !important;
  padding: 0.8em !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--ic-grad) !important;
  color: #050816 !important;
  font-weight: 700 !important; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(34, 211, 238, 0.25) !important;
  cursor: pointer; transition: transform .12s, box-shadow .12s;
}
.login-ui .buttons input[type=submit]:hover { transform: translateY(-1px); box-shadow: 0 14px 36px rgba(129, 140, 248, 0.35) !important; }

.login-ui p.login-error {
  background: rgba(248, 113, 113, 0.12) !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
  color: #fecaca !important;
  border-radius: 10px; backdrop-filter: blur(8px);
}

/* TOTP-Einrichtung */
.totp-enroll, .totp-details { color: var(--ic-text) !important; }
.totp-enroll img, .totp-qr-code img { background: #fff; padding: 8px; border-radius: 10px; }
.totp-details, .totp-details th, .totp-details td { color: var(--ic-muted) !important; }

/* ---------- App nach dem Login ---------- */
.header {
  background: rgba(11, 16, 32, 0.85) !important;
  border-bottom: 1px solid var(--ic-line) !important;
  backdrop-filter: blur(12px);
}
.header h2, h2, h3 { color: var(--ic-text) !important; }
.header h2 { font-weight: 700; letter-spacing: .02em; }

.view, .settings, .home, .manage, .history, .connection-history, .settings-view {
  background: transparent !important; color: var(--ic-text) !important;
}
#content, .content { background: transparent !important; }

.menu-dropdown, .menu-dropdown .menu-contents, .user-menu .menu-dropdown .menu-contents {
  background: var(--ic-panel-solid) !important;
  color: var(--ic-text) !important;
  border: 1px solid var(--ic-line) !important;
  border-radius: 10px;
}
.menu-dropdown .menu-contents li a, .menu-dropdown .menu-contents li { color: var(--ic-text) !important; }
.menu-dropdown .menu-contents li a:hover { background: rgba(34, 211, 238, 0.1) !important; }
.menu-dropdown .menu-title, .menu-dropdown::after { color: var(--ic-text) !important; }

/* Verbindungsliste */
.recent-connections .connection,
.all-connections .list-item,
.list-item {
  border-radius: 10px;
  color: var(--ic-text) !important;
}
.list-item:hover, .recent-connections .connection:hover, .list-item.selected {
  background: rgba(34, 211, 238, 0.08) !important;
}
.recent-connections .connection {
  background: var(--ic-panel) !important;
  border: 1px solid var(--ic-line) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}
.recent-connections .connection .thumbnail { border-radius: 8px; overflow: hidden; }
.list-item .caption .name, .connection .name { color: var(--ic-text) !important; }
.icon.type, .icon.expand, .icon.user, .icon.group { filter: invert(0.85) hue-rotate(160deg); }

.section, .settings .section, .connection-group, .group-list, .user-list, .connection-list {
  color: var(--ic-text) !important;
}
.header .filter input, input.search-string {
  background: rgba(7, 10, 20, 0.7) !important; color: var(--ic-text) !important;
  border: 1px solid var(--ic-line) !important; border-radius: 10px !important;
}

/* Tabs/Seitenliste */
.page-tabs, .page-list { background: transparent !important; border-color: var(--ic-line) !important; }
.page-list li a { color: var(--ic-muted) !important; }
.page-list li a.current, .page-list li a:hover { color: var(--ic-cyan) !important; border-color: var(--ic-cyan) !important; background: transparent !important; }

/* Tabellen */
table, .sorted, .history-list { color: var(--ic-text) !important; }
th { background: rgba(17, 24, 43, 0.9) !important; color: var(--ic-muted) !important; border-color: var(--ic-line) !important; }
td { border-color: var(--ic-line) !important; }
tr:nth-child(even) td { background: rgba(148, 163, 184, 0.04) !important; }

/* Formulare */
input[type=text], input[type=password], input[type=number], input[type=email],
input[type=date], input[type=time], select, textarea {
  background: rgba(7, 10, 20, 0.7) !important;
  color: var(--ic-text) !important;
  border: 1px solid var(--ic-line) !important;
  border-radius: 8px;
}
select option { background: var(--ic-panel-solid); color: var(--ic-text); }
.form .fields .labeled-field .field-header, .properties th { color: var(--ic-muted) !important; }

/* Buttons */
button, a.button, input[type=submit], input[type=button] {
  background: rgba(34, 211, 238, 0.12) !important;
  color: var(--ic-text) !important;
  border: 1px solid rgba(34, 211, 238, 0.35) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
button:hover, a.button:hover, input[type=submit]:hover { background: rgba(34, 211, 238, 0.22) !important; }
button.danger, a.button.danger, button.delete { background: rgba(248, 113, 113, 0.12) !important; border-color: rgba(248, 113, 113, 0.45) !important; }
.login-ui .buttons input[type=submit] { border: 0 !important; }

/* Benachrichtigungen / Dialoge */
.notification, .notification .body, .dialog, .modal .dialog {
  background: var(--ic-panel-solid) !important;
  color: var(--ic-text) !important;
  border: 1px solid var(--ic-line) !important;
  border-radius: var(--ic-radius) !important;
}
.notification .title-bar { background: rgba(34, 211, 238, 0.1) !important; color: var(--ic-text) !important; }

/* Guacamole-Menue in der laufenden Sitzung (Strg+Alt+Shift) */
#guac-menu, .menu {
  background: rgba(11, 16, 32, 0.95) !important; color: var(--ic-text) !important;
  border-right: 1px solid var(--ic-line) !important; backdrop-filter: blur(12px);
}
#guac-menu .menu-section, .menu .menu-section { border-color: var(--ic-line) !important; }
#guac-menu h3, .menu .menu-section h3 { background: transparent !important; color: var(--ic-cyan) !important; }
.client-panel { background: var(--ic-panel-solid) !important; border-color: var(--ic-line) !important; color: var(--ic-text) !important; }

a, a:visited { color: var(--ic-cyan); }
::selection { background: rgba(34, 211, 238, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 10px; }
::-webkit-scrollbar-track { background: transparent; }
.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}