/*   general.css - Global Styles & Variables*/
:root {
    /* Zwingt den Browser in den Dark-Mode für UI-Elemente */
    color-scheme: dark;

    /* --- NAV CORE --- */
    --th-accent: #006088;
    --th-accent-hover: #007ead;
    --th-accent-strong: rgb(85, 85, 85);

    --th-bg: #3b3a3a; /* Global Page Background */
    --th-panel: #262627; /* Card/Box Background */
    --th-panel-inner: #0b0b0c; /* Inner Sections */
    --th-border: #848181; /* Strong Border */
    --th-border-soft: #333339; /* Soft Border */
    --th-total-black: rgba(0, 0, 0, 0.7);
    /* Textfarben */
    --th-text: #9f9d9f; /* Main Text */
    --th-text-w: #fff; /* White Text / Highlight */
    --th-text-light: #fff; /* Alias for white text */
    --th-text-muted: #aaa; /* Muted Text */

    /* --- STATUS COLORS (Values from colors.css) --- */
    --status-green: rgb(81, 127, 64);
    --status-red: rgb(157, 82, 82);
    --status-yellow: rgb(141, 128, 66);

    /* --- SHADOWS --- */
    --shadow-general: 0 20px 50px rgba(0, 0, 0, .55);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.3);

    /* --- MAPPINGS (Aliases for compatibility) --- */
    --bg-page: var(--th-bg);
    --panel: var(--th-panel);
    --border: var(--th-border);
    --text: var(--th-text);
    --muted: var(--th-text-muted);
    --accent: var(--th-accent);
    --accent-strong: var(--th-accent-strong);
}
/* --- RESET & BASE --- */
* {
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
}

body {
    margin: 0;
    background-color: var(--th-bg);
    color: var(--text);
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
    line-height: 1.5;
    font-size: 14px;
}

/* =========================================
  SCROLLBAR
  ========================================= */
* {
    scrollbar-width: thin;
    scrollbar-color: #4a4a4f #111111;
}

::-webkit-scrollbar {
    width: 14px;
    height: 14px;
    background-color: #111111;
}

::-webkit-scrollbar-track {
    background: #111111;
    border-left: 1px solid #444444;
}

::-webkit-scrollbar-thumb {
    background-color: #4a4a4f;
    border-radius: 8px;
    border: 3px solid #111111;
    background-clip: content-box;
}

/* --- LINKS --- */
a {
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

a:hover {
    filter: brightness(1.2);
}

/* --- LAYOUT UTILS --- */
.wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    width: 100%;
}

.flex-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- CARDS & PANELS --- */
.card, .panel, .sideFrame {
    background: var(--th-panel);
    border: 1px solid var(--th-border-soft);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow-card);
    position: relative;
}

/* --- TYPOGRAPHY --- */
h1, .h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 14px 0;
    color: var(--th-text-w);
}

h2, .h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: var(--th-text-w);
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2a2a2f;
    color: var(--th-text-w);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: filter 0.2s;
}

.btn:hover {
    filter: brightness(1.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.btn-primary, .btn-save {
    background: var(--th-accent);
    border-color: var(--th-accent-hover);
    color: var(--th-text-w);
}

.btn-danger, .btn-del {
    background: #b60000;
    border-color: #d00000;
    color: var(--th-text-w);
}

/* --- FORMS --- */
input, select, textarea {
    background: #111;
    border: 1px solid #333;
    color: var(--text);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--th-accent);
}

/* --- TABS --- */
.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.tab {
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--th-border-soft);
    background: #1a1a1a;
    color: var(--text);
    cursor: pointer;
    font-weight: 500;
}

.tab:hover {
    background: #252525;
}

.tab.active {
    background: var(--th-accent-strong);
    color: var(--th-text-w);
    border-color: #666;
    font-weight: 700;
}

.pane {
    display: none;
}

.pane.active, .pane.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* --- BADGES --- */
.badge, .tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: #fff;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.tag.green, .status-ok, .badge.green {
    background: var(--status-green);
    color: var(--th-text-w);
}

.tag.red, .status-bad, .badge.red {
    background: var(--status-red);
    color: var(--th-text-w);
}

.tag.yellow, .status-warn, .badge.yellow {
    background: var(--status-yellow);
    color: var(--th-text-w);
    /*
    color: var(--th-total-black);
    */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* MODAL TITEL */
.modal__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #2a2b2f
}

.modal__title {
    font-weight: 700
}

.modal__close {
    background: #222;
    border: 1px solid #333;
    border-radius: 8px;
    color: var(--th-text-w);
    cursor: pointer;
    padding: 6px 10px
}

.modal__foot {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding: 12px 16px;
    border-top: 1px solid #2a2b2f
}