/**
 * MuM Board - Base Styles (Dark Theme)
 * CSS-Variablen für konsistente Farbgebung in der gesamten App.
 */

:root {
  /* Hintergründe */
  --bg-primary: #0d1117;
  --bg-secondary: #161b22;
  --bg-tertiary: #21262d;
  --bg-hover: #30363d;
  --bg-elevated: #2d333b;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --text-link: #58a6ff;

  /* Borders */
  --border: #30363d;
  --border-subtle: #21262d;

  /* Accents */
  --accent: #1f6feb;
  --accent-hover: #388bfd;
  --accent-muted: rgba(31, 111, 235, 0.15);

  /* Semantic Colors */
  --success: #3fb950;
  --warning: #d29922;
  --danger: #f85149;
  --info: #58a6ff;

  /* Priority Colors */
  --prio-critical: #f85149;
  --prio-high: #ff9800;
  --prio-medium: #d29922;
  --prio-low: #3fb950;

  /* Status Colors (Kanban Columns) */
  --col-backlog: #6e7681;
  --col-todo: #1f6feb;
  --col-progress: #d29922;
  --col-review: #a371f7;
  --col-done: #3fb950;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radii */
  --radius-sm: 4px;
  --radius: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", sans-serif;
  --font-family-mono: 'SF Mono', Consolas, Menlo, Monaco, monospace;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 15px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
}

/* ============================================================
   Reset
   ============================================================ */

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

* {
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--text-link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============================================================
   Buttons
   ============================================================ */

button,
.btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  padding: 7px 13px;
  border-radius: var(--radius);
  transition: background 0.15s ease, transform 0.05s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
}

button:disabled,
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(248, 81, 73, 0.1);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-lg {
  padding: 12px 24px;
  font-size: var(--font-size-md);
}

/* ============================================================
   Forms
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="date"],
select,
textarea {
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  padding: 9px 12px;
  border-radius: var(--radius);
  width: 100%;
  transition: border-color 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

label {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-hint {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 4px;
}

.form-error {
  font-size: var(--font-size-sm);
  color: var(--danger);
  margin-top: 4px;
}

/* ============================================================
   Layout-Helper
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.flex {
  display: flex;
  align-items: center;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-sm { font-size: var(--font-size-sm); }
.text-center { text-align: center; }

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

/* ============================================================
   Avatare
   ============================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-weight: 600;
  background: var(--bg-hover);
  user-select: none;
  flex-shrink: 0;
}

.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-md { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }

/* ============================================================
   Toast
   ============================================================ */

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  z-index: 9999;
  max-width: 420px;
  animation: toastSlideIn 0.3s ease;
}

.toast-success { border-color: rgba(63, 185, 80, 0.4); }
.toast-error { border-color: rgba(248, 81, 73, 0.5); }

.toast-fade-out {
  animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideIn {
  from { transform: translateX(calc(100% + 24px)); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toastFadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ============================================================
   Loading Spinner
   ============================================================ */

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Skeletons / Empty States
   ============================================================ */

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: var(--space-8) var(--space-4);
  font-size: var(--font-size-md);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}
