:root {
  --sidebar-bg:   #1A1D21;
  --sidebar-w:    240px;
  --highlight:    #e94560;
  --light:        #F8F8F8;
  --border:       #E8E8E8;
  --text:         #1D1C1D;
  --muted:        #616061;
  --white:        #FFFFFF;
  --accent:       #1A1D21;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
a, a:visited { color: #1D1C1D; text-decoration: none; }
a:hover { text-decoration: underline; }

body {
  font-family: Slack-Lato, appleLogo, sans-serif;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
  padding-left: var(--sidebar-w);
}

/* ── SIDEBAR (was .app-header) ── */
.app-header {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  padding: 0;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.app-header > div:first-child {
  padding: 1rem 1.2rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 0.5rem;
}

.app-header h1 {
  font-size: 1rem;
  font-weight: 900;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header .meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
  display: block;
}

.app-header nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 0.25rem 0.5rem;
  flex: 1;
}

.app-header nav a {
  color: rgba(255,255,255,0.72);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.app-header nav a:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.app-header nav a.active,
.app-header nav a[class="active"] {
  background: rgba(255,255,255,0.15);
  color: white;
  font-weight: 700;
}

/* ── MAIN CONTENT ── */
.page { max-width: 860px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.page-wide { max-width: 1060px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

/* ── CARDS ── */
.card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.card h2 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--highlight);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--highlight);
}

/* ── SEARCH BAR (admin) ── */
.search-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.search-bar label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

.search-bar select {
  padding: 0.5rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  background: white;
  cursor: pointer;
}

.search-bar select:focus { outline: none; border-color: var(--highlight); }

/* ── FORMS ── */
.field { margin-bottom: 1rem; }
.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.55rem 0.8rem;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  font-size: 0.92rem;
  font-family: inherit;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: #1264A3;
  box-shadow: 0 0 0 3px rgba(18,100,163,0.15);
}

.field textarea { min-height: 80px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.col-full { grid-column: 1 / -1; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.12s;
  font-family: inherit;
  line-height: 1.4;
}

.btn-primary { background: var(--highlight); color: white; }
.btn-primary:hover { background: #c73050; }
.btn-secondary { background: white; border: 1.5px solid #D1D1D1; color: var(--text); }
.btn-secondary:hover { border-color: var(--highlight); color: var(--highlight); background: #fff5f7; }
.btn-dark { background: var(--accent); color: white; }
.btn-sm { padding: 0.28rem 0.7rem; font-size: 0.78rem; }
.btn-full { width: 100%; text-align: center; padding: 0.75rem; }

/* ── ALERTS ── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border-left: 4px solid;
}
.alert-error   { background: #FFF0F0; border-color: #E01E5A; color: #8B0000; }
.alert-success { background: #F0FFF4; border-color: #2BAC76; color: #1A5C3A; }

/* ── TABLES ── */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.5rem 0.9rem;
  border-bottom: 2px solid var(--border);
  background: #FAFAFA;
}
td {
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: #F8F8F8; }

/* ── CAPABILITY RATING ── */
.cap-category-header {
  background: #F0F0F0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  margin-top: 0.8rem;
  margin-bottom: 0.1rem;
}

.cap-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #F5F5F5;
  gap: 1rem;
}
.cap-row:hover { background: #FAFAFA; }
.cap-name { flex: 1; font-size: 0.86rem; }

.rating-group { display: flex; gap: 3px; align-items: center; }
.rating-group input[type="radio"] { display: none; }
.rating-group label {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: #F0F0F0;
  color: #999;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  user-select: none;
}
.rating-group label:hover { background: #FFD5DC; color: var(--highlight); }
.rating-group input[type="radio"]:checked + label { background: var(--highlight); color: white; }
.rating-group label.none-lbl { width: auto; padding: 0 7px; border-radius: 20px; font-size: 0.68rem; }
.rating-group input.none-r:checked + label { background: #CCC; color: #555; }

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.73rem;
  color: var(--muted);
  padding: 0.6rem 0.8rem;
  background: #FAFAFA;
  border-radius: 6px;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}
.legend span { display: flex; align-items: center; gap: 4px; }
.ldot {
  width: 20px; height: 20px; border-radius: 50%;
  background: #EEE;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem; font-weight: 700; color: #888;
}
.ldot.on { background: var(--highlight); color: white; }

/* ── SCORE DOTS ── */
.score-dots { display: flex; gap: 3px; }
.sdot { width: 11px; height: 11px; border-radius: 50%; background: #E0E0E0; }
.sdot.on { background: var(--highlight); }

/* ── LOGIN ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  padding-left: 0 !important;
}
body:has(.login-wrap) { padding-left: 0; }
.login-box {
  background: white;
  border-radius: 8px;
  padding: 2.5rem 2rem;
  width: 380px;
  max-width: 95vw;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.login-box h1 { font-size: 1.2rem; font-weight: 900; margin-bottom: 0.3rem; }
.login-box p { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; }

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-superadmin { background: #1A1D21; color: white; }
.badge-admin      { background: var(--highlight); color: white; }
.badge-user       { background: #EEE; color: #555; }

/* ── FREELANCER CARDS (admin search) ── */
.fl-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: all 0.12s;
}
.fl-card:hover {
  border-color: var(--highlight);
  box-shadow: 0 2px 8px rgba(233,69,96,0.12);
  transform: translateX(2px);
}
.fl-avatar {
  width: 36px; height: 36px; border-radius: 6px;
  background: var(--highlight);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.82rem; flex-shrink: 0;
}

/* ── DSGVO ── */
.dsgvo-box {
  display: flex !important;
  gap: .75rem; align-items: flex-start;
  font-size: .88rem; color: #444;
  cursor: pointer;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
  line-height: 1.5;
}
.dsgvo-box input[type=checkbox] { margin-top: .2rem; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }

/* ── EMPTY STATE ── */
.empty { text-align: center; padding: 3rem; color: var(--muted); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  body { padding-left: 0; }
  .app-header {
    position: relative;
    width: 100%;
    height: auto;
    flex-direction: row;
    align-items: center;
    padding: 0.75rem 1rem;
  }
  .app-header > div:first-child { border-bottom: none; margin-bottom: 0; padding: 0; }
  .app-header nav { flex-direction: row; padding: 0; gap: 4px; }
  .grid-2 { grid-template-columns: 1fr; }
  .page, .page-wide { padding: 1rem 0.75rem 3rem; }
}

body.login-page { padding-left: 0; }

/* Lang Switcher */
.lang-switcher { margin-top:auto; padding:1rem 1.25rem 1.5rem; display:flex; gap:.5rem; }
.lang-switcher a { color:#aaa; text-decoration:none; font-size:.78rem; font-weight:700; padding:.25rem .5rem; border-radius:4px; }
.lang-switcher a.active { color:#fff; background:#3a3f47; }
.lang-switcher a:hover { color:#fff; }

.sidebar-logo { padding:.75rem 1.25rem 0; }
