/* Export modal */
.export-modal-overlay{ position:fixed; inset:0; background: rgba(15,23,42,0.32); z-index: 5000; display:flex; align-items:center; justify-content:center; }
.export-modal{ width:min(520px, calc(100% - 32px)); background:#fff; border-radius:16px; box-shadow:0 18px 36px rgba(15,23,42,0.24); border:1px solid rgba(15,23,42,0.08); }
.export-modal__header{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid rgba(15,23,42,0.08); }
.export-modal__title{ font-weight:700; color:#0f172a; font-size:16px; display:flex; align-items:center; gap:8px; }
.export-modal__close{ border:none; background:transparent; cursor:pointer; color:#6b7280; font-size:18px; }
.export-modal__body{ max-height:60vh; overflow:auto; padding:12px 16px; }
.export-file{ display:flex; align-items:center; gap:10px; padding:8px 6px; border-radius:8px; }
.export-file:hover{ background:rgba(15,23,42,0.04); }
.export-modal__footer{ display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:12px 16px; border-top:1px solid rgba(15,23,42,0.08); }
.btn{ padding:8px 14px; border-radius:10px; border:1px solid rgba(15,23,42,0.12); background:#fff; cursor:pointer; }
.btn--primary{ background:#0f766e; color:#fff; border-color:#0f766e; }
.btn--primary:hover{ background:#115e59; }

/* Projects modal */
.projects-modal-overlay{ position:fixed; inset:0; background: rgba(15,23,42,0.32); z-index: 5000; display:flex; align-items:center; justify-content:center; padding:24px; box-sizing:border-box; }
.projects-modal{ width:min(900px, calc(100% - 48px)); background:#fff; border-radius:16px; box-shadow:0 18px 36px rgba(15,23,42,0.24); border:1px solid rgba(15,23,42,0.08); display:flex; flex-direction:column; max-height:88vh; }
.projects-modal__header{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid rgba(15,23,42,0.08); }
.projects-modal__title{ font-weight:700; color:#0f172a; font-size:16px; }
.projects-modal__close{ border:none; background:transparent; cursor:pointer; color:#6b7280; font-size:18px; }
.projects-modal__controls{ display:grid; grid-template-columns: minmax(220px, 1fr) 190px 190px 190px; gap:10px; padding:12px 20px; border-bottom:1px solid rgba(15,23,42,0.08); }
.projects-modal__input,
.projects-modal__select{ padding:8px 10px; border-radius:10px; border:1px solid rgba(15,23,42,0.12); font-size:13px; color:#0f172a; background:#fff; }
.projects-modal__apply-btn{ padding:8px 12px; border-radius:10px; border:1px solid rgba(15,23,42,0.12); background:#0f766e; color:#fff; font-size:13px; cursor:pointer; white-space:nowrap; }
.projects-modal__apply-btn:hover{ background:#115e59; }
.projects-modal__apply-btn.is-active{ background:#fff; color:#0f172a; }
.projects-modal__apply-btn.is-active:hover{ background:#f8fafc; }
.projects-modal__body{ flex:1 1 auto; overflow:hidden; }
.projects-modal__list{ max-height:60vh; overflow:auto; overflow-x:hidden; padding:10px 20px 14px; }
.projects-modal__row{ display:grid; grid-template-columns: 110px minmax(220px, 1fr) 150px 130px 88px; gap:12px; align-items:center; width:100%; min-width:0; border:none; background:transparent; text-align:left; padding:9px 10px; border-radius:10px; cursor:pointer; font-size:13px; }
.projects-modal__row:hover{ background: rgba(15,23,42,0.04); }
.projects-modal__row--header{ font-weight:500; color:#0f172a; cursor:default; background:#f1f5f9; border-bottom:1px solid rgba(15,23,42,0.12); position:sticky; top:0; z-index:2; font-size:12px; letter-spacing:0.01em; }
.projects-modal__row--header:hover{ background:#f1f5f9; }
.projects-modal__col{ white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.projects-modal__col--name{ font-weight:500; color:#0f172a; }
.projects-modal__col--kst{ font-variant-numeric: tabular-nums; color:#0f172a; }
.projects-modal__status-pill{ display:inline-flex; align-items:center; padding:2px 8px; border-radius:999px; font-size:11px; font-weight:600; background:#e5e7eb; color:#111827; letter-spacing:0.01em; }
.projects-modal__status-pill--fertig{ background:#A6C4A1; color:#ffffff; }
.projects-modal__status-pill--neu{ background:#3b82f6; color:#ffffff; }
.projects-modal__status-pill--in-arbeit{ background:#e5e7eb; color:#111827; }
.projects-modal__col--actions{ display:flex; align-items:center; justify-content:flex-end; gap:8px; }
.projects-modal__action-btn{ width:28px; height:28px; border-radius:8px; border:1px solid rgba(15,23,42,0.12); background:#fff; color:#0f172a; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.projects-modal__action-btn:hover{ background: rgba(166,196,161,0.12); }
.projects-modal__action-btn svg{ width:14px; height:14px; }
.projects-modal__sort{ background:transparent; border:none; padding:0; text-align:left; cursor:pointer; font:inherit; color:inherit; display:inline-flex; align-items:center; gap:6px; }
.projects-modal__sort-icon{ position:relative; width:10px; height:12px; display:inline-block; }
.projects-modal__sort-icon::before,
.projects-modal__sort-icon::after{ content:''; position:absolute; left:1px; border-left:4px solid transparent; border-right:4px solid transparent; }
.projects-modal__sort-icon::before{ top:0; border-bottom:6px solid #cbd5e1; }
.projects-modal__sort-icon::after{ bottom:0; border-top:6px solid #cbd5e1; }
.projects-modal__sort.is-active[data-dir="asc"] .projects-modal__sort-icon::before{ border-bottom-color:#0f172a; }
.projects-modal__sort.is-active[data-dir="asc"] .projects-modal__sort-icon::after{ border-top-color:#e2e8f0; }
.projects-modal__sort.is-active[data-dir="desc"] .projects-modal__sort-icon::after{ border-top-color:#0f172a; }
.projects-modal__sort.is-active[data-dir="desc"] .projects-modal__sort-icon::before{ border-bottom-color:#e2e8f0; }
.projects-modal__empty{ padding:10px 6px; color:#6b7280; font-size:13px; }

@media (max-width: 860px){
  .projects-modal{ width: calc(100% - 32px); }
  .projects-modal__controls{ grid-template-columns: 1fr 1fr; }
  .projects-modal__apply-btn{ grid-column: 1 / -1; }
}

@media (max-width: 640px){
  .projects-modal__row{ grid-template-columns: 1fr 1fr; }
  .projects-modal__col--name{ grid-column: 1 / -1; }
  .projects-modal__col--actions{ justify-content:flex-start; }
}

/* Status modal */
.status-modal-overlay{ position:fixed; inset:0; background: rgba(15,23,42,0.40); z-index: 5000; display:flex; align-items:center; justify-content:center; }
.status-modal{ width:min(80vw, calc(100% - 32px)); background:#fff; border-radius:16px; box-shadow:0 18px 36px rgba(15,23,42,0.24); border:1px solid rgba(15,23,42,0.08); display:flex; flex-direction:column; overflow:hidden; }
.status-modal__header{ display:flex; align-items:center; justify-content:space-between; padding:12px 16px; border-bottom:1px solid rgba(15,23,42,0.08); position:relative; z-index:2; background:#fff; }
.status-modal__title{ font-weight:700; color:#0f172a; font-size:16px; display:flex; align-items:center; gap:8px; }
.status-modal__close{ border:none; background:transparent; cursor:pointer; color:#6b7280; font-size:18px; }
.status-modal__actions{ display:flex; align-items:center; gap:8px; }
.status-modal__download{ width:32px; height:32px; border-radius:10px; border:1px solid rgba(15,23,42,0.12); background:#fff; color:#0f172a; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.status-modal__download:hover{ background: rgba(166,196,161,0.12); }
.status-modal__download svg{ width:16px; height:16px; }
.status-modal__body{ height:80vh; padding:0; position:relative; z-index:1; }
.status-modal__body iframe{ width:100%; height:calc(100% + 3rem); border:0; display:block; position:relative; top:-3rem; }
