/* CannaGrow Projektboard 0.3 */

.live-filters{
  grid-template-columns:2fr 1fr 1fr auto;
}

.filter-hint{
  display:block;
  margin-top:10px;
}

.ticket-open{
  width:100%;
  text-align:left;
  color:inherit;
  cursor:pointer;
}

.ticket-open[hidden]{
  display:none;
}

.status-badge{
  color:#bcebc5;
}

.type-änderung{
  color:#e7c4ff;
}

/* Beitrags-Popup */
.post-modal[hidden],
.image-lightbox[hidden]{
  display:none;
}

.post-modal{
  position:fixed;
  inset:0;
  z-index:5000;
  display:grid;
  place-items:center;
  padding:22px;
}

.post-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.78);
  backdrop-filter:blur(5px);
}

.post-modal-dialog{
  position:relative;
  z-index:1;
  width:min(1080px,96vw);
  max-height:94vh;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--bg);
  box-shadow:0 30px 100px rgba(0,0,0,.7);
}

.post-modal-content{
  max-height:94vh;
  overflow:auto;
  padding:24px;
}

.post-modal-close{
  position:absolute;
  top:12px;
  right:14px;
  z-index:5;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:12px;
  background:#182019;
  color:var(--text);
  font-size:28px;
  cursor:pointer;
}

.modal-post-head{
  padding-right:54px;
  margin-bottom:18px;
}

.modal-post-head h1{
  margin-top:10px;
}

.modal-loading,
.modal-error{
  min-height:240px;
  display:grid;
  place-items:center;
  color:var(--muted);
}

body.modal-open{
  overflow:hidden;
}

.modal-post > .card{
  margin-bottom:16px;
}

.admin-action-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
  padding:16px 18px;
  border:1px solid #3a6946;
  border-radius:14px;
  background:linear-gradient(135deg,rgba(63,191,103,.12),rgba(21,28,23,.96));
}

.admin-action-card strong{
  display:block;
  margin-bottom:3px;
}

.admin-action-card span{
  color:var(--muted);
  font-size:.9rem;
}

/* Anhänge */
.attachment-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:12px;
  margin:16px 0;
}

.attachment-item{
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:12px;
  background:#101612;
}

.attachment-preview{
  width:100%;
  padding:0;
  border:0;
  display:block;
  aspect-ratio:16/9;
  cursor:zoom-in;
  background:#0b0f0c;
  overflow:hidden;
}

.attachment-preview img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.attachment-file-icon{
  height:120px;
  display:grid;
  place-items:center;
  font-size:2.5rem;
  background:#0b0f0c;
}

.attachment-info{
  padding:12px;
  min-width:0;
}

.attachment-info strong{
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.attachment-info small{
  display:block;
  color:var(--muted);
  margin-top:5px;
}

.attachment-actions{
  display:flex;
  gap:8px;
  padding:0 12px 12px;
}

.attachment-upload{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:end;
  padding-top:16px;
  margin-top:16px;
  border-top:1px solid var(--border);
}

/* Bild-Lightbox */
.image-lightbox{
  position:fixed;
  inset:0;
  z-index:7000;
  display:grid;
  place-items:center;
  padding:24px;
}

.image-lightbox-backdrop{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.9);
  backdrop-filter:blur(5px);
}

.image-lightbox-dialog{
  position:relative;
  z-index:1;
  width:min(1200px,96vw);
  max-height:94vh;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:16px;
  background:#101612;
}

.image-lightbox-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 16px;
  border-bottom:1px solid var(--border);
}

.image-lightbox-close{
  width:38px;
  height:38px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#182019;
  color:var(--text);
  font-size:28px;
  cursor:pointer;
}

.image-lightbox-content{
  max-height:calc(94vh - 64px);
  overflow:auto;
  display:grid;
  place-items:center;
  padding:14px;
}

.image-lightbox-content img{
  display:block;
  max-width:100%;
  max-height:calc(94vh - 95px);
  width:auto;
  height:auto;
  object-fit:contain;
}

/* Benachrichtigungen */
.notification-wrap{
  position:relative;
  display:flex;
  align-items:center;
}

.notification-button{
  position:relative;
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--panel-2);
  color:var(--text);
  cursor:pointer;
}

.notification-badge{
  position:absolute;
  top:-7px;
  right:-7px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#ff6464;
  color:#fff;
  font-size:.7rem;
  font-weight:800;
}

.notification-panel{
  position:absolute;
  top:50px;
  right:0;
  z-index:6000;
  width:min(390px,90vw);
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:14px;
  background:#111813;
  box-shadow:0 24px 60px rgba(0,0,0,.55);
}

.notification-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-bottom:1px solid var(--border);
}

.notification-head button{
  border:0;
  background:none;
  color:var(--accent);
  cursor:pointer;
}

.notification-list{
  max-height:420px;
  overflow:auto;
}

.notification-item{
  width:100%;
  display:grid;
  gap:5px;
  padding:12px 14px;
  text-align:left;
  border:0;
  border-bottom:1px solid var(--border);
  background:#111813;
  color:var(--text);
  cursor:pointer;
}

.notification-item:hover{
  background:#18221b;
}

.notification-item.unread{
  background:rgba(63,191,103,.1);
}

.notification-item small,
.notification-empty{
  color:var(--muted);
}

.notification-empty{
  padding:20px 14px;
  text-align:center;
}

@media(max-width:800px){
  .live-filters,
  .attachment-upload{
    grid-template-columns:1fr;
  }

  .post-modal{
    padding:8px;
  }

  .post-modal-dialog,
  .post-modal-content{
    max-height:97vh;
  }

  .post-modal-content{
    padding:16px;
  }

  .admin-action-card{
    flex-direction:column;
    align-items:stretch;
  }

  .notification-panel{
    position:fixed;
    top:80px;
    right:10px;
    left:10px;
    width:auto;
  }
}


/* Update 0.4 – Screenshots in Kommentaren */
.comment-screenshot-upload{
  padding:12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#101612;
}

.comment-screenshot-upload input{
  margin-top:7px;
}

.comment-attachment-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.comment-attachment-image{
  width:130px;
  height:90px;
  padding:0;
  overflow:hidden;
  border:1px solid var(--border);
  border-radius:10px;
  background:#0b0f0c;
  cursor:zoom-in;
}

.comment-attachment-image img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}

@media(max-width:600px){
  .comment-attachment-image{
    width:100px;
    height:75px;
  }
}


/* Abteilungen + erledigte Bereiche */
.live-filters-5{
  grid-template-columns:2fr 1fr 1fr 1fr auto;
}

.form-three{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:14px;
}

.department-badge{
  color:#8fd6ff;
  border-color:#33566e;
  background:rgba(91,155,197,.12);
}

.section-title{
  margin:20px 0 12px;
}

.done-accordion{
  margin-top:18px;
  padding:0;
  overflow:hidden;
}

.done-accordion summary{
  list-style:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  font-weight:700;
  user-select:none;
}

.done-accordion summary::-webkit-details-marker{
  display:none;
}

.done-accordion summary::after{
  content:"▾";
  opacity:.8;
  transition:transform .15s ease;
}

.done-accordion[open] summary::after{
  transform:rotate(180deg);
}

.done-accordion .board{
  padding:0 16px 16px;
}

.done-count{
  color:var(--muted);
  font-weight:600;
}

.done-ticket{
  opacity:.92;
}

@media(max-width:900px){
  .live-filters-5{
    grid-template-columns:1fr 1fr;
  }
  .form-three{
    grid-template-columns:1fr;
  }
}

@media(max-width:600px){
  .live-filters-5{
    grid-template-columns:1fr;
  }
}
