/* Globale Variablen - KERP Dark Theme Basis (exakt nach Desktop-Drive Screenshot) */
:root {
    --bg-color: #171a21;          /* Haupt-Canvas Blaugrau */
    --header-bg: #111317;        /* Titelleiste & Sidebar Anthrazit */
    --card-bg: #1f232d;          /* Flächen & Kacheln */
    --card-hover: #262b37;
    --border: #2b303f;           /* Feine Konturen */
    --border-subtle: #222631;
    --primary: #0078d4;          /* Desktop Ordner- & Upload-Blau */
    --primary-hover: #0284c7;
    --primary-subtle: rgba(0, 120, 212, 0.15);
    --text-color: #ffffff;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --danger-border: rgba(239, 68, 68, 0.4);
    --success: #10b981;
    --menu-bg: #111317;
}

/* ── Streng eckige Geometrie ("alles eckig" nach Benutzervorgabe) ── */
button,
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.back-btn,
input,
select,
textarea,
.surface-card,
.surface-base,
.card,
.modal-panel,
.modal-content,
.dms-doc-card,
.photo-grid-tile,
.sh-item-card,
.faktura-cat-btn,
.sh-cat-btn,
.fixed-bottom-bar,
.badge,
[class*="badge-"],
.drawer-lang-btn,
#network-status,
#menu-btn,
#home-btn,
#side-menu,
.drawer-nav-item,
[class*="rounded"] {
    border-radius: 0 !important;
}

/* Spinner & Status-Dot Ausnahme: Kreisförmige Animation */
.spinner,
.css-spinner,
.net-dot,
[style*="border-radius:50%"],
[style*="border-radius: 50%"] {
    border-radius: 50% !important;
}

/* Light Theme Overrides */
:root[data-theme="light"] {
    --bg-color: #f8fafc;
    --text-color: #0f172a;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --menu-bg: #ffffff;
    --text-muted: #64748b;
    --text-faint: #475569;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* PWA spezifisch: Verhindert unbeabsichtigtes Markieren von Text und den Chrome-Pull-to-Refresh Effekt */
    user-select: none;
    -webkit-user-select: none;
    overscroll-behavior-y: none;
}

