/* Klipper Sponsoring CRM - Styles */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue: #0067ac;
  --blue-dark: #004d80;
  --blue-light: #e8f2fa;
  --gold: #c8a84e;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --white: #ffffff;
  --success: #065f46;
  --success-bg: #ecfdf5;
  --error: #991b1b;
  --error-bg: #fef2f2;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--gray-50);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

/* Auth Pages (Login, Reset) */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
}
.auth-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo h1 {
  color: var(--blue);
  font-size: 1.5rem;
  font-weight: 700;
}
.auth-logo p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.auth-card h2 {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--text);
}

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.375rem;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  font-family: inherit;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,103,172,.15);
}
.form-help {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-secondary { background: var(--gray-100); color: var(--text); border-color: var(--gray-200); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #a7f3d0; }
.alert-error { background: var(--error-bg); color: var(--error); border: 1px solid #fecaca; }

/* Layout (Dashboard) */
.app-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--blue-dark);
  color: var(--white);
  padding: 1.5rem 0;
}
.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 1rem;
}
.sidebar-logo h1 {
  font-size: 1.125rem;
  font-weight: 700;
}
.sidebar-logo p {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}
.sidebar nav a {
  display: block;
  padding: 0.625rem 1.5rem;
  color: rgba(255,255,255,.85);
  font-size: 0.9375rem;
  transition: background 0.2s;
}
.sidebar nav a:hover, .sidebar nav a.active {
  background: rgba(255,255,255,.1);
  color: var(--white);
}
.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: 2rem;
  font-size: 0.8125rem;
  opacity: 0.8;
}
.sidebar-footer a { color: rgba(255,255,255,.85); }

.main {
  padding: 2rem;
  overflow-x: auto;
}
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.5rem;
  color: var(--blue-dark);
}

/* Card */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.kpi {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  margin-top: 0.25rem;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.data-table thead {
  background: var(--gray-100);
  border-bottom: 2px solid var(--gray-200);
}
.data-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-100);
}
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Detail List */
.detail-list { display: flex; flex-direction: column; gap: 0; }
.detail-list > div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--gray-100);
  font-size: 0.9375rem;
}
.detail-list > div:last-child { border-bottom: none; }
.detail-list dt { color: var(--text-muted); font-weight: 500; }
.detail-list dd { color: var(--text); }

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-active, .badge-free { background: #d1fae5; color: #065f46; }
.badge-booked { background: #dbeafe; color: #1e40af; }
.badge-expired, .badge-abgelehnt { background: #f3f4f6; color: #4b5563; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-recherche { background: #f3f4f6; color: #4b5563; }
.badge-kontaktiert { background: #fef3c7; color: #92400e; }
.badge-in_gespraech { background: #dbeafe; color: #1e40af; }
.badge-abgeschlossen { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Danger Button */
.btn-danger { background: #dc2626; color: var(--white); border-color: #dc2626; }
.btn-danger:hover { background: #b91c1c; color: var(--white); }

/* Empty card padding */
.card h2 { font-weight: 600; }

/* Activity list */
.activity-list { list-style: none; padding: 0; }
.activity-list li {
  position: relative;
  padding: 0.875rem 2rem 0.875rem 0;
  border-bottom: 1px solid var(--gray-100);
}
.activity-list li:last-child { border-bottom: none; }
.activity-meta {
  display: flex;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: var(--text);
  margin-bottom: 0.375rem;
  align-items: center;
}
.activity-body { font-size: 0.9375rem; line-height: 1.5; }
.activity-delete {
  position: absolute;
  top: 0.875rem;
  right: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  text-decoration: none;
}
.activity-delete:hover { background: #fef2f2; color: #dc2626; }

/* Mobile responsive */
@media (max-width: 768px) {
  .app-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    padding: 1rem 0;
  }
  .sidebar nav {
    display: flex;
    overflow-x: auto;
    padding: 0 0.5rem;
  }
  .sidebar nav a {
    padding: 0.5rem 1rem;
    white-space: nowrap;
  }
  .sidebar-footer { display: none; }
  .main { padding: 1rem; }
  .form-row { grid-template-columns: 1fr; }
  .data-table { font-size: 0.8125rem; }
  .data-table th, .data-table td { padding: 0.5rem 0.625rem; }
  .detail-list > div { grid-template-columns: 1fr; gap: 0.25rem; }
}
