/* ============================================================
   Basis-Styling (unverändert)
   ============================================================ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f9f9f9;
    margin: 0;
    padding: 40px;
    color: #333;
}

.logo-container {
    position: fixed;
    bottom: 15px;
    right: 20px;
    perspective: 140px;
    width: 100px;
    height: auto;
    z-index: 1000;
}

#logo {
    display: block;
    width: 100%;
    transition: opacity 0.3s ease;
    transform-origin: center center;
    animation: flipOver 7s ease-in-out infinite;
    animation-delay: -4s;
}

#logo.logo-hidden {
    opacity: 0.2;
    pointer-events: none;
    animation: none;
}

@keyframes flipOver {
    0%   { transform: rotateX(0deg); }
    80%  { transform: rotateX(0deg); }
    95%  { transform: rotateX(400deg); }
    100% { transform: rotateX(360deg); }
}

h1 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Preset buttons */
.presets {
    margin: 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.presets button {
    background: #eef2f7;
    border: 1px solid #cfdde6;
    border-radius: 30px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 5px 5px 10px rgba(0,0,0,.06);
}

.presets button:hover {
    background: #cfe5ff;
    border-color: #bdc4cc;
    box-shadow: 3px 3px 5px rgba(0,0,0,.1);
}

/* Messages */
.message {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-weight: 500;
    box-shadow: 5px 5px 10px rgba(0,0,0,.06);
}

.success {
    background: #e0f2e9;
    border-left: 5px solid #2ecc71;
    color: #1e6f3f;
}

.error {
    background: #fde8e8;
    border-left: 5px solid #e74c3c;
    color: #b33c2e;
}

.warning {
    background: #fff3e0;
    border-left: 5px solid #f39c12;
    color: #a25e00;
}

/* Dashboard rows and cards - unified style */
.dashboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    flex: 1;
    min-width: 0;
    border: 1px solid #e0e4e8;
    border-radius: 16px;
    background: white;
    box-shadow: 5px 5px 10px rgba(0,0,0,.06);
    padding: 1.2rem 1.5rem;
    overflow: auto;
}

/* Ergebnisbox mit Höhenbegrenzung und Abstand nach unten */
.result-card {
    margin-bottom: 2rem;
}

.result-content {
    max-height: 500px;
    overflow: auto;
}

.card-header {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
    border-bottom: 1px solid #e0e4e8;
    display: inline-block;
    padding-bottom: 0.25rem;
}

/* Code blocks and SQL content */
.code-block, .sql-content {
    background: #f4f6f9;
    padding: 0.8rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    max-height: 400px;
    white-space: pre-wrap;
    margin: 0;
}

/* ------------------------------------------------------------
   Einheitliche Zeilen in den unteren drei Boxen
   ------------------------------------------------------------ */
.compact-fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.compact-fieldset legend {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: #2c3e50;
}

/* Jede Zeile = Flex-Container, kein Umbruch */
.form-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: nowrap;   /* verhindert Umbruch der Select-Box */
}

/* Feste Breite für alle Beschriftungen */
.form-row > label,
.filter-label,
.date-label,
.meta-label {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a627a;
}

/* Normale Eingabefelder nehmen den restlichen Platz */
.form-row input:not([type="checkbox"]):not([type="radio"]),
.form-row select,
.filter-input,
.date-input,
.meta-input {
    flex: 1;
    min-width: 120px;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cfdfed;
    font-size: 0.85rem;
    background: white;
}

/* Select-Box für Datumsfelder – rechts, feste Breite, kein Schrumpfen */
.date-select-right {
    width: 130px;
    flex-shrink: 0;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cfdfed;
    font-size: 0.85rem;
    background: white;
}

/* Checkbox in der Filterzeile – schmal, rechtsbündig */
.filter-checkbox {
    width: auto;
    flex-shrink: 0;
    margin-left: auto;
    transform: scale(1.1);
    cursor: pointer;
}

/* Radio‑/Checkbox‑Gruppen in der Control-Box */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: normal;
    font-size: 0.85rem;
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
}

.checkbox-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: normal;
    font-size: 0.85rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Buttons */
button {
    background: #f0f4fa;
    border: 1px solid #cbdbe0;
    border-radius: 30px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 5px 5px 10px rgba(0,0,0,.06);
}

button:hover {
    background: #cfe5ff;
    border-color: #bdc4cc;
    box-shadow: 3px 3px 5px rgba(0,0,0,.1);
}

/* Result table */
.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.result-table th, .result-table td {
    border: 1px solid #e2e8f0;
    padding: 0.6rem 0.8rem;
    text-align: left;
    vertical-align: top;
}

.result-table th {
    background: #f1f5f9;
    font-weight: 600;
    color: #1e4668;
}

.result-table tr:nth-child(even) {
    background: #fafcff;
}

.result-table tr:hover {
    background: #f8fafd;
}

/* Blink animation */
.blink-box {
    animation: blinkBorder 0.5s ease-in-out 3;
    box-shadow: 0 0 0 2px #3498db;
    border-radius: 12px;
}

@keyframes blinkBorder {
    0% { box-shadow: 0 0 0 0 #3498db; }
    50% { box-shadow: 0 0 0 4px #3498db; }
    100% { box-shadow: 0 0 0 0 #3498db; }
}

/* Disabled elements */
.disabled-element {
    opacity: 0.3;
    filter: grayscale(100%);
    pointer-events: none;
    cursor: not-allowed;
}

/* Volltextsuche – in einer Zeile */
.fulltext-row {
    margin-top: 0.75rem;
}

.fulltext-label {
    width: 120px;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4a627a;
}

.fulltext-input {
    flex: 1;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cfdfed;
    font-size: 0.85rem;
}

/* Placeholder */
input::placeholder, select::placeholder {
    color: #bcbcbc;
    font-style: italic;
    font-size: 0.75rem;
}