/* ── Lokale Fonts (ersetzt den Google-Fonts-@import) ── */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;            /* variabel: deckt 300..800 UND 900 ab, inkl. optischer Größe (opsz) */
  font-display: swap;
  src: url('../fonts/dm-sans-variable.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500.woff2') format('woff2');
}


:root {
    --primary:        #3b82f6;
    --primary-light:  rgba(59,130,246,0.15);
    --primary-hover:  #2563eb;
    --success:        #10b981;
    --success-light:  rgba(16,185,129,0.1);
    --warning:        #f59e0b;
    --warning-light:  rgba(245,158,11,0.1);
    --danger:         #ef4444;
    --danger-light:   rgba(239,68,68,0.1);
    --bg:             #020617;
    --surface:        rgba(30,41,59,0.5);
    --surface-2:      rgba(15,23,42,0.8);
    --border:         rgba(255,255,255,0.1);
    --border-strong:  rgba(255,255,255,0.2);
    --text-primary:   #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted:     #94a3b8;
    --sidebar-bg:     #0f172a;
    --sidebar-width:  260px;
    --nav-height:     58px;
    --radius-sm:  5px;
    --radius-md:  9px;
    --radius-lg:  13px;
    --radius-xl:  18px;
    --shadow-sm:  0 1px 2px rgba(0,0,0,.3);
    --shadow-md:  0 4px 12px rgba(0,0,0,.4);
    --shadow-lg:  0 12px 32px rgba(0,0,0,.5);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(59,130,246,0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99,102,241,0.15) 0px, transparent 50%);
    color: var(--text-primary);
    overflow-x: hidden;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    top: 0 !important;
}
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
h2 { font-size: 1.2rem; color: var(--text-primary); }

/* NAV */
nav {
    background: rgba(2,6,23,0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 16px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1100;
    box-shadow: var(--shadow-sm);
    gap: 8px;
}
.nav-left { display: flex; align-items: center; gap: 8px; flex-shrink: 0; min-width: 0; }
.menu-toggle {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-md); font-size: 1.2rem; cursor: pointer;
    color: var(--text-secondary); transition: background .15s, color .15s;
    flex-shrink: 0; user-select: none;
}
.menu-toggle:hover { background: var(--surface); color: var(--text-primary); }
.nav-brand img { height: 38px; display: block; }
#nav-project-info { flex: 1; justify-content: center; align-items: center; gap: 3px; min-width: 0; overflow: hidden; }
#nav-project-name { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
#nav-grand-total { color: var(--primary); font-weight: 600; font-family: 'DM Mono', monospace; font-size: 0.82rem; }

