/* Hero Font */
@font-face {
    font-family: 'Hero';
    src: url('/static/fonts/hero-webfont.woff2') format('woff2'),
         url('/static/fonts/hero-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Hero', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f9f9f9;
}

/* Page Wrapper with Background */
#wrapper {
    min-height: 100vh;
    background: url('/static/img/backgrounds/background_1.jpg') no-repeat left center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
}

/* Logo */
.logo-link {
    position: absolute;
    top: 35px;
    left: 150px;
}

.logo-img {
    height: 50px;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
    padding-bottom: 200px;
}

/* Form Container */
.form-container {
    width: 500px;
    padding: 25px;
}

@media (max-width: 520px) {
    .form-container {
        width: 100%;
        padding: 20px;
        background: rgba(255, 255, 255, 0.5);
    }
}

@media (max-height: 699px) {
    .form-container {
        width: 400px;
    }
}

.invitation-info {
    text-align: center;
    font-size: 15px;
    color: #555;
    margin-bottom: 24px;
    padding: 12px 16px;
    background: #e8f5f5;
    border-radius: 4px;
}

/* Form Title */
.form-title {
    font-size: 32px;
    font-weight: 400;
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

.form-subtitle {
    font-size: 17px;
    font-weight: 300;
    color: #666;
    margin-bottom: 25px;
    text-align: center;
}

/* Form Controls */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 400;
    color: #333;
}

.form-control {
    width: 100%;
    height: 47px;
    padding: 10px 15px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #b2b4b5;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: #0d7377;
}

.form-control::placeholder {
    color: #a1a9ae;
}

.form-control.error {
    border-color: #f44843;
}

/* Validation error on tile groups */
.form-group.has-error .tiles li > span {
    border-color: #f44843;
}

.form-group.has-error .form-control {
    border-color: #f44843;
}

/* Select */
select.form-control {
    appearance: none;
    background: #fff 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='%23333' d='M6 8L1 3h10z'/%3e%3c/svg%3e") no-repeat right 15px center;
    padding-right: 40px;
}

/* Radio Buttons */
.radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.radio-group input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #0d7377;
}

/* Grid for Name Fields */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 520px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-login {
    background: #0d7377;
    color: #fff;
    border: 1px solid #0d7377;
    height: 47px;
}

.btn-login:hover {
    background: #0d7377;
    border-color: #0d7377;
}

/* Login Action Row */
.login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.form-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
}

.form-links a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.form-links a:hover {
    color: #0d7377;
}

