:root{--bg:#111713;--panel:#18211b;--muted:#a8b8ad;--text:#f3fff6;--line:#2d3b31;--accent:#34d399;--accent-strong:#22c55e;--danger:#fb7185;--paper:#ffffff;--ink:#1f2937}*{box-sizing:border-box}body{margin:0;background:linear-gradient(135deg,#0b0f0c,#17251b 55%,#ecfdf5);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);display:flex;min-height:100vh}aside{width:250px;background:rgba(9,14,11,.88);border-right:1px solid var(--line);padding:26px;position:sticky;top:0;height:100vh;display:flex;flex-direction:column}.brand{font-size:22px;font-weight:800;margin-bottom:35px}.brand span{display:block;color:var(--accent);font-size:14px}nav a{display:block;color:#d7e7dc;text-decoration:none;padding:13px 14px;border-radius:14px;margin:6px 0}nav a:hover{background:#1f3527;color:white}main{flex:1;padding:34px;max-width:1500px}h1{font-size:38px;margin:0 0 22px}h2{margin-top:30px}.grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:18px}.dashboard-grid{grid-template-columns:repeat(5,minmax(170px,1fr))}.card,.panel,.project{background:rgba(24,33,27,.9);border:1px solid var(--line);border-radius:24px;padding:22px;box-shadow:0 18px 50px rgba(0,0,0,.22)}.card small{display:block;color:var(--muted);margin-bottom:10px}.card strong{font-size:30px}.wide{grid-column:span 2}.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}label{color:#d7e7dc;font-size:14px}input,select,textarea{background:#101711;color:var(--text);border:1px solid #3d5143;border-radius:13px;padding:12px;min-width:180px}input:focus,select:focus,textarea:focus{outline:2px solid rgba(52,211,153,.35);border-color:var(--accent)}input[type=color]{min-width:60px;width:70px;height:46px;padding:5px}.color-label{display:flex;gap:10px;align-items:center;background:#101711;border:1px solid #3d5143;border-radius:13px;padding:6px 12px}textarea{width:100%;min-height:75px;margin-top:12px}button{background:var(--accent);border:0;color:#062015;font-weight:800;border-radius:13px;padding:12px 18px;cursor:pointer}.danger{background:var(--danger);color:white}.ghost{background:#203427;color:#d7e7dc;padding:7px 10px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:16px}.project{display:block;color:var(--text);text-decoration:none}.project b{display:block;font-size:19px;margin-bottom:8px}.project span,.project em,.muted{color:var(--muted);font-style:normal}.project em{display:block;margin-top:6px}.project-top{display:flex;justify-content:space-between;align-items:start;gap:10px}.progress-label{background:rgba(52,211,153,.14);color:#bbf7d0!important;border:1px solid rgba(52,211,153,.35);border-radius:999px;padding:5px 9px;font-weight:800;font-size:13px;white-space:nowrap}.bar{height:10px;background:#0f1712;border-radius:20px;overflow:hidden;margin:14px 0}.bar.big{height:18px}.bar i{display:block;height:100%;background:linear-gradient(90deg,#86efac,#22c55e,#16a34a);border-radius:20px}.color-dot{display:inline-block;width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,.5)}.timer-big{font-size:38px;font-weight:900;margin:10px 0 16px;color:white}table{width:100%;border-collapse:collapse;background:rgba(24,33,27,.82);border:1px solid var(--line);border-radius:18px;overflow:hidden;margin-top:14px}th,td{text-align:left;padding:14px;border-bottom:1px solid var(--line)}th{color:var(--muted);font-weight:600}.button{display:inline-block;background:#101711;color:white;padding:10px 14px;border-radius:12px;text-decoration:none;border:0}.button.secondary{background:#ecfdf5;color:#102016}.button.small{padding:6px 10px;border-radius:9px;font-size:13px}.calendar-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.right{justify-content:flex-end}.calendar.month{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));gap:14px}.day{min-height:150px;background:var(--paper);color:var(--ink);border:1px solid #dbe3ef;border-radius:18px;padding:12px;box-shadow:0 8px 20px rgba(0,0,0,.04)}.day-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;color:#0f172a}.day-title span{color:#334155;font-weight:700}.event{background:#f8fafc;color:#172033;border:1px solid #e5e7eb;border-left:6px solid #22c55e;border-radius:14px;padding:9px;margin:7px 0}.event b,.calendar-event b{color:#0f172a}.event small,.calendar-event small{display:block;color:#334155;margin-top:3px;font-weight:600}.event p,.calendar-event p{margin:5px 0 0;color:#475569}.empty{color:#64748b;font-size:13px;padding:14px 0}.week-calendar{display:grid;grid-template-columns:72px repeat(7,minmax(130px,1fr));background:#fff;color:#1f2937;border:1px solid #dbe3ef;border-radius:24px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.18)}.time-col,.week-day{border-right:1px solid #e5e7eb}.week-head-cell{height:72px;padding:12px;border-bottom:1px solid #e5e7eb;background:#f8fafc;color:#111827;display:flex;flex-direction:column;justify-content:center;gap:2px}.week-head-cell span,.week-head-cell small{color:#334155}.hour{height:58px;padding:8px;color:#475569;border-bottom:1px dashed #e5e7eb;font-size:13px}.day-lines{position:relative;min-height:754px}.line{height:58px;border-bottom:1px dashed #e5e7eb}.calendar-event{position:absolute;left:8px;right:8px;overflow:hidden;padding:10px;border-radius:14px;border:1px solid #dbe3ef;border-left:7px solid #22c55e;background:#ecfdf5;color:#1f2937;box-shadow:0 6px 16px rgba(15,23,42,.08)}.calendar-empty{position:absolute;top:14px;left:12px}.pie-wrap{display:flex;gap:28px;align-items:center;flex-wrap:wrap}.legend{display:grid;gap:10px;color:#d9fbe6}.legend-dot{display:inline-block;width:14px;height:14px;border-radius:50%;margin-right:8px;vertical-align:middle}@media(max-width:1100px){.dashboard-grid,.grid{grid-template-columns:1fr 1fr}.wide{grid-column:span 2}.week-calendar{grid-template-columns:1fr}.time-col{display:none}.week-day{border-right:0;border-bottom:1px solid #e5e7eb}.day-lines{min-height:160px}.line{display:none}.calendar-event{position:relative;left:auto;right:auto;top:auto!important;height:auto!important;margin:8px}.calendar.month{grid-template-columns:1fr 1fr}}@media(max-width:700px){body{display:block}aside{width:auto;height:auto;position:relative}.grid,.dashboard-grid{grid-template-columns:1fr}.wide{grid-column:auto}main{padding:20px}.calendar.month{grid-template-columns:1fr}.calendar-head{display:block}.row.right{justify-content:flex-start;margin-top:12px}}
.card.compact{padding:18px 20px;border-radius:22px}.card.compact strong{font-size:27px}.timer-card{padding:18px 20px}.timer-card h2{margin:6px 0}.timer-form select{min-width:170px}.completed-card{padding:18px 20px}.completed-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.completed-grid div{background:#101711;border:1px solid #3d5143;border-radius:16px;padding:14px}.completed-grid b{display:block;color:var(--muted);font-size:13px}.completed-grid strong{display:block;font-size:28px;margin:4px 0}.completed-grid span{color:#bbf7d0;font-weight:800}.status-panel{padding:16px 20px}.status-panel h2{margin-top:0}
.tabs{display:flex;gap:10px;margin:18px 0 8px;flex-wrap:wrap}.tabs a{background:#ffffff;color:#102016;text-decoration:none;border-radius:999px;padding:10px 16px;font-weight:800;border:1px solid #dbe3ef}.project-section{scroll-margin-top:20px;margin-top:20px}.count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;background:rgba(52,211,153,.16);color:#bbf7d0;border:1px solid rgba(52,211,153,.35);border-radius:999px;font-size:14px;margin-left:8px}.calendar-head .button.secondary{background:#ffffff!important;color:#102016!important;border:1px solid #dbe3ef;box-shadow:0 4px 12px rgba(15,23,42,.08)}input[type=time]{min-width:130px}

/* V6.1: nur gewünschte Änderungen */
.calendar-head a.button.secondary,
.calendar-head .button.secondary,
.calendar-head a.button,
.calendar-head button,
.calendar-head .row.right a {
  background:#ffffff !important;
  color:#102016 !important;
  border:1px solid #dbe3ef !important;
  box-shadow:0 4px 12px rgba(15,23,42,.10) !important;
  opacity:1 !important;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(2);
  opacity: 1;
}
.project-tabs{margin:18px 0 18px;}
.project-tabs .tab-button{
  background:#ffffff;
  color:#102016;
  border:1px solid #dbe3ef;
  border-radius:999px;
  padding:10px 16px;
  font-weight:800;
  cursor:pointer;
}
.project-tabs .tab-button.active{
  background:var(--accent);
  color:#062015;
  border-color:var(--accent);
  box-shadow:0 8px 20px rgba(52,211,153,.25);
}
.project-tabs .tab-button span{margin-left:6px;opacity:.8;}
.tab-panel{display:none;}
.tab-panel.active{display:block;}
button.danger,.danger{color:#fecaca!important;border-color:rgba(239,68,68,.55)!important;background:rgba(239,68,68,.12)!important}.delete-project-form{margin:-12px 0 18px 0}.delete-project-form button{width:auto}

nav{
    flex:1;
}

.user-box{
    margin-top:24px;
    padding-top:20px;
    border-top:1px solid var(--line);
}

.user-box strong{
    display:block;
    color:white;
    font-size:15px;
}

.user-box span{
    display:block;
    margin-top:4px;
    color:var(--muted);
    font-size:13px;
}

.user-box a{
    display:inline-block;
    margin-top:14px;
    color:#86efac;
    text-decoration:none;
    font-weight:600;
}

.user-box a:hover{
    color:white;
}

/* Partnerportal */
.button-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:var(--accent);
  color:#062015 !important;
  text-decoration:none;
  font-weight:800;
  border-radius:13px;
  padding:12px 18px;
  border:1px solid var(--accent);
  white-space:nowrap;
}

.button-link:hover{
  background:var(--accent-strong);
  color:#062015 !important;
}

.secondary-link{
  background:#203427;
  border-color:#3d5143;
  color:#d7e7dc !important;
}

.secondary-link:hover{
  background:#294332;
  color:#ffffff !important;
}

.partner-header{
  max-width:850px;
  margin-bottom:24px;
}

.partner-header small{
  display:block;
  color:#86efac;
  font-weight:800;
  margin-bottom:8px;
}

.partner-header h1{
  overflow-wrap:anywhere;
}

.partner-summary{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.partner-summary .card{
  min-width:0;
  overflow:hidden;
}

.partner-summary .card strong,
.partner-summary .card span{
  overflow-wrap:anywhere;
}

.partner-project-card{
  min-width:0;
  overflow:hidden;
}

.partner-project-card b,
.partner-project-card span,
.partner-project-card em{
  overflow-wrap:anywhere;
  word-break:break-word;
}

.section-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  flex-wrap:wrap;
  margin-top:32px;
  margin-bottom:16px;
}

.section-heading h2{
  margin:0;
}

.section-heading p{
  margin:5px 0 0;
}

.partner-request-page{
  max-width:920px;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px;
}

.form-grid label,
.full-field{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
  font-weight:700;
}

.form-grid input,
.full-field textarea{
  width:100%;
  min-width:0;
}

.form-grid small{
  color:var(--muted);
  font-weight:400;
}

.budget-field{
  display:flex;
  align-items:center;
  background:#101711;
  border:1px solid #3d5143;
  border-radius:13px;
  overflow:hidden;
}

.budget-field input{
  border:0;
  border-radius:0;
  flex:1;
}

.budget-field span{
  padding:0 14px;
  color:#bbf7d0;
  font-weight:800;
}

.full-field{
  margin-top:20px;
}

.form-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  margin-top:20px;
  flex-wrap:wrap;
}

.form-error{
  max-width:920px;
  margin-bottom:18px;
  padding:14px 18px;
  border-radius:14px;
  background:rgba(251,113,133,.12);
  border:1px solid rgba(251,113,133,.45);
  color:#fecdd3;
}

@media(max-width:900px){
  .partner-summary,
  .form-grid{
    grid-template-columns:1fr 1fr;
  }
}

@media(max-width:700px){
  .partner-summary,
  .form-grid{
    grid-template-columns:1fr;
  }

  .form-actions{
    justify-content:stretch;
  }

  .form-actions a,
  .form-actions button{
    width:100%;
  }
}

/* Partner-Projektübersicht: Statuszahl direkt an der Überschrift */
.partner-status-heading{
  justify-content:flex-start;
  margin-top:34px;
  margin-bottom:16px;
}

.partner-status-heading h2{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
}

.partner-status-heading .count-badge{
  margin-left:0;
  flex:0 0 auto;
}

.project-history{
  margin-top:28px;
  display:grid;
  gap:14px;
}

.history-entry{
  background:rgba(16,23,17,.75);
  border:1px solid var(--line);
  border-radius:16px;
  padding:16px 18px;
}

.history-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.history-entry p{
  margin:12px 0 0;
  white-space:pre-wrap;
  line-height:1.55;
}

/* =========================================================
   Login und PHP-Version
   ========================================================= */

.login-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
}

.login-shell {
    width: 100%;
    max-width: 520px;
    padding: 24px;
}

.login-card {
    background: rgba(24, 33, 27, .94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
    padding: 34px;
}

.login-card form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.login-card label {
    display: grid;
    gap: 8px;
}

.login-card input {
    width: 100%;
}

.alert {
    border-radius: 14px;
    margin-top: 18px;
    padding: 13px 15px;
}

.alert-error {
    background: rgba(251, 113, 133, .12);
    border: 1px solid rgba(251, 113, 133, .45);
    color: #fecdd3;
}

nav a.active {
    background: rgba(52, 211, 153, .18);
    border: 1px solid rgba(52, 211, 153, .35);
    color: #ffffff;
}
