/* ========================================
   BASIS
======================================== */

body{
  font-family: system-ui, Arial, sans-serif;
  margin:0;
  background:#f2f4f7;
  color:#222;
}

header{
  background:#2e7d32;
  color:white;
  padding:16px;
  font-size:20px;
  font-weight:bold;
}

.container{
  padding:20px;
  max-width:1200px;
  margin:auto;
}


/* ========================================
   LAYOUT
======================================== */

.layout{
  display:grid;
  grid-template-columns: 2fr 1fr;
  gap:16px;
  align-items:start;
}

.sticky{
  position:sticky;
  top:20px;
}

@media(max-width:900px){
  .layout{
    grid-template-columns: 1fr;
  }
}


/* ========================================
   KARTEN / BOXEN
======================================== */

.card{
  background:white;
  border-radius:12px;
  padding:16px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

.card.active{
  border-left:6px solid #2e7d32;
}


/* ========================================
   BUTTONS
======================================== */

.button{
  display:inline-block;
  background:#2e7d32;
  color:white;
  padding:12px 18px;
  border-radius:8px;
  text-decoration:none;
  border:none;
  cursor:pointer;
  font-weight:600;
}

.button.secondary{ background:#1976d2; }
.button.danger{ background:#c62828; }

.button:hover{ opacity:0.9; }


/* ========================================
   FORMULARE
======================================== */

input,select,textarea{
  width:100%;
  padding:10px;
  border-radius:8px;
  border:1px solid #ccc;
  margin-bottom:12px;
  font-size:15px;
}


/* ========================================
   SNACKBAR / MELDUNGEN
======================================== */

#snackbar{
  visibility:hidden;
  position:fixed;
  left:50%;
  bottom:30px;
  transform:translateX(-50%);
  background:#2e7d32;
  color:white;
  padding:14px 22px;
  border-radius:14px;
  font-weight:bold;
  box-shadow:0 8px 25px rgba(0,0,0,0.4);
  z-index:9999;
  pointer-events:none;
}

#snackbar.show{
  visibility:visible;
  animation:fadein .35s, fadeout .35s 2.65s;
}

@keyframes fadein{
  from{opacity:0; bottom:10px;}
  to{opacity:1; bottom:30px;}
}

@keyframes fadeout{
  from{opacity:1; bottom:30px;}
  to{opacity:0; bottom:10px;}
}


/* ========================================
   MITGLIEDER
======================================== */

.member-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:6px;
  max-height:180px;
  overflow:auto;
  border:1px solid #ccc;
  border-radius:8px;
  padding:8px;
}

.member-grid label{
  display:flex;
  align-items:center;
  font-size:14px;
}

.member-grid input{
  margin-right:6px;
  accent-color:#2e7d32;
}


/* ========================================
   EINSATZLISTE
======================================== */

.mission-list{
  height:auto;
  overflow:visible;
}

.mission-list::-webkit-scrollbar{
  width:8px;
}

.mission-list::-webkit-scrollbar-thumb{
  background:#bbb;
  border-radius:6px;
}


/* ========================================
   EINSATZKARTE
======================================== */

.mission-card{
  display:flex;
  background:white;
  border-radius:12px;
  padding:12px;
  margin-bottom:12px;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
  text-decoration:none;
  color:#222;
  transition:.15s;
  cursor:pointer;
}

.mission-card:hover{
  background:#f5f7f9;
}


/* Statusstreifen links */

.mission-status{
  min-width:95px;
  text-align:center;
  padding:8px 10px;
  border-radius:8px;
  color:white;
  font-weight:bold;
  margin-right:12px;
  font-size:13px;
}