header {
    background: var(--card-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-btn {
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

header h1 {
    margin: 0;
    line-height: 1;
}

#network-status {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 0;
    font-weight: 600;
    transition: background 0.3s ease;
}
.status-online { background: rgba(16, 185, 129, 0.2); color: var(--success); }
.status-offline { background: rgba(239, 68, 68, 0.2); color: var(--danger); }
.status-syncing { background: rgba(59, 130, 246, 0.2); color: #3b82f6; }

main {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.card {
    background: var(--card-bg);
    border-radius: 0;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
    transition: transform 0.1s, opacity 0.2s;
    /* Große Klickfläche auf Mobilen Geräten */
}

.btn:active {
    transform: scale(0.98);
}

#data-box {
    margin-top: 15px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #94a3b8;
}

.empty-state {
    text-align: center;
    padding: 30px 10px;
    color: #64748b;
}

/* Modal Backend & Styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none; /* Hide by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.css-spinner {
    border: 5px solid rgba(255,255,255,0.1);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-content {
    background: var(--card-bg);
    width: 90%;
    max-width: 400px;
    border-radius: 0;
    padding: 20px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid var(--border);
}

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

.modal-header h3 {
    font-size: 1.1rem;
    color: #f8fafc;
}

.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.8rem;
    padding: 0 5px;
    cursor: pointer;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.form-control {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    color: var(--text-color);
    padding: 10px;
    border-radius: 0;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.sync-badge {
    background: var(--danger);
    color: white;
    padding: 2px 10px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: bold;
    display: none;
}

.sync-badge.active {
    display: inline-block;
    margin-bottom: 15px;
}

/* Side Menu */
.menu-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.side-menu {
    position: fixed;
    top: 0; left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--menu-bg);
    z-index: 210;
    box-shadow: 4px 0 15px rgba(0,0,0,0.2);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.side-menu.open {
    left: 0;
}

.menu-header {
    padding: env(safe-area-inset-top, 20px) 20px 20px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-header h2 {
    font-size: 1.2rem;
    color: var(--text-color);
}

.menu-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.menu-item {
    padding: 15px 0;
    font-size: 1.05rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 10px 0;
}

/* Toggle Switch Style */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

.slider.round {
    border-radius: 0;
}

.slider.round:before {
    border-radius: 0;
}

/* Responsive Table Styling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Flüssiges Scrollen auf iOS */
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 10px;
}

.data-table {
    width: 100%;
    min-width: 500px; /* Erzwingt Scrolling auf sehr schmalen Bildschirmen */
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-color);
    font-weight: 600;
}

.data-table td {
    color: #cbd5e1;
}

.data-table tbody tr {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Drilldown Specific Styling */
.grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 15px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 20px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
}

.grid-item:hover, .grid-item:active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.grid-item h3 {
    margin-bottom: 5px;
    font-size: 1rem;
}

.grid-item span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.grid-item:hover span {
    color: rgba(255,255,255,0.8);
}

/* Tablet Optimizations */
@media (min-width: 768px) {
    #report-dynamic-fields,
    .tablet-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    #report-dynamic-fields .form-group,
    .tablet-grid .form-group,
    .tablet-grid .flex-row {
        margin-bottom: 0 !important;
    }
    
    .grid-col-span-full {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1024px) {
    #report-dynamic-fields,
    .tablet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Systemhaus WebApp Styles - Eckig / Kein Radius */
.sh-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.6);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.sh-nav-tab:hover {
    color: #f1f5f9;
    background: rgba(31, 35, 45, 0.9);
    border-color: rgba(0, 120, 212, 0.4);
}
.sh-nav-tab.active {
    color: #ffffff;
    background: rgba(0, 120, 212, 0.2);
    border-color: #0078d4;
}

#page-systemhaus,
#page-systemhaus *:not(.spinner):not(.css-spinner),
#sh-customer-modal,
#sh-customer-modal *:not(.spinner):not(.css-spinner),
#sh-edit-modal,
#sh-edit-modal *:not(.spinner):not(.css-spinner),
#sh-pdf-modal,
#sh-pdf-modal *:not(.spinner):not(.css-spinner),
.sh-item-card,
.sh-cat-btn,
.sh-nav-tab,
.sh-btn-customer-modal-trigger,
.sh-customer-label-text {
    border-radius: 0 !important;
}

/* Photos Modal Viewer & Safe Area Support */
#photos-modal-viewer,
#photos-modal-viewer *:not(.spinner) {
    border-radius: 0 !important;
}

.photos-modal-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
    min-height: 52px !important;
    padding-left: max(env(safe-area-inset-left, 0px), 12px) !important;
    padding-right: max(env(safe-area-inset-right, 0px), 12px) !important;
    background: color-mix(in srgb, var(--card-bg, #1e1e24) 98%, transparent) !important;
    border-bottom: 1px solid var(--border, #2d2d35) !important;
    box-sizing: border-box !important;
}

@media (max-width: 767px) {
    .photos-modal-header {
        padding-top: calc(max(env(safe-area-inset-top, 0px), 44px) + 8px) !important;
        padding-bottom: 10px !important;
        min-height: calc(56px + max(env(safe-area-inset-top, 0px), 44px)) !important;
        align-items: flex-end !important;
    }
}

.photos-canvas-container {
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
}

#photo-canvas {
    touch-action: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-touch-callout: none !important;
    cursor: grab;
}

#photo-canvas.is-dragging {
    cursor: grabbing !important;
}

.photos-modal-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 8px !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 10px) !important;
    padding-left: max(env(safe-area-inset-left, 0px), 12px) !important;
    padding-right: max(env(safe-area-inset-right, 0px), 12px) !important;
    min-height: calc(48px + env(safe-area-inset-bottom, 0px)) !important;
    background: color-mix(in srgb, var(--card-bg, #1e1e24) 98%, transparent) !important;
    border-top: 1px solid var(--border, #2d2d35) !important;
    box-sizing: border-box !important;
}

.photo-zoom-group {
    height: 32px !important;
    background: var(--card-bg, #1e1e24) !important;
    border: 1px solid var(--border, #2d2d35) !important;
}

.photo-zoom-btn {
    height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    color: var(--text-muted, #94a3b8) !important;
    background: transparent !important;
}

.photo-zoom-btn:hover {
    color: var(--text-color, #f8fafc) !important;
    background: color-mix(in srgb, var(--card-bg, #1e1e24) 80%, white) !important;
}

.photo-zoom-btn:active {
    background: rgba(0, 120, 212, 0.2) !important;
}

#photo-zoom-reset:hover {
    color: #0078d4 !important;
    background: rgba(0, 120, 212, 0.15) !important;
}

/* ── Universal Fixed Bottom Bar across ALL WebApp Apps (Rock-solid against iOS viewport bottom) ── */
.fixed-bottom-bar,
#drive-bottom-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    z-index: 45 !important;
    background: color-mix(in srgb, #111317 98%, transparent) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid var(--border, #2b303f) !important;
    border-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-top: 10px !important;
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 12px) !important;
    padding-left: max(env(safe-area-inset-left, 0px), 12px) !important;
    padding-right: max(env(safe-area-inset-right, 0px), 12px) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.45) !important;
    box-sizing: border-box !important;
    transform: none !important;
    -webkit-transform: none !important;
}

body[data-theme="light"] .fixed-bottom-bar,
body[data-theme="light"] #drive-bottom-bar {
    background: rgba(255, 255, 255, 0.97) !important;
    border-top-color: var(--border, #e2e8f0) !important;
}

.fixed-bottom-bar > button,
.fixed-bottom-bar > a,
.fixed-bottom-bar > [type="button"],
.fixed-bottom-bar > .btn,
.fixed-bottom-bar > .back-btn,
.fixed-bottom-bar > [class*="btn-"],
#drive-bottom-bar > button {
    flex: 1 1 0% !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    min-height: 42px !important;
    border-radius: 0 !important;
}

button:not([class*="bg-"]):not([class*="btn-"]),
[type="button"]:not([class*="bg-"]):not([class*="btn-"]),
[type="reset"]:not([class*="bg-"]):not([class*="btn-"]),
[type="submit"]:not([class*="bg-"]):not([class*="btn-"]) {
    background-color: transparent;
}

.btn-warning {
    background-color: #d97706 !important;
    background: #d97706 !important;
    color: #ffffff !important;
    border: 1px solid #f59e0b !important;
    font-weight: 700 !important;
}

.btn-warning:active {
    background-color: #b45309 !important;
    background: #b45309 !important;
}

.btn-danger {
    background-color: #dc2626 !important;
    background: #dc2626 !important;
    color: #ffffff !important;
    border: 1px solid #ef4444 !important;
    font-weight: 700 !important;
}

.btn-danger:active {
    background-color: #b91c1c !important;
    background: #b91c1c !important;
}

.btn-success {
    background-color: #059669 !important;
    background: #059669 !important;
    color: #ffffff !important;
    border: 1px solid #10b981 !important;
    font-weight: 700 !important;
}

.btn-success:active {
    background-color: #047857 !important;
    background: #047857 !important;
}

/* ── DMS Detailansicht Tab-Leiste & Buttons ── */
.dms-tab-btn {
    background: transparent !important;
    background-color: transparent !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.dms-tab-btn:hover {
    background-color: rgba(51, 65, 85, 0.25) !important;
}

#dms-detail-tab-back {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(51, 65, 85, 0.7) !important;
    color: #cbd5e1 !important;
}

#dms-detail-tab-back:hover {
    background-color: rgba(51, 65, 85, 0.95) !important;
    color: #ffffff !important;
}

/* ── DMS Detailansicht Fullscreen Overlay (auf iPhone über .top-header & mit Notch Safe-Area) ── */
#dms-detail-modal {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100% !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    z-index: 10050 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--bg-color, #0b1329) !important;
}

#dms-detail-modal.active {
    display: flex !important;
    opacity: 1 !important;
    pointer-events: all !important;
}

#dms-detail-modal .modal-panel {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100% !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    transform: none !important;
    background: var(--bg-color, #0b1329) !important;
    display: flex !important;
    flex-direction: column !important;
}

#dms-detail-header {
    padding-top: 18px !important;
    padding-top: max(constant(safe-area-inset-top), 18px) !important;
    padding-top: max(env(safe-area-inset-top, 0px), 18px) !important;
    padding-left: 12px !important;
    padding-left: max(constant(safe-area-inset-left), 12px) !important;
    padding-left: max(env(safe-area-inset-left, 0px), 12px) !important;
    padding-right: 12px !important;
    padding-right: max(constant(safe-area-inset-right), 12px) !important;
    padding-right: max(env(safe-area-inset-right, 0px), 12px) !important;
    padding-bottom: 12px !important;
    min-height: 74px !important;
    min-height: calc(56px + env(safe-area-inset-top, 0px)) !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    background: #172033 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45) !important;
}

#dms-detail-tabs-bar {
    padding-left: max(env(safe-area-inset-left, 0px), 8px) !important;
    padding-right: max(env(safe-area-inset-right, 0px), 8px) !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    background: #101625 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* --- Anti-Autofill Protection (Suppress yellow/blue browser autofill backgrounds) --- */
#sh-edit-form input:-webkit-autofill,
#sh-edit-form input:-webkit-autofill:hover, 
#sh-edit-form input:-webkit-autofill:focus,
#sh-edit-form input:-webkit-autofill:active,
#sh-edit-form select:-webkit-autofill,
#sh-edit-form textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #1e293b inset !important;
    box-shadow: 0 0 0 1000px #1e293b inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0 !important;
    transition: background-color 50000s ease-in-out 0s !important;
}

