/* AIKIT Portal – UV Norddeutschland Brandfarben */
:root {
  --ak-blue:     #0D52A0;
  --ak-blue-dk:  #133478;
  --ak-blue-lt:  #E6EEF7;
  --ak-blue-mid: #4A7FC1;
  --ak-red:      #E4003C;
  --ak-red-lt:   #FCEAEE;
  --ak-yellow:   #FFE400;
  --ak-yd:       #3A2E00;
  --ak-yl:       #FFFBE0;
  --ak-black:    #1D1D1B;
  --ak-gray:     #5F5E5A;
  --ak-muted:    #888780;
  --ak-bg:       #F4F3EF;
  --ak-white:    #ffffff;
  --ak-border:   #D3D1C7;
  --ak-bl:       #E8E6E0;
}

.aikit-wrap {
  max-width: 720px;
  margin: 2rem auto;
  font-family: -apple-system, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.aikit-header {
  background: var(--ak-blue-dk);
  border-radius: 14px 14px 0 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
}
.aikit-logo {
  height: 28px;
  width: auto;
  display: block;
}
.aikit-header-title {
  color: white;
  font-size: 14px;
  font-weight: 500;
}
.aikit-header-sub {
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  margin-left: 4px;
}
.aikit-badge {
  background: var(--ak-yellow);
  color: var(--ak-yd);
  font-weight: 700;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  letter-spacing: .02em;
}

/* Nav */
.aikit-nav {
  background: var(--ak-blue-dk);
  display: flex;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}
.aikit-nav a {
  flex: 1;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  padding: 10px 8px;
  font-size: 12px;
  text-align: center;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color .2s, border-color .2s;
}
.aikit-nav a:hover { color: var(--ak-yellow); }
.aikit-nav a.active { color: var(--ak-yellow); border-bottom-color: var(--ak-yellow); }

/* Cards */
.aikit-card {
  background: var(--ak-white);
  border-left: 0.5px solid var(--ak-border);
  border-right: 0.5px solid var(--ak-border);
  padding: 28px;
}
.aikit-card-footer {
  background: var(--ak-white);
  border: 0.5px solid var(--ak-border);
  border-top: 0.5px solid var(--ak-bl);
  border-radius: 0 0 14px 14px;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ak-muted);
}

