/* ============================================================
   Weidetagebuch – Modern Clean Design v3.0
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --wtb-bg:           #F3F6FA;
  --wtb-card:         #FFFFFF;
  --wtb-border:       #E4E9F0;
  --wtb-border-focus: #2D6A4F;

  --wtb-primary:      #2D6A4F;
  --wtb-primary-hover:#1E4D38;
  --wtb-primary-bg:   #EAF4EE;
  --wtb-primary-mid:  #40916C;

  --wtb-text:         #111827;
  --wtb-text-2:       #374151;
  --wtb-muted:        #6B7280;
  --wtb-muted-light:  #9CA3AF;

  --wtb-danger:       #DC2626;
  --wtb-danger-bg:    #FEF2F2;
  --wtb-warning:      #D97706;
  --wtb-warning-bg:   #FFFBEB;
  --wtb-success:      #059669;
  --wtb-success-bg:   #ECFDF5;
  --wtb-info:         #2563EB;
  --wtb-info-bg:      #EFF6FF;

  --wtb-topbar-h:     60px;
  --wtb-sidebar-w:    240px;
  --wtb-bnav-h:       64px;

  --wtb-radius:       14px;
  --wtb-radius-sm:    8px;
  --wtb-radius-pill:  999px;

  --wtb-shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --wtb-shadow:       0 4px 16px rgba(0,0,0,.07), 0 1px 4px rgba(0,0,0,.04);
  --wtb-shadow-md:    0 8px 32px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.05);
}

/* ---- RESET ---- */
#wtb-app * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }
#wtb-app { background: var(--wtb-bg); min-height: 600px; border-radius: var(--wtb-radius); overflow: hidden; color: var(--wtb-text); }

/* ---- LOGIN REQUIRED ---- */
.wtb-login-required {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius);
  padding: 48px;
  text-align: center;
  color: var(--wtb-text-2);
}
.wtb-login-btn {
  display: inline-block;
  margin-top: 18px;
  padding: 11px 28px;
  background: var(--wtb-primary);
  color: #fff;
  border-radius: var(--wtb-radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  transition: background .15s;
}
.wtb-login-btn:hover { background: var(--wtb-primary-hover); color: #fff; }

/* ---- TOPBAR ---- */
.wtb-topbar {
  background: #fff;
  border-bottom: 1px solid var(--wtb-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: var(--wtb-topbar-h);
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--wtb-primary);
  flex: 1;
  letter-spacing: -.01em;
}
.wtb-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
#wtb-username {
  font-size: .85rem;
  font-weight: 500;
  color: var(--wtb-muted);
}
.wtb-logout-btn {
  padding: 7px 14px;
  background: var(--wtb-bg);
  color: var(--wtb-muted);
  border-radius: var(--wtb-radius-sm);
  text-decoration: none;
  font-size: .83rem;
  font-weight: 600;
  border: 1px solid var(--wtb-border);
  transition: all .15s;
}
.wtb-logout-btn:hover { background: var(--wtb-border); color: var(--wtb-text); }

/* LANGUAGE SWITCHER */
.wtb-lang-switcher {
  display: flex;
  gap: 2px;
  background: var(--wtb-bg);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
  padding: 3px;
}
.wtb-lang-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 6px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  color: var(--wtb-muted);
  transition: all .15s;
  font-family: inherit;
}
.wtb-lang-btn.active {
  background: #fff;
  color: var(--wtb-primary);
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-lang-btn:hover { color: var(--wtb-text); }

/* ---- LAYOUT ---- */
.wtb-layout { display: flex; min-height: calc(600px - var(--wtb-topbar-h)); }

/* ---- SIDEBAR ---- */
.wtb-sidebar {
  width: var(--wtb-sidebar-w);
  background: #fff;
  border-right: 1px solid var(--wtb-border);
  padding: 16px 12px;
  flex-shrink: 0;
  overflow-y: auto;
}
.wtb-nav-group { margin-bottom: 4px; }
.wtb-nav-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--wtb-muted-light);
  padding: 10px 10px 4px;
  display: block;
}
.wtb-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: var(--wtb-radius-sm);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--wtb-muted);
  transition: all .12s;
  margin: 1px 0;
  position: relative;
}
.wtb-nav-item:hover { background: var(--wtb-bg); color: var(--wtb-text); }
.wtb-nav-item.active {
  background: var(--wtb-primary-bg);
  color: var(--wtb-primary);
  font-weight: 600;
}
.wtb-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--wtb-primary);
  border-radius: 0 3px 3px 0;
}
.wtb-divider { height: 1px; background: var(--wtb-border); margin: 8px 0; }

