/* Kontingentkunden Portal Pro - minimal clean UI */

@font-face{
  font-family:'Comfortaa';
  src:url('../fonts/Comfortaa-Regular.ttf') format('truetype');
  font-weight:400;
  font-style:normal;
  font-display:swap
}
@font-face{
  font-family:'Comfortaa';
  src:url('../fonts/Comfortaa-Bold.ttf') format('truetype');
  font-weight:700;
  font-style:normal;
  font-display:swap
}

:root{
  --kkp-accent:#1d3557;
  --kkp-bg:#ecece6;
  --kkp-card:#f7f7f2;
  --kkp-border:#cdd1c8;
  --kkp-border-strong:#b8beb2;
  --kkp-text:#2f3136;
  --kkp-muted:#5f646b;
  --kkp-focus:rgba(80,94,72,.2);
}

.kkp-login-wrap,
.kkp-portal{font-family:'Comfortaa', 'Segoe UI', Arial, sans-serif; color:var(--kkp-text)}

.kkp-login-wrap{min-height:60vh; display:flex; align-items:center; justify-content:center; padding:24px; background:var(--kkp-bg)}

.kkp-card{background:var(--kkp-card); border:1px solid var(--kkp-border); border-radius:14px; padding:18px; box-shadow:0 1px 3px rgba(0,0,0,.04)}

.kkp-login-card{max-width:480px; width:100%}