/* --- Systemhaus HTML Notes & Rich-Text WYSIWYG Editor --- */
.systemhaus-note-html {
    font-size: 0.8rem;
    line-height: 1.6;
    color: #e2e8f0;
}
.systemhaus-note-html p {
    margin-bottom: 0.5rem;
}
.systemhaus-note-html p:last-child {
    margin-bottom: 0;
}
.systemhaus-note-html ul {
    list-style-type: disc;
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.systemhaus-note-html ol {
    list-style-type: decimal;
    padding-left: 1.25rem;
    margin: 0.5rem 0;
}
.systemhaus-note-html li {
    margin-bottom: 0.2rem;
}
.systemhaus-note-html h1, .systemhaus-note-html h2, .systemhaus-note-html h3, .systemhaus-note-html h4 {
    font-weight: 700;
    color: #ffffff;
    margin: 0.75rem 0 0.35rem 0;
}
.systemhaus-note-html table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.75rem;
}
.systemhaus-note-html th, .systemhaus-note-html td {
    border: 1px solid #2b303f;
    padding: 0.35rem 0.5rem;
}
.systemhaus-note-html th {
    background: #1f232d;
    font-weight: 600;
}
.systemhaus-note-html blockquote {
    border-left: 3px solid #0078d4;
    padding-left: 0.75rem;
    margin: 0.5rem 0;
    color: #94a3b8;
    font-style: italic;
}
.systemhaus-note-html pre, .systemhaus-note-html code {
    font-family: monospace;
    background: #0f1218;
    color: #38bdf8;
    padding: 0.15rem 0.35rem;
    border: 1px solid #2b303f;
}
.systemhaus-note-html a {
    color: #60a5fa;
    text-decoration: underline;
}