/* ---- MAIN CONTENT ---- */
.wtb-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
  max-height: calc(100vh - var(--wtb-topbar-h));
  animation: wtb-fadein .22s ease;
}
@keyframes wtb-fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ---- PAGE HEADER ---- */
.wtb-page-header { margin-bottom: 24px; }
.wtb-page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--wtb-text);
  letter-spacing: -.02em;
}
.wtb-page-header p { color: var(--wtb-muted); margin-top: 3px; font-size: .9rem; }

/* ---- BUTTONS ---- */
.wtb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: var(--wtb-radius-sm);
  border: none;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .14s;
  font-family: inherit;
  white-space: nowrap;
}
.wtb-btn-primary { background: var(--wtb-primary); color: #fff; }
.wtb-btn-primary:hover { background: var(--wtb-primary-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(45,106,79,.25); }
.wtb-btn-primary:active { transform: translateY(0); }
.wtb-btn-secondary { background: var(--wtb-bg); color: var(--wtb-text-2); border: 1px solid var(--wtb-border); }
.wtb-btn-secondary:hover { background: var(--wtb-border); }
.wtb-btn-danger { background: var(--wtb-danger-bg); color: var(--wtb-danger); border: 1px solid #FCA5A5; }
.wtb-btn-danger:hover { background: var(--wtb-danger); color: #fff; }
.wtb-btn-sm { padding: 5px 12px; font-size: .8rem; }

/* ---- CARDS ---- */
.wtb-card {
  background: var(--wtb-card);
  border-radius: var(--wtb-radius);
  border: 1px solid var(--wtb-border);
  box-shadow: var(--wtb-shadow-sm);
  padding: 22px;
  margin-bottom: 16px;
  transition: box-shadow .18s;
}
.wtb-card:hover { box-shadow: var(--wtb-shadow); }
.wtb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.wtb-card-title { font-size: 1rem; font-weight: 700; color: var(--wtb-text); }

/* ---- STAT GRIDS ---- */
.wtb-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin-bottom: 16px; }
.wtb-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.wtb-stat {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius);
  padding: 20px;
  transition: all .15s;
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-stat:hover { box-shadow: var(--wtb-shadow); transform: translateY(-1px); }
.wtb-stat-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--wtb-primary);
  letter-spacing: -.04em;
  line-height: 1;
}
.wtb-stat-label {
  font-size: .76rem;
  font-weight: 600;
  color: var(--wtb-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 5px;
}

/* ---- WEIDEN ---- */
.wtb-weide-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(195px,1fr)); gap: 14px; margin-bottom: 20px; }
.wtb-weide-card {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius);
  padding: 18px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-weide-card:hover { border-color: var(--wtb-primary); box-shadow: var(--wtb-shadow); transform: translateY(-2px); }
.wtb-weide-card .wtb-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--wtb-primary-bg);
  color: var(--wtb-primary);
  border-radius: var(--wtb-radius-pill);
  padding: 2px 9px;
  font-size: .7rem;
  font-weight: 700;
}
.wtb-weide-icon { font-size: 1.8rem; margin-bottom: 8px; }
.wtb-weide-name { font-weight: 700; font-size: .95rem; color: var(--wtb-text); }
.wtb-weide-meta { font-size: .8rem; color: var(--wtb-muted); margin-top: 4px; }

/* ---- FORMS ---- */
.wtb-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.wtb-form-field { margin-bottom: 14px; }
.wtb-form-field label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--wtb-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.wtb-form-field input,
.wtb-form-field select,
.wtb-form-field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
  font-family: inherit;
  font-size: .93rem;
  background: #fff;
  color: var(--wtb-text);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.wtb-form-field input:focus,
