/* ============================================================
   FöbA CRM – Design nach foeba.de
   Primär:   #057582 (Teal)
   Akzent:   #94c122 (Grün)
   Gold:     #d6a726
   Hover:    #ff8800 (Orange)
   Text:     #5e5e5e
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f4f6f5;
  color: #5e5e5e;
  font-size: 15px;
  line-height: 1.6;
}

/* ---- Navbar ---- */
.navbar {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: .75rem 2rem;
  gap: 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
  border-bottom: 3px solid #94c122;
}
.nav-logo { display: flex; align-items: center; text-decoration: none; }
.nav-logo img { display: block; }
.nav-links { display: flex; gap: 1.5rem; flex: 1; }
.nav-links a {
  color: #5e5e5e;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-links a:hover { color: #057582; border-bottom-color: #057582; }
.nav-links a.active { color: #057582; border-bottom-color: #94c122; }
.nav-user { font-size: .85rem; color: #888; white-space: nowrap; }
.nav-user a { color: #057582; text-decoration: none; font-weight: 600; }
.nav-user a:hover { color: #ff8800; }

/* ---- Container ---- */
.container { max-width: 1150px; margin: 2rem auto; padding: 0 1.5rem; }

/* ---- Headings ---- */
h2 { color: #057582; font-weight: 700; margin-bottom: .75rem; font-size: 1.5rem; }
h3 { color: #94c122; font-weight: 600; margin-bottom: .6rem; }

/* ---- Alerts ---- */
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; border-left: 4px solid; }
.alert-success { background: #eaf6e4; color: #2d6a1f; border-color: #94c122; }
.alert-error   { background: #fde8e8; color: #721c24; border-color: #e74c3c; }
.alert-warning { background: #fff8e6; color: #7a5200; border-color: #d6a726; }

/* ---- KPI Grid ---- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.kpi-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  border-top: 4px solid #057582;
  transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.kpi-card.kpi-warn  { border-top-color: #e74c3c; }
.kpi-card.kpi-ok    { border-top-color: #94c122; }
.kpi-card.kpi-info  { border-top-color: #d6a726; }
.kpi-card.kpi-muted { border-top-color: #95a5a6; }
.kpi-value { font-size: 1.8rem; font-weight: 700; color: #057582; }
.kpi-label { font-size: .82rem; color: #888; margin-top: .25rem; }

/* ---- Sections ---- */
.section { margin: 2rem 0; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

/* ---- Progress bar ---- */
.progress-bar-wrap { background: #e0e0e0; border-radius: 999px; height: 18px; overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, #057582, #94c122); height: 100%; transition: width .4s; }
.progress-label { margin-top: .4rem; font-size: .85rem; color: #888; }

/* ---- Table ---- */
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.table th {
  background: #057582;
  color: #fff;
  padding: .65rem .9rem;
  text-align: left;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}
.table td { padding: .65rem .9rem; border-bottom: 1px solid #f0f0f0; font-size: .88rem; color: #5e5e5e; }
.table tr:last-child td { border-bottom: none; }
.table tr.status-storniert td { color: #bbb; }
.table tr:hover td { background: #f7fdf7; }
.empty { text-align: center; color: #bbb; padding: 2rem !important; }

/* ---- Badges ---- */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-sib { background: #dff0f5; color: #057582; }
.badge-bkm { background: #eaf6e4; color: #3d7a1a; }

.status-badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.status-aktiv       { background: #eaf6e4; color: #2d6a1f; }
.status-storniert   { background: #fde8e8; color: #721c24; }
.status-eingereicht { background: #fff8e6; color: #7a5200; }

/* ---- Forms ---- */
.form-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  border-top: 3px solid #94c122;
}
.form-row  { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; flex: 1; min-width: 180px; }
.form-group label { font-size: .82rem; font-weight: 600; color: #057582; margin-bottom: .3rem; }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1px solid #d0d8d8;
  border-radius: 8px;
  padding: .55rem .85rem;
  font-size: .9rem;
  font-family: inherit;
  color: #5e5e5e;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #057582;
  box-shadow: 0 0 0 3px rgba(5,117,130,.12);
}
.form-actions { display: flex; gap: .75rem; margin-top: 1.25rem; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; align-items: center; }
.filter-form select,
.filter-form input {
  padding: .45rem .75rem;
  border: 1px solid #d0d8d8;
  border-radius: 8px;
  font-size: .88rem;
  font-family: inherit;
  color: #5e5e5e;
  background: #fff;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: .5rem 1.4rem;
  border-radius: 9999px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background .2s, color .2s;
  font-family: inherit;
}
.btn-primary   { background: #057582; color: #fff; }
.btn-primary:hover { background: #ff8800; color: #fff; }
.btn-secondary { background: #eef4f4; color: #057582; }
.btn-secondary:hover { background: #d6a726; color: #fff; }
.btn-warn      { background: #e74c3c; color: #fff; }
.btn-warn:hover { background: #c0392b; }
.btn-full { width: 100%; text-align: center; padding: .65rem; }
.btn-sm   { padding: .3rem .8rem; font-size: .8rem; }

/* ---- Admin nav ---- */
.admin-nav { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ---- Login ---- */
.login-box {
  max-width: 400px;
  margin: 5rem auto;
  background: #fff;
  border-radius: 14px;
  padding: 2.5rem 2rem;
  box-shadow: 0 6px 30px rgba(0,0,0,.1);
  border-top: 4px solid #057582;
}
.login-box h1 { text-align: center; margin-bottom: .25rem; color: #057582; font-size: 1.6rem; }
.login-sub { text-align: center; color: #94c122; font-size: .9rem; font-weight: 600; margin-bottom: 1.5rem; }
.login-box .form-group { margin-bottom: 1rem; }