.btn-login-small {
    background: #0d7377;
    color: #fff;
    border: none;
    padding: 10px 30px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-login-small:hover {
    background: #0d7377;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}

.form-footer a {
    color: #333;
    text-decoration: none;
}

.form-footer a:hover {
    color: #0d7377;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Error Text */
.error-text {
    color: #AE0E0A;
    font-size: 12px;
    margin-top: 5px;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    text-align: center;
    font-size: 14px;
    color: #737373;
}

.footer-copyright {
    margin-bottom: 5px;
}

.footer-links a {
    color: #737373;
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    color: #0d7377;
}

@media (max-width: 520px) {
    .footer {
        font-size: 10px;
    }
}

/* Provider Cards */
.provider-grid {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 20px auto;
    list-style: none;
    padding: 0;
}

.provider-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25%;
    max-width: 230px;
    padding: 30px 0px;
    border: 1px solid #b2b4b5;
    margin-right: 20px;
    background-color: #fff;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.provider-card:last-child {
    margin-right: 0;
}

.provider-card img {
    max-width: 160px;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.provider-card:hover {
    background-color: #fafafa;
}

.provider-card[data-provider="telekom"]:hover {
    background-color: #e5007e;
}

.provider-card[data-provider="congstar"]:hover {
    background-color: #000;
}

.provider-card[data-provider="vodafone"]:hover {
    background-color: #e53722;
}

.provider-card[data-provider="o2"]:hover {
    background-color: #002d72;
}

.provider-card:hover img {
    filter: brightness(0) invert(1);
}

/* Avatar (Initialen) */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.avatar::after {
    content: attr(data-initials);
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 11px;
    margin-left: 6px;
}

.avatar-md {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

/* Internal Header (logged in) */
.internal-header {
    background: #fff;
    border-top: 5px solid #0d7377;
    box-shadow: 0 2px 10px 1px rgba(0, 0, 0, 0.1);
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.internal-header .logo {
    height: 35px;
}

.internal-header .nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.internal-header .shop-name {
    font-weight: 600;
    color: #333;
    margin-right: 8px;
}

.nav-shop-logo {
    height: 28px;
    width: auto;
    vertical-align: middle;
}

.nav-separator {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: #ddd;
    vertical-align: middle;
    margin: 0 8px;
}

.nav-bell {
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    padding: 4px;
    position: relative;
    vertical-align: middle;
    transition: color 0.2s;
}

.nav-bell:hover {
    color: #333;
}

.nav-bell-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #dc2626;
    border-radius: 50%;
    border: 2px solid #fff;
}

.nav-user-icon {
    vertical-align: middle;
    color: #888;
    margin-right: 4px;
}

.internal-header .user-menu {
    position: relative;
}

.internal-header .user-menu-toggle {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.internal-header .user-menu-toggle:hover {
    color: #0d7377;
}

.internal-header .user-menu-toggle:hover .nav-user-icon {
    color: #0d7377;
}

.internal-header .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    display: none;
}

.internal-header .dropdown-menu.show {
    display: block;
}

.internal-header .dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
}

.internal-header .dropdown-menu a:hover {
    background: #f5f5f5;
    color: #0d7377;
}

/* Internal Content */
.internal-content {
    padding: 30px;
    min-height: calc(100vh - 70px - 50px);
}

.internal-content h1 {
    font-size: 28px;
    font-weight: 400;
    margin-bottom: 30px;
    text-align: center;
}

/* Internal Footer */
.internal-footer {
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #737373;
    border-top: 1px solid #eee;
}

.internal-footer a {
    color: #737373;
    text-decoration: none;
    margin: 0 10px;
}

.internal-footer a:hover {
    color: #0d7377;
}

.footer-version {
    float: left;
    color: #999;
    font-size: 11px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    justify-content: center;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #0d7377;
}

.breadcrumb-sep {
    color: #999;
}

.breadcrumb-current {
    font-weight: 600;
}

/* Tile System */

/* Large tiles with SVG icons (Kundenart) */
.tile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 13px 0;
}

.tile-row {
    list-style: none;
    padding: 13px 0;
    margin: 0;
    display: flex;
}

.tile-col {
    flex: 0 0 50%;
    padding: 0 15px 0 0;
}

.tile {
    display: block;
    border: 1px solid #b2b4b5;
    padding: 12px 10px 22px;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    width: 100%;
    text-decoration: none;
    color: #333;
}

.tile:hover {
    color: #333;
}

.tile svg {
    width: 35%;
}

.tile small {
    display: block;
    font-size: 22px;
}

/* Text tiles (Anrede, Formular, etc.) */
.tiles {
    list-style: none;
    padding: 5px 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
}

.tiles li {
    padding: 5px 5px 5px 0;
}

.tiles li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b2b4b5;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
    background-color: #fff;
    width: 100%;
    min-height: 47px;
}

.tiles li:hover > span {
    background-color: #fafafa;
}

.tiles li.active > span {
    background-color: #f0f0f0;
}

/* Tile column counts */
.tiles-1 li { flex: 1; }
.tiles-2 li { flex: 0 0 50%; }
.tiles-3 li { flex: 0 0 33.333%; }
.tiles-4 li { flex: 0 0 25%; }
.tiles-6 li { flex: 0 0 16.666%; }

/* Tile flex layout (Anrede + Titel toggle on same row) */
.tile-flex {
    display: flex;
    gap: 0;
}

.tile-flex .flex-1 { flex: 1; }
.tile-flex .flex-2 { flex: 2; }

/* Email/Offer form - 2-column layout */
.email-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Floating Reset-Button */
.formular-reset {
    position: fixed;
    top: 250px;
    left: 0;
    z-index: 100;
    padding: 10px 10px 7px;
    background: #ddd;
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    color: #333;
    transition: background 0.2s;
}

.formular-reset:hover {
    background: #ccc;
}

.formular-reset::after {
    content: 'Formular zurücksetzen';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: #333;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s;
}

.formular-reset:hover::after {
    opacity: 1;
}

/* Basis-Bereich: halbe Breite (wie eine Spalte) */
.email-basis {
    width: 50%;
}

.email-columns {
    display: flex;
    gap: 0;
}

.email-col {
    flex: 0 1 50%;
    max-width: 50%;
    min-width: 0;
}

/* Rechte Spalte: visueller Abstand */
.email-col + .email-col {
    padding-left: 20px;
    margin-left: 10px;
}

.block-label {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
}

/* +/- Zieltarif / Tarifangaben Toggle-Buttons */
.zieltarif-toggle-icon {
    font-weight: bold;
    font-size: 16px;
    margin-right: 4px;
}

/* +/- Zieltarif Toggle: 1/4 breit, rechtsbündig */
.zt-toggle-row {
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.zt-toggle-row .tiles {
    width: 50%;
}

/* Toggle-Button: aktiv = − Zieltarif */
.zt-active > span {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
    color: #666 !important;
}

.zt-active > span:hover {
    background-color: #eee !important;
    border-color: #999 !important;
}

.email-container .form-group {
    margin-bottom: 0;
    margin-top: 15px;
}

.email-container .control-label {
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    margin: 0 0 5px 0;
}

.email-container .field-row {
    padding: 5px 10px 5px 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 4px;
    width: 1000px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0 5px;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 15px 20px 20px;
}

.modal-tiles {
    flex-wrap: wrap;
}

/* Rahmenvertrag tiles: Code + Prozent zweizeilig */
.modal-tiles li > span {
    flex-direction: column;
}

/* Eskalation-RV Hervorhebung (nur bei NV) */
.rv-eskalation-active > span {
    border-color: #e5007e !important;
    border-width: 2px !important;
}

.rv-eskalation-label {
    display: none;
    font-size: 10px;
    color: #e5007e;
    margin-top: 2px;
}

.rv-eskalation-active .rv-eskalation-label {
    display: block;
}

.rv-tile-prozent {
    font-size: 12px;
    font-weight: normal;
}

/* Rahmenvertrag button */
.rv-btn-content {
    flex-direction: column;
}

#btn-rahmenvertrag-label,
#block-1-2-rv-label {
    font-size: 16px;
}

#btn-rahmenvertrag-info,
#block-1-2-rv-info {
    font-weight: normal;
    font-size: 13px;
    padding-top: 2px;
}

.modal-divider {
    border: none;
    border-top: 1px solid #ddd;
    margin: 10px 0 15px;
}

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

.input-affix {
    display: flex;
    align-items: center;
    border: 1px solid #b2b4b5;
    background: #fff;
    height: 42px;
    padding: 0 12px;
    min-width: 180px;
}

.input-affix input {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    flex: 1;
    min-width: 0;
    padding: 0;
}

.input-prefix,
.input-suffix {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    flex-shrink: 0;
}

.input-prefix {
    margin-right: 4px;
}

.input-suffix {
    margin-left: 4px;
}

.btn-modal-submit {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: #fff;
    color: var(--provider-color, #e20074);
    border: 1px solid var(--provider-color, #e20074);
    border-radius: 4px;
    cursor: pointer;
    height: 42px;
}

.btn-modal-submit:hover {
    background: var(--provider-color, #e20074);
    color: #fff;
}

/* Tariflinie Modal */
.modal-tariflinie {
    width: 1170px;
}

.tl-provider-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.tl-provider-tab {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #999;
    transition: color 0.15s, border-color 0.15s;
}

.tl-provider-tab:hover {
    color: #333;
}

.tl-provider-tab.active {
    font-weight: 600;
}

.tl-kundenart-tabs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.tl-kundenart-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100px;
    padding: 8px 0;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s;
}

.tl-kundenart-tab small {
    font-size: 10px;
    font-weight: 600;
}

.tl-kundenart-tab svg {
    display: block;
    width: 32px;
    height: 32px;
}

.tl-kundenart-tab:hover {
    border-color: #999;
}

.tl-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.tl-legend {
    font-size: 13px;
    line-height: 1.8;
}

.tl-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
}

.tl-search input {
    height: 36px;
    width: 200px;
    font-size: 14px;
    font-family: inherit;
    padding: 0 10px;
    border: 1px solid #b2b4b5;
    outline: none;
}

/* Status-Icons (reines CSS) */
.tl-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    line-height: 1;
}

