* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fc;
    --card: #ffffff;
    --text: #152238;
    --text-soft: #718096;
    --border: #d9e1ec;
    --blue: #1473ea;
    --blue-hover: #0f63cc;
    --orange: #f57c00;
    --orange-hover: #dd6f00;
    --green: #16a34a;
    --green-hover: #12813a;
    --danger-bg: #fff0f0;
    --danger-text: #c53030;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 15% 90%,
            rgba(20, 115, 234, 0.07),
            transparent 32%
        ),
        radial-gradient(
            circle at 90% 15%,
            rgba(20, 115, 234, 0.045),
            transparent 30%
        ),
        var(--bg);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* ============================================================
   Allgemein
   ============================================================ */

.page {
    min-height: 100vh;
    width: 100%;
}

.card {
    background: var(--card);

    border-radius: 18px;

    box-shadow:
        0 25px 70px rgba(31, 52, 83, 0.10),
        0 5px 20px rgba(31, 52, 83, 0.05);
}


/* ============================================================
   Fehlermeldungen
   ============================================================ */

.error {
    background: var(--danger-bg);
    color: var(--danger-text);

    border: 1px solid #ffd5d5;

    border-radius: 9px;

    padding: 12px 14px;

    margin-bottom: 22px;

    font-size: 14px;
}


/* ============================================================
   LOGIN
   ============================================================ */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    overflow: hidden;

    padding: 40px 20px;
}


/* Dezente geschwungene Hintergrundflächen */

.login-page::before,
.login-page::after {
    content: "";

    position: absolute;

    pointer-events: none;

    border-radius: 50%;

    border: 1px solid rgba(20, 115, 234, 0.055);
}

.login-page::before {
    width: 900px;
    height: 420px;

    left: -400px;
    bottom: -250px;

    transform: rotate(12deg);
}

.login-page::after {
    width: 900px;
    height: 420px;

    left: -350px;
    bottom: -310px;

    transform: rotate(12deg);
}


/* ============================================================
   Login-Karte
   ============================================================ */

.login-card {
    width: 100%;
    max-width: 720px;

    position: relative;
    z-index: 1;

    overflow: hidden;
}


/* ============================================================
   Login-Inhalt
   ============================================================ */

.login-content {
    padding: 54px 64px 46px;
}

.login-logo {
    text-align: center;

    margin-bottom: 34px;
}

.login-logo img {
    width: 300px;
    max-width: 72%;

    height: auto;

    display: inline-block;
}

.login-title {
    margin: 0;

    text-align: center;

    font-size: 40px;
    line-height: 1.15;

    font-weight: 700;

    letter-spacing: -1px;
}

.login-subtitle {
    margin-top: 12px;
    margin-bottom: 44px;

    text-align: center;

    color: var(--text-soft);

    font-size: 20px;
    font-weight: 400;
}


/* ============================================================
   Formular
   ============================================================ */

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;

    margin-bottom: 9px;

    color: #354256;

    font-size: 16px;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;

    left: 17px;
    top: 50%;

    width: 21px;
    height: 21px;

    transform: translateY(-50%);

    color: #8491a5;

    pointer-events: none;
}

