@import url("https://www.datacrossmedia.de/cdn/css/dcm.css");
/*@import url("https://www.datacrossmedia.de/cdn/css/dcmdark.css");*/
/*@import "/bootstrap.min.css";*/

/* ========================================
   Font-Face Declarations (Equip Fonts)
   ======================================== */
@font-face {
    font-family: "Equip W03 Light";
    src: url("https://www.datacrossmedia.de/cdn/fonts/Equip_W03_Light/Web_Fonts/2b21083c41c7da1ef90f09f1d3e45f7c.woff2") format("woff2"),
         url("https://www.datacrossmedia.de/cdn/fonts/Equip_W03_Light/Web_Fonts/2b21083c41c7da1ef90f09f1d3e45f7c.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Equip W03 Regular";
    src: url("https://db.onlinewebfonts.com/t/94b4df2f9d7baafa25e225cce5ab06a8.woff2") format("woff2"),
         url("https://db.onlinewebfonts.com/t/94b4df2f9d7baafa25e225cce5ab06a8.woff") format("woff");
    font-weight: 425;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Equip W03 Medium";
    src: url("https://db.onlinewebfonts.com/t/5133c5f7921377cc2b2eb95c2fcb2be8.woff2") format("woff2"),
         url("https://db.onlinewebfonts.com/t/5133c5f7921377cc2b2eb95c2fcb2be8.woff") format("woff");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Equip Cond W03 Bold";
    src: url("https://db.onlinewebfonts.com/t/1178965303509cd6bfb803a8f7e3938a.woff2") format("woff2"),
         url("https://db.onlinewebfonts.com/t/1178965303509cd6bfb803a8f7e3938a.woff") format("woff");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   CSS Custom Properties (Design System)
   ======================================== */
:root {
    /* Font Families */
    --regular-font: "Equip W03 Regular", sans-serif;
    --medium-font: "Equip W03 Medium", sans-serif;
    --light-font: "Equip W03 Light", sans-serif;
    --bold-font: "Equip Cond W03 Bold", sans-serif;
    --longtext-font: SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;

    /* Typography Scale (rem-basiert) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */

    /* Light Mode (Standard) */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-tertiary: #94a3b8;
    --color-primary: #52a3e5;
    --color-secondary: #7ab8eb;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --border-color: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    --card-border-radius: 8px;
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Text Rendering */
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
}

/* Dark Mode */
html.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-tertiary: #94a3b8;
    --border-color: #475569;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
    --card-shadow-hover: 0 4px 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

html.dark-mode body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

html.dark-mode header {
    background-color: var(--bg-secondary);
    border-bottom-color: var(--border-color);
}

html.dark-mode .sidebar {
    background: linear-gradient(180deg, #1e3a5f 0%, #1e293b 30%, #0f172a 100%);
    color: #f8fafc;
}

html.dark-mode .main-content,
html.dark-mode .right-panel {
    background-color: var(--bg-primary);
}

html.dark-mode .sub-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

html.dark-mode .footer {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

html.dark-mode .input-field,
html.dark-mode .form-control {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html.dark-mode .user-details {
    background-color: var(--bg-tertiary);
}

html.dark-mode .json-tab-content {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 1px 3px 0 rgba(59, 130, 246, 0.2);
}

html.dark-mode .group-header {
    background: var(--bg-tertiary);
    border-bottom-color: #7ab8eb;
}

html.dark-mode .group-description {
    background: var(--bg-secondary);
}

html.dark-mode .json-tab-content .form-grid {
    background: var(--bg-secondary);
}

html.dark-mode .sidebarButton.active {
    background-color: rgba(82, 163, 229, 0.3);
    color: #f8fafc;
}

html.dark-mode .sidebar ul li button {
    color: #cbd5e1;
}

html.dark-mode .sidebar ul li button:hover {
    background-color: rgba(82, 163, 229, 0.2);
    color: #f8fafc;
}

body{
    /* Mindestbreite für die Webseite */
    min-width: 320px;
    min-height: 532.5px;
    overflow-x: hidden;
    word-wrap: break-word; /* Mindesthöhe für die Webseite */
}

/* Header */
header {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    left: 250px;
    font-family: var(--medium-font);
    font-size: var(--text-base);
    z-index: 1000;
    justify-content: space-between;
    background-color: var(--bg-primary);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    min-height: 56px;
    box-sizing: border-box;
    align-items: center;
    transition: left 0.3s ease;
}

/* Header Left - Menu Button + Breadcrumb */
.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-menu-btn svg {
    width: 20px;
    height: 20px;
}

.header-menu-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
}

.breadcrumb {
    font-family: var(--regular-font);
    font-size: var(--text-base);
    color: var(--text-secondary);
}

/* Header Right - Button Group */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: var(--regular-font);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
}

.header-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
}

.header-btn-icon {
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-btn-icon svg {
    width: 16px;
    height: 16px;
}

.header-btn-text {
    white-space: nowrap;
}

.header-btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.header-btn-primary:hover {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.header-btn-primary svg {
    stroke: white;
}

/* Legacy contact-info support */
header .contact-info {
    font-family: var(--regular-font);
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

header .contact-info a {
    color: var(--color-primary);
    text-decoration: none;
}

header .contact-info a:hover {
    text-decoration: underline;
}

/* Allgemeine Stile */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--regular-font);
    margin: 0;
    padding: 0;
    color: var(--text-primary);
    box-sizing: border-box;
    line-height: 1.6;
    font-size: var(--text-base);
    overflow-x: hidden;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--medium-font);
    line-height: 1.2;
    font-weight: 600;
    margin-top: 0;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

button {
    color: white;
    background-color: #7AB8EB;
    font-family: var(--medium-font);
    font-size: var(--text-sm);
    font-weight: 500;
    border: none;
}

/* Seitenlayout */
.sidebar {
    background: linear-gradient(180deg, #e8f4fc 0%, #f0f0ff 30%, #ffffff 100%);
    color: #333;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100vh;
    box-sizing: border-box;
    z-index: 1001;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}



/* Sidebar Logo Area */
.sidebar-logo {
    padding: 16px 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.sidebar-logo img {
    height: 26px;
    width: auto;
}

/* Sidebar Button Styling - KundenCenter Pattern */
.sidebar ul li {
    padding: 2px 8px;
}

.sidebar ul li button{
    color: #64748b;
    font-size: var(--text-sm);
    font-family: var(--regular-font);
    padding: 10px 12px;
    width: 100%;
    height: auto;
    min-height: 40px;
    text-decoration: none;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

/* Sidebar Icon */
.sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Sidebar Button Text */
.sidebar-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Badge (Counter) */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-badge.badge-success {
    background: var(--color-success);
}

.sidebar-badge.badge-warning {
    background: var(--color-warning);
}

.sidebar ul li button:focus {
    background-color: rgba(82, 163, 229, 0.15);
    color: #333;
    border: none;
    outline: none;
    box-shadow: 0 0 0 2px rgba(82, 163, 229, 0.3);
}

.sidebarButton.active {
    background-color: rgba(82, 163, 229, 0.15);
    color: #333;
    border: none;
    font-weight: 500;
}

.sidebar ul button:hover {
    background-color: rgba(82, 163, 229, 0.1);
    color: #333;
    border: none;
    transform: translateX(2px);
}

/* ========================================
   Collapsed Sidebar
   ======================================== */
.sidebar {
    transition: width 0.3s ease;
}

.sidebar-logo-icon {
    display: none;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.sidebar.collapsed,
.sidebar.left-panel.collapsed,
#left-panel.collapsed {
    width: 56px !important;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-logo,
#left-panel.collapsed .sidebar-logo {
    justify-content: center;
    padding: 12px;
    width: 56px !important;
    box-sizing: border-box;
}

.sidebar.collapsed .sidebar-logo img,
#left-panel.collapsed .sidebar-logo img {
    display: none !important;
}

.sidebar.collapsed .sidebar-logo-icon,
#left-panel.collapsed .sidebar-logo-icon {
    display: block !important;
}

.sidebar.collapsed ul,
#left-panel.collapsed ul {
    display: none !important;
}

/* Header/Footer/Content Anpassung bei Collapsed Sidebar */
html body.sidebar-collapsed header {
    left: 56px !important;
}

html body.sidebar-collapsed .footer {
    left: 56px !important;
}

html body.sidebar-collapsed .main-content {
    margin-left: 56px;
}

.main-content {
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 20px;
    min-height: calc(100vh - 56px - 38px);
    box-sizing: border-box;
}

/* sub-content */
.sub-content {
    fill: #fff;
    padding: 20px 20px 57px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.sub-content h2 {
    margin-top: 0;
    font-family: var(--medium-font);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 5px solid #7AB8EB;
    padding-bottom: 30px;
    box-sizing: border-box;
}




/* Benutzerübersicht */
.user-details{
    display: inline-block;
    background-color: var(--color-bg-2);
    width: 100%; /* Elemente nebeneinander mit Lücke */
    vertical-align: top;
    list-style-type: none;
    /*margin-right: 2%; /* Abstand zwischen den beiden Spalten */
}

.user-details ul{
    list-style-type: none;
    padding: 0;
    margin: 10px 0 10px 0;
}

.user-details li{
    display: flex;
    
}

.label {
    margin: 15px 0 25px 7px;
    width: 210px;
    font-family: var(--medium-font);
    font-size: var(--text-sm);
    font-weight: 500;
    padding-top: 9px;
    padding-right: 10px;
    box-sizing: border-box;
}

.input-field {
    font-family: var(--regular-font);
    font-size: var(--text-base);
    overflow-wrap: break-word;
    word-break: break-all;
    vertical-align: middle;
    flex:1;
    padding-inline-start: 7px;
    margin: 15px 20px 15px 0;
    border: none;
    border-radius: 2px;
    box-sizing: border-box;
}
.areaText {
    padding-top:7px;
}

input[type="file" i] {
    padding: 0; /* Beispiel: Fügt etwas Innenabstand hinzu */
    cursor: pointer; /* Beispiel: Ändert den Mauszeiger beim Hover */
}
input[type="color" i] {
    padding-inline-start: 0;
    padding-top: 10px;
    height:30px;
    
}
/*
.input-field {
    flex: 1; /* Input-Felder nehmen den restlichen Platz ein *
    padding: 5px;
}


.user-details li {
    display: flex;
    align-items: center; /* Richtet Label und Input vertikal aus *
    gap: 10px; /* Abstand zwischen Label und Input *
    margin-top: 10px;
}


.input-field {
    height: 36px; /* Einheitliche Höhe für Input-Felder *
}*/


/* Footer */
.topButton {
    margin-left: 10px;
    
    float: right;
    border-radius: 5px;
    padding: 6px 11px;
    box-sizing: border-box;
}

.saveButton {
    margin-left: 10px;
    margin-top: 10px;
    float: right;
    border-radius: 5px;
    padding: 6px 11px;
    box-sizing: border-box;
}

/* Button row container with clearfix */
.button-row {
    overflow: hidden;
    margin-top: var(--spacing-md, 16px);
}

.abbruchButton{
    background-color: white;
    color: #333333;
    border: 1px solid #f2f2f2;
}
.footer {
    position: fixed;
    bottom: 0;
    left: 250px;
    right: 0;
    height: 38px;
    z-index: 999;
    background-color: #ffffff;
    color: var(--text-secondary);
    font-family: var(--regular-font);
    font-size: var(--text-sm);
    padding: 10px 20px;
    text-align: center;
    box-sizing: border-box;
    border-top: 1px solid var(--border-color);
    transition: left 0.3s ease;
}
.footer a {
    color: #7AB8EC;
}


.footer a:hover{
    color:#2E7FBD
}

/* --- Media Queries für PC und Tablet Querformat --- */


@media(max-width: 930px){
    .footer{
        height: 52px;
    }
    
    .sidebar{
        height: calc(100% - 52px);
    }

}
@media(max-width: 890px){
    header{
        height: 76px;
    }
    .sidebar{
        height: calc(100% - 52px - 76px);
    }
}

.user-details div {
    font-family: sans-serif;
    padding: 0;
    vertical-align: middle;
    padding-inline-start: 0;
    margin: 15px 20px 15px 0;
    border: none;
    border-radius: 2px;
    box-sizing: border-box;
}



.switch {
    position: relative;
    display: inline-block !important;
    width: calc(100% - 237px);
    height: 28px;
    margin: 0 !important;
    
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position:  absolute;
    cursor: pointer;
    width: 50px;
    top: 0px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #a0a0a0;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position:  absolute;
    content: "";
    height: 22px;
    width: 22px;
    left:3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input[type="checkbox"]:checked + .slider {
    background-color: #7ab8eb;
}

input[type="checkbox"]:focus + .slider {
    box-shadow: 0 0 1px var(--color-blau);
}

input[type="checkbox"]:checked + .slider:before {
    transform: translateX(22px);
}



.fileInput{
    position: relative;
    display: inline-block !important;
    width: calc(100% - 237px);
    height: 28px;
    margin: 0 !important;
}

.fileInput input{
    opacity: 0;
    width: 0;
    height: 0;
}

.files{
    position:  absolute;
    background: #7AB8EB;
    width: 100%;
    top: 0px;
    left: 0;
    padding: 7px !important;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}
.files :hover {
    background: #7AB8EB;
}
span[type="file"]:focus + label[for="files"] {
    border: 1px solid #85E5FF;
}


.container {
    display: block;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar mit fester Breite */
.left-panel {
    background-color: var(--color-blau);
    color: white;
    overflow-y: auto;
}

/* Hauptinhalt neben der Sidebar */
.right-panel {
    position: fixed;
    top: 56px;
    left: 250px;
    right: 0;
    bottom: 38px;
    padding: 20px;
    overflow: auto;
    background: var(--bg-primary);
    transition: left 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.right-panel .sub-content {
    max-width: 1200px;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Right-Panel Anpassung bei Collapsed Sidebar */
html body.sidebar-collapsed .right-panel {
    left: 56px !important;
}

/* Dragbar ausblenden - feste Sidebar-Breite */
.dragbar {
    display: none;
}

/* ========================================
   Card Component Styles
   ======================================== */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--card-border-radius);
    box-shadow: var(--card-shadow);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    font-family: var(--medium-font);
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 3px solid var(--color-secondary);
    padding-bottom: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.card-description {
    font-family: var(--regular-font);
    color: var(--text-secondary);
    font-size: var(--text-base);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   JSON Parser Specific Styles
   ======================================== */
#JSON-Parser.sub-content {
    padding: var(--spacing-lg);
    margin-top: 56px;
    margin-bottom: 56px;
}

.json-parser-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* ========================================
   Tab Content for JSON Parser (Sidebar Navigation)
   Based on form-aligned-tile Pattern from Reference
   ======================================== */
.tab-content-container {
    min-height: 300px;
}

.json-tab-content {
    animation: fadeIn var(--transition-normal);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.json-tab-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), #1d4ed8);
    transition: all 0.3s ease;
}

/* Group Header - form-aligned-tile-title Pattern */
.group-header {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    padding-top: calc(0.875rem + 3px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: #7ab8eb 2px solid;
    position: relative;
}

.group-header h3 {
    margin: 0;
    font-family: var(--bold-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Group Description - form-aligned style */
.group-description {
    background: var(--bg-tertiary);
    padding: var(--spacing-md) 1rem;
    font-family: var(--regular-font);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    border-left: 3px solid var(--color-primary);
    margin: 0;
}

/* Form Grid Content Area - form-aligned-tile-content Pattern */
.json-tab-content .form-grid {
    padding: 1rem;
    background: var(--bg-primary);
}

/* ========================================
   Form Grid Layout
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: minmax(180px, 220px) 1fr;
    gap: var(--spacing-md) var(--spacing-lg);
    align-items: start;
}

.form-group {
    display: contents;
}

.form-label {
    font-family: var(--medium-font);
    font-weight: 500;
    color: var(--text-primary);
    padding-top: 10px;
    font-size: var(--text-sm);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: var(--text-base);
    font-family: var(--regular-font);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(82, 163, 229, 0.15);
}

.form-control:disabled {
    background: var(--bg-tertiary);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-helper {
    grid-column: 2;
    font-size: var(--text-xs);
    font-family: var(--regular-font);
    color: var(--text-tertiary);
    margin-top: -8px;
    line-height: 1.4;
}

.form-control.error {
    border-color: var(--color-error);
}

.form-error-message {
    grid-column: 2;
    font-size: var(--text-xs);
    font-family: var(--regular-font);
    color: var(--color-error);
    margin-top: -8px;
}

/* Select Dropdown Styling */
.form-control-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* File Input Styling */
.form-file-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-file-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-file-button {
    background: var(--color-primary);
    color: white;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--medium-font);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.form-file-button:hover {
    background: var(--color-secondary);
}

.form-file-name {
    font-family: var(--regular-font);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Switch/Toggle in Form Grid */
.form-switch-wrapper {
    display: flex;
    align-items: center;
    height: 38px;
}

/* ========================================
   Dark Mode Toggle Button
   ======================================== */
.dark-mode-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    margin-left: 15px;
}

.dark-mode-toggle:hover {
    background: var(--bg-secondary);
}

/* ========================================
   JSON Preview Area
   ======================================== */
.json-preview-card {
    margin-top: var(--spacing-lg);
}

.json-preview {
    background: var(--bg-tertiary);
    padding: var(--spacing-md);
    border-radius: 4px;
    overflow-x: auto;
    max-height: 300px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-break: break-all;
}

/* ========================================
   Animation Keyframes
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fadeIn { animation: fadeIn var(--transition-normal); }
.animate-slideUp { animation: slideUp var(--transition-normal); }
.animate-scaleIn { animation: scaleIn var(--transition-normal); }

/* ========================================
   Custom Scrollbar
   ======================================== */
.json-parser-container::-webkit-scrollbar,
.json-preview::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.json-parser-container::-webkit-scrollbar-track,
.json-preview::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.json-parser-container::-webkit-scrollbar-thumb,
.json-preview::-webkit-scrollbar-thumb {
    background: var(--color-secondary);
    border-radius: 4px;
}

.json-parser-container::-webkit-scrollbar-thumb:hover,
.json-preview::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ========================================
   Responsive Design - JSON Parser
   ======================================== */

/* Tablet Portrait */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    .form-label {
        padding-top: 0;
        margin-bottom: var(--spacing-xs);
    }

    .form-helper,
    .form-error-message {
        grid-column: 1;
    }

    .group-content {
        padding: var(--spacing-md);
    }
}

/* Mobile */
@media (max-width: 768px) {
    .group-header {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .group-header h3 {
        font-size: var(--font-size-normal);
    }

    .group-content {
        padding: var(--spacing-md);
    }

    .json-parser-container {
        gap: var(--spacing-md);
    }

    #JSON-Parser .topButton,
    #JSON-Parser .saveButton {
        width: 100%;
        margin: 5px 0;
        float: none;
    }

    #JSON-Parser h2 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .card {
        padding: var(--spacing-md);
    }

    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* High DPI / 200% Zoom Support */
@media (min-resolution: 192dpi),
       (min-resolution: 2dppx),
       (-webkit-min-device-pixel-ratio: 2) {
    .form-control {
        min-height: 44px; /* Touch-friendly */
    }

    .form-switch-wrapper .switch {
        min-height: 40px;
    }

    .form-switch-wrapper .slider {
        width: 56px;
        height: 32px;
    }

    .form-switch-wrapper .slider:before {
        height: 26px;
        width: 26px;
    }
}

/* Zoom Support - Ensure minimum touch targets */
@media (pointer: coarse) {
    .form-control,
    .form-file-button,
    .topButton,
    .saveButton {
        min-height: 44px;
    }

    .group-header {
        min-height: 48px;
    }
}

/* ========================================
   Responsive: Tablet/Small Desktop (< 1024px)
   ======================================== */
@media (max-width: 1024px) {
    .header-btn-text {
        display: none;
    }

    .header-btn {
        padding: 8px 12px;
    }
}

/* ========================================
   Responsive: Half Screen / Smaller Windows (< 900px)
   Sidebar als Overlay, Content nutzt volle Breite
   ======================================== */
@media (max-width: 900px) {
    /* Header und Footer nutzen volle Breite */
    header {
        left: 0 !important;
    }

    .footer {
        left: 0 !important;
    }

    /* Right-panel nutzt volle Breite */
    .right-panel {
        left: 0 !important;
    }

    /* Sidebar als Overlay (standardmäßig versteckt) */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
        width: 250px !important;
    }

    /* Sidebar öffnen bei Klick */
    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar.sidebar-open .sidebar-logo {
        width: 100% !important;
        justify-content: flex-start;
        padding: 16px 14px;
    }

    .sidebar.sidebar-open .sidebar-logo img {
        display: block !important;
    }

    .sidebar.sidebar-open .sidebar-logo-icon {
        display: none !important;
    }

    .sidebar.sidebar-open ul {
        display: block !important;
    }

    /* Overlay Hintergrund */
    .sidebar-overlay.active {
        display: block;
    }

    /* JSON-Parser Inhalt vollständig anzeigen */
    .right-panel .sub-content {
        max-width: 100%;
    }

    #JSON-Parser.sub-content {
        margin-top: 20px;
        margin-bottom: 20px;
    }
}

/* ========================================
   Responsive: Mobile (< 768px)
   Sidebar als Overlay
   ======================================== */
@media (max-width: 768px) {
    /* Header takes full width */
    header {
        left: 0 !important;
    }

    /* Footer takes full width */
    .footer {
        left: 0 !important;
    }

    /* Sidebar becomes overlay */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease, width 0.3s ease;
        z-index: 2000;
        width: 250px !important;
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .sidebar.sidebar-open .sidebar-logo img {
        display: block !important;
    }

    .sidebar.sidebar-open .sidebar-logo-icon {
        display: none !important;
    }

    .sidebar.sidebar-open ul {
        display: block !important;
    }

    /* Overlay background */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
    }

    .sidebar-overlay.active {
        display: block;
    }

    /* Main content takes full width */
    .right-panel {
        left: 0 !important;
        padding: 10px;
    }

    .main-content {
        margin-left: 0;
    }

    /* JSON-Parser Inhalt vollständig anzeigen */
    .right-panel .sub-content {
        max-width: 100%;
    }

    #JSON-Parser.sub-content {
        margin-top: 10px;
        margin-bottom: 10px;
        padding: var(--spacing-md);
    }
}

/* ========================================
   Very High Zoom (>200%) - Behandeln wie Mobile
   ======================================== */
@media (min-resolution: 288dpi),
       (min-resolution: 3dppx),
       (-webkit-min-device-pixel-ratio: 3) {
    /* Bei sehr hohem Zoom: wie Mobile behandeln */
    header {
        left: 0 !important;
    }

    .footer {
        left: 0 !important;
    }

    .right-panel {
        left: 0 !important;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }
}

/* Sidebar Toggle Button - hidden by default (use header-menu-btn instead) */
.sidebar-toggle {
    display: none;
}

.sidebar-overlay {
    display: none;
}

/* ========================================
   Modern Button Styles (KundenCenter Pattern)
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--medium-font);
    font-size: var(--text-sm);
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: #4a9bd8;
    border-color: #4a9bd8;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    border-color: var(--color-primary);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.btn-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Button with Arrow/Chevron */
.btn-with-arrow::after {
    content: '›';
    font-size: 1.2em;
    font-weight: bold;
    margin-left: 4px;
}

/* ========================================
   Alert / Warning Box Styles (KundenCenter Pattern)
   ======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid;
    background: var(--bg-secondary);
}

.alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-icon svg {
    width: 100%;
    height: 100%;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-family: var(--medium-font);
    font-size: var(--text-base);
    font-weight: 600;
    margin: 0 0 4px 0;
}

.alert-text {
    font-family: var(--regular-font);
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
}

/* Alert Variants */
.alert-warning {
    border-left-color: var(--color-error);
    background: rgba(239, 68, 68, 0.05);
}

.alert-warning .alert-icon {
    color: var(--color-error);
}

.alert-warning .alert-title {
    color: var(--color-error);
}

.alert-info {
    border-left-color: var(--color-primary);
    background: rgba(82, 163, 229, 0.05);
}

.alert-info .alert-icon {
    color: var(--color-primary);
}

.alert-success {
    border-left-color: var(--color-success);
    background: rgba(16, 185, 129, 0.05);
}

.alert-success .alert-icon {
    color: var(--color-success);
}

/* Dark Mode Alert Adjustments */
html.dark-mode .alert {
    background: var(--bg-tertiary);
}

html.dark-mode .alert-warning {
    background: rgba(239, 68, 68, 0.1);
}

html.dark-mode .alert-info {
    background: rgba(82, 163, 229, 0.1);
}

html.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.1);
}