/* BUTTONS */
.btn-add {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff; border: none;
    padding: 8px 16px; border-radius: var(--radius-md);
    font-weight: 600; font-size: 0.82rem; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    transition: background .15s, transform .1s, box-shadow .15s;
    white-space: nowrap; font-family: inherit; flex-shrink: 0;
    letter-spacing: -.01em; line-height: 1.4;
    box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.btn-add:hover  { background: var(--primary-hover); box-shadow: 0 6px 20px rgba(59,130,246,0.4); }
.btn-add:active { transform: scale(.97); }

/* ── Responsive Nav ──────────────────────────────────── */
/* Hide logo text on small screens */
@media (max-width: 480px) {
    .nav-brand-text { display: none !important; }
    #nav-btn-new .nav-new-label { display: none !important; }
    #nav-btn-new { padding: 7px 11px !important; font-size: 1.1rem; }
    #nav-btn-save .save-label { display: none !important; }
    #nav-btn-save { padding: 7px 11px !important; font-size: 1.1rem; }
    #nav-project-name { max-width: 100px !important; font-size: 0.78rem !important; }
}
@media (max-width: 640px) {
    #nav-grand-total { display: none; }
    .nav-brand-sub { display: none !important; }
}

/* Hamburger icon → proper icon */
.menu-toggle { font-size: 1.1rem; }
.hamburger-icon {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 20px;
}
.hamburger-icon span {
    display: block; height: 2px; border-radius: 2px;
    background: currentColor; transition: all .25s;
    transform-origin: center;
}
/* animate when open */
.main-menu-sidebar.open ~ nav .hamburger-icon span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.main-menu-sidebar.open ~ nav .hamburger-icon span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.main-menu-sidebar.open ~ nav .hamburger-icon span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

kbd {
    font-family: 'DM Mono', monospace;
    background: rgba(255,255,255,.1); padding: 1px 4px; border-radius: 4px;
    font-size: 0.72em; font-weight: 500; border: 1px solid rgba(255,255,255,.15);
}

/* MAIN MENU SIDEBAR */
.main-menu-sidebar {
    position: fixed; left: calc(-1 * var(--sidebar-width)); top: 0;
    width: var(--sidebar-width); height: 100%;
    background: var(--sidebar-bg); color: #cbd5e1;
    transition: left .25s cubic-bezier(.4,0,.2,1);
    will-change: left; z-index: 2000; padding: 16px 12px;
    display: flex; flex-direction: column; gap: 2px;
    overflow-y: auto; border-right: 1px solid var(--border);
}
.main-menu-sidebar.open { left: 0; }
.main-menu-sidebar > div:first-child { font-size: 1rem; font-weight: 800; color: #fff; margin-bottom: 16px; padding: 4px 10px; letter-spacing: -.02em; }
.menu-item {
    padding: 10px 12px; border-radius: var(--radius-md); cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    font-size: 0.875rem; font-weight: 500; color: #94a3b8;
    transition: background .15s, color .15s; user-select: none;
}
.menu-item:hover  { background: rgba(255,255,255,.05); color: #e2e8f0; }
.menu-item.active { background: var(--primary); color: #fff; }
.menu-item[style*="--danger"] { color: #f87171 !important; margin-top: auto; }
.menu-item[style*="--danger"]:hover { background: rgba(220,38,38,.15); }

.sidebar-overlay { position: fixed; inset: 0; background: rgba(2,6,23,0.7); backdrop-filter: blur(2px); display: none; z-index: 1900; }
.sidebar-overlay.show { display: block; }

/* CONTAINER */
.container { max-width: 1480px; margin: 0 auto; padding: 16px 14px; transition: margin-right .3s ease; }

/* DASHBOARD */
.dashboard-stats { margin-top: 8px; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat-box {
    background: var(--surface); border: 1px solid var(--border);
    backdrop-filter: blur(8px); border-radius: var(--radius-lg);
    padding: 18px 14px; text-align: center;
    border-top: 3px solid var(--border-strong); box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}
.stat-box:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: rgba(59,130,246,0.3); }
.stat-box.primary { border-top-color: var(--primary); }
.stat-box.warning { border-top-color: var(--warning); }
.stat-box.success { border-top-color: var(--success); }
.stat-num { font-size: 2rem; font-weight: 800; color: #fff; line-height: 1; font-family: 'DM Mono', monospace; letter-spacing: -.04em; }
.stat-label { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; letter-spacing: .07em; margin-top: 5px; }

.dash-toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }

/* ── Dashboard Tabs ─────────────────────────────────────── */
.dash-tabs {
    display: flex;
    gap: 3px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px;
    padding: 4px;
    flex-wrap: wrap;
}

/* Mobile: Tabs verstecken, Filter-Button zeigen */
.dash-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: rgba(255,255,255,.04);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.88rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s;
}
.dash-filter-btn:hover { border-color: rgba(255,255,255,.25); }

/* Bottom Sheet */
.dash-bottom-sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    z-index: 8000;
    animation: fadeInOverlay .2s ease;
}
@keyframes fadeInOverlay { from { opacity:0; } to { opacity:1; } }

.dash-bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--surface, #1e293b);
    border-top: 1.5px solid var(--border);
    border-radius: 20px 20px 0 0;
    padding: 12px 16px 32px;
    z-index: 8001;
    animation: slideUpSheet .25s cubic-bezier(.32,.72,0,1);
    max-height: 85vh;
    overflow-y: auto;
}
@keyframes slideUpSheet { from { transform: translateY(100%); } to { transform: translateY(0); } }

.dash-sheet-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    margin: 0 auto 16px;
}

.dash-sheet-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
    margin-bottom: 4px;
}
.dash-sheet-tab:hover { background: rgba(255,255,255,.06); }
.dash-sheet-tab--active { background: rgba(255,255,255,.08) !important; }
.dash-sheet-tab__dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.dash-sheet-tab__count {
    margin-left: auto;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.1);
}