.form-group input {
    width: 100%;

    min-height: 58px;

    padding:
        14px
        50px
        14px
        52px;

    border: 1px solid var(--border);

    border-radius: 9px;

    background: #ffffff;

    color: var(--text);

    font-size: 17px;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.form-group input::placeholder {
    color: #8a97aa;
}

.form-group input:hover {
    border-color: #c5d0df;
}

.form-group input:focus {
    outline: none;

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(20, 115, 234, 0.10);
}


/* ============================================================
   Passwort anzeigen/verbergen
   ============================================================ */

.password-toggle {
    position: absolute;

    right: 16px;
    top: 50%;

    width: 28px;
    height: 28px;

    transform: translateY(-50%);

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;

    background: transparent;

    color: #8491a5;
}

.password-toggle:hover {
    color: #4d5d73;
}

.password-toggle svg {
    width: 21px;
    height: 21px;
}


/* ============================================================
   Login Button
   ============================================================ */

.login-button {
    width: 100%;

    min-height: 58px;

    margin-top: 10px;

    border: 0;

    border-radius: 9px;

    background: var(--blue);

    color: #ffffff;

    font-size: 18px;
    font-weight: 600;

    box-shadow:
        0 5px 15px rgba(20, 115, 234, 0.18);

    transition:
        background 0.15s ease,
        transform 0.1s ease,
        box-shadow 0.15s ease;
}

.login-button:hover {
    background: var(--blue-hover);

    box-shadow:
        0 7px 18px rgba(20, 115, 234, 0.24);
}

.login-button:active {
    transform: translateY(1px);
}


/* ============================================================
   Sicherheitsfooter
   ============================================================ */

.login-footer {
    min-height: 112px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 0;

    border-top: 1px solid #e4e9f0;

    color: #748297;
    font-size: 15px;
    text-align: center;
}

.login-footer-slogan-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-footer-slogan {
    line-height: 1.4;
}

.login-footer-icon {
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
}

.login-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.login-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 10px;

    border: 1px solid rgba(46, 96, 128, 0.25);
    border-radius: 6px;

    background: rgba(46, 96, 128, 0.04);

    color: #2e6080;
    font-size: 12px;
    line-height: 1.2;

    text-decoration: none;

    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.login-footer-link:hover {
    background: rgba(46, 96, 128, 0.09);
    border-color: rgba(46, 96, 128, 0.4);
}

.login-footer-hosting {
    margin-top: 12px;

    color: #2e6080;
    font-size: 12px;
    line-height: 1.4;
}

.login-footer-hosting a {
    color: #2e6080;
    font-weight: 600;
    text-decoration: none;
}

.login-footer-hosting a:hover {
    text-decoration: underline;
}


/* ============================================================
   Tablet
   ============================================================ */

@media (max-width: 768px) {

    .login-page {
        padding: 28px 18px;
    }

    .login-card {
        max-width: 600px;
    }

    .login-content {
        padding: 42px 40px 38px;
    }

    .login-logo {
        margin-bottom: 28px;
    }

    .login-logo img {
        width: 260px;
    }

    .login-title {
        font-size: 34px;
    }

    .login-subtitle {
        font-size: 18px;

        margin-bottom: 36px;
    }
}


/* ============================================================
   Smartphone
   ============================================================ */

@media (max-width: 480px) {

    .login-page {
        padding: 16px 10px;
    }

    .login-card {
        border-radius: 14px;
    }

    .login-content {
        padding: 32px 22px 30px;
    }

    .login-logo {
        margin-bottom: 24px;
    }

    .login-logo img {
        width: 220px;
        max-width: 82%;
    }

    .login-title {
        font-size: 28px;

        letter-spacing: -0.5px;
    }

    .login-subtitle {
        margin-top: 9px;
        margin-bottom: 30px;

        font-size: 17px;
    }

    .form-group {
        margin-bottom: 20px;
    }

    .form-group label {
        font-size: 15px;
    }

    .form-group input {
        min-height: 54px;

        font-size: 16px;
    }

    .login-button {
        min-height: 54px;

        font-size: 17px;
    }

    .login-footer {
        min-height: 68px;

        font-size: 13px;
    }
}

/* ============================================================
   TEAM-GRUHL ADMIN / APP CI
   ============================================================ */

:root {
    --tg-orange: #f57c00;
    --tg-orange-hover: #dd6f00;
    --tg-green: #16a34a;
    --tg-green-hover: #12813a;
    --tg-navy: #101a26;
    --tg-navy-2: #172330;
    --tg-sidebar-text: #eef3f8;
    --tg-sidebar-muted: #aeb9c7;
    --tg-line: #dfe5ec;
    --tg-surface: #ffffff;
    --tg-bg: #f4f7fb;
}

body:has(.admin-app-shell),
body:has(.dashboard-app-shell) {
    background:
        radial-gradient(circle at 85% 10%, rgba(245,124,0,.035), transparent 28%),
        var(--tg-bg);
}

.admin-app-shell,
.dashboard-app-shell {
    min-height: 100vh;
    display: flex;
    width: 100%;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    width: 252px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #111b27 0%, #172431 100%);
    color: var(--tg-sidebar-text);
    box-shadow: 6px 0 24px rgba(15,27,42,.08);
}

.admin-sidebar-brand {
    min-height: 112px;
    display: flex;
    align-items: center;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-sidebar-brand img {
    width: 205px;
    max-width: 100%;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
    opacity: .96;
}

.admin-sidebar-nav {
    padding: 18px 0 170px;
    overflow-y: auto;
    min-height: 0;
}

.admin-sidebar-nav > a {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 0 24px;
    color: var(--tg-sidebar-text);
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.admin-sidebar-nav > a:hover {
    background: rgba(255,255,255,.055);
    color: #fff;
}

.admin-sidebar-nav > a.active {
    background: rgba(245,124,0,.28);
    color: var(--tg-orange);
    border-left-color: var(--tg-orange);
    font-weight: 700;
}

.admin-sidebar-nav .nav-icon {
    width: 24px;
    text-align: center;
    font-size: 24px;
    line-height: 1;
}

.admin-sidebar-subnav {
    padding: 2px 0 8px 61px;
}

.admin-sidebar-subnav a {
    display: block;
    padding: 9px 18px 9px 0;
    color: var(--tg-sidebar-muted);
    text-decoration: none !important;
    font-size: 13px;
}

.admin-sidebar-subnav a:hover,
.admin-sidebar-subnav a.active {
    color: var(--tg-orange);
}

.admin-sidebar-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin-top: 0;
    flex-shrink: 0;
    padding: 16px 24px 20px;
    color: var(--tg-sidebar-muted);
    font-size: 12px;
    line-height: 1.65;
}


.admin-sidebar-footer{position:absolute;left:0;right:0;bottom:0;z-index:2;background:linear-gradient(180deg,rgba(17,27,39,0) 0%,rgba(17,27,39,.96) 22%)}

.admin-sidebar-footer img {
    width: 145px;
    display: block;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
    opacity: .9;
}

.admin-main,
.dashboard-main {
    min-width: 0;
    flex: 1;
    margin-left: 252px;
}

.admin-topbar,
.dashboard-topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid var(--tg-line);
}

.tg-topbar-left,
.tg-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tg-topbar-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--tg-orange) !important;
    border-radius: 8px;
    background: var(--tg-orange) !important;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s ease, box-shadow .15s ease;
}

.tg-topbar-button:hover {
    background: var(--tg-orange-hover) !important;
    box-shadow: 0 5px 14px rgba(245,124,0,.18);
}

.tg-logout-button {
    width: 42px;
    min-width: 42px;
    padding: 0 !important;
}

.tg-logout-icon {
    width: 19px;
    height: 19px;
    display: block;
}

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

.tg-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #dbe2eb;
    border-radius: 50%;
    color: #526174;
    background: #fff;
    font-size: 20px;
}

.tg-user-text {
    line-height: 1.25;
}

.tg-user-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.tg-user-role {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 12px;
}

.admin-main > .admin-page,
.dashboard-main > .dashboard-page,
.generator-main > .generator-page {
    min-height: calc(100vh - 70px) !important;
    padding: 30px 32px 90px !important;
}

.admin-main .admin-container,
.dashboard-main .dashboard-container {
    width: min(1260px, 100%) !important;
    margin: 0 auto !important;
}

.admin-main .admin-header,
.dashboard-main .dashboard-header {
    margin-bottom: 24px !important;
    padding: 0 !important;
}

.admin-main .admin-brand,
.dashboard-main .dashboard-brand {
    display: block !important;
}

.admin-main .admin-brand .admin-logo,
.dashboard-main .dashboard-brand .dashboard-logo {
    display: none !important;
}

.admin-main .admin-title,
.dashboard-main .dashboard-title {
    margin: 0 !important;
    font-size: 30px !important;
    line-height: 1.15 !important;
    letter-spacing: -.5px;
}

.admin-main .admin-subtitle,
.dashboard-main .dashboard-subtitle {
    margin-top: 7px !important;
    color: var(--text-soft) !important;
    font-size: 14px !important;
}

.admin-main .back-link,
.admin-main .generator-back {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 16px !important;
    border: 1px solid var(--tg-orange) !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: var(--tg-orange) !important;
    font-weight: 700 !important;
    text-decoration: none !important;
}

.admin-main .back-link:hover,
.admin-main .generator-back:hover {
    background: var(--tg-orange) !important;
    color: #fff !important;
}

.admin-main .card,
.dashboard-main .card {
    border-radius: 12px !important;
    box-shadow: 0 8px 28px rgba(31,52,83,.07), 0 2px 7px rgba(31,52,83,.035) !important;
}

.admin-main .settings-card {
    overflow: hidden;
}

.admin-main .settings-tabs {
    background: #fff !important;
}

.admin-main .settings-tab.active {
    color: var(--tg-orange) !important;
    border-bottom-color: var(--tg-orange) !important;
}

.admin-main .admin-button,
.admin-main .generator-add-button,
.dashboard-main .generator-button {
    background: var(--tg-green) !important;
    color: #fff !important;
}

.admin-main .admin-button:hover,
.admin-main .generator-add-button:hover,
.dashboard-main .generator-button:hover {
    background: var(--tg-green-hover) !important;
}