.mission-status.planned{ background:#f9a825; }
.mission-status.active{ background:#2e7d32; }
.mission-status.done{ background:#616161; }


/* Hauptbereich */

.mission-main{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}


/* obere Zeile */

.mission-top{
  display:flex;
  justify-content:space-between;
  font-weight:600;
}

.mission-date{
  font-size:17px;
  color:#555;
  margin-top:2px;
}

.mission-name{
   font-size:20px;
  font-weight:700;
  color:#222;
}


/* Team */

.mission-team{
  font-size:14px;
  color:#444;
}


/* Navigation */

.mission-nav{
  align-self:flex-end;
  background:#1976d2;
  color:white;
  padding:6px 10px;
  border-radius:8px;
  font-size:13px;
  cursor:pointer;
}

.mission-nav:hover{
  background:#0d47a1;
}


/* ========================================
   STATUS-KLICK PRO
======================================== */

.status-select{
  position:relative;
   margin-right:18px;
}

.status-menu{
  display:none;
  position:absolute;
  top:0;
  left:12px;
  background:white;
  border:1px solid #ccc;
  border-radius:8px;
  box-shadow:0 4px 10px rgba(0,0,0,0.2);
  z-index:100;
}

.status-menu a{
  display:block;
  padding:8px;
  text-decoration:none;
  color:#222;
}

.status-menu a:hover{
  background:#f0f0f0;
}

.status-select:hover .status-menu{
  display:block;
}


/* ========================================
   DASHBOARD STATS
======================================== */

.stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  gap:12px;
  margin-bottom:20px;
}

.stat{
  background:#fafafa;
  padding:16px;
  border-radius:10px;
  text-align:center;
  font-size:18px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
}

.stat.planned{ background:#fff3cd; }
.stat.active{ background:#d4edda; }
.stat.done{ background:#e2e3e5; }


/* ========================================
   MENÜ
======================================== */

.menu-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:16px;
  margin-bottom:24px;
}

.menu-card{
  display:block;
  padding:20px;
  text-align:center;
  font-size:18px;
  background:#2e7d32;
  color:white;
  border-radius:12px;
  text-decoration:none;
  transition:.2s;
}

.menu-card:hover{
  background:#1b5e20;
}

/* Status-Anzeige */

.status-label{
  min-width:95px;
  text-align:center;
  padding:8px 10px;
  border-radius:8px;
  color:white;
  font-weight:bold;
  font-size:13px;
  cursor:pointer;
}

.status-label.planned{ background:#f9a825; }
.status-label.active{ background:#2e7d32; }
.status-label.done{ background:#616161; }


/* Dropdown */

.status-select{
  position:relative;
}

.status-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  background:white;
  border:1px solid #ccc;
  border-radius:8px;
  box-shadow:0 4px 10px rgba(0,0,0,0.2);
  z-index:100;
  min-width:140px;
}

.status-menu.show{
  display:block;
}

.status-menu a{
  display:block;
  padding:8px;
  text-decoration:none;
  color:#222;
}

.status-menu a:hover{
  background:#f0f0f0;
}
/* obere Zeile */

.mission-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
}

/* Navigation rechts oben */

.mission-nav-top{
  background:#1976d2;
  color:white;
  padding:6px 10px;
  border-radius:8px;
  font-size:16px;
  cursor:pointer;
  line-height:1;
}

.mission-nav-top:hover{
  background:#0d47a1;
}
.legend{
  display:flex;
  gap:16px;
  margin-top:10px;
  font-size:14px;
}

.dot{
  display:inline-block;
  width:14px;
  height:14px;
  border-radius:50%;
  margin-right:6px;
}

.planned{ background:#f9a825; }
.active{ background:#2e7d32; }
.done{ background:#616161; }
.nav-btn{
  display:inline-block;
  margin-top:6px;
  padding:6px 10px;
  background:#1976d2;
  color:white;
  border-radius:6px;
  text-decoration:none;
  font-size:13px;
}

.nav-btn:hover{
  background:#0d47a1;
}
/* Dashboard Einsatzkarte */

.mission-dashboard{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  padding:14px 16px;
  margin-top:18px;

  border-radius:12px;
  background:white;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
 gap:14px;
  border-left:8px solid #ccc;
}
.mission-dashboard_old{
  display:grid;
  grid-template-columns: 1fr 200px auto;
  align-items:center;
 
}


/* Info links */


/* 🟡 geplant */

.mission-dashboard .status-label.planned{
  background:#f9a825;
  color:white;
}

/* 🟢 aktiv */

.mission-dashboard .status-label.active{
  background:#2e7d32;
  color:white;
}

/* Card-Hintergrund je Status */

.mission-dashboard:has(.status-label.planned){
  background:#fff8e1;
  border-left-color:#f9a825;
}

.mission-dashboard:has(.status-label.active){
  background:#e8f5e9;
  border-left-color:#2e7d32;
}
.mission-info{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.nav-btn-large_old{
  white-space:nowrap;
  align-self:center;
}
.nav-btn-large{
  align-self:flex-end;

  background:#1976d2;
  color:white;
  padding:10px 16px;
  border-radius:10px;
  text-decoration:none;
  font-weight:bold;

  transition:0.2s;
}

.nav-btn-large:hover{
  background:#0d47a1;
}


/* Kleine Karten-Vorschau */

.map-preview_old{
  height:200px;
  width:100%;
  border-radius:12px;
  overflow:hidden;
  border:1px solid #ddd;
  cursor:pointer;
}
.map-preview{
  height:120px;

  width:60%;
  margin-top:10px;
border-radius:10px;
  overflow:hidden;
  border:1px solid #ccc;
  cursor:pointer;        
}
/* ===== Karte IM Infofeld ===== */

.mission-info .map-preview{
  height:180px;
  margin-top:10px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid #ddd;
}
.modal{
  display:none;
  position:fixed;
  top:0; left:0;
  width:100%; height:100%;
  background:rgba(0,0,0,0.6);
  z-index:9999;
}

.modal-content{
  background:white;
  margin:5% auto;
  padding:20px;
  width:90%;
  max-width:900px;
  border-radius:12px;
}

.close{
  float:right;
  cursor:pointer;
  font-size:20px;
}
.map-preview-static{
  height:160px;
  overflow:hidden;
  border-radius:10px;
  margin-bottom:20px;
  border:1px solid #ccc;
  cursor:pointer;
}

.map-preview-static img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.mission-card-old{
  background:white;
  border-radius:14px;
  padding:16px;
  margin-bottom:18px;
  box-shadow:0 6px 16px rgba(0,0,0,0.08);
  border:2px solid #e0e0e0;
  transition:.15s;
}
.mission-card{
  background:white;
  border-radius:14px;
  padding:16px;
  margin-bottom:18px;
  box-shadow:0 6px 16px rgba(0,0,0,0.08);

  border-left:8px solid #ccc;

  display:flex;
  flex-direction:column;
  gap:12px;
}


.mission-card:hover{
  box-shadow:0 10px 22px rgba(0,0,0,0.12);
  transform:translateY(-2px);
}
.mission-card.planned{
  border-left:8px solid #f9a825;
  background:#fffdf4;
}

.mission-card.active{
  border-left:8px solid #2e7d32;
  background:#f1f8f4;
}

.mission-card.done{
  border-left:8px solid #616161;
  background:#f5f5f5;
}
.mission-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:10px;
}
.status-badge{
  padding:6px 12px;
  border-radius:8px;
  color:white;
  font-weight:bold;
  font-size:13px;
}

.status-badge.planned{ background:#f9a825; }
.status-badge.active{ background:#2e7d32; }
.status-badge.done{ background:#616161; }

/* ==========================
   📱 HANDY / APP LAYOUT
========================== */

@media(max-width:700px){

  .container{
    padding:12px;
  }

  .mission-dashboard{
    display:flex;
    flex-direction:column;
    gap:12px;
  }

  /* Info oben */
  .mission-info{
    order:1;
  }

  /* Karte mittig */
  .map-preview{
    order:2;
    width:100%;
    height:180px;
    border-radius:10px;
  }

  /* Navigationsbutton unten */
  .nav-btn-large{
    order:3;
    width:100%;
    text-align:center;
    padding:14px;
    font-size:16px;
  }

  /* Status größer */
  .status-label{
    font-size:14px;
    padding:8px 14px;
  }

  /* Einsatzname größer */
  .mission-name{
    font-size:18px;
  }

  /* Datum */
  .mission-date{
    font-size:14px;
  }

}
/* ===== MOBILE APP ===== */

.mobile-app{
  font-family:system-ui;
  background:#f2f4f7;
  margin:0;
}

.app-header{
  background:#2e7d32;
  color:white;
  padding:18px;
  text-align:center;
  font-size:22px;
  font-weight:bold;
}

.app-container{
  padding:16px;
}


/* Einsatzkarten */

.mission-card-mobile{
  background:white;
  border-radius:14px;
  padding:16px;
  margin-bottom:14px;
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.mission-card-mobile.active{
  border-left:8px solid #2e7d32;
}

.mission-card-mobile.planned{
  border-left:8px solid #f9a825;
}

.mission-title{
  font-size:20px;
  font-weight:bold;
}

.mission-date{
  color:#555;
  margin:6px 0;
}

.mission-status{
  font-weight:bold;
  margin-bottom:10px;
}


/* Navigation */

.btn-nav{
  display:block;
  text-align:center;
  background:#1976d2;
  color:white;
  padding:14px;
  border-radius:12px;
  text-decoration:none;
  font-size:18px;
}


/* Schnellstart */

.quick-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:10px;
}

.quick-btn{
  display:block;
  background:#2e7d32;
  color:white;
  padding:18px;
  border-radius:14px;
  text-align:center;
  text-decoration:none;
  font-size:18px;
  font-weight:bold;
}


/* Logout */

.btn-logout{
  display:block;
  margin-top:20px;
  background:#c62828;
  color:white;
  padding:16px;
  border-radius:14px;
  text-align:center;
  text-decoration:none;
  font-size:18px;
  font-weight:bold;
}
/* ===== MOBILE BUTTON PRO ===== */

.quick-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:12px;
}

.quick-btn{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:18px;
  border-radius:16px;
  color:white;
  text-decoration:none;
  font-size:18px;
  font-weight:bold;
  box-shadow:0 6px 16px rgba(0,0,0,0.2);
}

/* große wichtigste Buttons */

.quick-btn.big{
  grid-column:span 2;
  font-size:20px;
  padding:22px;
}

/* Farben */

.green{ background:#2e7d32; }
.yellow{ background:#f9a825; }
.blue{ background:#1976d2; }
.gray{ background:#616161; }
.dark{ background:#263238; }

/* Hover */

.quick-btn:active{
  transform:scale(0.97);
}