/* ============================================================
   CV-Admin — gleiche Designsprache wie die Website
   ============================================================ */

:root {
  --bg:      #0A0D14;
  --panel:   #0F1420;
  --card:    rgba(255, 255, 255, 0.03);
  --line:    rgba(148, 163, 199, 0.16);
  --line-hi: rgba(148, 163, 199, 0.3);
  --text:    #EDF1F7;
  --muted:   #97A1B4;
  --amber:   #FFAE3D;
  --amber-2: #FF7847;
  --amber-soft: rgba(255, 174, 61, 0.12);
  --danger:  #FF6B6B;
  --ok:      #58D68F;
  --radius:  14px;
  --font-display: "Archivo", sans-serif;
  --font-body:    "Instrument Sans", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.97rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0; }

:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--amber); color: #171003; }

.mono { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.side {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  position: sticky;
  top: 0;
  height: 100vh;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  padding: 0 0.4rem;
}
.side-brand:hover { text-decoration: none; }

.side-brand .mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #171003;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8rem;
}

.side-nav { display: grid; gap: 2px; }

.side-nav a {
  color: var(--muted);
  padding: 0.6rem 0.8rem;
  border-radius: 10px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.side-nav a:hover { background: var(--card); color: var(--text); text-decoration: none; }

.side-nav a.active {
  background: var(--amber-soft);
  color: var(--amber);
}

.side-foot {
  margin-top: auto;
  display: grid;
  gap: 0.6rem;
  padding: 0 0.4rem;
  font-size: 0.85rem;
}

.linklike {
  background: none;
  border: none;
  color: var(--muted);
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  text-align: left;
}
.linklike:hover { color: var(--danger); }

.content { padding: 2rem clamp(1.2rem, 4vw, 3rem) 4rem; max-width: 1040px; }

.page-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.4rem;
}

/* ---------- Flash ---------- */
.flash {
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  margin-bottom: 1.4rem;
  border: 1px solid;
  font-weight: 500;
}
.flash.ok    { background: rgba(88, 214, 143, 0.1);  border-color: rgba(88, 214, 143, 0.4);  color: var(--ok); }
.flash.error { background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.4); color: var(--danger); }

/* ---------- Karten & Tabellen ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  margin-bottom: 1.6rem;
}

.panel > h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.1rem;
  font-weight: 500;
}

.table { width: 100%; border-collapse: collapse; }

.table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.table td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.cell-actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.dot.on  { background: var(--ok); box-shadow: 0 0 8px rgba(88, 214, 143, 0.6); }
.dot.off { background: var(--line-hi); }

.period-chip {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(255, 174, 61, 0.25);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

/* ---------- Formulare ---------- */
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

label.field { display: grid; gap: 0.35rem; font-weight: 500; font-size: 0.88rem; }
label.field .hint { color: var(--muted); font-weight: 400; font-size: 0.8rem; }

input[type="text"], input[type="email"], input[type="url"], input[type="month"],
input[type="password"], input[type="number"], select, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line-hi);
  color: var(--text);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

textarea { min-height: 96px; resize: vertical; }

input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--amber); }
.check { display: flex; align-items: center; gap: 0.55rem; font-weight: 500; font-size: 0.9rem; }

input[type="file"] { color: var(--muted); font-size: 0.9rem; }
input[type="file"]::file-selector-button {
  background: var(--panel);
  border: 1px solid var(--line-hi);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  margin-right: 0.8rem;
  font: inherit;
  cursor: pointer;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  text-decoration: none;
}

.btn.primary {
  background: linear-gradient(135deg, var(--amber), var(--amber-2));
  color: #171003;
  box-shadow: 0 4px 16px rgba(255, 138, 61, 0.25);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(255, 138, 61, 0.38); text-decoration: none; }

.btn.ghost {
  background: none;
  border: 1px solid var(--line-hi);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--amber); color: var(--amber); text-decoration: none; }

.btn.danger {
  background: none;
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: var(--danger);
}
.btn.danger:hover { background: rgba(255, 107, 107, 0.12); text-decoration: none; }

.btn.tiny { padding: 0.32rem 0.65rem; font-size: 0.78rem; border-radius: 8px; }

.iconbtn {
  background: none;
  border: 1px solid var(--line-hi);
  color: var(--muted);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: color 0.2s, border-color 0.2s;
}
.iconbtn:hover { color: var(--amber); border-color: var(--amber); }
.iconbtn.danger:hover { color: var(--danger); border-color: var(--danger); }
.iconbtn:disabled { opacity: 0.3; cursor: default; }

.inline-form { display: inline; }
.row-flex { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }

/* ---------- Dashboard ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  display: grid;
  gap: 0.2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.stat:hover { border-color: rgba(255, 174, 61, 0.3); transform: translateY(-2px); text-decoration: none; }
.stat b {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  font-size: 1.9rem;
  color: var(--text);
}
.stat span { color: var(--muted); font-size: 0.86rem; }

/* ---------- Foto ---------- */
.photo-preview {
  width: 130px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line-hi);
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(40% 34% at 80% 8%, rgba(255, 174, 61, 0.08), transparent 70%),
    radial-gradient(44% 38% at 10% 90%, rgba(77, 124, 254, 0.09), transparent 70%),
    var(--bg);
}

.login-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.login-card h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;
  text-transform: uppercase;
  font-size: 1.35rem;
}

.login-card .sub { color: var(--muted); font-size: 0.88rem; margin-top: -0.6rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .side {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem;
  }
  .side-nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
  .side-foot { margin: 0; width: 100%; display: flex; gap: 1.2rem; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
}