.tl-icon-aktiv {
    background: #28a745;
}
.tl-icon-aktiv::after {
    content: '\2713';
    color: #fff;
    font-size: 11px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tl-icon-reaktiv {
    background: #f0a500;
}
.tl-icon-reaktiv::after {
    content: '!';
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tl-icon-eingestellt {
    background: #dc3545;
}
.tl-icon-eingestellt::after {
    content: '\00d7';
    color: #fff;
    font-size: 13px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tl-icon-achtung {
    background: #dc3545;
    border: 2px solid #dc3545;
}
.tl-icon-achtung::after {
    content: '!';
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.tl-icon-info {
    background: #17a2b8;
}
.tl-icon-info::after {
    content: 'i';
    color: #fff;
    font-size: 11px;
    font-style: italic;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Tarifgruppe-Überschrift */
.tl-gruppe-heading {
    font-size: 20px;
    font-weight: 600;
    margin: 25px 0 10px;
}

.tl-content > .tl-gruppe-heading:first-child,
.tl-content > .tl-grid:first-child {
    margin-top: 0;
}

/* 2-Spalten Grid */
.tl-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-flow: dense;
    gap: 0 20px;
}

/* Kategorie-Sektion */
.tl-category {
    margin-bottom: 15px;
}

.tl-category-heading {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px;
}

/* Items */
.tl-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tl-item {
    margin-bottom: 4px;
}

.tl-item.tl-collapsed {
    display: none;
}

.tl-item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #b2b4b5;
    padding: 8px 10px;
    cursor: pointer;
    background: #fff;
    min-height: 40px;
    font-size: 14px;
    font-weight: bold;
}

.tl-item-content:hover {
    background: #f5f5f5;
}

.tl-item-icons {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.tl-item-name {
    flex: 1;
}

/* +/- Buttons */
.tl-controls {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.tl-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #b2b4b5;
    background: #fff;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
}

.tl-btn:hover:not(:disabled) {
    background: #f0f0f0;
}

.tl-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.tl-btn-plus {
    border-color: var(--provider-color, #e20074);
    color: var(--provider-color, #e20074);
}

/* Sub-Selection Tiles (Generation, Größe/ATK, Tarif) — generisch für alle Blöcke */
.sub-selection-area .tiles,
.email-sync-row .tiles-4 {
    flex-wrap: wrap;
}

.sub-selection-area .tiles li > span,
.email-sync-row .tiles-4 li > span {
    flex-direction: column;
    gap: 2px;
}

/* Sub-Tiles (Größe, Generation) brauchen vertikales Stacking */
.tiles li > span:has(.sub-tile-volume),
.tiles li > span:has(.sub-tile-preis) {
    flex-direction: column;
}

/* Tarif-Tiles (mit Preis) gleiche Höhe in jeder Zeile */
.tiles-4 li > span:has(.sub-tile-preis) {
    min-height: 90px;
}

.sub-tile-label {
    line-height: 1.3;
}

.sub-tile-volume {
    font-size: 11px;
    font-weight: normal;
    color: #888;
    line-height: 1.2;
}

/* Provider-farbige aktive Tiles in Sub-Selection und Tarif-Sync-Rows (alle Blöcke) */
.sub-selection-area .tiles li.active > span,
.email-sync-row .tiles-4 li.active > span {
    color: #fff;
    font-weight: bold;
}

.sub-selection-area .tiles li.active .sub-tile-volume,
.sub-selection-area .tiles li.active .sub-tile-preis,
.email-sync-row .tiles-4 li.active .sub-tile-volume,
.email-sync-row .tiles-4 li.active .sub-tile-preis {
    color: rgba(255, 255, 255, 0.85);
}

/* Gleiche Höhe für Auswahl-Tarif Tiles (alle Blöcke) */
.sub-selection-area .tiles li > span:has(.sub-tile-preis),
.email-sync-row .tiles-4 li > span:has(.sub-tile-preis) {
    min-height: 90px;
}

/* Auswahl Tarif Tiles (Preis, Doppeltarifung, Multiplikation) */
.sub-tile-preis {
    font-size: 12px;
    font-weight: normal;
    color: #666;
    margin-top: 2px;
}

.at-doppel > span {
    border-style: dashed !important;
}

.at-multi-tile > span {
    cursor: default;
    gap: 4px;
    position: relative;
}

.at-multi-info {
    position: absolute;
    top: 4px;
    right: 4px;
}

.at-multi-input input {
    width: 50px;
    height: 28px;
    text-align: center;
    font-size: 18px;
    font-family: inherit;
    font-weight: bold;
    border: none;
    outline: none;
    padding: 0;
    background: transparent;
}

.at-multi-label-row {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Ausgangstarif-Button mit Tarif-Info */
.at-btn-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin: -8px 0;
}

.at-btn-icons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    flex-shrink: 0;
}

.at-btn-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    flex: 1;
}

.at-btn-name {
    font-size: 14px;
    font-weight: bold;
}

.at-btn-preis {
    font-size: 13px;
    font-weight: normal;
    color: #555;
}

/* ── Quickrbox ── */

.qb-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1100;
    pointer-events: none;
}

.qb-popup {
    position: fixed;
    pointer-events: auto;
    background: #f5f5f5;
    border-radius: 8px;
    border: 1px solid #bbb;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    width: 520px;
    max-width: calc(100vw - 80px);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
    transition: width 0.2s;
}

/* Dreieck mit Rahmen */
.qb-popup::before,
.qb-popup::after {
    content: '';
    position: absolute;
    left: -11px;
    width: 0;
    height: 0;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    border-right: 11px solid #bbb;
    top: 7px;
}
.qb-popup::after {
    left: -10px;
    border-right-color: #e8e8e8;
    border-top-width: 11px;
    border-bottom-width: 11px;
    border-right-width: 10px;
    top: 8px;
}
/* Kein Pfeil: Modal-Modus oder geklemmt */
.qb-popup.qb-modal::before,
.qb-popup.qb-modal::after,
.qb-popup.qb-no-arrow::before,
.qb-popup.qb-no-arrow::after {
    display: none;
}

/* Modal-Modus (+): zentriert, Viewport mit Rand */
.qb-popup.qb-modal {
    left: 3vw !important;
    top: 3vh !important;
    width: 94vw;
    height: 94vh;
    max-width: none;
    max-height: none;
    border-radius: 10px;
}

.qb-popup.qb-modal .qb-inline-pdf,
.qb-popup.qb-modal .qb-inline-video {
    height: calc(94vh - 130px);
}

.qb-popup.qb-modal .qb-body {
    flex: 1;
    overflow-y: auto;
}

.qb-popup.qb-modal .qb-resize {
    display: none;
}

.qb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #e8e8e8;
    border-radius: 8px 8px 0 0;
}

.qb-title {
    font-size: 15px;
    font-weight: 600;
    color: #0d7377;
}

.qb-header-actions {
    display: flex;
    gap: 8px;
}

.qb-header-actions button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    line-height: 1;
    padding: 0 4px;
}

.qb-header-actions button:hover {
    color: #333;
}

.qb-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    background: #fff;
    padding: 0 10px;
    gap: 2px;
}