.admin-main .edit-button {
    background: #fff !important;
    border-color: var(--tg-orange) !important;
    color: var(--tg-orange) !important;
}

.admin-main .edit-button:hover {
    background: var(--tg-orange) !important;
    color: #fff !important;
}

.dashboard-main .dashboard-header {
    align-items: center !important;
}

.dashboard-main .dashboard-brand:before {
    content: "Dashboard";
    display: block;
    margin-bottom: 6px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.15;
}

.dashboard-main .dashboard-title {
    font-size: 16px !important;
    color: var(--text-soft);
    font-weight: 500;
}

.dashboard-main .dashboard-subtitle {
    display: none;
}

.dashboard-main .user-info {
    display: none;
}

.dashboard-main .dashboard-card {
    padding: 28px !important;
}

.dashboard-main .section-title {
    font-size: 21px;
}

.dashboard-main .generator-grid {
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 14px !important;
}

.dashboard-main .generator-card {
    min-height: 138px;
    border-radius: 10px;
    box-shadow: none;
}

.dashboard-main .generator-icon {
    background: #fff4e8;
    color: var(--tg-orange);
}

.dashboard-main .generator-button {
    background: var(--tg-orange) !important;
}

.dashboard-main .generator-button:hover {
    background: var(--tg-orange-hover) !important;
}

.dashboard-main .admin-settings {
    border-color: var(--tg-orange) !important;
    background: #fff !important;
    color: var(--tg-orange) !important;
}

.dashboard-main .admin-settings:hover {
    background: var(--tg-orange) !important;
    color: #fff !important;
}

.dashboard-main .logout-link {
    display: inline-flex !important;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--tg-orange) !important;
    border-radius: 8px;
    background: var(--tg-orange) !important;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
}

.dashboard-main .logout-link:hover {
    background: var(--tg-orange-hover) !important;
}

.generator-main {
    flex: 1;
    min-width: 0;
    margin-left: 252px;
}

.generator-main .generator-page {
    width: 100%;
}

.generator-main .generator-container {
    width: min(1260px, 100%) !important;
    margin: 0 auto !important;
}

.generator-main .generator-header {
    margin-bottom: 24px !important;
}

.generator-main .generator-header h1 {
    font-size: 30px !important;
}

.generator-main .generator-variables-button {
    border-color: var(--tg-orange) !important;
    color: var(--tg-orange) !important;
    background: #fff !important;
}

.generator-main .generator-variables-button:hover {
    background: var(--tg-orange) !important;
    color: #fff !important;
}

.generator-main .generator-save-button {
    background: var(--tg-green) !important;
    color: #fff !important;
}

.generator-main .generator-save-button:hover {
    background: var(--tg-green-hover) !important;
}

.generator-main .generator-edit-save-button,
.generator-main .generator-add-button {
    background: var(--tg-green) !important;
    color: #fff !important;
}

.generator-main .generator-edit-save-button:hover,
.generator-main .generator-add-button:hover {
    background: var(--tg-green-hover) !important;
}

.generator-main .generator-danger-button {
    border-color: #efb8b8 !important;
    background: #fff7f7 !important;
    color: #c53030 !important;
}

.generator-main .generator-danger-button:hover {
    background: #fff0f0 !important;
}

@media (max-width: 900px) {
    .admin-sidebar {
        width: 218px;
    }

    .admin-main,
    .dashboard-main,
    .generator-main {
        margin-left: 218px;
    }

    .admin-sidebar-brand img {
        width: 175px;
    }

    .admin-main > .admin-page,
    .dashboard-main > .dashboard-page,
    .generator-main > .generator-page {
        padding-left: 22px !important;
        padding-right: 22px !important;
    }
}

@media (max-width: 700px) {
    .admin-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .admin-app-shell,
    .dashboard-app-shell {
        display: block;
    }

    .admin-main,
    .dashboard-main,
    .generator-main {
        margin-left: 0;
    }

    .admin-topbar,
    .dashboard-topbar {
        height: auto;
        min-height: 66px;
        padding: 12px 16px;
    }

    .admin-sidebar-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        padding: 8px;
    }

    .admin-sidebar-nav > a {
        min-height: 44px;
        justify-content: center;
        padding: 0 8px;
        border-left: 0;
        border-bottom: 3px solid transparent;
    }

    .admin-sidebar-nav > a.active {
        border-left: 0;
        border-bottom-color: var(--tg-orange);
    }

    .admin-sidebar-subnav {
        display: none;
    }

    .admin-sidebar-footer {
        display: none;
    }

    .admin-sidebar-brand {
        min-height: 76px;
        justify-content: center;
    }

    .admin-main > .admin-page,
    .dashboard-main > .dashboard-page,
    .generator-main > .generator-page {
        min-height: auto !important;
        padding: 22px 16px 86px !important;
    }

    .dashboard-main .generator-grid {
        grid-template-columns: 1fr !important;
    }
}

.admin-main .button-primary,
.admin-main .admin-submit,
.admin-main .save-button {
    background: var(--tg-green) !important;
    color: #fff !important;
    border-color: var(--tg-green) !important;
}
.admin-main .button-primary:hover,
.admin-main .admin-submit:hover,
.admin-main .save-button:hover {
    background: var(--tg-green-hover) !important;
    color: #fff !important;
}
.admin-main .button-secondary {
    border-color: var(--tg-orange) !important;
    background: #fff !important;
    color: var(--tg-orange) !important;
}
.admin-main .button-secondary:hover {
    background: var(--tg-orange) !important;
    color: #fff !important;
}

.tg-topbar-label { font-size: 15px; font-weight: 700; color: var(--text); }

/* ============================================================
   Einstellungen – Kachel-Dashboard
   ============================================================ */

.settings-dashboard-page {
    padding-bottom: 50px !important;
}

.settings-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.settings-tile {
    position: relative;
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 126px;
    padding: 22px;
    border: 1px solid var(--tg-line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    text-decoration: none !important;
    box-shadow: 0 5px 18px rgba(31,52,83,.045);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.settings-tile:hover {
    transform: translateY(-1px);
    border-color: rgba(245,124,0,.42);
    box-shadow: 0 9px 26px rgba(31,52,83,.08);
}

.settings-tile-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #fff4e8;
    color: var(--tg-orange);
    font-size: 24px;
    font-weight: 700;
}

.settings-tile h2 {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    line-height: 1.3;
}

.settings-tile p {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}

.settings-tile-arrow {
    color: var(--tg-orange);
    font-size: 20px;
    font-weight: 700;
}

.settings-tile-system {
    grid-column: 1 / -1;
}

.settings-version-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: rgba(255,255,255,.72);
    color: var(--text-soft);
    font-size: 13px;
}

.settings-version-card strong {
    color: var(--text);
}