.wtb-form-field select:focus,
.wtb-form-field textarea:focus {
  border-color: var(--wtb-primary);
  box-shadow: 0 0 0 3px rgba(45,106,79,.1);
}
.wtb-form-field textarea { resize: vertical; min-height: 80px; }
.wtb-section-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--wtb-muted-light);
  margin: 22px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--wtb-border);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- CHECKBOXES ---- */
.wtb-checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.wtb-checkbox-item {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--wtb-text-2);
  padding: 6px 11px;
  border: 1.5px solid var(--wtb-border);
  border-radius: var(--wtb-radius-pill);
  transition: all .12s;
  background: #fff;
}
.wtb-checkbox-item:hover { border-color: var(--wtb-primary); background: var(--wtb-primary-bg); }
.wtb-checkbox-item input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--wtb-primary); cursor: pointer; }
.wtb-checkbox-item:has(input:checked) { border-color: var(--wtb-primary); background: var(--wtb-primary-bg); color: var(--wtb-primary); font-weight: 600; }

/* ---- HEALTH BUTTONS ---- */
.wtb-health-options { display: flex; gap: 8px; flex-wrap: wrap; }
.wtb-health-btn {
  padding: 9px 20px;
  border-radius: var(--wtb-radius-pill);
  border: 1.5px solid var(--wtb-border);
  cursor: pointer;
  font-size: .86rem;
  font-weight: 600;
  background: var(--wtb-bg);
  color: var(--wtb-muted);
  transition: all .15s;
  font-family: inherit;
  letter-spacing: .01em;
}
.wtb-health-btn:hover { transform: translateY(-1px); }
/* inactive tinted */
.wtb-health-btn.gut        { background: #F0FDF4; border-color: #BBF7D0; color: #16A34A; }
.wtb-health-btn.auffaellig { background: #FFFBEB; border-color: #FDE68A; color: #B45309; }
.wtb-health-btn.krank      { background: #FFF1F2; border-color: #FECDD3; color: #BE123C; }
/* active filled */
.wtb-health-btn.gut.active {
  background: #16A34A; color: #fff; border-color: #16A34A;
  box-shadow: 0 4px 12px rgba(22,163,74,.30);
}
.wtb-health-btn.auffaellig.active {
  background: #D97706; color: #fff; border-color: #D97706;
  box-shadow: 0 4px 12px rgba(217,119,6,.30);
}
.wtb-health-btn.krank.active {
  background: #DC2626; color: #fff; border-color: #DC2626;
  box-shadow: 0 4px 12px rgba(220,38,38,.30);
}

/* ---- WEATHER BUTTONS ---- */
.wtb-weather-options { display: flex; gap: 7px; flex-wrap: wrap; }
.wtb-weather-btn {
  padding: 8px 14px;
  border-radius: var(--wtb-radius-pill);
  border: 1.5px solid var(--wtb-border);
  cursor: pointer;
  font-size: 1.05rem;
  background: #fff;
  transition: all .13s;
  font-family: inherit;
}
.wtb-weather-btn:hover { border-color: var(--wtb-primary); background: var(--wtb-primary-bg); }
.wtb-weather-btn.active { border-color: var(--wtb-info); background: var(--wtb-info-bg); box-shadow: 0 2px 8px rgba(37,99,235,.12); }

/* ---- VOLT BAR ---- */
.wtb-volt-bar { height: 6px; background: var(--wtb-border); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.wtb-volt-fill { height: 100%; border-radius: 3px; transition: width .4s ease; }

/* ---- ENTRIES ---- */
.wtb-entry {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius);
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: all .15s;
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-entry:hover { box-shadow: var(--wtb-shadow); border-color: #CBD5E1; }
.wtb-entry-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.wtb-entry-date { font-weight: 700; font-size: .88rem; color: var(--wtb-text); }
.wtb-entry-weide {
  background: var(--wtb-primary-bg);
  color: var(--wtb-primary);
  padding: 3px 10px;
  border-radius: var(--wtb-radius-pill);
  font-size: .76rem;
  font-weight: 600;
}
.wtb-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: var(--wtb-radius-pill);
  font-size: .76rem;
  font-weight: 600;
  margin-right: 3px;
}
.wtb-tag-green  { background: var(--wtb-success-bg); color: var(--wtb-success); }
.wtb-tag-yellow { background: var(--wtb-warning-bg); color: var(--wtb-warning); }
.wtb-tag-red    { background: var(--wtb-danger-bg);  color: var(--wtb-danger); }
.wtb-tag-blue   { background: var(--wtb-info-bg);    color: var(--wtb-info); }
.wtb-tag-gray   { background: var(--wtb-bg);         color: var(--wtb-muted); border: 1px solid var(--wtb-border); }
.wtb-entry-detail { font-size: .84rem; color: var(--wtb-muted); margin-top: 7px; line-height: 1.5; }
.wtb-entry-img { max-width: 100px; border-radius: var(--wtb-radius-sm); margin-top: 8px; border: 1px solid var(--wtb-border); }
.wtb-entry-meta { font-size: .74rem; color: var(--wtb-muted-light); margin-top: 10px; display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--wtb-border); }

/* ---- FILTER BAR ---- */
.wtb-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.wtb-filter-bar select,
.wtb-filter-bar input[type=month] {
  padding: 8px 12px;
  border: 1.5px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
  font-family: inherit;
  font-size: .86rem;
  background: #fff;
  color: var(--wtb-text);
  outline: none;
  transition: border-color .15s;
}
.wtb-filter-bar select:focus,
.wtb-filter-bar input:focus { border-color: var(--wtb-primary); }

/* ---- USERS ---- */
.wtb-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--wtb-border);
  transition: background .12s;
}
.wtb-user-row:last-child { border-bottom: none; }
.wtb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--wtb-primary-bg);
  color: var(--wtb-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .97rem;
  flex-shrink: 0;
  border: 1.5px solid rgba(45,106,79,.2);
}
.wtb-user-info { flex: 1; }
.wtb-user-name { font-weight: 600; font-size: .9rem; color: var(--wtb-text); }
.wtb-user-sub { font-size: .76rem; color: var(--wtb-muted); margin-top: 1px; }
.wtb-role-badge { padding: 3px 10px; border-radius: var(--wtb-radius-pill); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wtb-role-admin { background: var(--wtb-danger-bg); color: var(--wtb-danger); }
.wtb-role-user  { background: var(--wtb-success-bg); color: var(--wtb-success); }

/* ---- MODAL ---- */
#wtb-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,.4);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 16px;
  animation: wtb-fadein .18s ease;
}
.wtb-modal {
  background: var(--wtb-card);
  border-radius: var(--wtb-radius);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--wtb-shadow-md);
  animation: wtb-slideup .2s ease;
}
@keyframes wtb-slideup { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.wtb-modal h3 { font-size: 1.2rem; font-weight: 700; color: var(--wtb-text); margin-bottom: 20px; letter-spacing: -.01em; }
.wtb-modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--wtb-border); }