.qb-tab {
    padding: 8px 12px;
    border: none;
    background: none;
    font-size: 13px;
    cursor: pointer;
    color: #333;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.qb-tab:hover {
    color: #0d7377;
}

.qb-tab.active {
    color: #0d7377;
    border-bottom-color: #0d7377;
    font-weight: 600;
}

.qb-tab.qb-disabled {
    color: #ccc;
    cursor: default;
    pointer-events: none;
}

.qb-body {
    padding: 15px;
    overflow-y: auto;
    flex: 1;
    min-height: 120px;
}

.qb-pane {
    display: none;
}

.qb-pane.active {
    display: block;
}

.qb-pane img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.qb-popup.qb-modal .qb-pane img {
    max-height: calc(94vh - 130px);
}

.qb-inline-pdf {
    width: 100%;
    height: 300px;
    border: none;
}

.qb-inline-video {
    width: 100%;
    height: 300px;
    border: none;
}

.qb-yt-link {
    display: block;
    position: relative;
    max-width: 480px;
    border-radius: 6px;
    overflow: hidden;
}

.qb-yt-thumb {
    width: 100%;
    display: block;
}

.qb-yt-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: #fff;
    background: rgba(0,0,0,0.6);
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px;
}

.qb-yt-link:hover .qb-yt-play {
    background: rgba(220,0,0,0.85);
}

.qb-pane .qb-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.qb-pane .qb-pdf-link:hover {
    border-color: #0d7377;
    color: #0d7377;
}

.qb-loading {
    color: #999;
    font-style: italic;
}

.qb-info-text {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.qb-empty {
    color: #bbb;
    font-style: italic;
}

.qb-no-info {
    color: #333;
    font-size: 14px;
}

/* ── Optionen-Modal ── */

.opt-modal {
    max-width: 95vw;
    width: 1200px;
}

.opt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.opt-header h3 {
    margin: 0;
    font-size: 18px;
}

.opt-header-center {
    font-size: 16px;
    font-weight: bold;
}

.opt-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.opt-btn-submit {
    padding: 8px 20px;
    border: none;
    background-color: #ccc;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.opt-btn-submit:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.opt-legende {
    padding: 10px 20px;
    text-align: center;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #eee;
    line-height: 2;
}

.opt-legende .tl-icon {
    margin-right: 2px;
}

.opt-icon-popup {
    cursor: help;
}

.opt-search-row {
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
}

.opt-search-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

.opt-search-input:focus {
    outline: none;
    border-color: #999;
}

.opt-body {
    padding: 10px 20px 20px;
    overflow-y: auto;
    max-height: calc(80vh - 160px);
}

/* Zwei-Spalten Gruppen-Layout */
.opt-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 20px;
    align-items: start;
}

.opt-gruppe-header {
    font-size: 15px;
    font-weight: bold;
    margin: 0 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.opt-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.opt-tile {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    padding: 2px 8px;
    cursor: pointer;
    background: #fff;
    min-height: 32px;
    transition: border-color 0.15s;
    gap: 8px;
}

.opt-tile:hover {
    border-color: #999;
}

.opt-tile.opt-active {
    border-width: 2px;
    padding: 1px 7px;
}

.opt-tile.opt-hidden,
.opt-tile.opt-search-hidden {
    display: none;
}

.opt-tile-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    width: 18px;
}


.tl-icon-achtung-disabled {
    background: #999;
    border-color: #999;
    opacity: 0.35;
    cursor: not-allowed;
}

.tl-icon-info-disabled {
    opacity: 0.4;
}

/* Quickrbox-Trigger */
.qb-trigger-info {
    cursor: pointer;
}

.opt-tile-name {
    flex: 1;
    font-size: 13px;
}

.opt-tile-preis {
    flex-shrink: 0;
    text-align: right;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    min-width: 80px;
}

.opt-tile-preis:hover {
    text-decoration: underline;
}

.opt-preis-value.opt-preis-custom {
    font-weight: bold;
    color: #e2007a;
}

.opt-preis-edit {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.opt-preis-input {
    width: 70px;
    padding: 3px 6px;
    border: 1px solid #ccc;
    font-size: 13px;
    text-align: right;
}

.opt-preis-ok {
    padding: 3px 10px;
    border: none;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

/* Opt-Collapsed (expand/collapse per group) */
.opt-tile.opt-collapsed {
    display: none;
}

.opt-controls {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 6px;
}
.opt-controls .tl-btn {
    width: 22px;
    height: 22px;
    font-size: 13px;
}

/* Opt-Popup (Info/Achtung overlay) */
.opt-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    pointer-events: none;
}

.opt-popup-content {
    pointer-events: auto;
    position: fixed;
    background: #fff;
    border: 2px solid #999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    padding: 12px 36px 12px 14px;
    font-size: 13px;
    line-height: 1.5;
    max-width: 400px;
    min-width: 200px;
    z-index: 2001;
}

.opt-popup-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
}

.opt-popup-close:hover {
    color: #333;
}

/* Selected options list */
.opt-selected-list {
    margin: 8px 0 0 0;
    padding: 0 0 0 12px;
    font-size: 15px;
    line-height: 1.8;
    list-style: none;
    counter-reset: opt-list;
}

.opt-selected-list li {
    padding: 0;
    counter-increment: opt-list;
}

