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

* {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    box-sizing: border-box !important;
}

:root {
    --bg-main: #0f172a;       /* Slate 900 */
    --bg-card: #1e293b;       /* Slate 800 */
    --bg-input: #334155;      /* Slate 700 */
    --border: #475569;        /* Slate 600 */
    --text-main: #f8fafc;     /* Slate 50 */
    --text-muted: #94a3b8;    /* Slate 400 */
    --primary: #f97316;       /* Orange 500 */
    --primary-hover: #ea580c; /* Orange 600 */
}

/* Hintergrund */
body, html, .view, .settings, .client-panel {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
}

/* ============================
   1. LOGIN SCREEN (Labels Fix)
   ============================ */
.login-ui {
    background: var(--bg-main) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-ui .login-dialog {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    padding: 3rem 2.5rem !important;
    width: 100% !important;
    max-width: 400px !important;
}

/* Logo */
.login-ui .login-dialog .logo {
    background-image: url('app/ext/tempnamespace/images/logo-placeholder.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    width: 100% !important;
    height: 70px !important;
    margin: 0 0 2rem 0 !important;
}

/* Alte Titel verstecken */
.login-ui .login-dialog h1, .login-ui .version { display: none !important; }

/* --- WICHTIG: LABELS SICHTBAR MACHEN --- */
/* Dies bringt den Text "Benutzername" und "Passwort" zurück */
.login-ui .login-dialog .login-fields .field-header {
    display: block !important;
    margin-bottom: 0.5rem !important;
    width: 100% !important;
}

.login-ui .login-dialog .login-fields .field-header label {
    color: #cbd5e1 !important; /* Helles Grau/Weiß */
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    display: block !important;
}

/* Input Felder */
.login-ui .login-dialog input {
    background-color: #020617 !important; /* Sehr dunkel für Kontrast */
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    padding: 12px 16px !important;
    font-size: 1rem !important;
    width: 100% !important;
    margin-bottom: 1.5rem !important;
    height: auto !important;
}

.login-ui .login-dialog input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2) !important;
    outline: none !important;
}

/* Button */
.login-ui .login-dialog button {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    width: 100% !important;
    cursor: pointer !important;
    margin-top: 0.5rem !important;
}
.login-ui .login-dialog button:hover { background: var(--primary-hover) !important; }


/* ============================
   2. INTERNES UI (Settings & Dropdown)
   ============================ */
.header {
    background-color: var(--bg-card) !important;
    border-bottom: 1px solid var(--border) !important;
    height: 64px !important;
}
.header h2 { color: var(--text-main) !important; }

/* Dropdown User Menu Fix */
.header .user-menu .username { 
    color: var(--text-main) !important;
    font-weight: 600 !important;
    padding-right: 15px !important;
}

/* Der Container selbst muss transparent sein, sonst sieht es buggy aus */
.header .user-menu .menu-dropdown {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    margin-top: 5px !important;
}

/* Erst der Inhalt bekommt den Hintergrund */
.header .user-menu .menu-dropdown .menu-contents {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important;
    min-width: 200px !important;
    margin-top: 5px !important;
}

.header .user-menu .menu-dropdown .menu-title {
    background: var(--bg-input) !important;
    color: var(--text-muted) !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid var(--border) !important;
}

.header .user-menu .menu-dropdown .menu-contents li a {
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 10px 20px !important;
}
.header .user-menu .menu-dropdown .menu-contents li a:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}

/* Tabellen & Tabs */
.page-tabs { background: var(--bg-card) !important; border-bottom: 1px solid var(--border) !important; }
.page-tabs .page-list li a { color: var(--text-muted) !important; border: none !important; background: transparent !important; }
.page-tabs .page-list li a.current { color: var(--primary) !important; border-bottom: 2px solid var(--primary) !important; }

table.sorted { background: var(--bg-card) !important; border: 1px solid var(--border) !important; }
th { background: var(--bg-input) !important; color: var(--text-main) !important; border-bottom: 1px solid var(--border) !important; text-transform: uppercase !important; font-size: 0.75rem !important; padding: 12px !important; }
td { border-bottom: 1px solid var(--border) !important; color: var(--text-muted) !important; padding: 12px !important; }
td.username a { color: var(--primary) !important; font-weight: 600 !important; }
tr:hover td { background: var(--bg-input) !important; }

/* Filter Input (War vorher weiß in Settings) */
.toolbar .filter input {
    background: var(--bg-main) !important;
    border: 1px solid var(--border) !important;
    border-radius: 20px !important;
    color: white !important;
    padding-left: 15px !important;
}

/* Standard Buttons */
button, .button {
    background: var(--primary) !important;
    border-radius: 6px !important;
    border: none !important;
    color: white !important;
    font-weight: 500 !important;
}
button:hover, .button:hover { background: var(--primary-hover) !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}