/* ---- TOAST ---- */
.wtb-toast {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background: var(--wtb-text);
  color: #fff;
  padding: 11px 18px;
  border-radius: var(--wtb-radius-sm);
  font-size: .87rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  transform: translateY(8px);
  z-index: 99999;
  box-shadow: var(--wtb-shadow-md);
}
.wtb-toast.show { opacity: 1; transform: translateY(0); }

/* ---- VOICE RECORDER ---- */
.wtb-voice-recorder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--wtb-bg);
  border: 1.5px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
}
.wtb-record-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all .15s;
  flex-shrink: 0;
}
.wtb-record-btn.idle { background: var(--wtb-primary); color: #fff; }
.wtb-record-btn.idle:hover { background: var(--wtb-primary-hover); transform: scale(1.05); }
.wtb-record-btn.recording { background: var(--wtb-danger); color: #fff; animation: wtb-pulse 1.2s infinite; }
@keyframes wtb-pulse { 0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(220,38,38,.4)} 50%{transform:scale(1.06);box-shadow:0 0 0 6px rgba(220,38,38,0)} }

/* ---- EMPTY / LOADING ---- */
.wtb-empty { text-align: center; padding: 48px 24px; color: var(--wtb-muted); }
.wtb-empty .wtb-empty-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: .7; }
.wtb-empty p { font-size: .92rem; line-height: 1.6; }
.wtb-loading {
  text-align: center;
  padding: 48px;
  color: var(--wtb-muted-light);
  font-size: .9rem;
}
.wtb-loading::after {
  content: '';
  display: block;
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--wtb-border);
  border-top-color: var(--wtb-primary);
  border-radius: 50%;
  animation: wtb-spin .7s linear infinite;
  margin: 12px auto 0;
}
@keyframes wtb-spin { to { transform: rotate(360deg); } }