.settings-version-card a {
    margin-left: auto;
    color: var(--tg-orange);
    font-weight: 700;
    text-decoration: none;
}

.settings-version-card a:hover {
    text-decoration: underline;
}

.admin-sidebar-version {
    margin: 0 0 3px;
    color: #eef3f8;
    font-weight: 700;
}

.settings-section-card {
    overflow: hidden;
}

.settings-section-content {
    padding: 28px;
}

.settings-placeholder-large {
    padding: 56px 28px;
}

.settings-placeholder-icon {
    margin-bottom: 12px;
    color: var(--tg-orange);
    font-size: 34px;
}

.logs-panel {
    padding: 24px;
    border: 1px solid var(--tg-line);
    border-radius: 12px;
    background: #fbfcfe;
}

.logs-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.logs-panel-head h2 {
    margin: 0;
    font-size: 19px;
}

.logs-panel-head p {
    margin: 6px 0 0;
    color: var(--text-soft);
}

.logs-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 7px;
    background: #e9f8ef;
    color: #27804a;
    font-size: 12px;
    font-weight: 700;
}

.logs-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 12px;
}

.logs-info-grid > div {
    padding: 14px;
    border: 1px solid var(--tg-line);
    border-radius: 9px;
    background: #fff;
}

.logs-info-grid span {
    display: block;
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 12px;
}

.logs-info-grid strong {
    color: var(--text);
    font-size: 14px;
}

.logs-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--tg-orange);
    background: #fff8f0;
    color: #765b20;
    font-size: 13px;
    line-height: 1.5;
}

.changelog-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #ccebd8;
    border-radius: 9px;
    background: #eefaf2;
    color: #27804a;
    font-size: 13px;
}

.changelog-content {
    color: var(--text);
    line-height: 1.65;
}

.changelog-content h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.changelog-content h3 {
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--tg-line);
    font-size: 18px;
}

.changelog-content h4 {
    margin: 20px 0 8px;
    font-size: 15px;
}

.changelog-content p {
    margin: 0 0 12px;
    color: var(--text-soft);
}

.changelog-content ul {
    margin: 7px 0;
    padding-left: 20px;
}

.changelog-content li {
    margin: 4px 0;
}

@media (max-width: 900px) {
    .settings-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-tile-system {
        grid-column: auto;
    }
}

@media (max-width: 700px) {
    .settings-section-content {
        padding: 20px;
    }

    .settings-tile {
        grid-template-columns: 46px minmax(0,1fr) auto;
        min-height: 110px;
        padding: 18px;
    }

    .settings-tile-icon {
        width: 46px;
        height: 46px;
    }

    .settings-version-card {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .settings-version-card a {
        width: 100%;
        margin-left: 0;
    }

    .logs-info-grid {
        grid-template-columns: 1fr;
    }

    .logs-panel-head {
        flex-direction: column;
    }
}

/* ============================================================
   Einstellungen – Bereichsseiten: gemeinsame Komponenten
   ============================================================ */

.settings-section-content {
    padding: 28px;
}

.settings-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.settings-section-title {
    margin: 0;
    color: var(--text);
    font-size: 21px;
    line-height: 1.25;
}

.settings-section-description {
    margin: 7px 0 0;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

/* Benutzerverwaltung */
.user-list,
.generator-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-row,
.generator-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 78px;
    padding: 14px 16px;
    border: 1px solid var(--tg-line);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.user-row:hover,
.generator-row:hover {
    border-color: #c8d4e2;
    box-shadow: 0 5px 18px rgba(31,52,83,.05);
}

.user-main {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    flex: 1;
}

.generator-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.user-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff4e8;
    color: var(--tg-orange);
    font-size: 15px;
    font-weight: 800;
}

.user-details,
.generator-main {
    min-width: 0;
}

.generator-details {
    min-width: 0;
    padding-left: 2px;
}

.generator-list-status {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e9f8ef;
    color: #16a34a;
    font-size: 20px;
    line-height: 1;
}

.generator-list-status.is-inactive {
    background: #fff0f0;
    color: #dc2626;
}

.user-name,
.generator-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.user-username,
.user-email,
.generator-meta {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.4;
}

.user-actions,
.generator-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
}

.role-badge {
    background: #eef3f9;
    color: #526174;
}

.status-badge.active {
    background: #e9f8ef;
    color: #27804a;
}

.status-badge.inactive {
    background: #f1f3f5;
    color: #7a8798;
}

.edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tg-orange);
    border-radius: 7px;
    background: #fff;
    color: var(--tg-orange);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none !important;
}

.edit-button:hover {
    background: var(--tg-orange);
    color: #fff;
}

/* Generatorübersicht */
.generator-add-form {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--tg-line);
}

.generator-add-input,
.email-input,
.email-select {
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    padding: 0 12px;
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.generator-add-input:focus,
.email-input:focus,
.email-select:focus {
    outline: none;
    border-color: var(--tg-orange);
    box-shadow: 0 0 0 3px rgba(245,124,0,.10);
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 15px;
    border: 0;
    border-radius: 8px;
    background: var(--tg-green);
    color: #fff !important;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
    white-space: nowrap;
}

.admin-button:hover {
    background: var(--tg-green-hover);
}

.settings-placeholder {
    padding: 24px;
    border: 1px dashed var(--tg-line);
    border-radius: 10px;
    background: #fafbfd;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.5;
}

.settings-placeholder strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text);
}

