@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@300;400;600;700&display=swap');

:root {
  --bg: #0f1117;
  --bg2: #161b27;
  --bg3: #1e2536;
  --border: #2a3348;
  --accent: #4a9eff;
  --accent2: #64ffda;
  --text: #e2e8f0;
  --text2: #8899aa;
  --text3: #556677;
  --green: #64ffda;
  --yellow: #ffd166;
  --red: #ff6b6b;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
}

header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  position: sticky;
  top: 0;
}

.header-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}
.header-dot.status-free { box-shadow: 0 0 8px var(--green); }
.header-dot.status-offline { box-shadow: 0 0 8px var(--red); }

.brand {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  margin-left: 1rem;
  flex: 1;
}

.tabs a {
  color: var(--text2);
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: color 0.15s, background 0.15s;
}

.tabs a:hover { color: var(--text); background: var(--bg3); }
.tabs a.active { color: var(--accent); background: var(--bg3); }

.current-user {
  color: var(--text2);
  font-size: 0.85rem;
}

.logout {
  color: var(--text2);
  text-decoration: none;
  font-size: 0.85rem;
}
.logout:hover { color: var(--text); }

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.sub {
  color: var(--text2);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

/* Umleitung */
.target-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.target-btn {
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1.1rem 1rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.target-btn:hover { border-color: var(--accent); }

.target-btn.active {
  background: rgba(100, 255, 218, 0.08);
  border-color: var(--green);
  color: var(--green);
  font-weight: 600;
}

/* Anrufliste */
.call-list {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.call-list th {
  text-align: left;
  color: var(--text3);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.call-list td {
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.call-number {
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
  color: var(--accent);
}
.call-number:hover { text-decoration: underline; }
.call-number.copied { color: var(--green); }

.edit-btn {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 1rem;
}
.edit-btn:hover { color: var(--accent); }

.empty {
  color: var(--text3);
  text-align: center;
  padding: 2rem !important;
}

/* Nebenstellen */
.line-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.line-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.line-id {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text2);
  width: 2rem;
}

.line-label { color: var(--text); }

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.status-free, .status-dot.status-free { background: var(--green); box-shadow: 0 0 6px var(--green); }
.status-busy, .status-dot.status-busy { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.status-offline, .status-dot.status-offline { background: var(--red); }
.status-unknown, .status-dot.status-unknown { background: var(--text3); }

.legend {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  color: var(--text2);
  font-size: 0.85rem;
}
.legend span { display: flex; align-items: center; gap: 0.4rem; }

/* Login */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.login-card h1 {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.login-sub {
  color: var(--text2);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.login-error {
  color: var(--red);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.login-card input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
}

.login-card button {
  width: 100%;
  background: var(--accent);
  border: none;
  color: #0f1117;
  padding: 0.7rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
}
.login-card button:hover { opacity: 0.9; }