/* ---- ALERTS ---- */
.wtb-alert { padding: 11px 15px; border-radius: var(--wtb-radius-sm); margin-bottom: 14px; font-size: .88rem; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.wtb-alert-success { background: var(--wtb-success-bg); color: var(--wtb-success); border: 1px solid #A7F3D0; }
.wtb-alert-error   { background: var(--wtb-danger-bg);  color: var(--wtb-danger);  border: 1px solid #FCA5A5; }

/* ---- KALENDER ---- */
.wtb-cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.wtb-cal-nav {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  color: var(--wtb-text-2);
  transition: all .13s;
}
.wtb-cal-nav:hover { background: var(--wtb-primary-bg); border-color: var(--wtb-primary); color: var(--wtb-primary); }
.wtb-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.wtb-cal-dow { text-align: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--wtb-muted-light); padding: 6px 0; letter-spacing: .04em; }
.wtb-cal-day {
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius-sm);
  min-height: 60px;
  padding: 7px;
  cursor: default;
  transition: all .13s;
}
.wtb-cal-day.has-entries { cursor: pointer; }
.wtb-cal-day.has-entries:hover { background: var(--wtb-primary-bg); border-color: var(--wtb-primary); }
.wtb-cal-day.today { border-color: var(--wtb-primary); box-shadow: 0 0 0 2px var(--wtb-primary-bg); }
.wtb-cal-day.empty { background: transparent; border-color: transparent; }
.wtb-cal-day-num { font-size: .8rem; font-weight: 600; color: var(--wtb-text-2); }
.wtb-cal-day.today .wtb-cal-day-num { color: var(--wtb-primary); font-weight: 800; }
.wtb-cal-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 5px; }
.wtb-cal-dot { width: 7px; height: 7px; border-radius: 50%; }
.wtb-dot-gut       { background: var(--wtb-success); }
.wtb-dot-auffaellig{ background: var(--wtb-warning); }
.wtb-dot-krank     { background: var(--wtb-danger); }