.opt-selected-list li::before {
    content: counter(opt-list) '. ';
    display: inline;
    font-weight: normal;
    min-width: 20px;
}

.opt-selected-item-preis {
    color: #666;
}

.opt-selected-item-inkl {
    color: #28a745;
    font-size: 12px;
}

.opt-selected-item-info {
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

/* tl-icon mit data-tooltip: kein CSS-Tooltip, nutzt JS-Popup stattdessen */
.tl-icon[data-tooltip] {
    cursor: help;
}

/* Eigene Option Tile */
.opt-eigene-tile {
    border-style: dashed !important;
    justify-content: center;
}

.opt-eigene-input {
    flex: 1;
}

.opt-eigene-input input {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 13px;
    padding: 2px 4px;
    background: transparent;
}

/* ── Endgeräte-Modal ── */

.eg-modal {
    max-width: 95vw;
    width: 1200px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative;
}

.eg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.eg-header h3 {
    margin: 0;
    font-size: 18px;
}

.eg-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.eg-copy-btn {
    padding: 5px 12px;
    font-size: 12px;
    border: 1px solid #ccc;
    background: #fff;
    color: #555;
    cursor: pointer;
    border-radius: 3px;
}

.eg-copy-btn:hover {
    border-color: #999;
    color: #333;
}

.eg-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.eg-btn-submit {
    padding: 10px 28px;
    border: none;
    background-color: var(--provider-color, #e20074);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    border-radius: 3px;
}

.eg-btn-submit:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    background-color: #ccc;
}

/* ── Selected Slots (oben) ── */

.eg-selected-area {
    padding: 15px 20px;
    border-bottom: 2px solid #eee;
    background: #f7f7f7;
}

.eg-slots {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 2px 4px 2px;
}

.eg-slot {
    width: 160px;
    min-height: 160px;
    border: 2px dashed #d0d0d0;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    flex-shrink: 0;
    position: relative;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.eg-slot.filled {
    border-style: solid;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.eg-slot-nr {
    font-size: 22px;
    font-weight: bold;
    color: #ddd;
}

.eg-slot-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    background: #e44;
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    z-index: 1;
}

.eg-slot-remove:hover {
    background: #c33;
}

.eg-slot-img {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}

.eg-slot-name {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    max-width: 150px;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}

.eg-slot-preis {
    font-size: 14px;
    font-weight: normal;
    color: var(--provider-color, #e20074);
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* ── Navigation (Kategorie-Tabs + Marge + Suche) ── */

.eg-nav {
    border-bottom: 1px solid #eee;
}

.eg-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
}

.eg-kat-tabs {
    display: flex;
    gap: 4px;
}

.eg-kat-tab {
    padding: 5px 14px;
    font-size: 13px;
    font-weight: bold;
    color: #777;
    cursor: pointer;
    border: 1px solid transparent;
    background: none;
    transition: all 0.15s;
}

.eg-kat-tab:hover {
    color: #333;
    background: #f5f5f5;
}

.eg-kat-tab.active {
    color: #333;
    border-color: #ccc;
    background: #f0f0f0;
}

.eg-marge-area {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
}

.eg-marge-label {
    color: #777;
    font-weight: bold;
}

.eg-marge-input {
    width: 65px;
    padding: 3px 6px;
    border: 1px solid #ccc;
    font-size: 13px;
    text-align: right;
}

.eg-marge-input:focus {
    outline: none;
    border-color: #999;
}

.eg-search-row {
    padding: 6px 20px 8px;
}

.eg-search-input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #ccc;
    font-size: 13px;
    box-sizing: border-box;
}

.eg-search-input:focus {
    outline: none;
    border-color: #999;
}

/* ── Browse-Bereich (Sidebar + Content) ── */

.eg-browse {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.eg-sidebar {
    width: 160px;
    min-width: 160px;
    border-right: 1px solid #eee;
    overflow-y: auto;
    background: #fafafa;
    padding: 5px 0;
}

.eg-sidebar-item {
    padding: 8px 15px;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.12s;
}

.eg-sidebar-item:hover {
    background: #f0f0f0;
    color: #333;
}

.eg-sidebar-item.active {
    background: #fff;
    color: #333;
    border-left-color: var(--provider-color, #e20074);
}

.eg-main {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ── Modell-Tiles ── */

.eg-modell-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.eg-modell-tile {
    padding: 8px 16px;
    border: 2px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    transition: all 0.12s;
}

.eg-modell-tile:hover {
    border-color: #aaa;
    color: #333;
}

.eg-modell-tile.active {
    border-color: var(--provider-color, #e20074);
    color: #333;
    background: #fff;
}

/* ── Varianten-Grid ── */

.eg-varianten-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.eg-var-tile {
    border: 2px solid #e0e0e0;
    padding: 8px;
    cursor: pointer;
    background: #fff;
    transition: border-color 0.12s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.eg-var-tile:hover {
    border-color: #aaa;
}

.eg-var-tile.selected {
    border-color: var(--provider-color, #e20074);
    border-width: 2px;
}

.eg-var-img {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 5px;
}

.eg-var-bild {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}

.eg-slot-bild {
    max-width: 70px;
    max-height: 70px;
    object-fit: contain;
}

.eg-var-placeholder {
    display: block;
    width: 60px;
    height: 70px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 8px;
    position: relative;
}

.eg-var-placeholder::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;
}

.eg-var-check {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    background: var(--provider-color, #e20074);
    color: #fff;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
}

.eg-var-info {
    width: 100%;
}

.eg-var-name {
    font-size: 12px;
    font-weight: bold;
    line-height: 1.3;
    color: #333;
}

.eg-var-speicher {
    font-size: 11px;
    color: #888;
    margin-top: 1px;
}

.eg-var-preis {
    font-size: 14px;
    font-weight: normal;
    color: var(--provider-color, #e20074);
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* Doppeltarif: Zwei Preise untereinander */
.eg-var-preis-doppel {
    line-height: 1.4;
}
.eg-var-preis-doppel span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.4px;
}

/* Slots bei Doppeltarif */
.eg-slot-preis-doppel {
    line-height: 1.4;
}
.eg-slot-preis-doppel span {
    display: block;
    font-size: 12px;
    letter-spacing: 0.4px;
}

.eg-var-farben {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 5px;
}

.eg-var-farbe {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background-color: #999;
    cursor: pointer;
    transition: border-color 0.12s, transform 0.1s;
}

.eg-var-farbe:hover {
    transform: scale(1.2);
    border-color: #777;
}

.eg-var-farbe.active {
    border-color: #333;
    transform: scale(1.15);
}

/* Slot-Farbbubbles */
.eg-slot-farben {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
}

.eg-slot-farbe {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background-color: #999;
    cursor: pointer;
    transition: border-color 0.12s, transform 0.1s;
}

.eg-slot-farbe:hover {
    transform: scale(1.2);
    border-color: #777;
}

.eg-slot-farbe.active {
    border-color: #333;
    transform: scale(1.15);
}

/* Instant Farb-Tooltip */
.eg-farbe-tooltip {
    position: absolute;
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.08s;
}

.eg-farbe-tooltip.visible {
    opacity: 1;
}

/* ── Versteckte Daten ── */

.eg-data { display: none; }

/* ── Summary unter Button ── */

.eg-selected-summary {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
}

.eg-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 5px 2px 12px;
    font-size: 12px;
}

.eg-summary-name {
    color: #333;
    font-weight: normal;
    font-size: 15px;
    flex: 1;
}

.eg-summary-preis {
    color: var(--provider-color, #e20074);
    font-weight: normal;
    font-size: 15px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
    margin-left: 10px;
}

/* Doppeltarifung: 2-Spalten EG-Summary */
.eg-summary-header {
    display: flex;
    padding: 2px 5px 4px 0;
    font-size: 12px;
    font-weight: bold;
    color: #696969;
}
.eg-summary-header span:first-child { flex: 1; }
.eg-summary-header span:nth-child(2),
.eg-summary-header span:nth-child(3) { min-width: 80px; text-align: right; margin-left: 10px; }
/* Platz für ℹ-Icon rechts (gleiche Breite wie Icon-Spalte) */
.eg-summary-header::after { content: ''; width: 20px; flex-shrink: 0; }
.eg-summary-doppel .eg-summary-name { flex: 1; }
.eg-summary-doppel .eg-summary-preis { min-width: 80px; text-align: right; }

/* ── Bindefrist ── */
.bf-btn-wrap {
    margin-top: 8px;
}
.bf-detail-list {
    margin-top: 6px;
    padding-left: 12px;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}
.bf-modal {
    width: 440px;
    max-width: 95vw;
    display: flex;
    flex-direction: column;
}
.bf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 12px;
}
.bf-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.bf-body {
    padding: 12px 24px 20px;
}
.bf-info {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}
.bf-date-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.bf-date-row label {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
.bf-date-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.bf-date-input:focus {
    outline: none;
    border-color: var(--provider-color, #0d7377);
}
.bf-result {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    background: #f8f8f8;
    border: 1px solid #eee;
}
.bf-result .bf-ok { color: #2e7d32; font-weight: 600; }
.bf-result .bf-warn { color: #e65100; font-weight: 600; }
.bf-result .bf-date { color: var(--provider-color, #0d7377); font-weight: 600; }
.bf-result .bf-err { color: #c62828; font-weight: 600; }
.bf-footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 24px;
    border-top: 1px solid #e0e0e0;
}
.bf-btn-submit {
    background: var(--provider-color, #0d7377);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.bf-btn-submit:hover { opacity: 0.9; }
.bf-btn-submit:disabled { opacity: 0.4; cursor: default; }

/* ── Preis-Check ── */
.pc-btn-wrap {
    margin-top: 8px;
}
.pc-tile {
    cursor: pointer;
}
.pc-modal {
    width: 800px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.pc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 16px;
}
.pc-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.pc-toolbar {
    display: flex;
    align-items: center;
    padding: 0 28px 18px;
    border-bottom: 1px solid #e0e0e0;
}
.pc-marge-area {
    display: flex;
    align-items: center;
    gap: 40px;
}
.pc-marge-group {
    display: flex;
    align-items: stretch;
}
.pc-marge-select {
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    width: 240px;
}
.pc-marge-select:focus {
    outline: none;
    border-color: var(--provider-color, #0d7377);
}
.pc-marge-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    margin-left: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #f5f5f5;
    cursor: pointer;
    color: #666;
    transition: background 0.15s, color 0.15s;
}
.pc-marge-toggle:hover {
    background: #e8e8e8;
}
.pc-marge-toggle.active {
    background: var(--provider-color, #0d7377);
    color: #fff;
    border-color: var(--provider-color, #0d7377);
}
.pc-marge-input-wrap {
    display: flex;
    align-items: center;
    width: 276px; /* gleich breit wie select+toggle */
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}
.pc-marge-input {
    flex: 1;
    padding: 7px 12px;
    border: none;
    font-size: 14px;
    text-align: left;
    outline: none;
}
.pc-marge-input:focus {
    box-shadow: inset 0 0 0 1px var(--provider-color, #0d7377);
}
.pc-marge-suffix {
    padding: 7px 12px 7px 0;
    font-size: 14px;
    color: #888;
}
.pc-marge-mode-btn {
    background: none;
    border: 1px solid #ccc;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    transition: border-color 0.15s, color 0.15s;
}
.pc-marge-mode-btn:hover {
    border-color: var(--provider-color, #0d7377);
    color: var(--provider-color, #0d7377);
}
.pc-body {
    padding: 24px 28px;
    overflow-y: auto;
    flex: 1;
}
.pc-table-wrap {
    transition: opacity 0.15s ease;
}
.pc-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}
.pc-error {
    text-align: center;
    padding: 40px;
    color: #c62828;
    font-size: 14px;
}
.pc-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 28px;
    border-top: 1px solid #e0e0e0;
}
.pc-btn-submit {
    background: var(--provider-color, #0d7377);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.pc-btn-submit:hover {
    opacity: 0.9;
}
.pc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.pc-table thead {
    background: #f8f8f8;
}
.pc-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #e0e0e0;
}
.pc-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.pc-table th.pc-th-vk, .pc-table td.pc-td-vk,
.pc-table th.pc-th-marge, .pc-table td.pc-td-marge {
    text-align: right;
    white-space: nowrap;
}
.pc-td-name {
    font-weight: 500;
}
.pc-vk-select {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    text-align: right;
    background: #fff;
    cursor: pointer;
    min-width: 110px;
}
.pc-vk-select:focus {
    outline: none;
    border-color: var(--provider-color, #0d7377);
}
.pc-td-marge.green { color: #2e7d32; font-weight: 600; }
.pc-td-marge.orange { color: #e65100; font-weight: 600; }
.pc-td-marge.red { color: #c62828; font-weight: 600; }
.pc-override .pc-vk-select {
    border-color: var(--provider-color, #0d7377);
    background: #f0fafa;
    font-weight: 600;
}
.pc-vk-reset {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    margin-right: 8px;
    vertical-align: middle;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pc-vk-reset:hover {
    background: #f0fafa;
    border-color: var(--provider-color, #0d7377);
    color: var(--provider-color, #0d7377);
}
.pc-table tbody tr:hover {
    background: #fafafa;
}

/* ── EG-Info Modal ── */
.egi-modal {
    max-width: 500px;
}

.egi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #ddd;
}

.egi-header h3 {
    margin: 0;
    font-size: 16px;
}

.egi-body {
    padding: 15px 20px;
}

.egi-device-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #333;
}

.egi-input-area {
    margin-top: 10px;
}

.egi-input-area .form-control {
    margin-top: 4px;
}

.egi-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.egi-footer .btn-submit {
    padding: 10px 28px;
    border: none;
    background-color: var(--provider-color, #e20074);
    color: #fff;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    border-radius: 3px;
}

.egi-footer .btn-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* EG-Summary: klickbare Zeilen + Markierung-Vorschau */
.eg-summary-item {
    cursor: pointer;
}

.eg-summary-item:hover {
    background: color-mix(in srgb, var(--provider-color, #0d7377) 8%, white);
}

.eg-summary-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #17a2b8;
    color: #fff;
    font-size: 10px;
    font-style: italic;
    font-weight: bold;
    flex-shrink: 0;
    margin-left: 4px;
    cursor: pointer;
}

.eg-summary-markierung {
    font-size: 12px;
    padding: 1px 12px 3px;
    color: #555;
}

/* Preis-Check Rechenweg */
.pc-info-toggle {
    cursor: pointer;
}

.pc-info-toggle:hover {
    background: #f0f0f0;
}

.pc-toggle-icon {
    display: inline-block;
    width: 14px;
    font-size: 10px;
    color: #888;
}

.pc-rechenweg {
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 4px 0;
}

.pc-rw-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

.pc-rw-table td {
    padding: 2px 8px;
    white-space: nowrap;
}

.pc-rw-val {
    text-align: right;
    font-family: monospace;
    font-size: 12px;
}

.pc-rw-sep td {
    font-weight: 600;
    padding-top: 8px;
    color: #555;
}

.pc-rw-sum td {
    font-weight: 600;
    border-top: 1px solid #ccc;
    padding-top: 4px;
}

/* ── Aktion Modal ── */
.ak-btn-wrap {
    margin-top: 8px;
}
.ak-tile {
    cursor: pointer;
}
/* ak-tile.active nutzt Standard-Tile-Styling (.tiles li.active > span) */
.ak-detail-list {
    margin-top: 6px;
    padding-left: 12px;
    font-size: 15px;
    color: #555;
    line-height: 1.6;
}
.ak-detail-list div {
    padding: 2px 0;
}
.ak-modal {
    width: 560px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.ak-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 16px;
}
.ak-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}
.ak-body {
    padding: 8px 28px 24px;
    overflow-y: auto;
    flex: 1;
}
.ak-section {
    margin-bottom: 24px;
}
.ak-section + .ak-section {
    margin-top: 40px;
}
.ak-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}
.ak-buttons {
    display: flex;
    gap: 10px;
}
.ak-toggle-btn {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.ak-toggle-btn:hover {
    border-color: #bbb;
    background: #f8f8f8;
}
.ak-toggle-btn.active {
    border-color: var(--provider-color, #0d7377);
    background: var(--provider-color, #0d7377);
    color: #fff;
}
.ak-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ak-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    text-align: right;
    -moz-appearance: textfield;
}
.ak-input::-webkit-outer-spin-button,
.ak-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.ak-input:focus {
    outline: none;
    border-color: var(--provider-color, #0d7377);
}
.ak-input-suffix {
    font-size: 14px;
    color: #666;
}
.ak-select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    margin-left: 10px;
}
.ak-select:focus {
    outline: none;
    border-color: var(--provider-color, #0d7377);
}
.ak-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 28px;
    border-top: 1px solid #e0e0e0;
}
.ak-btn-submit {
    background: var(--provider-color, #0d7377);
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.ak-btn-submit:hover {
    opacity: 0.9;
}

/* Weiter-Button + Textvorlage */
.weiter-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.weiter-newtab-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #888;
    cursor: pointer;
    margin-right: 8px;
}

.btn-vorlage {
    padding: 10px 20px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid #ccc;
    background: #fff;
    color: #666;
}

.btn-vorlage:hover {
    border-color: var(--provider-color, #e20074);
    color: var(--provider-color, #e20074);
}

.btn-weiter {
    padding: 10px 30px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid var(--provider-color, #e20074);
    background: #fff;
    color: var(--provider-color, #e20074);
}

.btn-weiter:hover {
    background: var(--provider-color, #e20074);
    color: #fff;
}

.btn-weiter:disabled {
    border-color: #ccc;
    color: #ccc;
    cursor: default;
    background: #fff;
}

/* Bild-Modal */
.bild-modal {
    width: 800px;
    max-height: 93vh;
}

.bild-section {
    margin-top: 20px;
}

.bild-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
}

#bild-section-endgeraet {
    margin-top: 0;
}

#bild-grid-endgeraet {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
}

#bild-grid-endgeraet .bild-tile {
    min-width: 130px;
    flex-shrink: 0;
}

.bild-hr {
    border: none;
    border-top: 2px solid var(--provider-color, #e20074);
    margin: 0 0 15px;
}

.bild-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.bild-tile {
    width: 145px;
    cursor: pointer;
    border: 2px solid #ddd;
    padding: 8px;
    text-align: center;
    background: #fff;
}

.bild-tile:hover {
    border-color: #999;
}

.bild-tile.active {
    border-color: var(--provider-color, #e20074);
    box-shadow: 0 0 0 1px var(--provider-color, #e20074);
}

.bild-tile img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    display: block;
    margin-bottom: 6px;
}

.bild-tile-label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.bild-tile .bild-placeholder {
    width: 100%;
    height: 100px;
    margin-bottom: 6px;
}

.bild-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}

/* Settings Table (Team) */
.settings-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.settings-table th:last-child,
.settings-table td:last-child {
    min-width: 130px;
    width: 130px;
    text-align: right;
    white-space: nowrap;
}

.settings-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 4px;
    border-bottom: 2px solid #eee;
}

.settings-table td {
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.settings-table td:first-child,
.settings-table td:nth-child(2) {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.settings-table tbody tr:hover {
    background: #fafafa;
}

.settings-row-inactive td {
    color: #aaa;
}

.settings-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.settings-badge-active {
    background: #d4edda;
    color: #155724;
}

.settings-badge-inactive {
    background: #f0f0f0;
    color: #888;
}

.settings-badge-pending {
    background: #fff3cd;
    color: #856404;
}

.settings-table-actions {
    text-align: right;
    white-space: nowrap;
}

.settings-table-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    color: #666;
    margin-left: 4px;
    padding: 0;
}

.settings-table-btn:hover {
    background: #f5f5f5;
    border-color: #bbb;
}

.settings-table-btn-danger:hover {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.tooltip-btn {
    position: relative;
}

.tooltip-btn::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.tooltip-btn:hover::after {
    opacity: 1;
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* Tab-Hinweis im Dropdown-Menü */
.nav-tab-hint {
    display: inline-block;
    font-size: 9px;
    background: #0d7377;
    color: #fff;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hinweis für Mitarbeiter */
.settings-hint-banner {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
}

/* Banner auf Settings-Seite (aus Angebot kommend) */
.settings-tab-banner {
    background: #e8f5f5;
    border: 1px solid #0d7377;
    border-radius: 4px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #0d7377;
}

/* =========================================================================
   Einstellungen (Settings)
   ========================================================================= */

.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.settings-container-wide .settings-tabs,
.settings-container-wide .settings-section,
.settings-container-wide .settings-message,
.settings-container-wide .settings-tab-banner {
    max-width: none;
    width: calc(100% + 200px);
}

/* Tabs */
.settings-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #ddd;
    margin-bottom: 24px;
}

.settings-tab {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.settings-tab:hover {
    color: #333;
}

.settings-tab.active {
    color: #0d7377;
    border-bottom-color: #0d7377;
}

.settings-tab.disabled {
    color: #bbb;
    pointer-events: none;
}

/* Messages */
.settings-message {
    padding: 10px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
}

.settings-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.settings-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.settings-message-info {
    background: #e8f5f5;
    color: #0d7377;
    border: 1px solid #b8dfe0;
}

/* Sections */
.settings-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
}

.settings-refresh-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    padding: 0;
    margin-left: auto;
    position: relative;
    transition: border-color 0.2s, color 0.2s;
}

.settings-refresh-btn:hover {
    color: #0d7377;
    border-color: #0d7377;
    border-bottom: 1px solid #eee;
}

.settings-subsection-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin: 20px 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Form elements */
.settings-form-group {
    margin-bottom: 16px;
}

.settings-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    margin-bottom: 4px;
}

.settings-info-value {
    font-size: 15px;
    color: #333;
    padding: 8px 0;
}

.settings-form-group input[type="text"],
.settings-form-group input[type="email"],
.settings-form-group input[type="url"],
.settings-form-group input[type="password"],
.settings-form-group input[type="number"],
.settings-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.settings-form-group input:focus,
.settings-form-group select:focus {
    outline: none;
    border-color: #0d7377;
    box-shadow: 0 0 0 2px rgba(13, 115, 119, 0.1);
}

.settings-form-row {
    display: flex;
    gap: 16px;
}

.settings-form-row .settings-form-group {
    flex: 1;
}

.settings-form-row .flex-1 { flex: 1; }
.settings-form-row .flex-3 { flex: 3; }

/* Radio buttons */
.settings-radio-group {
    display: flex;
    gap: 20px;
}

.settings-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Checkbox */
.settings-checkbox {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Buttons */
.settings-btn-save {
    padding: 8px 24px;
    background: #0d7377;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-btn-save:hover {
    background: #0a5c5f;
}

.settings-btn-secondary {
    padding: 8px 24px;
    background: #fff;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.settings-btn-secondary:hover {
    background: #f5f5f5;
}

.settings-password-wrapper {
    position: relative;
}

.settings-password-wrapper input {
    padding-right: 36px;
}

.settings-password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
    display: none;
}

.settings-password-wrapper.has-value .settings-password-toggle {
    display: block;
}

.settings-password-toggle:hover {
    color: #555;
}

.settings-saved-hint {
    display: inline-flex;
    align-items: center;
    margin-left: 12px;
    color: #0d7377;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.5s;
    height: 100%;
}

/* Geänderte Felder (unsaved) */
.settings-field-changed {
    border-color: #e8a317 !important;
    box-shadow: 0 0 0 2px rgba(232, 163, 23, 0.15);
}

/* Readonly/gesperrte Felder */
.settings-form-group input[readonly],
.settings-form-group select[readonly] {
    background-color: #f0f0f0;
    color: #888;
    cursor: not-allowed;
    border-color: #ddd;
}

.settings-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

/* Errors */
.settings-errors {
    background: #f8d7da;
    color: #721c24;
    padding: 10px 16px;
    border-radius: 4px;
    margin-top: 12px;
    font-size: 13px;
}

.settings-errors p {
    margin: 4px 0;
}

/* Preview */
.settings-preview {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 16px;
    margin-top: 12px;
    font-size: 14px;
}

.settings-preview p {
    margin: 4px 0;
}

/* Upload */
.settings-upload-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.settings-upload-preview {
    margin: 8px 0;
}

.settings-upload-preview img {
    max-width: 200px;
    max-height: 80px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px;
}

/* Hints */
.settings-hint {
    font-size: 13px;
    color: #888;
    margin-top: 8px;
}

.settings-hint a {
    color: #0d7377;
}

/* Placeholder */
.settings-placeholder {
    color: #999;
    font-style: italic;
}

/* Modal */
.settings-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-modal {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 600px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.settings-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.settings-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.settings-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.settings-modal-close:hover {
    color: #333;
}

