/*
 * epcan Intranet — Design System
 *
 * Markenfarben:
 *   Orange:     #f1800e  (Primary, CTAs, Akzente)
 *   Dunkelblau: #122538  (Sidebar Dark Mode, Login-BG)
 *   Blau:       #004d9f  (Links, Info)
 *
 * Reihenfolge: Light-Mode zuerst, Dark-Mode ueberschreibt danach.
 */

/* Inter wird von Filament lokal geliefert (LocalFontProvider) */

/* ================================================================
   GIF PICKER
   ================================================================ */

[x-cloak] { display: none !important; }

/* RichEditor: volle Hoehe klickbar */
.fi-fo-rich-editor-content .ProseMirror {
    min-height: 300px;
    cursor: text;
}
.fi-fo-rich-editor-content .ProseMirror img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Zurueck-Button fuer Detail-Seiten */
.pwa-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    margin-bottom: 12px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 100ms;
}
.pwa-back-btn:hover {
    background: #f1f5f9;
}
.pwa-back-btn:active {
    background: #e2e8f0;
}
.dark .pwa-back-btn {
    border-color: #334155;
    color: #94a3b8;
}
.dark .pwa-back-btn:hover {
    background: #1e293b;
}
.dark .pwa-back-btn:active {
    background: #334155;
}

/* ================================================================
   IMAGE LIGHTBOX (PWA-sicher, kein Navigation)
   ================================================================ */
.epcan-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: epcan-lb-in 150ms ease;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}
@keyframes epcan-lb-in { from { opacity: 0; } to { opacity: 1; } }
.epcan-lightbox img {
    max-width: 92vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}
.epcan-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms;
}
.epcan-lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* Bilder in Content-Bereichen klickbar machen */
.news-content img,
.news-view-featured-image img,
.wiki-page-body img,
.shop-description-text img,
.event-description-box img {
    cursor: zoom-in;
}

/* Notification-Swipe auf Mobile deaktivieren */
.fi-notification {
    touch-action: pan-y !important;
    user-select: none;
}

.fi-notification-close-btn {
    display: flex !important;
}

/* Notification-Panel: kein horizontales Scrollen */
.fi-notifications {
    overflow-x: hidden !important;
}

.gif-picker-panel {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid rgba(100,116,139,0.2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-top: 0.5rem;
    max-height: 320px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dark .gif-picker-panel {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
}

.gif-picker-search {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(100,116,139,0.15);
}

.gif-picker-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    color: inherit;
    font-family: inherit;
}

.gif-picker-grid {
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-content: flex-start;
}

.gif-picker-grid button {
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 0.375rem;
    overflow: hidden;
    height: 96px;
    flex: 1 0 auto;
    min-width: 80px;
    max-width: 180px;
    background: rgba(100,116,139,0.1);
    transition: opacity 0.1s;
}

.gif-picker-grid button:active {
    opacity: 0.75;
}

.gif-picker-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gif-picker-footer {
    padding: 0.375rem 1rem;
    font-size: 0.65rem;
    opacity: 0.35;
    text-align: right;
    border-top: 1px solid rgba(100,116,139,0.1);
    flex-shrink: 0;
}

.gif-spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid rgba(241,128,14,0.2);
    border-top-color: #f1800e;
    border-radius: 50%;
    animation: gif-spin 0.6s linear infinite;
    margin: 2rem auto;
}

@keyframes gif-spin {
    to { transform: rotate(360deg); }
}


/* ================================================================
   PWA APP FEELING — Kein Bounce, kein Pull-to-Refresh
   ================================================================ */

html, body {
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
}

/* Safe Area unten (iOS) */
.fi-main {
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 2rem)) !important;
}


/* ================================================================
   LOGO — Proportional, nicht verzerrt
   ================================================================ */

/* Beide Logos: korrekte Proportionen */
.epcan-logo-light,
.epcan-logo-dark {
    height: 2.25rem !important;
    width: auto !important;
    max-width: 150px !important;
    object-fit: contain !important;
    display: block;
}

@media (max-width: 768px) {
    .epcan-logo-light,
    .epcan-logo-dark {
        height: 2rem !important;
        max-width: 130px !important;
    }
}

/* Hell-Modus: weisses Logo ausblenden */
.epcan-logo-dark {
    display: none !important;
}

/* Dunkel-Modus: helles Logo ausblenden, weisses zeigen */
.dark .epcan-logo-light {
    display: none !important;
}

.dark .epcan-logo-dark {
    display: block !important;
}

/* ================================================================
   LIGHT MODE — Basis (kommt zuerst!)
   ================================================================ */

/* Body & Layout */
html, body, .fi-body, .fi-layout {
    background-color: #f8fafc !important;
}

/* Topbar */
.fi-topbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

/* Content */
.fi-main {
    background-color: #f8fafc !important;
}

/* Sidebar Light: Weiss */
.fi-sidebar {
    background-color: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
}

.fi-sidebar .fi-sidebar-header {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.fi-sidebar .fi-sidebar-nav-groups {
    background-color: #ffffff !important;
}

.fi-sidebar .fi-sidebar-item a,
.fi-sidebar .fi-sidebar-item button {
    color: #475569 !important;
    transition: all 200ms ease;
}

.fi-sidebar .fi-sidebar-item a:hover,
.fi-sidebar .fi-sidebar-item button:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
}

.fi-sidebar .fi-sidebar-item.fi-active a,
.fi-sidebar .fi-sidebar-item.fi-active button {
    color: #f1800e !important;
    background-color: rgba(241, 128, 14, 0.08) !important;
}

.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #f1800e !important;
}

.fi-sidebar .fi-sidebar-item-icon {
    color: #94a3b8 !important;
}

.fi-sidebar .fi-sidebar-item a:hover .fi-sidebar-item-icon,
.fi-sidebar .fi-sidebar-item button:hover .fi-sidebar-item-icon {
    color: #475569 !important;
}

.fi-sidebar .fi-sidebar-group-label {
    color: #94a3b8 !important;
    font-size: 0.675rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    font-weight: 600 !important;
}

.fi-sidebar-footer {
    background-color: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
}

/* Tabellen Hover */
.fi-ta-row:hover {
    background-color: rgba(241, 128, 14, 0.03) !important;
}

/* ================================================================
   DARK MODE — Ueberschreibt Light (kommt danach!)
   ================================================================ */

/* Body & Layout */
html.dark, html.dark body, .dark .fi-body, .dark .fi-layout {
    background-color: #1e293b !important;
}

/* Topbar */
.dark .fi-topbar {
    background-color: #1e293b !important;
    border-bottom: 1px solid #334155 !important;
    box-shadow: none !important;
}

/* Content */
.dark .fi-main {
    background-color: #1e293b !important;
}

/* Sidebar Dark: Dunkelblau */
.dark .fi-sidebar {
    background-color: #122538 !important;
    border-right: none !important;
}

.dark .fi-sidebar .fi-sidebar-header {
    background-color: #122538 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.dark .fi-sidebar .fi-sidebar-nav-groups {
    background-color: #122538 !important;
}

.dark .fi-sidebar .fi-sidebar-item a,
.dark .fi-sidebar .fi-sidebar-item button {
    color: rgba(255, 255, 255, 0.7) !important;
}

.dark .fi-sidebar .fi-sidebar-item a:hover,
.dark .fi-sidebar .fi-sidebar-item button:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

.dark .fi-sidebar .fi-sidebar-item.fi-active a,
.dark .fi-sidebar .fi-sidebar-item.fi-active button {
    color: #ffffff !important;
    background-color: rgba(241, 128, 14, 0.15) !important;
}

.dark .fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #f1800e !important;
}

.dark .fi-sidebar .fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.5) !important;
}

.dark .fi-sidebar .fi-sidebar-item a:hover .fi-sidebar-item-icon,
.dark .fi-sidebar .fi-sidebar-item button:hover .fi-sidebar-item-icon {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark .fi-sidebar .fi-sidebar-group-label {
    color: rgba(255, 255, 255, 0.35) !important;
}

.dark .fi-sidebar-footer {
    background-color: #0d1c2b !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Logo-Umschaltung: Light zeigt Normal, Dark zeigt Weiss */
.epcan-logo-dark {
    display: none !important;
}

.dark .epcan-logo-light {
    display: none !important;
}

.dark .epcan-logo-dark {
    display: inline-block !important;
}

/* Tabellen Hover */
.dark .fi-ta-row:hover {
    background-color: rgba(241, 128, 14, 0.06) !important;
}

/* ================================================================
   LOGIN-SEITE (beide Modi gleich)
   ================================================================ */

.fi-simple-layout {
    background: linear-gradient(135deg, #122538 0%, #1a3352 100%) !important;
}

.fi-simple-layout .fi-simple-main-ctn {
    border-radius: 0.75rem !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3) !important;
}

/* Login: Farbiges Logo (sitzt in der weissen Card) */
.fi-simple-layout .epcan-logo-light {
    display: inline-block !important;
}

.fi-simple-layout .epcan-logo-dark {
    display: none !important;
}

/* ================================================================
   WIDGETS
   ================================================================ */

.fi-wi-stats-overview-stat {
    transition: box-shadow 200ms ease;
}

.fi-wi-stats-overview-stat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
}

.dark .fi-wi-stats-overview-stat:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* ================================================================
   DASHBOARD GREETING
   ================================================================ */

/* Dashboard: Abstand zwischen Greeting-Header und Widgets angleichen */
.fi-dashboard .fi-page-content > :is(.flex, .grid, div) {
    gap: 1rem;
}
.dashboard-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    margin-bottom: 0;
}
.dark .dashboard-greeting {
    background: #1e293b;
    border-color: #334155;
}
.dashboard-greeting-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.dashboard-greeting-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #f1800e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.dashboard-greeting-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dashboard-greeting-text {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.25;
}
.dashboard-greeting-date {
    font-size: 0.8rem;
    opacity: 0.5;
    margin-top: 0.1rem;
}

/* ================================================================
   DASHBOARD NEWS WIDGET
   ================================================================ */

.news-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.news-widget-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    text-decoration: none;
    color: inherit;
    transition: background 150ms ease;
    border-radius: 0.375rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}
.news-widget-item:last-child {
    border-bottom: none;
}
.news-widget-item:hover {
    background: rgba(241, 128, 14, 0.04);
}
.dark .news-widget-item:hover {
    background: rgba(241, 128, 14, 0.08);
}
.news-widget-item-content {
    flex: 1;
    min-width: 0;
}
.news-widget-item-meta {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
}
.news-widget-category {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
}
.news-widget-pin {
    font-size: 0.65rem;
    color: #f1800e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.2rem;
}
.news-widget-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}
.news-widget-excerpt {
    font-size: 0.78rem;
    opacity: 0.55;
    line-height: 1.45;
    margin-bottom: 0.35rem;
}
.news-widget-footer {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.72rem;
    opacity: 0.5;
    flex-wrap: wrap;
}
.news-widget-thumb {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    flex-shrink: 0;
}
.news-widget-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================================================
   DASHBOARD PEOPLE WIDGETS (Geburtstage & Jubilaeen)
   ================================================================ */

.people-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.people-widget-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    transition: background 150ms ease;
}
.people-widget-item:hover {
    background: rgba(100, 116, 139, 0.06);
}
.people-widget-item--today {
    background: rgba(241, 128, 14, 0.08) !important;
}
.dark .people-widget-item--today {
    background: rgba(241, 128, 14, 0.12) !important;
}
.people-widget-item--milestone {
    background: rgba(234, 179, 8, 0.06);
}
.dark .people-widget-item--milestone {
    background: rgba(234, 179, 8, 0.1);
}
.people-widget-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: #f1800e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}
.people-widget-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.people-widget-info {
    flex: 1;
    min-width: 0;
}
.people-widget-name {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.people-widget-sub {
    font-size: 0.72rem;
    opacity: 0.5;
    margin-top: 0.1rem;
}
.people-widget-badge {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.5;
    white-space: nowrap;
    flex-shrink: 0;
}
.people-widget-badge--today {
    color: #f1800e;
    opacity: 1;
}
.people-widget-badge--milestone {
    color: #ca8a04;
    opacity: 1;
}
.anniversary-milestone-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(234, 179, 8, 0.15);
    color: #ca8a04;
    border: 1px solid rgba(234, 179, 8, 0.3);
}
.dark .anniversary-milestone-badge {
    background: rgba(234, 179, 8, 0.2);
    color: #fbbf24;
    border-color: rgba(234, 179, 8, 0.4);
}
.anniversary-years-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(100, 116, 139, 0.1);
    color: #64748b;
}
.dark .anniversary-years-badge {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
}

/* ================================================================
   NEWS DETAIL & KOMMENTARE
   ================================================================ */

/* Kommentar-Formular */
.comment-form-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}
.dark .comment-form-wrapper {
    background: #0f172a;
    border-color: #334155;
}

/* Kommentar-Karte */
.comment-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
}
.dark .comment-card {
    background: #0f172a;
    border-color: #334155;
}

/* Textarea im Kommentar-Formular */
.comment-textarea {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    width: 100%;
    padding: 0.625rem 0.875rem;
    resize: vertical;
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.5;
}
.dark .comment-textarea {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #475569;
}
.comment-textarea::placeholder {
    color: #94a3b8;
}

