/* ==========================================================================
   Base — Typografie, Body, globale Defaults
   ========================================================================== */

body {
  font-size: 80%;
}

h1 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}
h2 {
  font-size: 1.3rem;
  margin-bottom: 20px;
}
h3 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
h4 {
  font-size: 1rem;
  margin-bottom: 20px;
}

body.no-actions #actions {
  display: none !important;
}

.forum-mention {
  background-color: #dbeafe;
  color: #1d4ed8;
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
}


/* ==========================================================================
   Components — wiederverwendbare UI-Bausteine
   ========================================================================== */

.avatar-circle {
  width: 40px;
  height: 40px;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
}

.avatar-circle-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 7px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

/* Avatar-Variante für Tabellenzeilen (FM, Projekte, Zeiterfassung) */
.avatar-circle-md {
  width: 20px;
  height: 20px;
  font-size: 8px;
}

/* "+"-Icon in den Sidebar-Action-Panels (Neuanlegen-Aktionen) */
.action-icon-add {
  font-size: 40px;
}

/* Leerzustände ("Noch keine Dateien/Notizen vorhanden") */
.empty-state-icon {
  font-size: 3rem;
  opacity: .25;
}
.empty-state-text {
  font-size: .9rem;
}

/* Text in einer Zelle abschneiden, max-width wird je Kontext inline gesetzt */
.text-ellipsis {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.btn-action {
  color: #6c757d;
  border: none;
  background: none;
}
.btn-action:hover { color: #212529; }
.btn-action.danger:hover { color: #dc3545; }

/* Dateiverwaltung (EigeneDateien, FM): etwas größere Schaltflächen */
#dateiTabelle .btn-action,
#dateiTbody .btn-action {
  padding: 0 6px;
  font-size: 1rem;
}

/* Notizen (Notizen, EigeneNotizen): kompaktere Schaltflächen */
#notizenGrid .btn-action,
#notizenListe .btn-action {
  padding: 0 5px;
  font-size: .9rem;
}
#notizenListe tbody tr:hover .btn-action { opacity: 1; }

.notiz-card .card-header { background: none; border-bottom: 1px solid rgba(0,0,0,.08); }
.notiz-card .card-footer { background: none; border-top: 1px solid rgba(0,0,0,.06); font-size: .78rem; }
.notiz-card .ql-editor { padding: 0; min-height: 40px; }
#notizenGrid .card { border: 1px solid rgba(0,0,0,.10); box-shadow: 0 1px 3px rgba(0,0,0,.04); }

/* Datei-Upload per Drag & Drop (EigeneDateien, FM) */
#dragOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 110, 253, .10);
  border: 3px dashed #0d6efd;
  z-index: 1050;
  pointer-events: none;
}
#dragOverlay .drop-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #0d6efd;
}
#dragOverlay .drop-hint i { font-size: 4rem; }
#dragOverlay .drop-hint p { font-size: 1.4rem; font-weight: 600; margin-top: .5rem; }
.file-name-link { font-weight: 500; }

table.dataTable tbody td { vertical-align: middle; }


/* ==========================================================================
   Navigation
   ========================================================================== */

.navbar-nav .nav-link {
  font-size: 1rem;
}
.navbar-nav .dropdown-menu .nav-link {
  font-size: 1rem;
}

.navbar-nav .nav-link.active {
  background-color: #0d6efd;
  color: #FFFFFF;
  border-radius: 0.25rem;
}


/* ==========================================================================
   Module: Dashboard / Zeiterfassung — Progress-Circle
   ========================================================================== */

.progress-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

/* Dashboard-Widgets: Kreis horizontal in der Kachel zentrieren */
.card-body .progress-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle circle {
  fill: none;
}

.progress-circle .bg {
  stroke: #eee;
}

.progress-circle .progress {
  stroke: #0d6efd;
  stroke-linecap: round;
  stroke-dasharray: 314; /* 2 * π * 50 */
  stroke-dashoffset: 314; /* Start bei 0% */
  transition: stroke-dashoffset 1s ease-out;
}

.progress-circle .percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20px;
  font-weight: bold;
}

.dashboard-card {
  height: 200px;
}

.dashboard-card .card-body {
  text-align: center;
}

.dashboard-card-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

a.dashboard-card-link {
  text-decoration: none;
  color: inherit;
}

a.dashboard-card-link .dashboard-card {
  cursor: pointer;
  transition: box-shadow .15s ease;
}

a.dashboard-card-link:hover .dashboard-card {
  box-shadow: 0 .25rem .75rem rgba(0,0,0,.1);
}

.dashboard-container {
  padding-right: 2rem;
}


/* ==========================================================================
   Module: LSD
   ========================================================================== */

thead.custom-head th {
  background-color: rgb(44,62,80);
  color: white;
}

/* Status "durchgestrichen" für ausgeschlossene Einsätze/Stichworte/Einsatzmittel/Fahrten */
.durchgestrichen,
.durchgestrichen td {
  text-decoration: line-through;
  color: lightgray;
}

.durchgestrichen td a {
  text-decoration: line-through;
  color: lightgray !important;
}

/* LSD_data.tpl (Einsätze-Tabelle): Zeilenklick öffnet Modal, Checkbox bleibt bedienbar */
.durchgestrichen {
  pointer-events: none;
}
.durchgestrichen input {
  pointer-events: auto;
}
.durchgestrichen td:not(:has(.form-check)) {
  color: lightgray;
  text-decoration: line-through;
}
tr.durchgestrichen td span {
  display: none !important; /* EZÜ / ErrG Badges ausblenden */
}

/* LSD_zo_sw.tpl / LSD_zo_em.tpl: Eingabefelder ausgrauen, außer dem jeweiligen Ausschluss-Schalter */
.durchgestrichen input:not([id^="SW_Ausschluss_"]):not([id^="EM_Ausschluss_"]),
.durchgestrichen select,
.durchgestrichen textarea {
  opacity: 0.3;
}


/* ==========================================================================
   Module: Login
   ========================================================================== */

body.login-page {
  background-color: #f8f9fa;
}
body.login-page .card {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}