.kkp-brand{display:flex; align-items:center; gap:12px; margin-bottom:14px}
.kkp-logo{width:48px; height:48px; object-fit:contain}
.kkp-logo-fallback{width:48px; height:48px; border-radius:12px; background:linear-gradient(135deg, var(--kkp-accent), #457b9d)}
.kkp-brand-title{font-weight:700; font-size:18px}
.kkp-brand-subtitle{color:var(--kkp-muted); font-size:13px; margin-top:2px}

.kkp-login-form #loginform{margin:0}
.kkp-login-form label{font-size:12px; color:var(--kkp-muted); font-weight:600}
.kkp-login-form input[type="text"],
.kkp-login-form input[type="password"]{
  width:100%;
  min-height:42px;
  border:1px solid var(--kkp-border);
  border-radius:12px;
  padding:10px 12px;
  margin-top:4px;
  background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:border-color .16s ease, box-shadow .16s ease
}
.kkp-login-form input[type="text"]:hover,
.kkp-login-form input[type="password"]:hover{border-color:var(--kkp-border-strong)}
.kkp-login-form input[type="text"]:focus,
.kkp-login-form input[type="password"]:focus{
  outline:none;
  border-color:var(--kkp-accent);
  box-shadow:0 0 0 4px var(--kkp-focus)
}
.kkp-login-form .login-remember{margin-top:10px}
.kkp-login-form input[type="submit"]{
  background:linear-gradient(180deg, #2a4b78 0%, var(--kkp-accent) 100%);
  border:none;
  color:#fff;
  padding:11px 14px;
  border-radius:12px;
  cursor:pointer;
  width:100%;
  margin-top:10px;
  font-weight:700;
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease
}
.kkp-login-form input[type="submit"]:hover{filter:brightness(.95)}
.kkp-login-form input[type="submit"]:active{transform:translateY(1px)}

.kkp-login-footer{margin-top:12px; font-size:12px; color:var(--kkp-muted)}
.kkp-login-footer a{color:var(--kkp-accent)}

.kkp-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:linear-gradient(180deg, #2a4b78 0%, var(--kkp-accent) 100%);
  color:#fff;
  padding:10px 15px;
  border-radius:12px;
  text-decoration:none;
  border:1px solid transparent;
  box-shadow:0 4px 10px rgba(17,24,39,.12);
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease
}
.kkp-button:hover{
  filter:brightness(.97);
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(17,24,39,.16)
}
.kkp-button-ghost{background:transparent; color:var(--kkp-accent); border-color:var(--kkp-border)}
.kkp-button-small{padding:6px 10px; border-radius:9px; font-size:12px}

.kkp-muted{color:var(--kkp-muted)}

.kkp-portal{background:var(--kkp-bg); padding:18px; border-radius:14px}

.kkp-portal-header{display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px}
.kkp-portal-header h2{margin:0; font-size:20px}

.kkp-subnav-wrap{margin:0 0 14px}
.kkp-subnav-active{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#eef4ff;
  border:1px solid #cfdcf6;
  border-radius:999px;
  padding:6px 12px;
  font-size:12px;
  color:#23406f
}
.kkp-subnav-active strong{font-size:13px}
.kkp-subnav{display:flex; gap:10px; flex-wrap:wrap; margin:10px 0 0}
.kkp-subnav-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid var(--kkp-border);
  border-radius:999px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color:#111827;
  text-decoration:none;
  font-size:13px;
  font-weight:600;
  line-height:1;
  transition:all .15s ease;
}
.kkp-subnav-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:#8a98ab
}
.kkp-subnav-link:hover{
  border-color:var(--kkp-accent);
  color:var(--kkp-accent);
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(17,24,39,.08)
}
.kkp-subnav-link:hover .kkp-subnav-dot{background:var(--kkp-accent)}
.kkp-subnav-link-active{
  background:var(--kkp-accent);
  color:#fff;
  border-color:var(--kkp-accent);
  box-shadow:0 6px 14px rgba(29,53,87,.28)
}
.kkp-subnav-link-active .kkp-subnav-dot{background:#fff}

.kkp-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px}
@media (max-width: 980px){
  .kkp-grid{grid-template-columns:1fr}
}

.kkp-kv{display:grid; grid-template-columns:1fr; gap:8px}
.kkp-kv > div{display:flex; justify-content:space-between; gap:12px; border-bottom:1px dashed var(--kkp-border); padding-bottom:6px}
.kkp-kv strong{font-weight:600; color:#111827}

.kkp-kpis{display:flex; gap:10px; margin-top:10px; flex-wrap:wrap}
.kkp-kpi{flex:1; min-width:150px; border:1px solid var(--kkp-border); border-radius:12px; padding:10px; background:#fbfbfd}
.kkp-kpi .n{font-weight:800; font-size:18px}
.kkp-kpi .l{color:var(--kkp-muted); font-size:12px}

.kkp-traffic-status{
  margin-top:10px;
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:7px 12px;
  border:1px solid var(--kkp-border);
  border-radius:999px;
  background:linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}
.kkp-traffic-dot{
  width:14px;
  height:14px;
  border-radius:50%;
  box-shadow:inset 0 0 0 2px rgba(255,255,255,.72), 0 0 0 1px rgba(15,23,42,.12);
}
.kkp-traffic-dot-green{
  background:radial-gradient(circle at 30% 30%, #54dd88 0%, #16a34a 70%);
}
.kkp-traffic-dot-yellow{
  background:radial-gradient(circle at 30% 30%, #ffe384 0%, #d4a908 72%);
}
.kkp-traffic-dot-red{
  background:radial-gradient(circle at 30% 30%, #ff9a9a 0%, #dc2626 72%);
}
.kkp-traffic-dot-neutral{
  background:radial-gradient(circle at 30% 30%, #d4dbe7 0%, #8b95a7 72%);
}
.kkp-traffic-label{
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
  color:#1f2a3c;
}

.kkp-alert{padding:10px 12px; border-radius:12px; margin:10px 0; border:1px solid var(--kkp-border)}
.kkp-alert-warn{background:#fff7ed; border-color:#fed7aa}

.kkp-guide{
  margin-bottom:14px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #cfe0f7;
  background:linear-gradient(180deg, #f8fbff 0%, #f1f6ff 100%);
}
.kkp-guide strong{
  display:block;
  margin-bottom:6px;
  color:#10243f;
}
.kkp-guide ol{
  margin:0 0 0 18px;
}
.kkp-guide li{
  margin:4px 0;
}

.kkp-table-wrap{overflow:auto; border:1px solid var(--kkp-border); border-radius:12px}
.kkp-table{width:100%; border-collapse:collapse; font-size:13px}
.kkp-table th, .kkp-table td{padding:10px 12px; border-bottom:1px solid var(--kkp-border)}
.kkp-table th{background:#f3f4f6; text-align:left}
.kkp-table td.right, .kkp-table th.right{text-align:right}
.kkp-table textarea{
  width:100%;
  min-height:68px;
  border:1px solid var(--kkp-border);
  border-radius:10px;
  padding:8px 10px;
  resize:vertical;
}

.kkp-doc-list{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px}
.kkp-doc-list li{display:flex; justify-content:space-between; align-items:center; gap:12px; padding:10px 12px; border:1px solid var(--kkp-border); border-radius:12px; background:#fff}

.kkp-form-grid{display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px}
@media (max-width: 760px){
  .kkp-form-grid{grid-template-columns:1fr}
}
.kkp-field label{display:block; margin-bottom:4px; font-weight:600; color:#243041}
.kkp-field input[type="text"],
.kkp-field input[type="email"],
.kkp-field input[type="date"],
.kkp-field input[type="number"],
.kkp-field input[type="password"],
.kkp-field select,
.kkp-field textarea{
  width:100%;
  border:1px solid var(--kkp-border);
  border-radius:12px;
  padding:10px 12px;
  background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease
}
.kkp-field input[type="text"],
.kkp-field input[type="email"],
.kkp-field input[type="date"],
.kkp-field input[type="number"],
.kkp-field input[type="password"],
.kkp-field select{
  min-height:42px
}
.kkp-field textarea{min-height:120px; line-height:1.45}
.kkp-field input::placeholder,
.kkp-field textarea::placeholder{color:#9099a8}
.kkp-field input[type="text"]:hover,
.kkp-field input[type="email"]:hover,
.kkp-field input[type="date"]:hover,
.kkp-field input[type="number"]:hover,
.kkp-field input[type="password"]:hover,
.kkp-field select:hover,
.kkp-field textarea:hover{border-color:var(--kkp-border-strong)}
.kkp-field input[type="text"]:focus,
.kkp-field input[type="email"]:focus,
.kkp-field input[type="date"]:focus,
.kkp-field input[type="number"]:focus,
.kkp-field input[type="password"]:focus,
.kkp-field select:focus,
.kkp-field textarea:focus{
  outline:none;
  border-color:var(--kkp-accent);
  box-shadow:0 0 0 4px var(--kkp-focus)
}
.kkp-form-actions{margin-top:12px}

.kkp-pdf-links{display:flex; gap:6px; flex-wrap:wrap}

.kkp-subtabs{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0 14px;
}
.kkp-subtab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  padding:7px 12px;
  border:1px solid var(--kkp-border);
  border-radius:999px;
  background:linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color:#1f2937;
  text-decoration:none;
  font-size:12px;
  font-weight:700;
  letter-spacing:.01em;
  transition:all .14s ease;
}
.kkp-subtab:hover{
  border-color:var(--kkp-accent);
  color:var(--kkp-accent);
  transform:translateY(-1px);
}
.kkp-subtab-active{
  background:var(--kkp-accent);
  color:#fff;
  border-color:var(--kkp-accent);
  box-shadow:0 5px 12px rgba(29,53,87,.22);
}
.kkp-cal-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:10px;
}
.kkp-cal-embed-wrap{
  border:1px solid var(--kkp-border);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 10px rgba(15,23,42,.06);
}
.kkp-cal-embed{
  display:block;
  width:100%;
  min-height:880px;
  border:0;
}
@media (max-width: 980px){
  .kkp-cal-embed{min-height:980px}
}

.kkp-ai-chat{
  margin-top:10px;
  border:1px solid var(--kkp-border);
  border-radius:14px;
  background:#fff;
  box-shadow:0 2px 10px rgba(15,23,42,.06);
  overflow:hidden;
}
.kkp-ai-messages{
  max-height:460px;
  overflow:auto;
  padding:14px;
  background:linear-gradient(180deg, #f7fafc 0%, #f2f6fb 100%);
  border-bottom:1px solid var(--kkp-border);
}
.kkp-ai-message{
  margin-bottom:10px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--kkp-border);
  background:#fff;
}
.kkp-ai-message:last-child{margin-bottom:0}
.kkp-ai-message-user{
  border-color:#c8d8ef;
  background:#eef5ff;
}
.kkp-ai-message-assistant{
  border-color:#d5ddd0;
  background:#f7faf5;
}
.kkp-ai-head{
  font-size:11px;
  color:#5f6b7b;
  margin-bottom:4px;
  font-weight:700;
  letter-spacing:.01em;
}
.kkp-ai-text{
  line-height:1.55;
  font-size:13px;
  color:#233042;
}
.kkp-ai-form{
  padding:14px;
  background:#fff;
}
.kkp-ai-form label{
  display:block;
  margin-bottom:6px;
  font-weight:700;
  color:#1f2a3c;
}
.kkp-ai-form textarea{
  width:100%;
  min-height:110px;
  border:1px solid var(--kkp-border);
  border-radius:12px;
  padding:10px 12px;
  line-height:1.5;
  background:linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:border-color .16s ease, box-shadow .16s ease;
}
.kkp-ai-form textarea:focus{
  outline:none;
  border-color:var(--kkp-accent);
  box-shadow:0 0 0 4px var(--kkp-focus);
}
.kkp-ai-actions{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.kkp-tl-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.kkp-tl-actions{
  display:flex;
  align-items:flex-start;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.kkp-tl-canvas{
  margin-top:10px;
  border:1px solid var(--kkp-border);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}

.kkp-tl-wrap{
  padding:12px;
}
.kkp-tl-axis{
  position:relative;
  height:34px;
  border-bottom:1px dashed #c6cedb;
  margin-bottom:8px;
}
.kkp-tl-axis-tick{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  border-left:1px solid #d7deea;
  height:100%;
}
.kkp-tl-axis-tick span{
  position:absolute;
  top:0;
  left:6px;
  font-size:11px;
  color:#5f6b7b;
  white-space:nowrap;
}

.kkp-tl-rows{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.kkp-tl-row{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:10px;
  align-items:center;
}
.kkp-tl-label{
  min-width:0;
}
.kkp-tl-label strong{
  display:block;
  font-size:13px;
  color:#16243c;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.kkp-tl-label span{
  display:block;
  color:#66758c;
  font-size:12px;
  margin-top:2px;
}
.kkp-tl-lane{
  position:relative;
  min-height:38px;
  border:1px solid #dbe2ec;
  border-radius:10px;
  background:linear-gradient(180deg, #f9fbff 0%, #f4f8ff 100%);
  overflow:hidden;
}

.kkp-tl-seg{
  position:absolute;
  top:8px;
  height:20px;
  border-radius:8px;
  background:var(--tl-color);
  border:1px solid #22324a;
  box-shadow:0 2px 6px rgba(15,23,42,.12);
  opacity:.88;
}
.kkp-tl-seg.mode-start_deadline{
  border-style:dashed;
  opacity:.58;
}
.kkp-tl-seg.mode-start_plus_weeks{
  border-style:dashed;
  opacity:.3;
}
.kkp-tl-seg.mode-earliest_latest{
  border-style:dotted;
  background:var(--tl-color);
  opacity:.42;
}

.kkp-tl-marker{
  position:absolute;
  top:3px;
  width:0;
  height:30px;
  border-left:2px solid var(--tl-color);
  filter:drop-shadow(0 1px 1px rgba(15,23,42,.2));
}
.kkp-tl-marker.mode-start_deadline.marker-b{
  border-left-width:5px;
}
.kkp-tl-marker.mode-earliest_only,
.kkp-tl-marker.mode-deadline_only{
  border-left-width:4px;
}

.kkp-tl-hours{
  position:absolute;
  left:10px;
  top:8px;
  display:inline-flex;
  align-items:center;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  color:#102a43;
  border:1px solid var(--tl-color);
  background:#eef3ff;
}
.kkp-tl-empty{
  position:absolute;
  left:10px;
  top:10px;
  font-size:11px;
  color:#7a879b;
}

@media (max-width: 980px){
  .kkp-tl-row{
    grid-template-columns:1fr;
  }
  .kkp-tl-head{
    flex-direction:column;
  }
  .kkp-tl-actions{
    justify-content:flex-start;
  }
}