/* Artikel-Inhalt Typografie */
.news-content {
    font-size: 1rem;
    line-height: 1.8;
}
.news-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
.news-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.news-content p { margin-bottom: 1rem; }
.news-content ul, .news-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.news-content ul { list-style-type: disc; }
.news-content ol { list-style-type: decimal; }
.news-content li { margin-bottom: 0.25rem; }
.news-content a { color: #f1800e; text-decoration: underline; }
.news-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.news-content th, .news-content td { padding: 10px 12px; border: 1px solid #e2e8f0; text-align: left; }
.news-content th { background: #f8fafc; font-weight: 600; }
.dark .news-content th { background: #1e293b; }
.dark .news-content td, .dark .news-content th { border-color: #334155; }
.news-content blockquote {
    border-left: 4px solid #f1800e;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #64748b;
}
.dark .news-content blockquote { color: #94a3b8; }
.news-content pre, .news-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
}
.dark .news-content pre, .dark .news-content code {
    background: #1e293b;
}
.news-content pre { padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
.news-content pre code { background: none; padding: 0; }
.news-content img { max-width: 100%; border-radius: 0.5rem; margin: 1rem 0; }

/* ================================================================
   DATEI-ANHAENGE IM CONTENT (PDF, Word, Excel, ZIP etc.)
   Gilt fuer News und Wiki
   ================================================================ */
.news-content a[href$=".pdf"],
.news-content a[href$=".doc"],
.news-content a[href$=".docx"],
.news-content a[href$=".xls"],
.news-content a[href$=".xlsx"],
.news-content a[href$=".ppt"],
.news-content a[href$=".pptx"],
.news-content a[href$=".zip"],
.news-content a[href$=".csv"],
.news-content a[href$=".txt"],
.wiki-page-body a[href$=".pdf"],
.wiki-page-body a[href$=".doc"],
.wiki-page-body a[href$=".docx"],
.wiki-page-body a[href$=".xls"],
.wiki-page-body a[href$=".xlsx"],
.wiki-page-body a[href$=".ppt"],
.wiki-page-body a[href$=".pptx"],
.wiki-page-body a[href$=".zip"],
.wiki-page-body a[href$=".csv"],
.wiki-page-body a[href$=".txt"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    margin: 0.5rem 0;
    border-radius: 0.5rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s ease;
    word-break: break-all;
}
.news-content a[href$=".pdf"]:hover,
.news-content a[href$=".doc"]:hover,
.news-content a[href$=".docx"]:hover,
.news-content a[href$=".xls"]:hover,
.news-content a[href$=".xlsx"]:hover,
.news-content a[href$=".ppt"]:hover,
.news-content a[href$=".pptx"]:hover,
.news-content a[href$=".zip"]:hover,
.news-content a[href$=".csv"]:hover,
.news-content a[href$=".txt"]:hover,
.wiki-page-body a[href$=".pdf"]:hover,
.wiki-page-body a[href$=".doc"]:hover,
.wiki-page-body a[href$=".docx"]:hover,
.wiki-page-body a[href$=".xls"]:hover,
.wiki-page-body a[href$=".xlsx"]:hover,
.wiki-page-body a[href$=".ppt"]:hover,
.wiki-page-body a[href$=".pptx"]:hover,
.wiki-page-body a[href$=".zip"]:hover,
.wiki-page-body a[href$=".csv"]:hover,
.wiki-page-body a[href$=".txt"]:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}
/* Datei-Icon vor dem Link */
.news-content a[href$=".pdf"]::before,
.news-content a[href$=".doc"]::before,
.news-content a[href$=".docx"]::before,
.news-content a[href$=".xls"]::before,
.news-content a[href$=".xlsx"]::before,
.news-content a[href$=".ppt"]::before,
.news-content a[href$=".pptx"]::before,
.news-content a[href$=".zip"]::before,
.news-content a[href$=".csv"]::before,
.news-content a[href$=".txt"]::before,
.wiki-page-body a[href$=".pdf"]::before,
.wiki-page-body a[href$=".doc"]::before,
.wiki-page-body a[href$=".docx"]::before,
.wiki-page-body a[href$=".xls"]::before,
.wiki-page-body a[href$=".xlsx"]::before,
.wiki-page-body a[href$=".ppt"]::before,
.wiki-page-body a[href$=".pptx"]::before,
.wiki-page-body a[href$=".zip"]::before,
.wiki-page-body a[href$=".csv"]::before,
.wiki-page-body a[href$=".txt"]::before {
    content: '';
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}
/* PDF Icon (rot) */
.news-content a[href$=".pdf"]::before,
.wiki-page-body a[href$=".pdf"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6zm2-5.5c0-.3.1-.5.3-.7.3-.2.7-.3 1.2-.3.2 0 .4 0 .5.1v-.1c0-.3-.2-.5-.5-.5-.2 0-.5.1-.7.2l-.3-.7c.4-.2.8-.3 1.2-.3.5 0 .9.1 1.1.4.2.3.4.6.4 1.1v2h-.9v-.3c-.2.3-.5.4-.9.4-.3 0-.6-.1-.8-.3-.2-.2-.3-.4-.3-.7zm.9-.1c0 .1.1.2.1.3.1.1.2.1.4.1.2 0 .4-.1.5-.3v-.5c-.1 0-.3-.1-.4-.1-.4 0-.6.2-.6.5zm3.1-2.3h1.4c.5 0 .9.1 1.2.4.3.3.4.6.4 1.1 0 .5-.2.9-.5 1.1-.3.3-.7.4-1.2.4H13v1.4h-1v-4.4zm1 .8v1.4h.3c.5 0 .7-.2.7-.7 0-.5-.2-.7-.7-.7H13z'/%3E%3C/svg%3E");
}
/* Word Icon (blau) */
.news-content a[href$=".doc"]::before,
.news-content a[href$=".docx"]::before,
.wiki-page-body a[href$=".doc"]::before,
.wiki-page-body a[href$=".docx"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232563eb'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
}
/* Excel Icon (gruen) */
.news-content a[href$=".xls"]::before,
.news-content a[href$=".xlsx"]::before,
.news-content a[href$=".csv"]::before,
.wiki-page-body a[href$=".xls"]::before,
.wiki-page-body a[href$=".xlsx"]::before,
.wiki-page-body a[href$=".csv"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a34a'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
}
/* PowerPoint Icon (orange) */
.news-content a[href$=".ppt"]::before,
.news-content a[href$=".pptx"]::before,
.wiki-page-body a[href$=".ppt"]::before,
.wiki-page-body a[href$=".pptx"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ea580c'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
}
/* ZIP Icon (grau) */
.news-content a[href$=".zip"]::before,
.wiki-page-body a[href$=".zip"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
}
/* Text Icon (grau) */
.news-content a[href$=".txt"]::before,
.wiki-page-body a[href$=".txt"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 1.5L18.5 9H13V3.5zM6 20V4h5v7h7v9H6z'/%3E%3C/svg%3E");
}
/* Dark Mode fuer Datei-Anhaenge */
.dark .news-content a[href$=".pdf"],
.dark .news-content a[href$=".doc"],
.dark .news-content a[href$=".docx"],
.dark .news-content a[href$=".xls"],
.dark .news-content a[href$=".xlsx"],
.dark .news-content a[href$=".ppt"],
.dark .news-content a[href$=".pptx"],
.dark .news-content a[href$=".zip"],
.dark .news-content a[href$=".csv"],
.dark .news-content a[href$=".txt"],
.dark .wiki-page-body a[href$=".pdf"],
.dark .wiki-page-body a[href$=".doc"],
.dark .wiki-page-body a[href$=".docx"],
.dark .wiki-page-body a[href$=".xls"],
.dark .wiki-page-body a[href$=".xlsx"],
.dark .wiki-page-body a[href$=".ppt"],
.dark .wiki-page-body a[href$=".pptx"],
.dark .wiki-page-body a[href$=".zip"],
.dark .wiki-page-body a[href$=".csv"],
.dark .wiki-page-body a[href$=".txt"] {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}
.dark .news-content a[href$=".pdf"]:hover,
.dark .news-content a[href$=".doc"]:hover,
.dark .news-content a[href$=".docx"]:hover,
.dark .news-content a[href$=".xls"]:hover,
.dark .news-content a[href$=".xlsx"]:hover,
.dark .news-content a[href$=".ppt"]:hover,
.dark .news-content a[href$=".pptx"]:hover,
.dark .news-content a[href$=".zip"]:hover,
.dark .news-content a[href$=".csv"]:hover,
.dark .news-content a[href$=".txt"]:hover,
.dark .wiki-page-body a[href$=".pdf"]:hover,
.dark .wiki-page-body a[href$=".doc"]:hover,
.dark .wiki-page-body a[href$=".docx"]:hover,
.dark .wiki-page-body a[href$=".xls"]:hover,
.dark .wiki-page-body a[href$=".xlsx"]:hover,
.dark .wiki-page-body a[href$=".ppt"]:hover,
.dark .wiki-page-body a[href$=".pptx"]:hover,
.dark .wiki-page-body a[href$=".zip"]:hover,
.dark .wiki-page-body a[href$=".csv"]:hover,
.dark .wiki-page-body a[href$=".txt"]:hover {
    background: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

/* Beitragsbild: ganzes Bild zeigen, nie abschneiden */
.news-view-featured-image {
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    justify-content: center;
}
.dark .news-view-featured-image {
    background: #1e293b;
}
.news-view-featured-image img {
    width: auto;
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    display: block;
}

@media (max-width: 640px) {
    .news-view h1 { font-size: 1.375rem !important; }
}

/* ================================================================
   FULLCALENDAR (saade/filament-fullcalendar Anpassungen)
   ================================================================ */

/* --- Nächste Termine (über dem Kalender) --- */
.upcoming-events-section {
    margin-bottom: 1.5rem;
}
.upcoming-events-header {
    margin-bottom: 0.75rem;
}
.upcoming-events-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}
.upcoming-events-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.5rem;
}
@media (min-width: 640px) {
    .upcoming-events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .upcoming-events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.upcoming-event-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-left: 3px solid var(--event-color, #f1800e);
    border-radius: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 150ms ease;
    min-height: 4.5rem;
}
.upcoming-event-card:hover {
    border-color: var(--event-color, #f1800e);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}
.dark .upcoming-event-card {
    background: #1e293b;
    border-color: #334155;
    border-left-color: var(--event-color, #f1800e);
}
.dark .upcoming-event-card:hover {
    border-color: var(--event-color, #f1800e);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.upcoming-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 3rem;
    flex-shrink: 0;
    line-height: 1;
}
.upcoming-event-day {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--event-color, #f1800e);
}
.upcoming-event-month {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.6;
    margin-top: 0.1rem;
}
.upcoming-event-weekday {
    font-size: 0.55rem;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.45;
    margin-top: 0.05rem;
}
.upcoming-event-content {
    flex: 1;
    min-width: 0;
}
.upcoming-event-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.upcoming-event-meta {
    font-size: 0.72rem;
    opacity: 0.55;
    margin-top: 0.15rem;
}
.upcoming-event-location {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    opacity: 0.5;
    margin-top: 0.15rem;
}
.upcoming-event-icon {
    width: 0.75rem;
    height: 0.75rem;
    flex-shrink: 0;
}
.upcoming-event-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}
.upcoming-event-category-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
}
.upcoming-event-rsvp {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 9999px;
    background: rgba(241, 128, 14, 0.12);
    color: #f1800e;
    white-space: nowrap;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}
.calendar-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.calendar-legend-dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex-shrink: 0;
}

/* FullCalendar epcan Branding */
.fc .fc-button-primary {
    background-color: #f1800e !important;
    border-color: #f1800e !important;
    font-size: 0.8rem !important;
    font-weight: 500;
    transition: opacity 200ms ease;
}
.fc .fc-button-primary:hover {
    opacity: 0.85;
}
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: #c96a0b !important;
    border-color: #c96a0b !important;
}
.fc .fc-today-button:disabled {
    opacity: 0.4;
}
.fc .fc-day-today {
    background-color: rgba(241, 128, 14, 0.06) !important;
}
.dark .fc .fc-day-today {
    background-color: rgba(241, 128, 14, 0.1) !important;
}
.fc .fc-daygrid-more-link {
    color: #f1800e;
    font-weight: 600;
}
.fc .fc-toolbar-title {
    font-size: 1.15rem !important;
    font-weight: 700;
}
.fc .fc-col-header-cell-cushion {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.dark .fc-theme-standard td,
.dark .fc-theme-standard th,
.dark .fc-theme-standard .fc-scrollgrid {
    border-color: #334155;
}
.dark .fc .fc-list-day-cushion {
    background-color: #1e293b;
}
.dark .fc .fc-list-event:hover td {
    background-color: rgba(241, 128, 14, 0.08);
}
.fc .fc-event {
    cursor: pointer;
    border-radius: 4px;
    border: none;
    font-size: 0.78rem;
    padding: 2px 6px;
    font-weight: 500;
}
.fc .fc-daygrid-event-dot {
    display: none;
}
.fc .fc-event-time {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
}
/* Toolbar mit mehr Abstand */
.fc .fc-toolbar {
    margin-bottom: 1rem !important;
}
.fc .fc-toolbar-title {
    font-size: 1.15rem !important;
    font-weight: 700;
}
/* Wochentag-Kopfzeile */
.fc .fc-col-header-cell {
    padding: 0.4rem 0;
}
/* Zellen-Höhe begrenzen für bessere Übersicht */
.fc .fc-daygrid-day-frame {
    min-height: 5rem;
}
/* Tages-Nummer schöner */
.fc .fc-daygrid-day-number {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.5rem;
}

/* --- Listenansicht schöner --- */
.fc .fc-list {
    border-radius: 0.5rem;
    overflow: hidden;
}
.fc .fc-list-event td {
    padding: 0.5rem 0.75rem;
}
.fc .fc-list-day-cushion {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}
.fc .fc-list-event-title a {
    font-weight: 500;
}
.fc .fc-list-event-time {
    font-size: 0.75rem;
    white-space: nowrap;
}
.fc .fc-list-empty-cushion {
    font-size: 0.85rem;
    padding: 2rem;
    opacity: 0.5;
}

/* --- Mobile Kalender --- */
@media (max-width: 768px) {
    /* Toolbar: kompakt gestapelt */
    .fc .fc-toolbar {
        flex-direction: column;
        gap: 0.4rem;
        margin-bottom: 0.75rem !important;
    }
    .fc .fc-toolbar-title {
        font-size: 1rem !important;
        order: -1;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    .fc .fc-button {
        font-size: 0.68rem !important;
        padding: 0.25rem 0.45rem !important;
    }
    .fc .fc-button-group .fc-button {
        padding: 0.3rem 0.5rem !important;
    }

    /* Monatsansicht auf Mobile: kompakter */
    .fc .fc-daygrid-day-frame {
        min-height: 3.5rem;
    }
    .fc .fc-daygrid-day-number {
        font-size: 0.7rem;
        padding: 0.2rem 0.35rem;
    }
    .fc .fc-col-header-cell-cushion {
        font-size: 0.65rem;
    }
    .fc .fc-daygrid-event {
        font-size: 0.65rem !important;
        padding: 1px 3px;
    }
    .fc .fc-daygrid-more-link {
        font-size: 0.65rem;
    }
    /* Maximal 2 Events pro Tag auf Mobile */
    .fc .fc-daygrid-day-events {
        max-height: 2.5rem;
        overflow: hidden;
    }

    /* Listenansicht auf Mobile: viel besser lesbar */
    .fc .fc-list-event td {
        padding: 0.6rem 0.5rem;
    }
    .fc .fc-list-event-graphic {
        width: 0.5rem;
        padding-right: 0.25rem;
    }
    .fc .fc-list-event-dot {
        width: 6px;
        height: 6px;
    }

    /* Nächste Termine: eine Spalte */
    .upcoming-events-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ================================================================
   EVENT VIEW — RSVP BUTTONS
   ================================================================ */

.event-view-category {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
}
.rsvp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms ease;
    min-height: 44px;
    color: inherit;
}
.dark .rsvp-btn {
    background: #1e293b;
    border-color: #475569;
}
.rsvp-btn:hover {
    border-color: #94a3b8;
}
.rsvp-btn--active-yes {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}
.rsvp-btn--active-maybe {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
}
.rsvp-btn--active-no {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #ffffff !important;
}

/* ================================================================
   CALENDAR WIDGET (Dashboard)
   ================================================================ */

.calendar-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.calendar-widget-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.25rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    text-decoration: none;
    color: inherit;
    transition: background 150ms ease;
    border-radius: 0.375rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}
.calendar-widget-item:last-child {
    border-bottom: none;
}
.calendar-widget-item:hover {
    background: rgba(241, 128, 14, 0.04);
}
.dark .calendar-widget-item:hover {
    background: rgba(241, 128, 14, 0.08);
}
.calendar-widget-date-badge {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}
.calendar-widget-date-day {
    font-size: 1rem;
    font-weight: 700;
}
.calendar-widget-date-month {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
}
.calendar-widget-content {
    flex: 1;
    min-width: 0;
}
.calendar-widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.calendar-widget-meta {
    font-size: 0.72rem;
    opacity: 0.55;
    margin-top: 0.1rem;
}
.calendar-widget-rsvp-badge {
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    background: rgba(241, 128, 14, 0.15);
    color: #f1800e;
    border: 1px solid rgba(241, 128, 14, 0.3);
    flex-shrink: 0;
}

/* ================================================================
   TASKS WIDGET (Dashboard)
   ================================================================ */

.tasks-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
}
.tasks-widget-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tasks-widget-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.25rem;
    border-bottom: 1px solid rgba(100, 116, 139, 0.12);
    text-decoration: none;
    color: inherit;
    transition: background 150ms ease;
    border-radius: 0.375rem;
    margin: 0 -0.25rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}
.tasks-widget-item:last-child {
    border-bottom: none;
}
a.tasks-widget-item:hover {
    background: rgba(241, 128, 14, 0.04);
}
.dark a.tasks-widget-item:hover {
    background: rgba(241, 128, 14, 0.08);
}
.tasks-widget-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(241, 128, 14, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tasks-widget-icon-svg {
    width: 1.15rem;
    height: 1.15rem;
    color: #f1800e;
}
.tasks-widget-content {
    flex: 1;
    min-width: 0;
}
.tasks-widget-title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.3;
}
.tasks-widget-desc {
    font-size: 0.72rem;
    opacity: 0.55;
    margin-top: 0.1rem;
    line-height: 1.3;
}
.tasks-widget-due {
    font-size: 0.72rem;
    font-weight: 600;
    opacity: 0.5;
    white-space: nowrap;
    flex-shrink: 0;
}
.tasks-widget-due--today {
    color: #f59e0b;
    opacity: 1;
}
.tasks-widget-due--overdue {
    color: #ef4444;
    opacity: 1;
}

/* RSVP Unterliste im Tasks-Widget */
.tasks-rsvp-sublist {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-left: 3rem;
    border-left: 2px solid rgba(241, 128, 14, 0.2);
    padding-left: 0.75rem;
}
.tasks-rsvp-subitem {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.25rem;
    text-decoration: none;
    color: inherit;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    transition: background 150ms;
}
.tasks-rsvp-subitem:hover {
    background: rgba(241, 128, 14, 0.04);
}
.dark .tasks-rsvp-subitem:hover {
    background: rgba(241, 128, 14, 0.08);
}
.tasks-rsvp-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.tasks-rsvp-title {
    flex: 1;
    font-weight: 500;
}
.tasks-rsvp-date {
    font-size: 0.72rem;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ================================================================
   PWA INSTALL BANNER
   ================================================================ */

.pwa-install-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #f1800e10, #f1800e05);
    border: 1px solid rgba(241, 128, 14, 0.2);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    color: inherit;
}
.dark .pwa-install-banner {
    background: linear-gradient(135deg, #f1800e15, #f1800e08);
    border-color: rgba(241, 128, 14, 0.25);
}
.pwa-install-content {
    flex: 1;
}

/* ================================================================
   MOBILE
   ================================================================ */

@media (max-width: 768px) {
    .fi-sidebar .fi-sidebar-item a,
    .fi-sidebar .fi-sidebar-item button {
        min-height: 44px !important;
        padding: 0.625rem 1rem !important;
    }

    .fi-btn {
        min-height: 44px !important;
    }
}

/* === ESSENSBESTELLUNG === */

.food-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}

.dark .food-header {
    background: #1e293b;
    border-color: #334155;
}

.food-header-kw {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f1800e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.food-header-vendor {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
}

.dark .food-header-vendor {
    color: #f1f5f9;
}

.food-header-notes {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
}

.food-header-right {
    text-align: right;
    flex-shrink: 0;
}

.food-header-balance {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.food-header-balance-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.food-header-balance-amount {
    font-size: 1rem;
    font-weight: 700;
}

.food-header-balance-amount.positive { color: #059669; }
.food-header-balance-amount.negative { color: #dc2626; }

/* Guthaben-Aufladen Modal */
.food-topup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.food-topup-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    color: #1e293b;
}
.dark .food-topup-modal {
    background: #1e293b;
    color: #e2e8f0;
}
.food-topup-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}
.dark .food-topup-option {
    border-color: #334155;
}
.food-topup-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.food-header-deadline {
    font-size: 0.75rem;
    color: #64748b;
    padding: 4px 10px;
    background: #f0fdf4;
    border-radius: 6px;
    display: inline-block;
}

.food-header-deadline.expired {
    background: #fef2f2;
    color: #dc2626;
}

.dark .food-header-deadline {
    background: #0f2a1a;
}

.dark .food-header-deadline.expired {
    background: #2a0f0f;
}

.food-order-form-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.food-order-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.food-order-field-grow {
    flex: 1;
    min-width: 200px;
}

.food-order-field-btn {
    flex-shrink: 0;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.food-order-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.food-order-input {
    padding: 9px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.875rem;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 200ms;
    font-family: inherit;
}

.food-order-input:focus {
    border-color: #f1800e;
    box-shadow: 0 0 0 2px rgba(241, 128, 14, 0.1);
}

.dark .food-order-input {
    background: #0f172a;
    border-color: #475569;
    color: #e2e8f0;
}

.food-order-submit {
    padding: 9px 24px;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 200ms;
    white-space: nowrap;
    font-family: inherit;
    min-height: 40px;
}

.food-order-submit:hover {
    opacity: 0.9;
}

.food-order-cancel {
    padding: 9px 18px;
    background: transparent;
    color: #64748b;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 200ms, color 200ms;
    white-space: nowrap;
    font-family: inherit;
    min-height: 40px;
}

.food-order-cancel:hover {
    background: #f1f5f9;
    color: #334155;
}

.food-closed-notice {
    padding: 14px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

.dark .food-closed-notice {
    background: #2a0f0f;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.food-order-count {
    background: #f1800e;
    color: #fff;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.food-empty {
    text-align: center;
    padding: 24px;
    color: #94a3b8;
    font-size: 0.875rem;
}

/* Bestellliste */
.food-order-table {
    /* table-like layout */
}

.food-order-table-header {
    display: grid;
    grid-template-columns: 200px 1fr 200px 70px;
    gap: 8px;
    padding: 8px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    border-bottom: 1px solid #f1f5f9;
}

.dark .food-order-table-header {
    border-bottom-color: #334155;
}

.food-order-table-row {
    display: grid;
    grid-template-columns: 200px 1fr 200px 70px;
    gap: 8px;
    padding: 10px 14px;
    align-items: center;
    border-bottom: 1px solid #f8fafc;
    font-size: 0.875rem;
    transition: background 200ms;
}

.food-order-table-row:hover {
    background: rgba(241, 128, 14, 0.03);
}

.dark .food-order-table-row {
    border-bottom-color: #1e293b;
}

.food-order-mine {
    background: rgba(241, 128, 14, 0.04);
    border-left: 3px solid #f1800e;
}

.food-col-name strong {
    font-weight: 600;
    font-size: 0.875rem;
}

.food-ordered-by {
    display: block;
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 400;
}

.food-col-notes {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
}

.food-col-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}

.food-action-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 200ms;
}

.food-action-btn:hover {
    background: #f1f5f9;
    color: #f1800e;
}

.food-action-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dark .food-action-btn:hover {
    background: #334155;
}

.food-no-week {
    text-align: center;
    padding: 60px 24px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User-Suche Dropdown */
.food-user-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 50;
    margin-top: 4px;
}

.dark .food-user-dropdown {
    background: #1e293b;
    border-color: #334155;
}

.food-user-option {
    padding: 8px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.1s;
}

.food-user-option:hover {
    background: #f1f5f9;
}

.dark .food-user-option:hover {
    background: #334155;
}

/* ================================================================
   WALLET / KASSE
   ================================================================ */

.food-wallet-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.food-wallet-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dark .food-wallet-stat-card {
    background: #1e293b;
    border-color: #334155;
}

.food-wallet-stat-label {
    font-size: 0.65rem;
    color: #94a3b8;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.food-wallet-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.food-wallet-stat-value.positive { color: #059669; }
.food-wallet-stat-value.negative { color: #dc2626; }

.food-wallet-stat-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 5px;
}

.food-wallet-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 20px;
    align-items: start;
}

.food-wallet-user-list {
    max-height: 480px;
    overflow-y: auto;
}

.food-wallet-user-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(100,116,139,0.1);
    cursor: pointer;
    transition: background 0.1s;
}

.food-wallet-user-item:hover {
    background: #f8fafc;
}

.dark .food-wallet-user-item:hover {
    background: rgba(255,255,255,0.05);
}

.food-wallet-user-item.active {
    background: #fff7ed;
}

.dark .food-wallet-user-item.active {
    background: rgba(241,128,14,0.1);
}

.food-wallet-user-info {
    flex: 1;
    min-width: 0;
}

.food-wallet-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.food-wallet-user-dept {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 1px;
}

.food-wallet-user-balance {
    font-size: 0.82rem;
    font-weight: 600;
    flex-shrink: 0;
}

.food-wallet-user-balance.positive { color: #059669; }
.food-wallet-user-balance.negative { color: #dc2626; }

.food-wallet-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(100,116,139,0.15);
    margin-bottom: 16px;
}

.food-wallet-hero-name {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.food-wallet-hero-dept {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 3px;
}

.food-wallet-hero-balance {
    text-align: right;
}

.food-wallet-hero-balance-label {
    font-size: 0.62rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.food-wallet-hero-balance-amount {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
}

.food-wallet-hero-balance-amount.positive { color: #059669; }
.food-wallet-hero-balance-amount.negative { color: #dc2626; }

.food-wallet-booking {
    background: rgba(100,116,139,0.05);
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.food-wallet-booking-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.food-wallet-booking-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.food-wallet-booking-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.food-wallet-tx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(100,116,139,0.15);
}

.food-wallet-tx-list {
    max-height: 350px;
    overflow-y: auto;
}

.food-wallet-tx-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    gap: 12px;
    border-bottom: 1px solid rgba(100,116,139,0.06);
}

.food-wallet-tx-row:hover .food-wallet-tx-delete {
    opacity: 1;
}

.food-wallet-tx-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 600;
    flex-shrink: 0;
}

.food-wallet-tx-tag.deposit {
    background: #dcfce7;
    color: #166534;
}

.dark .food-wallet-tx-tag.deposit {
    background: rgba(22,163,74,0.15);
    color: #4ade80;
}

.food-wallet-tx-tag.withdrawal {
    background: #fef2f2;
    color: #991b1b;
}

.dark .food-wallet-tx-tag.withdrawal {
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
}

.food-wallet-tx-desc {
    flex: 1;
    font-size: 0.85rem;
}

.food-wallet-tx-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

.food-wallet-tx-amount {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
}

.food-wallet-tx-amount.positive { color: #059669; }
.food-wallet-tx-amount.negative { color: #dc2626; }

.food-wallet-tx-delete {
    opacity: 0;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.12s;
    display: flex;
    align-items: center;
}

.food-wallet-tx-delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.dark .food-wallet-tx-delete:hover {
    background: rgba(220,38,38,0.15);
}

.food-wallet-tx-row.cancelled {
    opacity: 0.5;
}

.food-wallet-tx-tag.tag-cancelled {
    background: #f1f5f9;
    color: #94a3b8;
}

.dark .food-wallet-tx-tag.tag-cancelled {
    background: rgba(100,116,139,0.15);
}

.line-through {
    text-decoration: line-through;
}

/* Wallet Import */
.wallet-import-upload {
    padding: 24px 0;
}

.wallet-import-upload-info {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    max-width: 560px;
}

.wallet-import-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.wallet-import-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wallet-import-badge.matched {
    background: #dcfce7;
    color: #166534;
}

.dark .wallet-import-badge.matched {
    background: rgba(22,163,74,0.15);
    color: #4ade80;
}

.wallet-import-badge.unmatched {
    background: #fef3c7;
    color: #92400e;
}

.dark .wallet-import-badge.unmatched {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}

.wallet-import-badge.zero {
    background: #f1f5f9;
    color: #64748b;
}

.dark .wallet-import-badge.zero {
    background: rgba(100,116,139,0.15);
    color: #94a3b8;
}

.wallet-import-table-wrap {
    overflow-x: auto;
    margin: 8px 0;
}

.wallet-import-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.wallet-import-table th {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    padding: 8px 10px;
    border-bottom: 2px solid #e2e8f0;
}

.dark .wallet-import-table th {
    border-color: #334155;
}

.wallet-import-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(100,116,139,0.1);
    vertical-align: middle;
}

.wallet-import-table td.positive { color: #059669; }
.wallet-import-table td.negative { color: #dc2626; }

.wallet-import-row-ok {
    background: rgba(22,163,74,0.03);
}

.dark .wallet-import-row-ok {
    background: rgba(22,163,74,0.05);
}

.wallet-import-row-open {
    background: rgba(245,158,11,0.05);
}

.dark .wallet-import-row-open {
    background: rgba(245,158,11,0.08);
}

.wallet-import-row-skip {
    opacity: 0.45;
}

.wallet-import-select {
    min-width: 200px;
    font-size: 0.82rem;
    padding: 5px 8px;
}

.wallet-import-select-open {
    border-color: #f59e0b !important;
}

.wallet-import-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.wallet-import-status.auto {
    background: #dcfce7;
    color: #166534;
}

.dark .wallet-import-status.auto {
    background: rgba(22,163,74,0.15);
    color: #4ade80;
}

.wallet-import-status.manual {
    background: #dbeafe;
    color: #1e40af;
}

.dark .wallet-import-status.manual {
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
}

.wallet-import-status.open {
    background: #fef3c7;
    color: #92400e;
}

.dark .wallet-import-status.open {
    background: rgba(245,158,11,0.15);
    color: #fbbf24;
}

.wallet-import-status.skip {
    background: #f1f5f9;
    color: #94a3b8;
}

.dark .wallet-import-status.skip {
    background: rgba(100,116,139,0.15);
}

.wallet-import-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid rgba(100,116,139,0.15);
    margin-top: 8px;
}

.wallet-import-btn-cancel {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.12s;
}

.wallet-import-btn-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

.dark .wallet-import-btn-cancel {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

.dark .wallet-import-btn-cancel:hover {
    background: #475569;
    color: #e2e8f0;
}

/* Teamtime Dashboard Banner */
.food-banner {
    display: block;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 0;
    transition: all 0.15s;
}

.food-banner:hover {
    border-color: #f1800e;
    box-shadow: 0 2px 8px rgba(241,128,14,0.15);
}

.dark .food-banner {
    background: linear-gradient(135deg, rgba(241,128,14,0.08) 0%, rgba(241,128,14,0.04) 100%);
    border-color: rgba(241,128,14,0.25);
}

.dark .food-banner:hover {
    border-color: #f1800e;
}

.food-banner-content {
    display: flex;
    align-items: center;
    gap: 14px;
}

.food-banner-icon {
    color: #f1800e;
    flex-shrink: 0;
}

.food-banner-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
}

.dark .food-banner-title {
    color: #f1f5f9;
}

.food-banner-sub {
    font-size: 0.78rem;
    color: #92400e;
    margin-top: 2px;
}

.dark .food-banner-sub {
    color: #fbbf24;
}

.food-banner-arrow {
    margin-left: auto;
    color: #f1800e;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ================================================================
   FOOD WEEK BOOKING TABLE
   ================================================================ */

.food-booking-table {
    width: 100%;
}

.food-booking-header {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 100px 80px 50px;
    gap: 12px;
    padding: 10px 16px;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid rgba(100,116,139,0.15);
}

.food-booking-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr 100px 80px 50px;
    gap: 12px;
    padding: 10px 16px;
    align-items: center;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(100,116,139,0.06);
    transition: background 0.1s;
}

.food-booking-row:hover {
    background: rgba(100,116,139,0.03);
}

.food-booking-row.booked {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .food-booking-header { display: none; }

    .food-booking-row {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 12px 14px;
    }
}

@media (max-width: 768px) {
    .food-wallet-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .food-wallet-grid {
        grid-template-columns: 1fr;
    }

    .food-wallet-booking-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .food-header {
        flex-direction: column;
    }

    .food-header-right {
        text-align: left;
    }

    .food-order-form-row {
        flex-direction: column;
    }

    .food-order-field,
    .food-order-field-grow,
    .food-order-field-btn {
        width: 100%;
    }

    .food-order-submit,
    .food-order-cancel {
        flex: 1;
    }

    .food-order-table-header {
        display: none;
    }

    .food-order-table-row {
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px 14px;
    }

    .food-col-actions {
        justify-content: flex-start;
    }
}

/* === TABELLEN: Kompakterer Header === */

.fi-ta-header-toolbar {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
}

.fi-ta-search-field {
    max-width: 240px;
}

/* Sortier-Dropdown ausblenden (Spalten-Klick reicht) */
.fi-ta-content-header {
    display: none !important;
}

/* === WIKI WIDGET === */

.wiki-widget-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wiki-widget-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 200ms;
}

.wiki-widget-item:hover {
    background: rgba(241, 128, 14, 0.06);
}

.wiki-widget-icon-wrap {
    width: 32px;
    height: 32px;
    background: rgba(241, 128, 14, 0.08);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wiki-widget-icon {
    width: 16px;
    height: 16px;
    color: #f1800e;
}

.wiki-widget-content {
    min-width: 0;
}

.wiki-widget-title {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dark .wiki-widget-title {
    color: #e2e8f0;
}

.wiki-widget-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ================================================================
   BENEFITS ADMIN
   ================================================================ */
.ba-panel {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.dark .ba-panel {
    border-color: #334155;
    background: #1e293b;
}
.ba-search {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
}
.dark .ba-search {
    border-bottom-color: #334155;
}
.ba-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.82rem;
    background: #fff;
    color: #1e293b;
}
.dark .ba-input {
    border-color: #475569;
    background: #0f172a;
    color: #e2e8f0;
}
.ba-user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-align: left;
    background: transparent;
    color: inherit;
}
.dark .ba-user-item {
    border-bottom-color: #1e293b;
}
.ba-user-item.active {
    background: rgba(241,128,14,0.08);
}
.dark .ba-user-item.active {
    background: rgba(241,128,14,0.15);
}
.ba-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.ba-card.active {
    border-color: rgba(16,185,129,0.2);
    background: rgba(16,185,129,0.04);
}
.dark .ba-card {
    border-color: #334155;
    background: #1e293b;
}
.dark .ba-card.active {
    border-color: rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.1);
}
.ba-edit-form {
    padding: 12px 16px;
    border: 1px solid #f1800e;
    border-radius: 10px;
    background: rgba(241,128,14,0.04);
    margin-top: -4px;
}
.dark .ba-edit-form {
    background: rgba(241,128,14,0.08);
}
.ba-btn-cancel {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    font-size: 0.8rem;
    cursor: pointer;
    color: #64748b;
}
.dark .ba-btn-cancel {
    border-color: #475569;
    background: #1e293b;
    color: #94a3b8;
}
.ba-available-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    color: inherit;
}
.dark .ba-available-btn {
    border-color: #334155;
    background: #1e293b;
}

/* === WIKI === */

.wiki-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    min-height: 75vh;
    background: var(--wiki-bg, #ffffff);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.dark .wiki-layout {
    --wiki-bg: #1e293b;
    border-color: #334155;
}

/* Sidebar */
.wiki-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    overflow-y: auto;
    max-height: 80vh;
    position: sticky;
    top: 0;
}

.dark .wiki-sidebar {
    background: #0f172a;
    border-right-color: #334155;
}

.wiki-search {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dark .wiki-search {
    border-bottom-color: #334155;
}

.wiki-search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    background: #ffffff;
    color: #1e293b;
    outline: none;
    transition: border-color 200ms;
}

.wiki-search-input:focus {
    border-color: #f1800e;
    box-shadow: 0 0 0 2px rgba(241, 128, 14, 0.1);
}

.dark .wiki-search-input {
    background: #1e293b;
    border-color: #475569;
    color: #e2e8f0;
}

.wiki-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    pointer-events: none;
}

/* Nav */
.wiki-nav {
    padding: 8px;
}

.wiki-nav-home {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    text-align: left;
    transition: all 200ms;
}

.wiki-nav-home:hover, .wiki-nav-home.active {
    background: rgba(241, 128, 14, 0.08);
    color: #f1800e;
}

.wiki-nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.wiki-nav-category-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 7px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: left;
    transition: all 200ms;
}

.wiki-nav-category-btn:hover, .wiki-nav-category-btn.active {
    background: rgba(241, 128, 14, 0.08);
    color: #f1800e;
}

.wiki-nav-category-btn.sub {
    font-weight: 500;
    padding-left: 24px;
    font-size: 12.5px;
}

.dark .wiki-nav-category-btn {
    color: #cbd5e1;
}

.wiki-nav-chevron {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 200ms;
    color: #94a3b8;
}

.wiki-nav-chevron.rotated {
    transform: rotate(90deg);
}

.wiki-nav-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: 10px;
}

.dark .wiki-nav-count {
    background: #334155;
    color: #64748b;
}

.wiki-nav-pages {
    padding: 2px 0 4px 20px;
}

.wiki-nav-page {
    display: block;
    width: 100%;
    padding: 5px 12px;
    border: none;
    background: transparent;
    border-radius: 4px;
    font-size: 12.5px;
    color: #64748b;
    cursor: pointer;
    text-align: left;
    transition: all 200ms;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wiki-nav-page:hover {
    color: #f1800e;
    background: rgba(241, 128, 14, 0.05);
}

.wiki-nav-page.active {
    color: #f1800e;
    font-weight: 600;
    background: rgba(241, 128, 14, 0.08);
}

.dark .wiki-nav-page {
    color: #94a3b8;
}

/* Content */
.wiki-content {
    padding: 32px 48px;
    overflow-y: auto;
    max-height: 80vh;
}

/* Breadcrumbs */
.wiki-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 13px;
    margin-bottom: 20px;
}

.wiki-breadcrumb-link {
    background: none;
    border: none;
    padding: 0;
    color: #64748b;
    cursor: pointer;
    font-size: 13px;
    transition: color 200ms;
}

.wiki-breadcrumb-link:hover {
    color: #f1800e;
}

.wiki-breadcrumb-sep {
    color: #cbd5e1;
    padding: 0 6px;
}

.wiki-breadcrumb-current {
    color: #1e293b;
    font-weight: 500;
}

.dark .wiki-breadcrumb-current {
    color: #e2e8f0;
}

/* Page Header */
.wiki-page-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.dark .wiki-page-header {
    border-bottom-color: #334155;
}

.wiki-page-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.dark .wiki-page-title {
    color: #f1f5f9;
}

.wiki-page-meta {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

.wiki-page-edit-link {
    margin-left: 12px;
    padding: 3px 10px;
    background: rgba(241, 128, 14, 0.1);
    color: #f1800e;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 200ms;
}

.wiki-page-edit-link:hover {
    background: rgba(241, 128, 14, 0.2);
}

/* Page Body */
.wiki-page-body {
    font-size: 15px;
    line-height: 1.75;
    color: #334155;
}

.dark .wiki-page-body {
    color: #cbd5e1;
}

.wiki-page-body h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 32px 0 12px;
    color: #0f172a;
}

.wiki-page-body h3 {
    font-size: 17px;
    font-weight: 600;
    margin: 24px 0 8px;
    color: #1e293b;
}

.dark .wiki-page-body h2, .dark .wiki-page-body h3 {
    color: #e2e8f0;
}

.wiki-page-body p {
    margin: 0 0 16px;
}

.wiki-page-body ul, .wiki-page-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}
.wiki-page-body ul {
    list-style-type: disc;
}
.wiki-page-body ol {
    list-style-type: decimal;
}

.wiki-page-body li {
    margin-bottom: 6px;
}

.wiki-page-body img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.wiki-page-body a {
    color: #f1800e;
    text-decoration: none;
}

.wiki-page-body a:hover {
    text-decoration: underline;
}

.wiki-page-body blockquote {
    border-left: 3px solid #f1800e;
    padding: 8px 16px;
    margin: 16px 0;
    background: #fef8f0;
    border-radius: 0 6px 6px 0;
    color: #78350f;
}

.dark .wiki-page-body blockquote {
    background: rgba(241, 128, 14, 0.1);
    color: #fbbf24;
}

.wiki-page-body pre, .wiki-page-body code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 13px;
}

.wiki-page-body pre {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

.dark .wiki-page-body pre {
    background: #0f172a;
}

.wiki-page-body code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
}

.dark .wiki-page-body code {
    background: #1e293b;
}

.wiki-page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.wiki-page-body th, .wiki-page-body td {
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.wiki-page-body th {
    background: #f8fafc;
    font-weight: 600;
}

.dark .wiki-page-body th {
    background: #1e293b;
}

.dark .wiki-page-body th, .dark .wiki-page-body td {
    border-color: #334155;
}

/* Revisions */
.wiki-revisions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.dark .wiki-revisions {
    border-top-color: #334155;
}

.wiki-revisions-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.wiki-revisions-toggle:hover {
    color: #f1800e;
}

.wiki-revisions-list {
    margin-top: 12px;
}

.wiki-revision-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    font-size: 13px;
    color: #64748b;
    border-bottom: 1px solid #f8fafc;
}

.wiki-revision-date {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

.wiki-revision-author {
    font-weight: 500;
    color: #475569;
}

.wiki-revision-note {
    color: #94a3b8;
    font-style: italic;
}

/* Heading */
.wiki-heading {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 16px;
}

.dark .wiki-heading {
    color: #f1f5f9;
}

.wiki-heading-count {
    font-weight: 400;
    color: #94a3b8;
    font-size: 16px;
}

.wiki-subheading {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 12px;
}

.dark .wiki-subheading {
    color: #e2e8f0;
}

.wiki-intro {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 28px;
}

.wiki-empty {
    color: #94a3b8;
    font-size: 14px;
    padding: 20px 0;
}

.wiki-category-desc {
    color: #64748b;
    font-size: 14px;
    margin: -8px 0 20px;
}

/* Category Cards */
.wiki-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.wiki-category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 200ms;
    text-align: left;
}

.wiki-category-card:hover {
    border-color: #f1800e;
    box-shadow: 0 2px 8px rgba(241, 128, 14, 0.1);
    transform: translateY(-1px);
}

.dark .wiki-category-card {
    background: #1e293b;
    border-color: #334155;
}

.wiki-category-card-icon {
    width: 36px;
    height: 36px;
    background: rgba(241, 128, 14, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.wiki-category-card-svg {
    width: 18px;
    height: 18px;
    color: #f1800e;
}

.wiki-category-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.dark .wiki-category-card-title {
    color: #f1f5f9;
}

.wiki-category-card-count {
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.wiki-category-card-desc {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.4;
}

/* Page List */
.wiki-page-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wiki-page-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    text-align: left;
    transition: all 200ms;
}

.wiki-page-list-item:hover {
    background: rgba(241, 128, 14, 0.06);
    color: #f1800e;
}

.dark .wiki-page-list-item {
    color: #cbd5e1;
}

.wiki-page-list-icon {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Search Results */
.wiki-search-results {
    /* nothing special */
}

.wiki-search-result-item {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-align: left;
    transition: background 200ms;
}

.wiki-search-result-item:hover {
    background: rgba(241, 128, 14, 0.04);
}

.dark .wiki-search-result-item {
    border-bottom-color: #334155;
}

.wiki-search-result-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}

.dark .wiki-search-result-title {
    color: #f1f5f9;
}

.wiki-search-result-meta {
    font-size: 13px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Toggle Button - nur auf Mobile sichtbar */
.wiki-mobile-nav-toggle {
    display: none;
}

/* Mobile */
@media (max-width: 768px) {
    .wiki-layout {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        max-height: none;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        position: static;
    }

    .wiki-mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 14px;
        background: none;
        border: none;
        border-top: 1px solid #e2e8f0;
        font-size: 0.85rem;
        font-weight: 600;
        color: inherit;
        cursor: pointer;
    }
    .dark .wiki-mobile-nav-toggle {
        border-top-color: #334155;
    }

    .wiki-nav-collapsed {
        display: none !important;
    }

    .wiki-content {
        padding: 20px;
        max-height: none;
    }

    .wiki-page-title {
        font-size: 22px;
    }

    .wiki-categories-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   REISEKOSTEN / TRAVEL EXPENSES
   ================================================================ */

.te-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.te-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.te-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.te-input {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: inherit;
    background: #fff;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.dark .te-input {
    background: #1e293b;
    border-color: #334155;
    color: #f1f5f9;
}

.te-input:focus {
    border-color: #f1800e;
}

.te-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.te-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #f1800e;
}

.te-btn-secondary {
    padding: 8px 16px;
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.dark .te-btn-secondary {
    border-color: #334155;
    color: #94a3b8;
}

.te-btn-secondary:hover {
    background: #f8fafc;
    border-color: #f1800e;
    color: #f1800e;
}

.dark .te-btn-secondary:hover {
    background: rgba(241,128,14,0.1);
}

/* Day Cards */
.te-day-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafbfc;
    transition: border-color 0.15s;
}

.dark .te-day-card {
    background: rgba(255,255,255,0.02);
    border-color: #334155;
}

.te-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.te-day-number {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f1800e;
}

.te-day-action {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.12s;
    display: flex;
    align-items: center;
}

.te-day-action:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.te-day-action-delete:hover {
    background: #fef2f2;
    border-color: #dc2626;
    color: #dc2626;
}

.te-day-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 2fr;
    gap: 10px;
}

.te-day-options {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.te-day-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.te-day-calc {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(100,116,139,0.15);
    font-size: 0.78rem;
    color: #64748b;
    flex-wrap: wrap;
}

.te-day-payout {
    margin-left: auto;
    color: #059669;
    font-size: 0.85rem;
}

/* Total Bar */
.te-total-bar {
    display: flex;
    gap: 24px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dark .te-total-bar {
    background: #1e293b;
    border-color: #334155;
}

.te-total-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.te-total-highlight {
    margin-left: auto;
}

.te-total-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

.te-total-value {
    font-size: 1rem;
    font-weight: 700;
}

/* Actions */
.te-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Status Badges */
.te-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.te-status-entwurf { background: #f1f5f9; color: #64748b; }
.te-status-eingereicht { background: #dbeafe; color: #1d4ed8; }
.te-status-geprueft { background: #fef3c7; color: #92400e; }
.te-status-erstattet { background: #dcfce7; color: #166534; }

.dark .te-status-entwurf { background: rgba(100,116,139,0.15); color: #94a3b8; }
.dark .te-status-eingereicht { background: rgba(59,130,246,0.15); color: #60a5fa; }
.dark .te-status-geprueft { background: rgba(245,158,11,0.15); color: #fbbf24; }
.dark .te-status-erstattet { background: rgba(34,197,94,0.15); color: #4ade80; }

/* Cards */
.te-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.te-card {
    border: 1px solid rgba(100,116,139,0.12);
    border-radius: 12px;
    padding: 16px 20px;
    transition: border-color 0.15s, box-shadow 0.15s;
    border-left: 4px solid #94a3b8;
}
.te-card:hover {
    border-color: rgba(100,116,139,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.te-card-entwurf { border-left-color: #94a3b8; }
.te-card-eingereicht { border-left-color: #3b82f6; }
.te-card-geprueft { border-left-color: #f59e0b; }
.te-card-erstattet { border-left-color: #059669; }
.te-card-abgelehnt { border-left-color: #dc2626; }

.dark .te-card {
    border-color: rgba(148,163,184,0.12);
}
.dark .te-card:hover {
    border-color: rgba(148,163,184,0.25);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.te-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.te-card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.te-card-purpose {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
}
.te-card-period {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.te-card-days {
    background: rgba(100,116,139,0.08);
    padding: 1px 8px;
    border-radius: 99px;
    font-size: 0.72rem;
}
.te-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed rgba(100,116,139,0.1);
    font-size: 0.75rem;
    color: #94a3b8;
}
.te-card-meta:empty { display: none; }
.te-card-note {
    color: #f1800e;
    font-style: italic;
}
.te-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(100,116,139,0.08);
}
.te-card-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #059669;
}
.te-card-actions {
    display: flex;
    gap: 8px;
}

/* List (Desktop fallback) */
.te-list-header {
    display: grid;
    grid-template-columns: 1.5fr 2fr 60px 100px 100px 80px;
    gap: 12px;
    padding: 10px 16px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    border-bottom: 1px solid rgba(100,116,139,0.15);
}

.te-list-row {
    display: grid;
    grid-template-columns: 1.5fr 2fr 60px 100px 100px 80px;
    gap: 12px;
    padding: 12px 16px;
    font-size: 0.85rem;
    align-items: center;
    border-bottom: 1px solid rgba(100,116,139,0.06);
    transition: background 0.1s;
}

.te-list-row:hover {
    background: rgba(100,116,139,0.03);
}

/* View Page */
.te-view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.dark .te-view-header {
    background: #1e293b;
    border-color: #334155;
}

.te-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.te-view-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.te-view-value {
    font-size: 0.9rem;
}

/* Tabs */
.te-tab, .te-tab-active {
    padding: 10px 18px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #64748b;
    transition: all 0.15s;
}
.te-tab:hover { color: #334155; }
.te-tab-active {
    color: #f1800e;
    border-bottom-color: #f1800e;
    font-weight: 600;
}
.dark .te-tab { color: #94a3b8; }
.dark .te-tab:hover { color: #e2e8f0; }
.dark .te-tab-active { color: #f1800e; border-bottom-color: #f1800e; }

/* Secondary Button */
.te-btn-secondary {
    padding: 8px 16px;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    color: #334155;
}
.te-btn-secondary:hover { background: #f8fafc; border-color: #cbd5e1; }
.dark .te-btn-secondary { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.dark .te-btn-secondary:hover { background: #334155; }

/* Table */
.te-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.te-table th {
    padding: 8px 10px;
    text-align: left;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    border-bottom: 1px solid rgba(100,116,139,0.15);
    white-space: nowrap;
}

.te-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(100,116,139,0.06);
}

.te-table tfoot td {
    padding: 10px;
    border-top: 2px solid rgba(100,116,139,0.2);
    border-bottom: none;
}

/* Timeline */
.te-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.te-timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.te-timeline-item span {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-left: 4px;
}

.te-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

.te-timeline-dot.active { background: #f1800e; }
.te-timeline-dot.success { background: #059669; }

/* ================================================================
   SHOP
   ================================================================ */

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    min-height: 60vh;
}

/* Sidebar */
.shop-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.shop-search { margin-bottom: 4px; }
.shop-categories {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.shop-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border: none;
    background: none;
    border-radius: 8px;
    font-size: 0.85rem;
    color: inherit;
    cursor: pointer;
    transition: background 0.1s;
    text-align: left;
    width: 100%;
}
.shop-cat-item:hover { background: rgba(100,116,139,0.06); }
.shop-cat-item.active { background: rgba(241,128,14,0.1); color: #f1800e; font-weight: 600; }
.shop-cat-child { padding-left: 28px; font-size: 0.82rem; }
.shop-cat-count {
    font-size: 0.7rem;
    background: rgba(100,116,139,0.08);
    padding: 1px 8px;
    border-radius: 99px;
    color: #94a3b8;
}

/* Mini-Warenkorb */
.shop-mini-cart {
    border: 1px solid rgba(100,116,139,0.12);
    border-radius: 12px;
    overflow: hidden;
}
.shop-mini-cart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(100,116,139,0.08);
    font-size: 0.85rem;
}
.shop-cart-badge {
    background: #f1800e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
}
.shop-mini-cart-items {
    max-height: 200px;
    overflow-y: auto;
}
.shop-mini-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(100,116,139,0.04);
    font-size: 0.78rem;
    gap: 8px;
}
.shop-mini-cart-info { display: flex; flex-direction: column; min-width: 0; }
.shop-mini-cart-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-mini-cart-variant { color: #94a3b8; font-size: 0.72rem; }
.shop-mini-cart-right { display: flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.shop-mini-cart-remove {
    border: none;
    background: none;
    color: #dc2626;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
}
.shop-mini-cart-remove:hover { background: rgba(220,38,38,0.08); }
.shop-mini-cart-footer {
    padding: 12px 14px;
    border-top: 1px solid rgba(100,116,139,0.1);
}
.shop-mini-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}
.shop-checkout-btn {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}
.shop-checkout-btn:hover { background: #d96e0c; color: #fff; }
.shop-checkout-btn-disabled {
    background: #94a3b8;
    cursor: not-allowed;
    font-size: 0.7rem;
}
.shop-checkout-btn-disabled:hover { background: #94a3b8; }

/* Bestell-Status Badges */
.shop-order-status {
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
.shop-order-status-pending { background: #fef3c7; color: #92400e; }
.shop-order-status-processing { background: #dbeafe; color: #1e40af; }
.shop-order-status-partially_delivered { background: #fef3c7; color: #92400e; }
.shop-order-status-delivered { background: #d1fae5; color: #065f46; }
.shop-order-status-cancelled { background: #fee2e2; color: #991b1b; }

.shop-order-card {
    border-bottom: 1px solid rgba(100,116,139,0.1);
    transition: background 0.1s;
}
.shop-order-card:hover {
    background: rgba(100,116,139,0.04);
}

/* Checkout */
.shop-checkout-page {
    max-width: 640px;
}
.shop-checkout-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.shop-checkout-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.shop-checkout-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
}
.shop-checkout-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.shop-checkout-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}
.shop-qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}
.shop-qty-btn:hover { background: #e2e8f0; }
.shop-qty-value {
    width: 28px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
}
.shop-checkout-remove {
    border: none;
    background: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.1s;
}
.shop-checkout-remove:hover { color: #dc2626; }
.shop-checkout-item-qty {
    font-size: 0.85rem;
    color: #64748b;
    min-width: 30px;
    text-align: center;
}
.shop-checkout-item-price {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 80px;
    text-align: right;
}
.shop-checkout-summary {
    padding: 12px 0;
    border-top: 1px solid #e2e8f0;
    margin-bottom: 16px;
}
.shop-checkout-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
}
.shop-checkout-total {
    font-size: 1.1rem !important;
    font-weight: 700;
    padding-top: 8px;
    border-top: 2px solid #e2e8f0;
    margin-top: 4px;
}
.shop-checkout-payment {
    margin-bottom: 20px;
}
.shop-payment-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shop-payment-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.shop-payment-option:hover {
    border-color: #cbd5e1;
}
.shop-payment-option.selected {
    border-color: #f1800e;
    background: #fff7ed;
}
.shop-payment-option input[type="radio"] {
    accent-color: #f1800e;
    width: 18px;
    height: 18px;
}
.shop-payment-option div {
    display: flex;
    flex-direction: column;
}
.shop-payment-option strong {
    font-size: 0.85rem;
}
.shop-payment-option span {
    font-size: 0.75rem;
    color: #64748b;
}
.shop-checkout-final {
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.shop-payment-info {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f0fdf4;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #065f46;
}
.shop-payment-info strong { color: #065f46; }
.shop-payment-info span { font-weight: 700; color: #059669; }

@media (max-width: 640px) {
    .shop-checkout-item {
        flex-wrap: wrap;
    }
    .shop-checkout-item-info {
        width: 100%;
    }
}

/* Produktgrid */
.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.shop-product-card {
    border: 1px solid rgba(100,116,139,0.1);
    border-radius: 12px;
    overflow: hidden;
    background: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    text-align: left;
    width: 100%;
    padding: 0;
}
.shop-product-card:hover {
    border-color: rgba(241,128,14,0.3);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.shop-product-card-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dark .shop-product-card-image { background: #ffffff; }
.shop-product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
    transition: transform 0.2s;
}
.shop-product-card:hover .shop-product-card-image img { transform: scale(1.03); }
.shop-product-card-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #94a3b8;
}
.shop-product-card-info { padding: 12px 14px; }
.shop-product-card-cat { font-size: 0.68rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.shop-product-card-name { display: block; font-weight: 600; font-size: 0.88rem; margin-top: 2px; line-height: 1.3; }
.shop-card-colors { display: flex; gap: 4px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.shop-card-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(100,116,139,0.2);
    flex-shrink: 0;
}
.shop-card-color-more { font-size: 0.65rem; color: #94a3b8; }
.shop-product-card-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.shop-product-card-price { font-weight: 700; color: #f1800e; font-size: 0.9rem; }
.shop-product-card-rating { display: flex; align-items: center; gap: 2px; font-size: 0.78rem; color: #94a3b8; }

/* Sterne */
.shop-star { color: #d1d5db; font-size: 0.9rem; }
.shop-star.filled { color: #f59e0b; }

/* Back Button */
.shop-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(100,116,139,0.15);
    border-radius: 8px;
    background: none;
    color: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    margin-bottom: 16px;
    text-decoration: none;
}
.shop-back-btn:hover { background: rgba(100,116,139,0.05); }

/* Produkt-Detail */
.shop-product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: flex-start;
}
.shop-product-image {
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    aspect-ratio: 1;
}
.dark .shop-product-image { background: #ffffff; }
.shop-product-image img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.shop-product-category {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.shop-product-title { font-size: 1.4rem; font-weight: 700; margin: 4px 0 8px; line-height: 1.2; }
.shop-product-price { font-size: 1.2rem; font-weight: 700; color: #f1800e; margin-bottom: 8px; }
.shop-product-rating { display: flex; align-items: center; gap: 2px; margin-bottom: 16px; }

/* Attribut-Gruppen */
.shop-attr-group { margin-bottom: 16px; }
.shop-attr-label { font-size: 0.8rem; font-weight: 600; display: block; margin-bottom: 8px; }
.shop-attr-options { display: flex; flex-wrap: wrap; gap: 6px; }

/* Swatches */
.shop-swatch {
    border: 2px solid rgba(100,116,139,0.15);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.1s, opacity 0.1s;
    background: none;
    color: inherit;
}
.shop-swatch:hover { border-color: rgba(100,116,139,0.4); }
.shop-swatch.selected { border-color: #f1800e; box-shadow: 0 0 0 1px #f1800e; }
.shop-swatch.disabled { opacity: 0.25; cursor: not-allowed; }
.shop-swatch-color {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    padding: 0;
}
.shop-swatch-image {
    width: 48px;
    height: 48px;
    padding: 2px;
    border-radius: 8px;
}
.shop-swatch-image img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.shop-swatch-text {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Stock Info */
.shop-stock-info { font-size: 0.82rem; margin: 8px 0 12px; font-weight: 600; }

/* Add to Cart */
.shop-add-to-cart { display: flex; gap: 10px; align-items: center; margin-bottom: 24px; }
.shop-quantity {
    display: flex;
    align-items: center;
    border: 1px solid rgba(100,116,139,0.15);
    border-radius: 8px;
    overflow: hidden;
}
.shop-quantity button {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: inherit;
}
.shop-quantity button:hover { background: rgba(100,116,139,0.06); }
.shop-quantity-input {
    width: 48px;
    text-align: center;
    border: none;
    background: none;
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
    -moz-appearance: textfield;
}
.shop-quantity-input::-webkit-outer-spin-button,
.shop-quantity-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.shop-add-btn {
    flex: 1;
    padding: 10px 20px;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.shop-add-btn:hover { background: #d96e0c; }
.shop-add-btn.disabled { background: #94a3b8; cursor: not-allowed; }

/* Beschreibung */
.shop-product-description { margin-top: 24px; border-top: 1px solid rgba(100,116,139,0.08); padding-top: 20px; }
.shop-product-description h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; }
.shop-description-text { font-size: 0.85rem; line-height: 1.6; color: #64748b; }
.shop-description-text img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

/* Bewertungen */
.shop-reviews { margin-top: 24px; border-top: 1px solid rgba(100,116,139,0.08); padding-top: 20px; }
.shop-reviews h3 { font-size: 0.95rem; font-weight: 600; margin-bottom: 12px; }
.shop-review-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(100,116,139,0.06);
}
.shop-review-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.shop-review-stars { display: flex; gap: 1px; }
.shop-review-author { font-size: 0.8rem; font-weight: 600; }
.shop-review-date { font-size: 0.72rem; color: #94a3b8; }
.shop-review-comment { font-size: 0.85rem; margin: 0; color: #64748b; line-height: 1.5; }

/* Dark Mode */
.dark .shop-product-card { border-color: rgba(148,163,184,0.1); }
.dark .shop-product-card:hover { border-color: rgba(241,128,14,0.3); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.dark .shop-mini-cart { border-color: rgba(148,163,184,0.1); }
.dark .shop-cat-item:hover { background: rgba(148,163,184,0.06); }
.dark .shop-description-text { color: #94a3b8; }

/* Mobile Topbar (nur auf Mobile sichtbar) */
.shop-mobile-orders { display: none; margin-top: 24px; }
.shop-mobile-topbar {
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.shop-mobile-search { display: none; }
.shop-mobile-categories {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    scrollbar-width: none;
}
.shop-mobile-categories::-webkit-scrollbar { display: none; }
.shop-mobile-cat {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.shop-mobile-cat.active {
    background: #f1800e;
    color: #fff;
    border-color: #f1800e;
}
.shop-mobile-cat:hover:not(.active) { background: #f8fafc; }

/* Floating Cart (nur auf Mobile sichtbar) */
.shop-floating-cart {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 50;
}
.shop-floating-cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: #122538;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.shop-floating-cart-badge {
    background: #f1800e;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
}
.shop-floating-cart-panel {
    background: #fff;
    border-radius: 12px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 50vh;
    overflow-y: auto;
}
.dark .shop-floating-cart-panel { background: #1e293b; }
.dark .shop-mobile-cat { background: #1e293b; border-color: #334155; color: #94a3b8; }
.dark .shop-mobile-cat.active { background: #f1800e; color: #fff; border-color: #f1800e; }
/* Dark Mode: Checkout */
.dark .shop-checkout-item { background: #1e293b; border-color: #334155; }
.dark .shop-checkout-item-info strong { color: #e2e8f0; }
.dark .shop-checkout-item-info span { color: #94a3b8 !important; }
.dark .shop-checkout-item-price { color: #e2e8f0; }
.dark .shop-checkout-summary { border-color: #334155; }
.dark .shop-checkout-summary-row { color: #cbd5e1; }
.dark .shop-checkout-total { border-color: #475569; color: #e2e8f0; }
.dark .shop-checkout-final { background: #1e293b; border-color: #334155; }
.dark .shop-checkout-page h2 { color: #e2e8f0; }

/* Dark Mode: Zahlungsmethode */
.dark .shop-payment-option { border-color: #334155; color: #e2e8f0; }
.dark .shop-payment-option:hover { border-color: #475569; }
.dark .shop-payment-option.selected { border-color: #f1800e; background: rgba(241,128,14,0.1); }
.dark .shop-payment-option strong { color: #e2e8f0; }
.dark .shop-payment-option span { color: #94a3b8 !important; }
.dark .shop-payment-info { background: rgba(16,185,129,0.1); color: #cbd5e1; border: 1px solid rgba(16,185,129,0.2); }
.dark .shop-payment-info strong { color: #34d399; }
.dark .shop-payment-info span { color: #34d399; }

/* Dark Mode: Quantity Controls */
.dark .shop-qty-btn { background: #334155; color: #e2e8f0; }
.dark .shop-qty-btn:hover { background: #475569; }
.dark .shop-qty-value { color: #e2e8f0; }
.dark .shop-checkout-qty-control { border-color: #334155; }
.dark .shop-checkout-remove { color: #64748b; }
.dark .shop-checkout-remove:hover { color: #ef4444; }

/* Dark Mode: Floating Cart (Mobile) */
.dark .shop-mini-cart-footer div[style*="color: #94a3b8"] { color: #64748b !important; }
.dark .shop-floating-cart-btn { background: #0f172a; }
.dark .shop-floating-cart-panel { background: #1e293b; border: 1px solid #334155; }
.dark .shop-floating-cart-panel .shop-mini-cart-item { border-color: #334155; }
.dark .shop-floating-cart-panel .shop-mini-cart-info span { color: #94a3b8; }
.dark .shop-floating-cart-panel .shop-mini-cart-right span { color: #cbd5e1; }

/* Dark Mode: Mobile Bestellungen */
.dark .shop-mobile-orders h3 { color: #e2e8f0; }
.dark .shop-mobile-orders .shop-order-card { background: #1e293b !important; border-color: #334155 !important; }

/* Dark Mode: Bestell-Status Badges */
.dark .shop-order-status-pending { background: rgba(245,158,11,0.15); color: #fbbf24; }
.dark .shop-order-status-processing { background: rgba(59,130,246,0.15); color: #60a5fa; }
.dark .shop-order-status-partially_delivered { background: rgba(245,158,11,0.15); color: #fbbf24; }
.dark .shop-order-status-delivered { background: rgba(16,185,129,0.15); color: #34d399; }
.dark .shop-order-status-cancelled { background: rgba(239,68,68,0.15); color: #f87171; }

/* Dark Mode: Sidebar Warenkorb + Bestellungen */
.dark .shop-mini-cart-footer { color: #e2e8f0; }
.dark .shop-mini-cart-footer .shop-mini-cart-total span { color: #94a3b8; }
.dark .shop-mini-cart-total strong { color: #e2e8f0; }
.dark .shop-mini-cart-name { color: #e2e8f0; }
.dark .shop-mini-cart-right span { color: #cbd5e1; }
.dark .shop-order-card { border-color: rgba(148,163,184,0.1); }
.dark .shop-order-card:hover { background: rgba(148,163,184,0.06); }

/* Shop Responsive */
@media (max-width: 768px) {
    .shop-mobile-topbar { display: flex; }
    .shop-mobile-search { display: block; }
    .shop-desktop-search { display: none; }
    .shop-floating-cart { display: block; }
    .shop-layout { grid-template-columns: 1fr; }
    .shop-sidebar { display: none; }
    .shop-main { order: 1; padding-bottom: 80px; }
    .shop-mobile-orders { display: block; }
    .shop-checkout-item { flex-wrap: wrap; }
    .shop-checkout-item-info { width: 100%; margin-bottom: 6px; }
    .shop-checkout-item-actions { width: 100%; justify-content: space-between; }
    .shop-product-detail { grid-template-columns: 1fr; gap: 20px; }
    .shop-product-image { max-height: 350px; }
    .shop-product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
    .shop-product-card-info { padding: 10px 12px; }
    .shop-product-card-name { font-size: 0.82rem; }
    .shop-add-to-cart { flex-direction: column; }
    .shop-add-btn { width: 100%; }
    .shop-mini-cart { display: none; } /* Auf Mobile: extra Warenkorb-Seite */
}

/* Passkey Cards */
.passkey-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
}
.dark .passkey-card {
    border-color: #334155;
    background: #1e293b;
    color: #e2e8f0;
}
.passkey-card-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}
.dark .passkey-card-meta {
    color: #94a3b8;
}

/* Profile Link Cards */
.te-link-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--te-border, #e2e8f0);
    border-radius: 8px;
    color: var(--te-text, #334155);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: border-color 0.15s;
}
.te-link-card:hover { border-color: #f1800e; color: #f1800e; }
.dark .te-link-card { border-color: #334155; color: #cbd5e1; }
.dark .te-link-card:hover { border-color: #f1800e; color: #f1800e; }

/* Responsive */
@media (max-width: 768px) {
    .te-form-grid { grid-template-columns: 1fr; }

    /* Tag-Grid: alles untereinander auf Mobile */
    .te-day-grid {
        grid-template-columns: 1fr;
    }
    .te-day-grid > .te-field { grid-column: span 1 !important; }

    /* Date/Time Inputs: volle Breite erzwingen auf iOS */
    input[type="date"].te-input,
    input[type="time"].te-input {
        -webkit-appearance: none;
        appearance: none;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Checkboxen-Reihe: untereinander statt nebeneinander */
    .te-day-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .te-day-row > span[style*="margin-left"] {
        margin-left: 0 !important;
    }

    /* Berechnung: untereinander */
    .te-day-calc {
        flex-direction: column;
        gap: 4px;
    }

    .te-total-bar { flex-direction: column; gap: 12px; }
    .te-total-highlight { margin-left: 0; }
    .te-actions { flex-direction: column; }

    /* Kacheln: etwas kompakter auf Mobile */
    .te-card { padding: 14px 16px; }
    .te-card-purpose { font-size: 0.88rem; }
    .te-card-amount { font-size: 1rem; }

    /* Inputs: max-width begrenzen */
    .te-input {
        max-width: 100%;
        box-sizing: border-box;
    }

    .te-view-grid { grid-template-columns: 1fr; }
    .te-table { font-size: 0.75rem; }
    .te-table th, .te-table td { padding: 6px 6px; }
}

/* Quick Links Widget */
.ql-container { display: flex; flex-direction: column; gap: 12px; }
.ql-category-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
    margin-bottom: -4px;
}
.ql-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.ql-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    text-decoration: none;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1.3;
}
.ql-item:hover {
    border-color: #f1800e;
    background: rgba(241,128,14,0.05);
    color: #f1800e;
}
.ql-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(241,128,14,0.1);
    color: #f1800e;
    flex-shrink: 0;
}
.ql-label { word-break: break-word; }
.dark .ql-item { border-color: #334155; background: #1e293b; color: #cbd5e1; }
.dark .ql-item:hover { border-color: #f1800e; background: rgba(241,128,14,0.08); color: #f1800e; }
.dark .ql-icon { background: rgba(241,128,14,0.15); }

/* ================================================================
   DASHBOARD WIDGET GRID
   ================================================================ */

.dashboard-widget-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .dashboard-widget-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1280px) {
    .dashboard-widget-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Widget-Breiten (responsive) */
.dw-span-full { grid-column: 1 / -1; }
.dw-span-2    { grid-column: span 1; }
.dw-span-1    { grid-column: span 1; }

@media (min-width: 768px) {
    .dw-span-full { grid-column: 1 / -1; }
    .dw-span-2    { grid-column: span 2; }
}

@media (min-width: 1280px) {
    .dw-span-full { grid-column: 1 / -1; }
    .dw-span-2    { grid-column: span 2; }
    .dw-span-1    { grid-column: span 1; }
}

/* ================================================================
   DASHBOARD ANPASSEN — Transitions
   ================================================================ */

/* Overlay fade */
.dcp-overlay-enter       { transition: opacity 0.2s ease; }
.dcp-overlay-enter-start { opacity: 0; }
.dcp-overlay-enter-end   { opacity: 1; }
.dcp-overlay-leave       { transition: opacity 0.15s ease; }
.dcp-overlay-leave-start { opacity: 1; }
.dcp-overlay-leave-end   { opacity: 0; }

/* Panel slide */
.dcp-panel-enter       { transition: transform 0.3s ease; }
.dcp-panel-enter-start { transform: translateX(100%); }
.dcp-panel-enter-end   { transform: translateX(0); }
.dcp-panel-leave       { transition: transform 0.2s ease; }
.dcp-panel-leave-start { transform: translateX(0); }
.dcp-panel-leave-end   { transform: translateX(100%); }

/* ================================================================
   DASHBOARD ANPASSEN
   ================================================================ */

/* FAB-Button */
.dashboard-customize-fab {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 2rem;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(241,128,14,0.4);
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 0.01em;
}
.dashboard-customize-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 18px rgba(241,128,14,0.5);
}
.dashboard-customize-fab:active {
    transform: translateY(0);
}

/* Overlay */
.dashboard-customize-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 40;
}

/* Slide-over Panel */
.dashboard-customize-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: 360px;
    max-width: 100vw;
    z-index: 50;
    background: #fff;
    box-shadow: -4px 0 28px rgba(0,0,0,0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(0);
}
.dark .dashboard-customize-panel {
    background: #1e293b;
    box-shadow: -4px 0 28px rgba(0,0,0,0.4);
}

/* Panel-Header */
.dashboard-customize-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(100,116,139,0.15);
    flex-shrink: 0;
}
.dashboard-customize-panel-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}
.dark .dashboard-customize-panel-title { color: #f1f5f9; }

.dashboard-customize-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    color: #64748b;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.dashboard-customize-close:hover {
    background: rgba(100,116,139,0.1);
    color: #0f172a;
}
.dark .dashboard-customize-close:hover { color: #f1f5f9; }

/* Hinweis-Text */
.dashboard-customize-hint {
    padding: 0.7rem 1.5rem;
    font-size: 0.78rem;
    color: #64748b;
    border-bottom: 1px solid rgba(100,116,139,0.1);
    margin: 0;
    flex-shrink: 0;
    line-height: 1.45;
}

/* Widget-Liste */
.dashboard-customize-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* Einzelnes Widget-Element */
.dashboard-customize-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: #f8fafc;
    border: 1px solid rgba(100,116,139,0.15);
    border-radius: 0.5rem;
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: background 0.15s, opacity 0.2s, border-color 0.15s, transform 0.15s;
}
.dashboard-customize-item:hover {
    background: #f1f5f9;
    border-color: rgba(100,116,139,0.28);
}
.dark .dashboard-customize-item {
    background: #0f172a;
    border-color: rgba(255,255,255,0.07);
}
.dark .dashboard-customize-item:hover {
    background: #1e293b;
    border-color: rgba(255,255,255,0.14);
}
.dashboard-customize-item--dragging {
    opacity: 0.4;
    cursor: grabbing;
    border-color: #f1800e !important;
    border-style: dashed;
    transform: scale(0.98);
}

.dashboard-customize-item-handle {
    color: #94a3b8;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    cursor: grab;
}

.dashboard-customize-item-label {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
}
.dark .dashboard-customize-item-label { color: #e2e8f0; }

/* Toggle-Switch */
.dashboard-customize-toggle {
    position: relative;
    display: flex;
    align-items: center;
    width: 2.5rem;
    height: 1.375rem;
    background: #cbd5e1;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}
.dashboard-customize-toggle.is-on { background: #f1800e; }

.dashboard-customize-toggle-thumb {
    position: absolute;
    left: 0.1875rem;
    width: 1rem;
    height: 1rem;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.dashboard-customize-toggle.is-on .dashboard-customize-toggle-thumb {
    transform: translateX(1.125rem);
}

/* Aktionen */
.dashboard-customize-actions {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(100,116,139,0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}
.dashboard-customize-save {
    display: block;
    width: 100%;
    padding: 0.625rem 1rem;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 2.5rem;
}
.dashboard-customize-save:hover { background: #d9720c; }

.dashboard-customize-reset {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    background: none;
    color: #64748b;
    border: 1px solid rgba(100,116,139,0.2);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    min-height: 2.25rem;
}
.dashboard-customize-reset:hover {
    color: #0f172a;
    border-color: rgba(100,116,139,0.4);
}
.dark .dashboard-customize-reset:hover { color: #f1f5f9; }

@media (max-width: 640px) {
    .dashboard-customize-panel { width: 100vw; }
    .dashboard-customize-fab { bottom: 4.5rem; right: 1rem; }
}


/* ==========================================================================
   FEEDBACK FAB
   ========================================================================== */

.feedback-fab {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 40;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(100, 116, 139, 0.12);
    border: 1px solid rgba(100, 116, 139, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.feedback-fab:hover {
    background: rgba(100, 116, 139, 0.22);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.dark .feedback-fab {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.1);
}
.dark .feedback-fab:hover { background: rgba(255,255,255,0.13); }

.feedback-fab-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #64748b;
}
.dark .feedback-fab-icon { color: #94a3b8; }

/* Overlay */
.feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Modal */
.feedback-modal {
    background: #fff;
    border-radius: 1rem;
    width: 100%;
    max-width: 28rem;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
    overflow: hidden;
}
.dark .feedback-modal {
    background: #1e293b;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

/* Header */
.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.125rem 1.5rem;
    border-bottom: 1px solid rgba(100,116,139,0.15);
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
}
.dark .feedback-modal-header { color: #f1f5f9; border-bottom-color: rgba(100,116,139,0.25); }

.feedback-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.375rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    transition: background 0.15s;
}
.feedback-modal-close:hover { background: rgba(100,116,139,0.1); color: #64748b; }
.dark .feedback-modal-close:hover { background: rgba(255,255,255,0.08); }

/* Body */
.feedback-modal-body {
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.feedback-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.feedback-form-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
}
.dark .feedback-form-label { color: #94a3b8; }

.feedback-select,
.feedback-input,
.feedback-textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(100,116,139,0.3);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #fff;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
.dark .feedback-select,
.dark .feedback-input,
.dark .feedback-textarea {
    background: #0f172a;
    border-color: rgba(100,116,139,0.35);
    color: #f1f5f9;
}
.feedback-select:focus,
.feedback-input:focus,
.feedback-textarea:focus {
    border-color: #f1800e;
    box-shadow: 0 0 0 3px rgba(241,128,14,0.15);
}
.feedback-textarea {
    resize: vertical;
    min-height: 7rem;
    line-height: 1.5;
}

.feedback-form-error {
    font-size: 0.75rem;
    color: #dc2626;
}

/* Footer */
.feedback-modal-footer {
    display: flex;
    gap: 0.625rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(100,116,139,0.15);
    justify-content: flex-end;
}
.dark .feedback-modal-footer { border-top-color: rgba(100,116,139,0.25); }

.feedback-btn-cancel {
    padding: 0.5rem 1rem;
    background: none;
    border: 1px solid rgba(100,116,139,0.25);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 2.25rem;
    font-family: inherit;
}
.feedback-btn-cancel:hover { background: rgba(100,116,139,0.08); }
.dark .feedback-btn-cancel { color: #94a3b8; border-color: rgba(100,116,139,0.35); }

.feedback-btn-submit {
    padding: 0.5rem 1.25rem;
    background: #f1800e;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 2.25rem;
    font-family: inherit;
}
.feedback-btn-submit:hover { background: #d9720c; }
.feedback-btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

/* Erfolgsmeldung */
.feedback-modal-success {
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.feedback-success-icon {
    width: 3rem;
    height: 3rem;
    color: #10b981;
}
.feedback-success-text {
    font-size: 0.9375rem;
    color: #334155;
    line-height: 1.5;
}
.dark .feedback-success-text { color: #94a3b8; }

.feedback-success-close {
    margin-top: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: #f1800e;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}
.feedback-success-close:hover { background: #d9720c; }

@media (max-width: 640px) {
    .feedback-fab { bottom: 4.5rem; left: 1rem; }
    .feedback-overlay { align-items: flex-end; padding: 0; }
    .feedback-modal { border-radius: 1rem 1rem 0 0; max-width: 100%; }
}


/* ==========================================================================
   FEEDBACK PAGE — Intro-Box
   ========================================================================== */

.feedback-page-intro {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.125rem 1.375rem;
    background: rgba(241, 128, 14, 0.07);
    border: 1px solid rgba(241, 128, 14, 0.2);
    border-radius: 0.75rem;
    margin-bottom: 0.25rem;
}
.dark .feedback-page-intro {
    background: rgba(241, 128, 14, 0.1);
    border-color: rgba(241, 128, 14, 0.25);
}

.feedback-page-intro-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    color: #f1800e;
    margin-top: 0.125rem;
}
.feedback-page-intro-icon svg {
    width: 100%;
    height: 100%;
}

.feedback-page-intro-text {
    font-size: 0.875rem;
    line-height: 1.55;
    color: #334155;
}
.dark .feedback-page-intro-text { color: #94a3b8; }

.feedback-page-intro-text strong {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}
.dark .feedback-page-intro-text strong { color: #f1f5f9; }

.feedback-page-intro-text p {
    margin: 0;
    opacity: 0.85;
}

/* ================================================================
   PURCHASE ORDER — Lagerbestellung Suche
   ================================================================ */

.po-stock-search-dropdown {
    position: absolute;
    z-index: 50;
    width: 100%;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
}
.dark .po-stock-search-dropdown {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.po-stock-search-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}
.po-stock-search-item:last-child {
    border-bottom: none;
}
.po-stock-search-item:hover {
    background: #f8fafc;
}
.dark .po-stock-search-item {
    border-bottom-color: #334155;
}
.dark .po-stock-search-item:hover {
    background: #334155;
}

.po-stock-search-meta {
    font-size: 0.78rem;
    color: #64748b;
}
.dark .po-stock-search-meta {
    color: #94a3b8;
}

/* Lagerbestellung Hinweisbox */
.po-info-box-stock {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #3730a3;
}
.dark .po-info-box-stock {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
}

/* Aus Lager Hinweisbox */
.po-info-box-fromstock {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: #065f46;
}
.dark .po-info-box-fromstock {
    background: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.3);
    color: #6ee7b7;
}

/* ================================================================
   ORGANIGRAMM
   ================================================================ */

/* Toolbar */
.org-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.dark .org-toolbar { background: #1e293b; border-color: #334155; }
.org-toolbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.org-toolbar-right { display: flex; align-items: center; gap: 12px; }

.org-search-wrap { position: relative; flex: 1; max-width: 320px; }
.org-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #94a3b8; pointer-events: none; }
.org-search-input {
    width: 100%; padding: 8px 12px 8px 36px; border: 1px solid #e2e8f0; border-radius: 8px;
    font-size: 0.875rem; background: #f8fafc; color: #1e293b; outline: none; transition: border-color 150ms;
}
.org-search-input:focus { border-color: #f1800e; box-shadow: 0 0 0 2px rgba(241, 128, 14, 0.15); }
.dark .org-search-input { background: #0f172a; border-color: #334155; color: #e2e8f0; }
.dark .org-search-input:focus { border-color: #f1800e; }

.org-zoom-controls { display: flex; align-items: center; gap: 2px; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.dark .org-zoom-controls { background: #0f172a; }
.org-zoom-btn {
    display: flex; align-items: center; justify-content: center; width: 32px; height: 32px;
    border: none; background: none; border-radius: 6px; cursor: pointer; color: #64748b; transition: background 100ms;
}
.org-zoom-btn:hover { background: #e2e8f0; color: #1e293b; }
.dark .org-zoom-btn:hover { background: #334155; color: #e2e8f0; }
.org-zoom-label { width: auto; padding: 0 6px; font-size: 0.75rem; font-weight: 600; pointer-events: none; }
.org-zoom-icon { width: 16px; height: 16px; }

/* Tree */
.org-tree-wrapper { background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 32px 24px; min-height: 300px; }
.dark .org-tree-wrapper { background: #1e293b; border-color: #334155; }
.org-tree-scroll { overflow-x: auto; overflow-y: visible; padding-bottom: 16px; }
.org-tree { display: inline-block; min-width: 100%; transition: transform 200ms ease; }

.org-level { display: flex; gap: 20px; justify-content: center; }
.org-branch { display: flex; flex-direction: column; align-items: center; position: relative; }

/* Connector Lines */
.org-children {
    position: relative; margin-top: 28px; padding-top: 28px;
}
/* Vertikale Linie vom Eltern runter zum horizontalen Balken */
.org-children::before {
    content: ''; position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
    width: 2px; height: 28px; background: #475569;
}
:root:not(.dark) .org-children::before { background: #cbd5e1; }

/* Kinder-Level: Grid mit gleich breiten Spalten fuer konsistente Linien */
.org-children > .org-level {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    justify-items: center;
    position: relative;
}
.org-children > .org-level > .org-branch { position: relative; padding: 0 10px; width: 100%; }

/* EINE horizontale Linie: von Mitte erster Spalte bis Mitte letzter Spalte */
.org-children > .org-level::before {
    content: ''; position: absolute; top: -28px;
    left: calc(50% / var(--children-count, 1));
    right: calc(50% / var(--children-count, 1));
    height: 2px; background: #475569;
}
:root:not(.dark) .org-children > .org-level::before { background: #cbd5e1; }

/* Vertikale Linie vom horizontalen Balken runter zum Kind */
.org-children > .org-level > .org-branch::before {
    content: ''; position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
    width: 2px; height: 28px; background: #475569;
}
:root:not(.dark) .org-children > .org-level > .org-branch::before { background: #cbd5e1; }

.org-card { position: relative; }

/* ---- Grid-Modus bei vielen Kindern (>4) ---- */
/* Eine durchgehende vertikale Linie vom Eltern runter zum Grid-Oberrand */
.org-children-grid::before {
    height: 56px; /* deckt margin (28) + padding (28) ab */
}
/* Grid-Layout: 3 Spalten mit Wrap (Auto-Flow zuruecksetzen!) */
.org-children-grid > .org-level {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    justify-items: stretch;
}
/* Keine horizontale Linie + keine Vertikale pro Branch im Grid-Modus */
.org-children-grid > .org-level::before { display: none; }
.org-children-grid > .org-level > .org-branch::before { display: none; }
.org-children-grid > .org-level > .org-branch { padding: 0; width: 100%; }

@media (max-width: 1024px) {
    .org-children-grid > .org-level { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---- Kompakte Karte ---- */
.org-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 14px 16px;
    min-width: 160px;
    max-width: 240px;
    cursor: pointer;
    transition: all 150ms;
    user-select: none;
}
.org-card:hover {
    border-color: #f1800e;
    box-shadow: 0 0 0 1px rgba(241, 128, 14, 0.3), 0 4px 16px rgba(0,0,0,0.2);
}
/* Light Mode */
:root:not(.dark) .org-card { background: #ffffff; border-color: #e2e8f0; }
:root:not(.dark) .org-card:hover { border-color: #f1800e; box-shadow: 0 0 0 1px rgba(241, 128, 14, 0.2), 0 4px 16px rgba(0,0,0,0.06); }

.org-card-name {
    font-size: 0.88rem; font-weight: 600; color: #f1f5f9;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
:root:not(.dark) .org-card-name { color: #1e293b; }
.org-card-leader {
    font-size: 0.72rem; color: #94a3b8; margin: 2px 0 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Avatar-Reihe */
.org-card-members { display: flex; align-items: center; gap: 8px; }
.org-card-avatars { display: flex; flex-shrink: 0; }
.org-card-avatar {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
    border: 2px solid #0f172a; margin-left: -8px; position: relative;
}
.org-card-avatar:first-child { margin-left: 0; }
:root:not(.dark) .org-card-avatar { border-color: #ffffff; }

.org-card-avatar-initials {
    display: flex; align-items: center; justify-content: center;
    background: #f1800e; color: #fff; font-size: 0.6rem; font-weight: 700;
}
.org-card-avatar-more {
    display: flex; align-items: center; justify-content: center;
    background: #334155; color: #94a3b8; font-size: 0.6rem; font-weight: 600;
}
:root:not(.dark) .org-card-avatar-more { background: #e2e8f0; color: #64748b; }

.org-card-count { font-size: 0.75rem; color: #94a3b8; white-space: nowrap; }
.org-card-empty { font-size: 0.75rem; color: #64748b; font-style: italic; }

/* Fuss der Karte: Sub-Teams + Klick-Hinweis */
.org-card-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 10px; padding-top: 8px; border-top: 1px solid #1e293b;
    font-size: 0.75rem; color: #64748b;
}
:root:not(.dark) .org-card-footer { border-color: #f1f5f9; }

.org-card-subteams { display: flex; align-items: center; gap: 4px; }
.org-card-subteams-icon { width: 16px; height: 16px; }
.org-card-total { color: #94a3b8; }

.org-card-hint {
    display: flex; align-items: center; gap: 2px;
    color: #64748b; font-size: 0.7rem; opacity: 0.7;
    transition: all 150ms;
}
.org-card:hover .org-card-hint { color: #f1800e; opacity: 1; }
.org-card-hint-icon { width: 14px; height: 14px; }

/* Such-Zustaende */
.org-branch-match .org-card {
    border-color: #f1800e !important;
    box-shadow: 0 0 0 2px rgba(241, 128, 14, 0.3), 0 4px 16px rgba(241, 128, 14, 0.15) !important;
}
.org-branch-dimmed .org-card {
    opacity: 0.3;
    filter: saturate(0.5);
}
.org-branch-dimmed .org-card:hover { opacity: 0.6; }

/* ---- Detail Overlay ---- */
.org-detail-overlay {
    position: fixed; inset: 0; z-index: 50;
    background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.org-detail-panel {
    background: #ffffff; border-radius: 16px; width: 100%; max-width: 480px;
    max-height: 80vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.dark .org-detail-panel { background: #1e293b; }

.org-detail-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    padding: 20px 20px 12px; gap: 12px;
}
.org-detail-header-content { flex: 1; min-width: 0; }
.org-detail-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.org-detail-title { font-size: 1.1rem; font-weight: 700; color: #1e293b; margin: 0; }
.dark .org-detail-title { color: #f1f5f9; }
.org-detail-desc { font-size: 0.8rem; color: #94a3b8; margin: 4px 0 0; line-height: 1.4; }

.org-detail-edit,
.org-detail-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border: none; background: #f1f5f9;
    border-radius: 8px; cursor: pointer; color: #64748b; flex-shrink: 0; transition: all 100ms;
    text-decoration: none;
}
.org-detail-close:hover { background: #e2e8f0; color: #1e293b; }
.org-detail-edit:hover { background: rgba(241, 128, 14, 0.1); color: #f1800e; }
.dark .org-detail-close,
.dark .org-detail-edit { background: #0f172a; color: #94a3b8; }
.dark .org-detail-close:hover { background: #334155; color: #f1f5f9; }
.dark .org-detail-edit:hover { background: rgba(241, 128, 14, 0.15); color: #f1800e; }

.org-detail-empty {
    padding: 24px 20px; text-align: center;
    font-size: 0.85rem; color: #94a3b8; font-style: italic;
}

/* Teamleiter-Sektion */
.org-detail-leader-section {
    padding: 0 20px 12px; border-bottom: 1px solid #f1f5f9;
}
.dark .org-detail-leader-section { border-color: #0f172a; }
.org-detail-leader-label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: #f1800e; margin-bottom: 8px;
}
.org-detail-leader-row {
    display: flex; align-items: center; gap: 12px; padding: 8px;
    background: rgba(241, 128, 14, 0.04); border-radius: 10px;
}
.dark .org-detail-leader-row { background: rgba(241, 128, 14, 0.06); }
.org-detail-leader-photo {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
    flex-shrink: 0; border: 2px solid #f1800e;
}

.org-detail-members-label {
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    color: #64748b; padding: 12px 20px 4px;
}

.org-detail-members { padding: 0 20px 16px; }
.org-detail-person {
    display: flex; align-items: center; gap: 12px; padding: 10px 8px;
    border-radius: 10px; transition: background 100ms;
}
.org-detail-person:hover { background: #f8fafc; }
.dark .org-detail-person:hover { background: #0f172a; }
.org-detail-person-leader { background: rgba(241, 128, 14, 0.04); }
.dark .org-detail-person-leader { background: rgba(241, 128, 14, 0.06); }

.org-detail-person-photo { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.org-detail-person-leader .org-detail-person-photo { border: 2px solid #f1800e; }
.org-detail-person-initials {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%;
    background: #f1800e; color: #fff; font-size: 0.8rem; font-weight: 700; flex-shrink: 0;
}
.org-detail-person-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.org-detail-person-name {
    font-size: 0.88rem; font-weight: 500; color: #1e293b;
    display: flex; align-items: center; gap: 6px;
}
.dark .org-detail-person-name { color: #f1f5f9; }
.org-detail-person-role { font-size: 0.75rem; color: #94a3b8; }
.org-detail-person-actions { display: flex; gap: 4px; flex-shrink: 0; }

.org-action-btn {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px; color: #94a3b8;
    transition: all 100ms; text-decoration: none;
}
.org-action-btn:hover { background: #f1f5f9; color: #f1800e; }
.dark .org-action-btn:hover { background: #0f172a; color: #f1800e; }
.org-action-btn svg { width: 16px; height: 16px; }

.org-leader-badge {
    font-size: 0.6rem; padding: 2px 6px; background: #f1800e; color: #fff;
    border-radius: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
}

.org-activity-badges {
    display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px;
}
.org-activity-badge {
    font-size: 0.68rem; padding: 2px 8px; border-radius: 10px;
    font-weight: 500; line-height: 1.4;
    background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe;
}
.dark .org-activity-badge {
    background: rgba(59, 130, 246, 0.12); color: #93c5fd; border-color: rgba(59, 130, 246, 0.25);
}

/* Empty State */
.org-empty-card { text-align: center; padding: 60px 20px; background: #ffffff; border: 1px solid #e2e8f0; border-radius: 12px; }
.dark .org-empty-card { background: #1e293b; border-color: #334155; }

/* ---- Nicht zugeordnet ---- */
.org-unassigned {
    margin-top: 16px; background: #fffbeb; border: 1px solid #fde68a; border-radius: 12px; padding: 16px;
}
.dark .org-unassigned { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.2); }
.org-unassigned-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; font-weight: 600; color: #92400e; margin: 0 0 12px;
}
.dark .org-unassigned-title { color: #fbbf24; }
.org-unassigned-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.org-person-mini {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px;
    background: #ffffff; border-radius: 8px; border: 1px solid #fde68a;
}
.dark .org-person-mini { background: #1e293b; border-color: rgba(245, 158, 11, 0.15); }
.org-person-mini-photo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.org-person-mini-initials {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%; background: #f59e0b; color: #fff; font-size: 0.7rem; font-weight: 700; flex-shrink: 0;
}
.org-person-mini-name { font-size: 0.82rem; font-weight: 500; color: #1e293b; }
.dark .org-person-mini-name { color: #f1f5f9; }
.org-person-mini-detail { font-size: 0.72rem; color: #94a3b8; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .org-toolbar { flex-direction: column; align-items: stretch; }
    .org-toolbar-left { min-width: unset; }
    .org-toolbar-right { display: none; } /* Zoom-Controls auf Mobile ausblenden */
    .org-search-wrap { max-width: unset; }

    .org-tree-wrapper { padding: 0; background: transparent; border: none; }
    .org-tree { transform: none !important; display: block; }

    /* Root-Ebene: Teams untereinander mit Abstand */
    .org-tree > .org-level {
        flex-direction: column; gap: 14px; align-items: stretch;
    }

    /* Root-Branch wird zum Container (volle Breite) */
    .org-tree > .org-level > .org-branch {
        background: #0f172a;
        border: 1px solid #334155;
        border-radius: 14px;
        overflow: hidden;
        padding: 0;
        align-items: stretch;
        width: 100%;
    }
    :root:not(.dark) .org-tree > .org-level > .org-branch {
        background: #ffffff; border-color: #e2e8f0;
    }

    /* Root-Karte: wird zum Header des Containers */
    .org-tree > .org-level > .org-branch > .org-card {
        background: linear-gradient(180deg, rgba(241, 128, 14, 0.08), transparent);
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #334155;
        max-width: unset;
        min-width: unset;
        padding: 16px;
    }
    :root:not(.dark) .org-tree > .org-level > .org-branch > .org-card {
        background: linear-gradient(180deg, rgba(241, 128, 14, 0.06), transparent);
        border-bottom-color: #f1f5f9;
    }
    .org-tree > .org-level > .org-branch > .org-card:hover {
        box-shadow: none;
        border-color: transparent;
        border-bottom-color: #334155;
    }
    .org-tree > .org-level > .org-branch > .org-card .org-card-name {
        font-size: 1rem;
    }

    /* Children-Container: Body des Root-Containers */
    .org-tree > .org-level > .org-branch > .org-children {
        margin: 0; padding: 10px;
        border-left: none;
    }

    /* Alle Connector-Lines ausblenden */
    .org-children::before,
    .org-children > .org-level > .org-branch::before,
    .org-children > .org-level > .org-branch::after { display: none; }

    /* Sub-Team-Karten: etwas dezenter */
    .org-children .org-card {
        background: #1e293b;
        border-color: #334155;
        min-width: unset;
        max-width: unset;
        padding: 12px 14px;
    }
    :root:not(.dark) .org-children .org-card {
        background: #f8fafc;
        border-color: #e2e8f0;
    }
    .org-children > .org-level {
        display: flex;
        flex-direction: column;
        grid-auto-flow: initial;
        grid-auto-columns: initial;
        gap: 8px;
    }
    .org-children > .org-level::before { display: none; }
    .org-children > .org-level > .org-branch {
        padding: 0;
        width: 100%;
        align-items: stretch;
    }

    /* Verschachtelte Sub-Sub-Teams leicht eingerueckt */
    .org-children .org-children {
        margin: 8px 0 0; padding: 0 0 0 14px;
        border-left: 2px solid #334155;
    }
    :root:not(.dark) .org-children .org-children { border-left-color: #e2e8f0; }

    /* Detail Overlay als Bottom-Sheet */
    .org-detail-overlay { padding: 0; align-items: flex-end; }
    .org-detail-panel {
        max-width: unset; max-height: 85vh;
        border-radius: 16px 16px 0 0;
        animation: org-slideup 220ms ease-out;
    }
    @keyframes org-slideup {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}