@media (max-width: 640px) {
    .dash-tabs { display: none; }
    .dash-filter-btn { display: inline-flex; }
}

.dash-tab {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 13px;
    border: none;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    background: transparent;
    color: var(--text-muted);
    transition: background 0.18s, color 0.18s, transform 0.12s, box-shadow 0.18s;
    position: relative;
}

.dash-tab:hover:not(.dash-tab--active) {
    background: rgba(255,255,255,.07);
    color: var(--text-secondary, #cbd5e1);
    transform: translateY(-1px);
}

.dash-tab--active {
    color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.15);
    transform: translateY(-1px);
}

.dash-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    transition: background 0.18s, color 0.18s;
}

.dash-tab--active .dash-tab__count {
    background: rgba(255,255,255,.22);
    color: white;
}

.dash-tab:not(.dash-tab--active) .dash-tab__count {
    color: white;
}


.project-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap: 14px; }
.project-card {
    background: var(--surface); border-radius: var(--radius-lg);
    backdrop-filter: blur(8px); padding: 16px 18px;
    border: 1px solid var(--border); cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s; box-shadow: var(--shadow-sm);
}
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--primary); background: rgba(255,255,255,0.05); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.card-name { font-size: 0.95rem; font-weight: 700; color: #fff; }
.card-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 12px; }
.card-delete { background: none; border: none; cursor: pointer; opacity: 0; font-size: 0.95rem; padding: 2px 5px; border-radius: var(--radius-sm); color: var(--danger); transition: opacity .15s, background .15s; flex-shrink: 0; }
.project-card:hover .card-delete { opacity: 1; }
.card-delete:hover { background: var(--danger-light); }
.card-copy { background: none; border: none; cursor: pointer; opacity: 0; font-size: 0.9rem; padding: 2px 5px; border-radius: var(--radius-sm); color: var(--text-muted); transition: opacity .15s, background .15s, color .15s; flex-shrink: 0; }
.project-card:hover .card-copy { opacity: 1; }
.card-copy:hover { background: rgba(59,130,246,.12); color: #3b82f6; }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.status-badge { font-size: 0.68rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; }
.card-sum { font-weight: 700; color: #ffffff; font-size: 0.9rem; font-family: 'DM Mono', monospace; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h2 { color: #fff; margin-bottom: 8px; font-size: 1.2rem; }
.empty-state p  { max-width: 340px; margin: 0 auto 24px; line-height: 1.6; font-size: 0.875rem; }

/* LV EDITOR */
.bereich {
    background: var(--surface); border-radius: var(--radius-lg);
    backdrop-filter: blur(8px); margin-bottom: 16px;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    overflow: visible; transition: box-shadow .2s;
}
.bereich:hover { box-shadow: var(--shadow-md); border-color: rgba(255,255,255,0.15); }
.bereich-header {
    background: rgba(255,255,255,0.02); border-bottom: 1px solid var(--border);
    padding: 11px 14px; display: flex; align-items: center; gap: 8px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.bereich-header span[contenteditable] { font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); outline: none; flex: 1; min-width: 0; }
.bereich-header span[contenteditable]:focus { color: var(--primary); background: rgba(59,130,246,0.1); border-radius: 4px; padding: 0 5px; }

.aufgaben-tabelle { width: 100%; border-collapse: collapse; table-layout: auto; }
.aufgaben-tabelle th { text-align: left; padding: 9px 12px; font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 1px solid var(--border); background: rgba(255,255,255,0.02); white-space: nowrap; }
.aufgabe td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 0.83rem; color: #fff; }
.aufgabe:last-child td { border-bottom: none; }
.aufgabe:hover td { background: rgba(255,255,255,0.03); }

.val-qty      { width: 80px !important; }
.val-price    { width: 88px !important; }
.task-time    { width: 85px !important; font-size: 0.75rem; margin-right: 2px; }
.task-time-end { width: 85px !important; font-size: 0.75rem; }

/* INPUTS */
input, select, textarea {
    font-family: inherit; font-size: 0.83rem; color: #fff;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    padding: 6px 9px; max-width: 100%; background: rgba(255,255,255,0.05);
    transition: border-color .15s, box-shadow .15s; outline: none; -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,0.2); background: rgba(255,255,255,0.08); }
.beschreibung { width: 100%; border: none !important; box-shadow: none !important; font-weight: 600; background: transparent !important; padding: 3px 0; font-size: 0.83rem; color: #fff; }
.beschreibung:focus { background: rgba(59,130,246,0.1) !important; border-radius: 4px; padding: 3px 6px; }
.beschreibung::placeholder { color: var(--text-muted); font-weight: 400; }

/* DAY PICKER */
.day-picker { display: flex; gap: 2px; }
.day-btn { width: 23px; height: 23px; border-radius: 4px; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 0.58rem; font-weight: 700; cursor: pointer; background: rgba(255,255,255,0.05); color: var(--text-muted); transition: all .15s; user-select: none; }
.day-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.day-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* STATUS DOTS */
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: #334155; transition: all .3s; }
.status-dot.active-green  { background: #10b981; box-shadow: 0 0 8px 3px rgba(16,185,129,.5); }
.status-dot.active-orange { background: #f59e0b; box-shadow: 0 0 8px 3px rgba(245,158,11,.5); }

/* TOGGLE */
.switch { position: relative; display: inline-block; width: 36px; height: 19px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: rgba(255,255,255,0.1); border-radius: 999px; transition: .25s; }
.slider::before { content: ''; position: absolute; width: 13px; height: 13px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .25s; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
input:checked + .slider { background: var(--primary); }
input:checked + .slider::before { transform: translateX(17px); }

/* ICONS */
.action-icon { font-size: 1rem; cursor: pointer; opacity: 0.6; transition: opacity .15s, transform .15s; display: inline-block; line-height: 1; color: #fff; }
.action-icon:hover { opacity: 1; transform: scale(1.15); }
.delete-btn { color: var(--danger); cursor: pointer; font-weight: 700; font-size: 0.95rem; opacity: 0.45; transition: opacity .15s; user-select: none; }
.delete-btn:hover { opacity: 1; }

/* CALENDAR */
.cal-header { margin-top: 10px; display: flex; justify-content: space-between; align-items: center; background: var(--surface); padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); margin-bottom: 12px; box-shadow: var(--shadow-sm); gap: 8px; }
.cal-header h3 { font-size: 1rem; font-weight: 700; text-align: center; flex: 1; white-space: nowrap; color: #fff; }
.cal-header button { background: var(--primary); color: #fff; border: none; padding: 7px 14px; border-radius: var(--radius-md); cursor: pointer; font-weight: 600; font-size: 0.8rem; transition: background .15s; white-space: nowrap; font-family: inherit; flex-shrink: 0; box-shadow: 0 4px 12px rgba(59,130,246,0.2); }
.cal-header button:hover { background: var(--primary-hover); }

.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day-name { text-align: center; font-weight: 700; font-size: 0.65rem; color: var(--text-muted); padding: 7px 0; text-transform: uppercase; letter-spacing: .06em; }
.cal-cell { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); min-height: 85px; padding: 5px; cursor: pointer; transition: border-color .15s, box-shadow .15s; overflow: hidden; }
.cal-cell:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); background: rgba(255,255,255,0.05); }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-date-num { font-weight: 700; font-size: 0.8rem; color: #fff; margin-bottom: 3px; font-family: 'DM Mono', monospace; }
.cal-event-pill { font-size: 0.65rem; background: var(--primary); color: #fff; padding: 2px 6px; border-radius: 999px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-weight: 600; }

/* Kalender — Heute & Auswahl (konsolidiert) */
.cal-cell.today { border: 1px solid rgba(255,255,255,0.5) !important; background: rgba(255,255,255,0.05); }
.cal-cell.today .cal-date-num { color: #fff; font-weight: 900; text-shadow: 0 0 8px rgba(255,255,255,0.6); }
.cal-cell.selected-day { background: rgba(37,99,235,0.15) !important; border: 2px solid #3b82f6 !important; box-shadow: 0 0 15px rgba(59,130,246,0.4); transform: scale(0.98); transition: all .2s ease; }
.cal-cell.selected-day .cal-date-num { color: var(--primary); font-weight: 800; }
.cal-cell.today.selected-day { border-color: #3b82f6 !important; box-shadow: 0 0 20px rgba(59,130,246,0.5), inset 0 0 10px rgba(255,255,255,0.2); background: rgba(37,99,235,0.1) !important; }

/* DAILY AGENDA */
.daily-agenda { margin-top: 14px; background: var(--surface); padding: 16px; border-radius: var(--radius-lg); border: 1px solid var(--border); border-left: 4px solid var(--primary); box-shadow: var(--shadow-md); }
.agenda-item { display: flex; gap: 10px; padding: 12px 8px; border-bottom: 1px solid var(--border); align-items: flex-start; cursor: pointer; border-radius: var(--radius-sm); transition: background .15s; }
.agenda-item:hover { background: rgba(255,255,255,0.05); }
.agenda-item:last-child { border-bottom: none; }
.agenda-time { font-weight: 600; color: var(--text-secondary); min-width: 65px; font-size: 0.82rem; font-family: 'DM Mono', monospace; padding: 3px 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 6px; text-align: center; flex-shrink: 0; letter-spacing: 0.5px; transition: all .2s ease; }
/* Ohne Uhrzeit (LV-Position ohne festen Termin): Platz bleibt erhalten, aber kein sichtbares Kästchen */
.agenda-time:empty { background: transparent; border-color: transparent; }
.agenda-item:hover .agenda-time { color: #fff; border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }

/* RIGHT SIDEBAR */
.sidebar { position: fixed; right: -420px; top: 0; width: 360px; height: 100%; background: #0f172a; box-shadow: -6px 0 24px rgba(0,0,0,.5); transition: right .25s cubic-bezier(.4,0,.2,1); z-index: 1200; padding: 20px 18px; overflow-y: auto; border-left: 1px solid var(--border); }
.sidebar.open { right: 0; }
.sidebar-btn { width: 100%; text-align: left; padding: 9px 11px; margin-bottom: 4px; border: 1.5px solid var(--border); border-radius: var(--radius-md); background: rgba(255,255,255,0.05); cursor: pointer; font-size: 0.83rem; font-weight: 500; color: #fff; transition: border-color .15s, background .15s; font-family: inherit; }
.sidebar-btn:hover { border-color: var(--primary); background: rgba(59,130,246,0.1); }
.sidebar-btn.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

#side-title { font-size: 1.7rem; font-weight: 800; color: var(--text-primary); line-height: 1.3; letter-spacing: -.01em; }

/* ADMIN TABLES */
.admin-view { display: none; }
.admin-table { width: 100%; background: var(--surface); border-collapse: separate; border-spacing: 0; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.admin-table th { background: rgba(255,255,255,0.05); padding: 11px 14px; text-align: left; font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; border-bottom: 1px solid var(--border); }
.admin-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.85rem; color: #fff; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.03); }

/* DRAG & DROP */
.drag-handle { cursor: grab; color: var(--text-muted); font-size: 1rem; padding: 0 5px; opacity: 0; transition: opacity .15s; user-select: none; display: inline-block; flex-shrink: 0; }
.aufgabe:hover .drag-handle, .bereich-header:hover .drag-handle { opacity: 0.6; }
.drag-handle:active { cursor: grabbing; }
.dragging { opacity: 0.3; border: 2px dashed var(--primary) !important; box-shadow: var(--shadow-lg) !important; border-radius: var(--radius-lg) !important; }
.drag-over { border-top: 3px solid #10b981 !important; }
.drag-over-bereich { border: 2px dashed #10b981 !important; }

/* MISC */
.img-preview { width: 100%; border-radius: var(--radius-md); margin-top: 8px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.goog-te-combo { padding: 5px 8px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); font-size: 0.8rem; font-family: inherit; background: var(--surface-2); color: #fff; }
.project-mode .planning-col, body.basis-mode .planning-col { display: none !important; }
.global-stats, .dot, .stat-item { display: none; }

/* LOGO */
.logo-hexagon { position: relative; width: 42px; height: 42px; background: linear-gradient(135deg, #3b82f6, #6366f1); clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 20px rgba(59,130,246,0.5); transition: all .3s ease; }
.logo-hexagon:hover { transform: rotate(10deg) scale(1.1); filter: brightness(1.2); }
.logo-hexagon::after { content: ''; position: absolute; inset: -2px; background: inherit; clip-path: inherit; z-index: -1; filter: blur(8px); opacity: 0.6; }
.logo-e { color: white; font-family: 'DM Sans', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: -1px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.brand-main { font-size: 20px; font-weight: 800; color: #ffffff; letter-spacing: 1px; }
.brand-sub { font-size: 16px; font-weight: 300; color: #94a3b8; letter-spacing: 3px; margin-top: 2px; }

/* GOOGLE TRANSLATE — alle Toolbar/UI killen */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.skiptranslate,
iframe[id*="container"].skiptranslate,
div.skiptranslate > iframe,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
body > .skiptranslate { display: none !important; visibility: hidden !important; height: 0 !important; min-height: 0 !important; }
.goog-te-gadget { font-size: 0 !important; }
#goog-gt-tt, .goog-gt-answer, .goog-te-balloon-frame,
.VIpgJd-ZVi9od-aZ2wEe, .VIpgJd-ZVi9od-aZ2wEe-OIiCO,
.VIpgJd-ZVi9od-a2wEe-wOHMyf { display: none !important; }

/* STATUS BADGES — Tagesplan */
.status-badge-agenda { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 0.65rem; font-weight: 700; letter-spacing: .04em; flex-shrink: 0; white-space: nowrap; }
.status-badge-agenda.none   { background: rgba(51,65,85,.4);   color: #64748b; border: 1px solid #334155; }
.status-badge-agenda.orange { background: rgba(245,158,11,.1); color: #f59e0b; border: 1px solid rgba(245,158,11,.35); }
.status-badge-agenda.green  { background: rgba(16,185,129,.1); color: #10b981; border: 1px solid rgba(16,185,129,.35); }
.status-badge-agenda.blue   { background: rgba(59,130,246,.1); color: #3b82f6; border: 1px solid rgba(59,130,246,.35); }
.status-badge-agenda.red    { background: rgba(239,68,68,.15); color: #ef4444; }

/* GLOW DOTS — Stats */
.status-glow-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot-waiting { background-color: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.dot-working { background-color: #3b82f6; box-shadow: 0 0 8px #3b82f6; }
.dot-done    { background-color: #10b981; box-shadow: 0 0 8px #10b981; }

/* SIDEBAR STATS */
.sidebar-stats-item { padding: 8px 12px; border-radius: 8px; transition: background .2s ease; background: transparent; display: flex; align-items: center; }
.sidebar-stats-item.active { background: rgba(255,255,255,0.05); }

/* MODALS & DROPDOWNS — Dark-Mode Fixes */
select option { background: #1e293b; color: #f8fafc; }
select option:hover, select option:focus, select option:checked { background: #2563eb; color: #ffffff; }

[style*="position:fixed"] input,
[style*="position:fixed"] select,
[style*="position:fixed"] textarea { background: rgba(255,255,255,0.07) !important; color: #f8fafc !important; border-color: rgba(255,255,255,0.15) !important; }
[style*="position:fixed"] input::placeholder,
[style*="position:fixed"] textarea::placeholder { color: #94a3b8 !important; }
[style*="position:fixed"] label { color: #94a3b8 !important; }
[style*="position:fixed"] > div { background: #1e293b !important; color: #f8fafc !important; }
[style*="position:fixed"] > div h3,
[style*="position:fixed"] > div h2,
[style*="position:fixed"] > div b,
[style*="position:fixed"] > div span { color: #f8fafc; }
[style*="position:fixed"] > div p { color: #94a3b8; }

#staff-modal input, #staff-modal select,
#fleet-modal input, #fleet-modal select,
#customer-modal input, #customer-modal select,
#customer-modal textarea { background: rgba(255,255,255,0.07) !important; color: #f8fafc !important; border: 1.5px solid rgba(255,255,255,0.15) !important; }

#customer-dropdown { background: #1e293b !important; border-color: rgba(255,255,255,0.15) !important; }
#customer-dropdown > div { color: #f8fafc !important; border-bottom-color: rgba(255,255,255,0.08) !important; }
#customer-dropdown > div:hover { background: rgba(59,130,246,0.15) !important; }

#aktionen-menu { background: #1e293b !important; border-color: rgba(255,255,255,0.1) !important; }
#aktionen-menu button { color: #f8fafc !important; }
#aktionen-menu button:hover { background: rgba(255,255,255,0.06) !important; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateX(-50%) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
/* ── Public Offer Toggle Row ──────────────────────────────────────── */
.public-offer-row {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 8px 12px !important;
}
.public-offer-label {
    font-size: 0.82rem;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
}
.toggle-switch {
    position: relative;
    width: 40px;
    height: 22px;
    background: rgba(255,255,255,.2);
    border-radius: 999px;
    cursor: pointer;
    transition: background .25s;
    flex-shrink: 0;
}
.toggle-switch.active { background: #10b981; }
.toggle-switch .toggle-knob {
    position: absolute;
    top: 3px; left: 3px;
    width: 16px; height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform .25s;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
    pointer-events: none;
}
.toggle-switch.active .toggle-knob { transform: translateX(18px); }
.copy-link-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all .15s;
    flex-shrink: 0;
    font-family: inherit;
}
.copy-link-btn:hover { background: rgba(16,185,129,.12); border-color: #10b981; color: #10b981; }

/* Globale Toast-Benachrichtigung (vormals inline in showToast).
   Farbe pro Aufruf via --toast-bg; Layout zentral hier. */
.global-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--toast-bg, #10b981);
    color: white;
    padding: 10px 22px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
    pointer-events: none;
}

/* ── AGENDA-ITEMS: Kalender-Layout + Prioritaets-Rand ──────────────────────── */
/* Ausgelagert aus calendar.js (frueher item.style.cssText). Werte 1:1 uebernommen. */
/* Basisklasse .agenda-item liefert bereits display:flex, gap:10px, cursor:pointer. */
.agenda-item--cal        { padding: 10px 8px 10px 14px; align-items: center; }
.agenda-item--prio-low    { border-left: 3px solid #64748b; }
.agenda-item--prio-normal { border-left: 3px solid #f59e0b; }
.agenda-item--prio-high   { border-left: 4px solid #ef4444; }
.agenda-item--prio-urgent { border-left: 5px solid #be123c; box-shadow: inset 3px 0 8px rgba(190,18,60,0.15); }


/* ── LV-ANGEBOT: Zustands-/Container-Klassen (ausgelagert aus lv-editor-angebot.js) ── */
/* Kundenwunsch abgelehnt — frueher imperativ via row.style.* . Werte 1:1, .aufgabe.X */
/* fuer ausreichende Spezifitaet ggue. bestehenden .aufgabe-/.task-locked-Regeln.        */
.aufgabe.is-rejected { opacity: 0.5; }
.aufgabe.is-rejected .beschreibung { text-decoration: line-through; cursor: default; }
.aufgabe.is-rejected .val-qty,
.aufgabe.is-rejected .val-unit,
.aufgabe.is-rejected .val-price,
.aufgabe.is-rejected .task-time,
.aufgabe.is-rejected .task-time-end,
.aufgabe.is-rejected .val-rhythm,
.aufgabe.is-rejected .einmalig-date { cursor: not-allowed; }
.aufgabe.is-rejected .day-btn { pointer-events: none; }
.aufgabe.is-rejected .delete-btn { color: #10b981; font-weight: 700; }
/* Override-Zeile (Kundenanpassung) + Kundenwunsch-Zeile — frueher style.cssText. */
.aufgabe.lv-ov-row    { border-left: 3px solid #f59e0b; background: rgba(245,158,11,.04); }
.aufgabe.lv-ctask-row { border-left: 3px solid #7c3aed; background: rgba(124,58,237,.06); }


/* ── UPGRADE-/PRINT-MODAL-OVERLAY (ausgelagert aus api.js style.cssText) ────────── */
.upgrade-modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.7); backdrop-filter: blur(6px); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 16px; }