/* Metrics */
.aikit-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.aikit-metric {
  background: var(--ak-bg);
  border-radius: 10px;
  padding: 14px;
  text-align: center;
}
.aikit-metric .val { font-size: 26px; font-weight: 600; color: var(--ak-black); display: block; }
.aikit-metric .lbl { font-size: 11px; color: var(--ak-muted); margin-top: 3px; }
.aikit-metric.blue   .val { color: var(--ak-blue); }
.aikit-metric.yellow .val { color: #9A8000; }
.aikit-metric.red    .val { color: var(--ak-red); }

/* Form Fields */
.aikit-field { margin-bottom: 16px; }
.aikit-field label { display: block; font-size: 12px; font-weight: 500; color: var(--ak-gray); margin-bottom: 6px; }
.aikit-field input,
.aikit-field select,
.aikit-field textarea {
  width: 100%; padding: 10px 12px;
  border: 0.5px solid var(--ak-border); border-radius: 9px;
  font-size: 14px; font-family: inherit;
  color: var(--ak-black); background: var(--ak-white);
  box-sizing: border-box; outline: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.aikit-field input:focus,
.aikit-field select:focus,
.aikit-field textarea:focus {
  border-color: var(--ak-blue);
  box-shadow: 0 0 0 3px var(--ak-blue-lt);
}
.aikit-field textarea { resize: vertical; min-height: 80px; }
.aikit-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .aikit-field-row { grid-template-columns: 1fr; } }

/* Buttons */
.aikit-btn {
  padding: 10px 22px; border-radius: 9px; font-size: 13px;
  font-weight: 500; font-family: inherit; cursor: pointer; border: none;
  transition: background .15s, transform .1s; display: inline-block; text-decoration: none;
}
.aikit-btn:active { transform: scale(.98); }
.aikit-btn-primary { background: var(--ak-blue); color: #fff; }
.aikit-btn-primary:hover { background: var(--ak-blue-dk); color: #fff; }
.aikit-btn-yellow { background: var(--ak-yellow); color: var(--ak-yd); }
.aikit-btn-yellow:hover { background: #e6cd00; }
.aikit-btn-ghost { background: transparent; border: 0.5px solid var(--ak-border); color: var(--ak-gray); }
.aikit-btn-ghost:hover { background: var(--ak-bg); }
.aikit-btn-danger { background: var(--ak-red); color: #fff; }
.aikit-btn-sm { padding: 6px 14px; font-size: 12px; }
.aikit-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 24px; padding-top: 18px; border-top: 0.5px solid var(--ak-bl);
}

/* Tables */
.aikit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aikit-table th {
  text-align: left; padding: 8px 12px;
  background: var(--ak-blue-dk); color: var(--ak-yellow);
  font-weight: 600; font-size: 11px;
}
.aikit-table td { padding: 8px 12px; border-bottom: 0.5px solid var(--ak-bl); color: var(--ak-black); vertical-align: middle; }
.aikit-table tr:hover td { background: var(--ak-bg); }

/* Badges */
.aikit-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.aikit-status.aktiv { background: var(--ak-blue-lt); color: var(--ak-blue-dk); }
.aikit-status.inaktiv { background: var(--ak-yl); color: #9A8000; }
.aikit-status.abgeschlossen { background: var(--ak-bg); color: var(--ak-muted); }

/* Info Boxes */
.aikit-info  { background: var(--ak-blue-lt); border: 0.5px solid var(--ak-blue-mid); border-radius: 9px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; color: var(--ak-blue-dk); line-height: 1.6; }
.aikit-warn  { background: var(--ak-yl);       border: 0.5px solid #9A8000;            border-radius: 9px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; color: #5A4A00;           line-height: 1.6; }
.aikit-error { background: var(--ak-red-lt);   border: 0.5px solid var(--ak-red);      border-radius: 9px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; color: var(--ak-red);    line-height: 1.6; }

/* Custom Checkboxen */
.aikit-check-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 9px 12px; border: 0.5px solid var(--ak-border); border-radius: 9px;
  background: #fff; transition: border-color .15s, background .15s; user-select: none; margin-bottom: 8px;
}
.aikit-check-item:hover { border-color: var(--ak-blue); background: var(--ak-blue-lt); }
.aikit-check-item.checked { border-color: var(--ak-blue); background: var(--ak-blue-lt); }
.aikit-cbox {
  width: 16px; height: 16px; border: 1.5px solid var(--ak-border); border-radius: 4px;
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s;
}
.aikit-check-item.checked .aikit-cbox { background: var(--ak-blue); border-color: var(--ak-blue); }
.aikit-ccheck { display: none; color: #fff; font-size: 11px; font-weight: 700; }
.aikit-check-item.checked .aikit-ccheck { display: block; }
.aikit-ctext { font-size: 13px; color: var(--ak-black); }

/* KI Skala */
.aikit-scale-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 0.5px solid var(--ak-border); border-radius: 9px; background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s; user-select: none; margin-bottom: 8px;
}
.aikit-scale-item:hover { border-color: var(--ak-blue); background: var(--ak-blue-lt); }
.aikit-scale-item.selected { border-color: var(--ak-blue); background: var(--ak-blue-lt); }
.aikit-sbadge { padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600; min-width: 46px; text-align: center; flex-shrink: 0; }

/* Module Liste */
.aikit-modul-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 0.5px solid var(--ak-bl); border-radius: 8px; margin-bottom: 8px; background: var(--ak-white);
}
.aikit-modul-item .modul-name { font-size: 13px; font-weight: 500; color: var(--ak-black); }
.aikit-modul-item .modul-date { font-size: 11px; color: var(--ak-muted); }

/* Success */
.aikit-success { text-align: center; padding: 40px 20px; }
.aikit-success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--ak-blue-lt);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; font-size: 32px; color: var(--ak-blue);
}

/* Toast */
.aikit-toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--ak-black); color: #fff;
  padding: 12px 20px; border-radius: 10px;
  font-size: 13px; z-index: 9999;
  opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
.aikit-toast.show { opacity: 1; transform: translateY(0); }
.aikit-toast.success { border-left: 3px solid var(--ak-blue); }
.aikit-toast.error   { border-left: 3px solid var(--ak-red); }

/* Logout */
.aikit-logout { color: rgba(255,255,255,0.4); font-size: 11px; cursor: pointer; background: none; border: none; text-decoration: underline; margin-left: auto; }
.aikit-logout:hover { color: rgba(255,255,255,0.8); }

/* Spinner */
.aikit-spinner {
  display: none; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: aikit-spin .7s linear infinite;
  margin-left: 8px; vertical-align: middle;
}
@keyframes aikit-spin { to { transform: rotate(360deg); } }