/* WYSIWYG Editor Component */
.sh-editor-wrapper {
    border: 1px solid #2b303f;
    background: #171a21;
}
.sh-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    background: #1f232d;
    border-bottom: 1px solid #2b303f;
}
.sh-editor-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    min-width: 26px;
    padding: 0 5px;
    font-size: 11px;
    background: #171a21;
    color: #94a3b8;
    border: 1px solid #2b303f;
    cursor: pointer;
    transition: all 0.15s ease;
}
.sh-editor-btn:hover {
    background: #2b303f;
    color: #ffffff;
    border-color: #0078d4;
}
.sh-editor-btn.active {
    background: #0078d4;
    color: #ffffff;
    border-color: #60a5fa;
}
.sh-editor-btn-sep {
    width: 1px;
    height: 18px;
    background: #2b303f;
    margin: 0 3px;
}
.sh-editor-content {
    min-height: 140px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 10px;
    color: #e2e8f0;
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    -webkit-user-select: text;
    user-select: text;
}
.sh-editor-content:focus {
    background: #15181f;
}
.sh-editor-content p {
    margin-bottom: 4px;
}
.sh-editor-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 4px 0;
}
.sh-editor-content ol {
    list-style-type: decimal;
    padding-left: 20px;
    margin: 4px 0;
}
.sh-editor-content a {
    color: #60a5fa;
    text-decoration: underline;
}
.sh-editor-source {
    width: 100%;
    min-height: 140px;
    max-height: 280px;
    padding: 8px 10px;
    background: #0f1218;
    color: #38bdf8;
    font-family: monospace;
    font-size: 11px;
    border: none;
    outline: none;
    resize: vertical;
}

/* ══════════════════════════════════════════════════════════════════════════
   Online Bestellung WebApp Styles
   ══════════════════════════════════════════════════════════════════════════ */
.ob-status-tab,
.ob-time-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(51, 65, 85, 0.6);
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ob-status-tab:hover,
.ob-time-tab:hover {
    color: #f1f5f9;
    background: rgba(31, 35, 45, 0.9);
    border-color: rgba(245, 158, 11, 0.4);
}
.ob-status-tab.active,
.ob-time-tab.active {
    color: #ffffff;
    background: rgba(245, 158, 11, 0.2);
    border-color: #f59e0b;
}

#page-online_bestellung,
#page-online_bestellung *:not(.spinner):not(.css-spinner),
.ob-order-card,
.ob-status-tab,
.ob-time-tab {
    border-radius: 0 !important;
}