/* E-Mail-System */
.email-system-heading { margin-bottom: 18px; }
.email-system-heading h2, .email-templates-header h2 { margin: 0; color: var(--text); font-size: 19px; }
.email-system-heading p, .email-templates-header p { margin: 5px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.45; }
.email-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.email-field.full { grid-column: 1 / -1; }
.email-label { display: block; margin-bottom: 7px; color: var(--text); font-size: 12px; font-weight: 700; }
.email-help { margin: 6px 0 0; color: var(--text-soft); font-size: 12px; line-height: 1.45; }
.email-actions { display: flex; justify-content: flex-end; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--tg-line); }
.email-divider { margin: 28px 0 22px; border-top: 1px solid var(--tg-line); }
.email-form { margin-bottom: 22px; }
.test-email-panel { display: grid; grid-template-columns: 58px minmax(280px,1fr) minmax(430px,1.35fr); align-items: center; gap: 18px; margin-bottom: 20px; padding: 18px 20px; border: 1px solid var(--tg-line); border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(31,52,83,.025); }
.test-email-icon { display:flex; align-items:center; justify-content:center; width:58px; height:58px; border-radius:10px; background:#fff1e8; color:var(--tg-orange); font-size:29px; transform:rotate(-18deg); }
.test-email-copy h3 { margin:0; color:var(--text); font-size:16px; }
.test-email-copy p { margin:6px 0 0; color:var(--text-soft); font-size:12px; line-height:1.45; }
.test-email-form { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; }
.test-email-button { min-height:42px; padding:0 15px; border:1px solid var(--tg-orange); border-radius:8px; background:var(--tg-orange); color:#fff; font:inherit; font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.test-email-button:hover { filter:brightness(.96); }
.email-templates-header { margin: 0 0 14px; }
.email-template-card { position:relative; margin-top:16px; padding:16px; border:1px solid var(--tg-line); border-radius:10px; background:#fff; }
.email-template-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:14px; }
.email-template-card-head h3 { margin:0; color:var(--text); font-size:14px; }
.email-template-card-head p { margin:5px 0 0; color:#6f8297; font-size:11px; line-height:1.4; }
.email-reset-button { flex:0 0 auto; min-height:32px; padding:0 11px; border:1px solid var(--tg-line); border-radius:7px; background:#fff; color:var(--text-soft); font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.email-reset-button:hover { background:#f7f9fb; color:var(--text); }
.email-template-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:38px; }
.email-template-left, .email-template-right { min-width:0; }
.email-template-textarea { width:100%; min-height:190px; padding:12px 13px; border:1px solid var(--tg-line); border-radius:7px; background:#fff; color:var(--text); font:12px/1.55 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; resize:vertical; box-sizing:border-box; }
.email-template-html { min-height:250px; border-top-left-radius:0; border-top-right-radius:0; }
.email-html-editor { border:1px solid var(--tg-line); border-radius:7px; overflow:hidden; background:#fff; }
.email-html-editor .email-template-html { border:0; border-radius:0; display:block; }
.email-editor-toolbar { display:flex; align-items:center; gap:0; height:35px; padding:0 5px; border-bottom:1px solid var(--tg-line); background:#fff; }
.email-editor-toolbar button { width:34px; height:30px; border:0; border-right:1px solid #e7edf3; background:#fff; color:#25384d; font:700 13px/1 Arial,sans-serif; cursor:default; }
.email-editor-toolbar button:hover { background:#f7f9fb; }
.email-editor-toolbar span:not(.email-editor-spacer) { width:1px; height:22px; margin:0 5px; background:#e5ebf1; }
.email-editor-spacer { flex:1; }
.email-editor-toolbar .email-editor-code { border:1px solid #e1e8ef; border-radius:5px; width:34px; }
.email-template-actions { display:flex; justify-content:flex-end; margin-top:12px; }
@media (max-width: 1050px) {
    .test-email-panel { grid-template-columns:58px minmax(220px,1fr); }
    .test-email-form { grid-column:2; }
    .email-template-grid { grid-template-columns:1fr; gap:18px; }
}
@media (max-width: 900px) {
    .user-row, .generator-row { align-items:flex-start; flex-direction:column; }
    .user-actions, .generator-actions { width:100%; justify-content:flex-start; }
    .email-form-grid { grid-template-columns:1fr; }
    .email-field.full { grid-column:auto; }
}
@media (max-width: 760px) {
    .settings-section-header { flex-direction:column; }
    .test-email-panel { grid-template-columns:1fr; }
    .test-email-form { grid-column:auto; grid-template-columns:1fr; }
    .email-template-card-head { flex-direction:column; }
    .email-reset-button { align-self:flex-start; }
    .email-template-actions .admin-button, .test-email-button { width:100%; }
}

/* System */
.system-notice.system-restart-alert{margin:0 0 24px;padding:18px 20px;border:1px solid #f2b8b8;border-left:5px solid #dc2626;border-radius:10px;background:#fff0f0;color:#b42318;font-size:14px;font-weight:700;line-height:1.55;box-shadow:0 4px 14px rgba(220,38,38,.05)}

.system-panel {
    padding: 24px;
    border: 1px solid var(--tg-line);
    border-radius: 12px;
    background: #fff;
}

.system-panel-title {
    margin: 0;
    color: var(--text);
    font-size: 19px;
}

.system-panel-description {
    margin: 7px 0 18px;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.55;
}

.system-warning {
    margin-bottom: 18px;
    padding: 12px 14px;
    border-left: 3px solid var(--tg-orange);
    border-radius: 0 8px 8px 0;
    background: #fff8f0;
    color: #765b20;
    font-size: 13px;
    line-height: 1.5;
}

.system-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 17px;
    border: 0;
    border-radius: 8px;
    background: var(--tg-orange);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(245,124,0,.16);
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease, transform .1s ease;
}

.system-button:hover {
    background: var(--tg-orange-hover);
    box-shadow: 0 6px 16px rgba(245,124,0,.20);
}

.system-button:active {
    transform: translateY(1px);
}

/* Generator-Feldbearbeitung */
.generator-edit-grid {
    grid-template-columns: minmax(0,1fr) 190px auto 150px;
    align-items: end;
}

.generator-edit-action {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}

.generator-edit-action .generator-variable-fixed {
    margin: 0;
    min-height: 16px;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.generator-edit-action .generator-edit-save-button {
    width: 100%;
}

.settings-tile-icon-changelog {
    font-size: 22px;
    line-height: 1;
}

@media (max-width: 900px) {
    .user-row,
    .generator-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-actions,
    .generator-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .email-form-grid {
        grid-template-columns: 1fr;
    }

    .email-field.full {
        grid-column: auto;
    }

    .generator-edit-grid {
        grid-template-columns: minmax(0,1fr) 190px auto 150px;
    }
}

@media (max-width: 760px) {
    .settings-section-header {
        flex-direction: column;
    }

    .generator-add-form,
    .test-email-row {
        grid-template-columns: 1fr;
    }

    .email-actions {
        justify-content: stretch;
    }

    .email-actions .admin-button,
    .test-email-button {
        width: 100%;
    }

    .generator-edit-grid {
        grid-template-columns: 1fr;
    }

    .generator-edit-action {
        grid-column: 1;
    }

    .generator-edit-action .generator-variable-fixed {
        text-align: left;
    }
}

/* Generatorübersicht: Textbereich linksbündig halten.
   .generator-main ist ausschließlich das Seitenlayout. */
.generator-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.generator-summary .generator-name,
.generator-summary .generator-meta {
    text-align: left;
}

/* V10: Sidebar-Footer in Generatoren und Adminbereichen immer sichtbar */
.admin-sidebar-footer {
    position: fixed !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 252px !important;
    box-sizing: border-box !important;
    z-index: 500 !important;
    background: linear-gradient(180deg, rgba(17,27,39,0) 0%, rgba(17,27,39,.97) 20%, #111b27 55%) !important;
    padding: 34px 24px 20px !important;
}
.admin-sidebar-footer img { width: 132px !important; margin-bottom: 8px !important; }
.admin-sidebar-version { display:block !important; visibility:visible !important; opacity:1 !important; color:#fff !important; font-weight:800 !important; margin-bottom:2px !important; }
.admin-sidebar-nav { padding-bottom: 185px !important; }
@media (max-width: 900px) {
    .admin-sidebar-footer { width:218px !important; }
}
@media (max-width: 700px) {
    .admin-sidebar-footer { display:none !important; }
}

/* V10: Löschaktion für deaktivierte Generatoren */
.admin-main .generator-actions { display:flex; align-items:center; gap:8px; }
.admin-main .delete-button {
    min-height:38px;
    padding:0 12px;
    border:1px solid #efb8b8;
    border-radius:8px;
    background:#fff7f7;
    color:#c53030;
    font:inherit;
    font-size:13px;
    font-weight:700;
    cursor:pointer;
}
.admin-main .delete-button:hover { background:#fff0f0; }

/* V11: Kompakte mobile Sidebar mit dauerhaft sichtbarer Version */
.tg-password-link {
    display:inline-block;
    margin-top:3px;
    color:var(--tg-sidebar-muted, #aeb9c8);
    font-size:11px;
    text-decoration:none;
}
.tg-password-link:hover { color:var(--tg-orange); text-decoration:none; }

@media (max-width:700px) {
    .admin-sidebar {
        min-height:0 !important;
        height:auto !important;
    }
    .admin-sidebar-brand {
        min-height:54px !important;
        height:54px !important;
        padding:6px 12px !important;
    }
    .admin-sidebar-brand img { width:125px !important; }
    .admin-sidebar-nav {
        display:grid !important;
        grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
        padding:4px !important;
        gap:2px;
        overflow-x:auto;
    }
    .admin-sidebar-nav > a {
        min-height:38px !important;
        height:38px !important;
        font-size:11px !important;
        gap:4px !important;
        white-space:nowrap;
    }
    .admin-sidebar-nav .nav-icon { font-size:14px !important; }
    .admin-sidebar-footer {
        display:flex !important;
        position:static !important;
        width:100% !important;
        min-height:30px !important;
        box-sizing:border-box !important;
        align-items:center !important;
        justify-content:center !important;
        gap:8px !important;
        padding:5px 10px !important;
        background:#111b27 !important;
        font-size:10px !important;
        line-height:1.2 !important;
        white-space:nowrap;
    }
    .admin-sidebar-footer img { display:none !important; }
    .admin-sidebar-footer .admin-sidebar-version { margin:0 !important; }
}

/* V11: einheitliche Aktionsgröße für Variablen und Vorlagen */
.generator-header-actions .generator-variables-button,
.generator-header-actions .generator-back {
    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    min-height:42px !important;
    box-sizing:border-box;
    font-family:inherit !important;
    font-size:14px !important;
    font-weight:700 !important;
    line-height:1 !important;
}

/* ============================================================
   V12 – Passwort, Sidebar und Ergebnisansicht
   ============================================================ */
.nav-icon-gear {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.nav-icon-gear svg {
    width: 20px;
    height: 20px;
    display: block;
}

.password-container {
    width: min(920px, 100%);
}
.password-card {
    max-width: 760px;
    padding: 34px 36px;
}
.password-form {
    display: grid;
    gap: 20px;
}
.password-field {
    display: grid;
    gap: 8px;
}
.password-field label {
    color: #1f344f;
    font-size: 14px;
    font-weight: 700;
}
.password-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.password-field input:focus {
    border-color: rgba(20,115,234,.45);
    box-shadow: 0 0 0 3px rgba(20,115,234,.08);
}
.password-save-button {
    min-height: 48px;
    margin-top: 4px;
    border: 1px solid var(--tg-green);
    border-radius: 8px;
    background: var(--tg-green);
    color: #fff;
    font-weight: 700;
}
.password-save-button:hover {
    background: var(--tg-green-hover);
}

.result-email-info {
    margin: 18px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #f8fafc;
    color: #526174;
    font-size: 14px;
}
.result-email-label { font-weight: 700; color: #1f344f; }
.result-email-address { color: #2e6080; }
.result-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 12px;
}

@media (max-width: 700px) {
    .admin-sidebar-brand {
        min-height: 58px;
        padding: 8px 16px;
    }
    .admin-sidebar-brand img {
        width: 150px;
        max-height: 46px;
        object-fit: contain;
    }
    .admin-sidebar-nav {
        padding: 4px 8px;
        gap: 4px;
    }
    .admin-sidebar-nav > a {
        min-height: 40px;
        font-size: 13px;
    }
    .admin-sidebar-nav .nav-icon {
        width: 20px;
        font-size: 19px;
    }
    .admin-sidebar-footer {
        display: block;
        position: static;
        padding: 7px 16px 10px;
        text-align: center;
        background: #111b27;
        font-size: 10px;
        line-height: 1.35;
    }
    .admin-sidebar-footer img {
        display: none;
    }
    .admin-sidebar-version {
        margin-bottom: 2px;
        font-weight: 700;
        color: #fff;
    }
    .password-card {
        padding: 24px 20px;
    }
    .password-field input {
        min-height: 46px;
    }
}


/* ============================================================
   V3.0 – Mobile Login, Sidebar-Footer und Favicon
   ============================================================ */

@media (max-width: 700px) {
    .admin-sidebar {
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .admin-sidebar-nav {
        flex: 0 0 auto !important;
    }

    .admin-sidebar-footer {
        display: flex !important;
        flex: 0 0 auto !important;
        min-height: 38px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-top: 4px !important;
        padding: 8px 12px !important;
        background: #111b27 !important;
        color: #fff !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .admin-sidebar-footer img {
        display: none !important;
    }

    .admin-sidebar-footer .admin-sidebar-version {
        display: inline !important;
        margin: 0 !important;
        color: #fff !important;
        font-weight: 800 !important;
    }

    .login-content {
        padding-top: 40px !important;
    }

    .login-logo {
        padding: 8px 0 8px !important;
        margin-bottom: 30px !important;
    }

    .login-logo img {
        width: 245px !important;
        max-width: 92% !important;
        height: auto !important;
    }

    .login-footer {
        padding: 20px 14px 24px !important;
    }

    .login-footer-slogan-row {
        margin-top: 4px !important;
        margin-bottom: 4px !important;
    }

    .login-footer-links {
        margin-top: 16px !important;
    }

    .login-footer-hosting {
        margin-top: 16px !important;
        padding-bottom: 4px !important;
    }
}

@media (max-width: 480px) {
    .login-content {
        padding-top: 44px !important;
    }

    .login-logo {
        padding-top: 10px !important;
        padding-bottom: 12px !important;
        margin-bottom: 32px !important;
    }

    .login-logo img {
        width: 250px !important;
        max-width: 94% !important;
    }

    .login-footer {
        padding-top: 22px !important;
        padding-bottom: 26px !important;
    }

    .login-footer-links {
        margin-top: 18px !important;
    }

    .login-footer-hosting {
        margin-top: 18px !important;
        padding-bottom: 6px !important;
    }
}


/* V3.0 – mobile sidebar footer, logo spacing and current generator fixes */
@media (max-width: 700px) {
    .admin-sidebar-brand {
        min-height: 78px !important;
        height: 78px !important;
        padding: 10px 14px !important;
        box-sizing: border-box !important;
    }

    .admin-sidebar-brand img {
        width: 150px !important;
        max-width: 78vw !important;
        height: auto !important;
        max-height: 58px !important;
        object-fit: contain !important;
    }

    .admin-sidebar-footer {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        z-index: 50 !important;
        width: 100% !important;
        min-height: 38px !important;
        margin: 0 !important;
        padding: 8px 10px !important;
        box-sizing: border-box !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        background: #111b27 !important;
        color: #fff !important;
        font-size: 10px !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
        text-align: center !important;
        border-top: 1px solid rgba(255,255,255,.08) !important;
    }

    .admin-sidebar-footer img { display: none !important; }
    .admin-sidebar-footer .admin-sidebar-version {
        display: inline !important;
        margin: 0 !important;
        color: #fff !important;
        font-weight: 800 !important;
    }

    .admin-main > .admin-page,
    .dashboard-main > .dashboard-page,
    .generator-main > .generator-page {
        padding-bottom: 105px !important;
    }
}


/* V3.0.1 – Mobile navigation polish and inactivity session */
.tg-avatar { display: none !important; }

.admin-sidebar-footer {
    display: block !important;
}

@media (max-width: 700px) {
    .admin-app-shell,
    .dashboard-app-shell {
        min-height: 100vh;
    }

    .admin-sidebar {
        min-height: 100vh !important;
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .admin-sidebar-brand {
        min-height: 96px !important;
        height: 96px !important;
        padding: 14px 18px !important;
    }

    .admin-sidebar-brand img {
        width: 170px !important;
        max-width: 72vw !important;
        max-height: 68px !important;
        object-fit: contain !important;
    }

    .admin-sidebar-nav {
        flex: 0 0 auto !important;
        padding: 6px 8px !important;
    }

    .admin-sidebar-footer {
        position: static !important;
        flex: 0 0 auto !important;
        margin-top: auto !important;
        min-height: 40px !important;
        padding: 8px 12px !important;
        background: #111b27 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        white-space: normal !important;
        text-align: center !important;
        font-size: 10px !important;
        line-height: 1.3 !important;
    }

    .admin-sidebar-footer img { display: none !important; }
    .admin-sidebar-footer .admin-sidebar-version {
        display: inline !important;
        margin: 0 !important;
        color: #fff !important;
        font-weight: 800 !important;
    }

    .password-field input {
        text-align: left !important;
        padding-left: 12px !important;
    }
}

@media (max-width: 480px) {
    .admin-sidebar-brand {
        min-height: 104px !important;
        height: 104px !important;
        padding: 16px 18px !important;
    }

    .admin-sidebar-brand img {
        width: 182px !important;
        max-width: 78vw !important;
        max-height: 74px !important;
    }
}


/* V3.0.2 – Mobile sidebar compact: content follows menu immediately. */
@media (max-width: 700px) {
    .admin-app-shell, .dashboard-app-shell {
        display: block !important;
        min-height: 0 !important;
    }
    .admin-sidebar {
        position: relative !important;
        min-height: 0 !important;
        height: auto !important;
    }
    .admin-sidebar-footer {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        margin-top: 0 !important;
        width: 100% !important;
    }
    .admin-main, .dashboard-main, .generator-main {
        margin-left: 0 !important;
    }
}


/* V3.0 – Mobile page footer belongs below the page content */
@media (max-width: 700px) {
    .admin-app-shell,
    .dashboard-app-shell {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
    }

    .admin-sidebar {
        display: contents !important;
        width: auto !important;
        min-height: 0 !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .admin-sidebar-brand,
    .admin-sidebar-nav {
        order: 1 !important;
    }

    .admin-main,
    .dashboard-main,
    .generator-main {
        order: 2 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .admin-sidebar-footer {
        order: 3 !important;
        position: static !important;
        width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }
}


/* V3.0 – Mobile sidebar background and page footer polish (23.08.2026) */
@media (max-width: 700px) {
    .admin-sidebar-brand,
    .admin-sidebar-nav,
    .admin-sidebar-subnav {
        background: #111b27 !important;
        color: #eef3f8 !important;
    }

    .admin-sidebar-brand {
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    .admin-sidebar-nav {
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }

    .admin-sidebar-nav > a,
    .admin-sidebar-subnav a {
        background: transparent !important;
    }

    .admin-sidebar-footer {
        background: #111b27 !important;
        border-top: 1px solid rgba(255,255,255,0.08) !important;
    }
}


/* V3.0 – History and support logs */
.activity-list,
.error-log-list { display:flex; flex-direction:column; gap:10px; margin-top:18px; }

.activity-row {
    display:grid;
    grid-template-columns:150px minmax(0,1fr) 150px;
    gap:16px;
    align-items:center;
    padding:14px 16px;
    border:1px solid var(--tg-line,#dbe3ec);
    border-radius:10px;
    background:#fff;
}
.activity-time,.error-log-time { color:var(--tg-muted,#718096); font-size:12px; white-space:nowrap; }
.activity-title { font-weight:800; color:var(--tg-text,#14233a); }
.activity-details { margin-top:3px; color:var(--tg-muted,#718096); font-size:13px; line-height:1.45; }
.activity-user { text-align:right; }
.activity-user strong,.activity-user span { display:block; }
.activity-user span { margin-top:2px; color:var(--tg-muted,#718096); font-size:12px; }

.error-log-row { border:1px solid #f1d0d0; border-radius:10px; background:#fffafa; overflow:hidden; }
.error-log-row summary {
    display:grid;
    grid-template-columns:150px 190px minmax(0,1fr);
    gap:12px;
    align-items:center;
    padding:13px 15px;
    cursor:pointer;
    list-style:none;
}
.error-log-row summary::-webkit-details-marker { display:none; }
.error-log-detail { padding:13px 15px 15px; border-top:1px solid #f1d0d0; color:#4a5568; font-size:13px; line-height:1.55; }

@media (max-width:760px) {
    .activity-row { grid-template-columns:1fr; gap:6px; }
    .activity-user { text-align:left; }
    .error-log-row summary { grid-template-columns:1fr; gap:4px; }
}


/* V3.0 – History search and failed-login highlighting */
.history-filters {
    display:grid;
    grid-template-columns:minmax(180px,1.2fr) minmax(180px,1fr) minmax(150px,.7fr) auto;
    gap:12px;
    align-items:end;
    margin-top:18px;
    padding:14px;
    border:1px solid var(--tg-line,#dbe3ec);
    border-radius:10px;
    background:#f8fafc;
}
.history-filter-field { display:flex; flex-direction:column; gap:6px; }
.history-filter-field label { font-size:12px; font-weight:800; color:var(--tg-text,#14233a); }
.history-filter-field input,
.history-filter-field select {
    height:40px;
    box-sizing:border-box;
    width:100%;
    border:1px solid var(--border,#dbe3ec);
    border-radius:8px;
    background:#fff;
    padding:0 11px;
    font:inherit;
    color:var(--tg-text,#14233a);
}
.history-filter-field input:focus,
.history-filter-field select:focus {
    outline:none;
    border-color:var(--tg-orange,#ff8200);
    box-shadow:0 0 0 3px rgba(255,130,0,.10);
}
.history-filter-actions { display:flex; gap:8px; align-items:center; }
.history-filter-actions .tg-button {
    min-height:40px;
    padding:0 14px;
    border-radius:8px;
    font-weight:800;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
}
.history-filter-actions .tg-button-orange {
    background:var(--tg-orange,#ff8200);
    color:#fff;
    border:1px solid var(--tg-orange,#ff8200);
}
.history-filter-actions .tg-button-light {
    background:#fff;
    color:var(--tg-orange,#ff8200);
    border:1px solid #dbe3ec;
}
.history-filter-actions .tg-button-light:hover {
    background:#f7f9fb;
    border-color:#c7d1dc;
    color:#d86d00;
}
.activity-row-danger {
    border-color:#efb2b2 !important;
    background:#fff7f7 !important;
}
.activity-row-danger .activity-title { color:#b42318 !important; }
.activity-row-success {
    border-color:#bfe5cf !important;
    background:#f5fcf7 !important;
}
.activity-row-success .activity-title { color:#168247 !important; }

@media (max-width:760px) {
    .history-filters { grid-template-columns:1fr; }
    .history-filter-actions { width:100%; }
    .history-filter-actions .tg-button { flex:1; justify-content:center; display:inline-flex; align-items:center; }
}


/* V3.0 – Deutlicher Erfolgs-Hinweis für gespeicherte Generator-Einstellungen */
.system-notice.success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    padding: 15px 18px;
    border: 1px solid #bfe5cf;
    border-left: 5px solid #16a34a;
    border-radius: 10px;
    background: #eefaf2;
    color: #166534;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(22,163,74,.08);
}

.system-notice.success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}


/* V3.0 – Berichte: dauerhafter Abstand zwischen Entwürfen und fertigen Berichten */
.reports-section-spaced {
    margin-top: 24px !important;
}

/* V3.0 – System: verwaiste Daten finden und sicher bereinigen */
.orphan-cleanup-panel { margin-top: 20px; }
.system-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.system-button-secondary {
    display:inline-flex; align-items:center; justify-content:center;
    min-height:44px; padding:0 17px; border-radius:8px;
    border:1px solid var(--tg-orange,#ff8200); background:#fff;
    color:var(--tg-orange,#ff8200); font-weight:800; text-decoration:none;
}
.system-button-secondary:hover { background:var(--tg-orange,#ff8200); color:#fff; }
.orphan-result-head {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    margin-top:20px; padding-top:16px; border-top:1px solid var(--tg-line,#dbe3ec);
    color:var(--tg-text,#14233a);
}
.orphan-clean { color:#15803d; font-weight:800; }
.orphan-list { display:flex; flex-direction:column; gap:10px; margin-top:12px; }
.orphan-row {
    display:flex; align-items:center; justify-content:space-between; gap:16px;
    padding:13px 15px; border:1px solid #ead1d1; border-radius:10px;
    background:#fffafa;
}
.orphan-main { min-width:0; display:flex; flex-direction:column; gap:3px; }
.orphan-main strong { color:var(--tg-text,#14233a); }
.orphan-main span { color:var(--tg-muted,#718096); font-size:13px; line-height:1.4; }
.orphan-delete-button {
    min-height:40px; padding:0 14px; border-radius:8px;
    border:1px solid #dc2626; background:#fff0f0; color:#dc2626;
    font-weight:800; cursor:pointer; white-space:nowrap;
}
.orphan-delete-button:hover { background:#ffe1e1; border-color:#b91c1c; color:#b91c1c; }

@media (max-width:700px) {
    .orphan-row { align-items:flex-start; flex-direction:column; }
    .orphan-delete-button { width:100%; }
}


/* Docker Image 1.5 */
.admin-sidebar-feature-link {
    display: inline-flex;
    align-items: center;
    margin: 4px 0 8px;
    padding: 5px 9px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 6px;
    background: rgba(255,255,255,.055);
    color: #d8e0e9;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.admin-sidebar-feature-link:hover {
    border-color: rgba(245,124,0,.45);
    background: rgba(245,124,0,.14);
    color: #fff;
}
.generator-photo-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--tg-line);
}
.generator-photo-setting-help {
    margin: 6px 0 0;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}
.generator-photo-setting-help code {
    font-size: 11px;
}
.generator-toggle-group {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 3px;
    border: 1px solid var(--tg-line);
    border-radius: 9px;
    background: #f8fafc;
}
.generator-toggle-option {
    min-width: 105px;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-soft);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}
.generator-toggle-option.is-active[data-photos-value="1"] {
    background: #e9f8ef;
    color: #27804a;
    box-shadow: 0 2px 7px rgba(39,128,74,.08);
}
.generator-toggle-option.is-active[data-photos-value="0"] {
    background: #fff0f0;
    color: #b42318;
    box-shadow: 0 2px 7px rgba(180,35,24,.08);
}
.generator-toggle-option[data-photos-value="0"]:hover {
    background: #fff0f0;
    color: #b42318;
}
.email-templates-header {
    margin-bottom: 18px;
}
.email-template-card {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid var(--tg-line);
    border-radius: 12px;
    background: #fbfcfe;
}
.email-template-card-head h4 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
}
.email-template-card-head p {
    margin: 6px 0 18px;
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.5;
}
.email-template-textarea {
    width: 100%;
    min-height: 180px;
    padding: 12px 13px;
    border: 1px solid var(--tg-line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    resize: vertical;
    box-sizing: border-box;
}
.email-template-html {
    min-height: 260px;
}
@media (max-width: 760px) {
    .generator-photo-setting {
        align-items: stretch;
        flex-direction: column;
    }
    .generator-toggle-group {
        width: 100%;
    }
    .generator-toggle-option {
        flex: 1;
    }
}