/* ---- STATISTIKEN ---- */
.wtb-chart-container { position: relative; height: 240px; margin-bottom: 16px; }
.wtb-chart-container canvas { max-height: 240px; }
.wtb-range-btns { display: flex; gap: 4px; margin-bottom: 18px; }
.wtb-range-btn {
  padding: 6px 16px;
  border-radius: var(--wtb-radius-pill);
  border: 1px solid var(--wtb-border);
  background: var(--wtb-card);
  cursor: pointer;
  font-size: .83rem;
  font-weight: 600;
  color: var(--wtb-muted);
  transition: all .13s;
  font-family: inherit;
}
.wtb-range-btn:hover { border-color: var(--wtb-primary); color: var(--wtb-primary); }
.wtb-range-btn.active { background: var(--wtb-primary); color: #fff; border-color: var(--wtb-primary); }

/* ---- AUFGABEN ---- */
.wtb-aufgabe {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--wtb-card);
  border: 1px solid var(--wtb-border);
  border-radius: var(--wtb-radius);
  margin-bottom: 8px;
  transition: all .14s;
  box-shadow: var(--wtb-shadow-sm);
}
.wtb-aufgabe:hover { box-shadow: var(--wtb-shadow); }
.wtb-aufgabe.erledigt { opacity: .55; }
.wtb-aufgabe-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--wtb-border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: .8rem;
  transition: all .14s;
}
.wtb-aufgabe-check:hover { border-color: var(--wtb-primary); background: var(--wtb-primary-bg); }
.wtb-aufgabe-check.done { background: var(--wtb-success); border-color: var(--wtb-success); color: #fff; }
.wtb-aufgabe-body { flex: 1; min-width: 0; }
.wtb-aufgabe-titel { font-weight: 600; font-size: .92rem; color: var(--wtb-text); }
.wtb-aufgabe-titel.erledigt { text-decoration: line-through; color: var(--wtb-muted); }
.wtb-aufgabe-meta { font-size: .77rem; color: var(--wtb-muted); margin-top: 4px; display: flex; gap: 10px; flex-wrap: wrap; }
.wtb-prio-hoch   { color: var(--wtb-danger); font-weight: 700; }
.wtb-prio-normal { color: var(--wtb-success); font-weight: 600; }
.wtb-prio-niedrig{ color: var(--wtb-muted-light); }
.wtb-aufgabe-faellig-over { color: var(--wtb-danger); font-weight: 700; }
.wtb-tab-btns {
  display: flex;
  border-radius: var(--wtb-radius-sm);
  overflow: hidden;
  border: 1px solid var(--wtb-border);
  background: var(--wtb-card);
}
.wtb-tab-btn { flex: 1; padding: 8px 16px; text-align: center; cursor: pointer; font-size: .85rem; font-weight: 600; background: transparent; color: var(--wtb-muted); border: none; transition: all .14s; font-family: inherit; }
.wtb-tab-btn:hover { color: var(--wtb-text); }
.wtb-tab-btn.active { background: var(--wtb-primary); color: #fff; }

/* ---- EINSTELLUNGEN ---- */
.wtb-settings-row { display: flex; align-items: flex-start; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--wtb-border); }
.wtb-settings-row:last-child { border-bottom: none; }
.wtb-settings-label { flex: 0 0 200px; }
.wtb-settings-label > span, .wtb-settings-label > div:first-child { font-weight: 600; font-size: .9rem; color: var(--wtb-text); }
.wtb-settings-sub { font-size: .78rem; color: var(--wtb-muted); margin-top: 2px; }
.wtb-settings-val { flex: 1; }
.wtb-settings-val input, .wtb-settings-val select { width: 100%; padding: 9px 12px; border: 1.5px solid var(--wtb-border); border-radius: var(--wtb-radius-sm); font-family: inherit; font-size: .9rem; background: #fff; color: var(--wtb-text); outline: none; transition: border-color .15s, box-shadow .15s; }
.wtb-settings-val input:focus, .wtb-settings-val select:focus { border-color: var(--wtb-primary); box-shadow: 0 0 0 3px rgba(45,106,79,.1); }

/* ---- MOBILE BOTTOM NAV ---- */
.wtb-bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--wtb-border); z-index: 1000; box-shadow: 0 -2px 16px rgba(0,0,0,.07); }
.wtb-bottom-nav-inner { display: flex; justify-content: space-around; align-items: stretch; height: var(--wtb-bnav-h); }
.wtb-bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: .58rem;
  font-weight: 600;
  color: var(--wtb-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 6px 2px;
  transition: all .12s;
  position: relative;
}
.wtb-bottom-nav-item .wtb-bnav-icon { font-size: 1.25rem; line-height: 1; }
.wtb-bottom-nav-item.active { color: var(--wtb-primary); }
.wtb-bottom-nav-item.active::before { content: ''; position: absolute; top: 0; left: 20%; right: 20%; height: 2.5px; background: var(--wtb-primary); border-radius: 0 0 3px 3px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .wtb-sidebar { display: none; }
  .wtb-bottom-nav { display: block; }
  .wtb-layout { padding-bottom: var(--wtb-bnav-h); }
  .wtb-content { padding: 16px; padding-bottom: calc(var(--wtb-bnav-h) + 20px); max-height: none; }
  .wtb-toast { bottom: calc(var(--wtb-bnav-h) + 10px); right: 12px; }
  .wtb-form-row { grid-template-columns: 1fr; }
  .wtb-grid-2, .wtb-grid-3 { grid-template-columns: 1fr; }
  .wtb-settings-row { flex-direction: column; gap: 8px; }
  .wtb-settings-label { flex: none; }
  .wtb-topbar { padding: 0 14px; }
  #wtb-username { display: none; }
}
