/* ═══════════════════════════════════════════════════
   Steuerberatung Schöning – KI-Agenten Plattform
   Light Theme – Production CSS
   ═══════════════════════════════════════════════════ */

:root {
  --bg-primary: #f8f9fc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f4ff;
  --bg-input: #f1f3f9;
  --bg-sidebar: #0f172a;
  --bg-sidebar-hover: rgba(255,255,255,0.06);
  --bg-sidebar-active: rgba(45,212,191,0.12);
  --border-subtle: #e5e7ef;
  --border-medium: #d1d5e0;
  --border-sidebar: rgba(255,255,255,0.08);
  --text-primary: #1a1f36;
  --text-secondary: #5a6178;
  --text-muted: #8b92a8;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #2dd4bf;
  --accent-teal: #0d9488;
  --accent-teal-bright: #14b8a6;
  --accent-teal-dim: rgba(13,148,136,0.08);
  --accent-gold: #d97706;
  --accent-gold-dim: rgba(217,119,6,0.08);
  --accent-coral: #e11d48;
  --accent-coral-dim: rgba(225,29,72,0.06);
  --accent-blue: #2563eb;
  --accent-blue-dim: rgba(37,99,235,0.06);
  --accent-violet: #7c3aed;
  --accent-violet-dim: rgba(124,58,237,0.06);
  --status-success: #059669;
  --status-success-bg: rgba(5,150,105,0.08);
  --status-warning: #d97706;
  --status-warning-bg: rgba(217,119,6,0.08);
  --status-error: #e11d48;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 12px 40px rgba(13,148,136,0.1), 0 4px 12px rgba(0,0,0,0.06);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ═══════ AMBIENT BG ═══════ */
.ambient-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.ambient-bg .orb {
  position: absolute; border-radius: 50%;
  filter: blur(120px);
  animation: float 25s ease-in-out infinite;
}
.ambient-bg .orb-1 {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(13,148,136,0.04) 0%, transparent 70%);
  top: -300px; right: -200px;
}
.ambient-bg .orb-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(37,99,235,0.03) 0%, transparent 70%);
  bottom: -200px; left: 200px;
  animation-delay: -10s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.03); }
  66% { transform: translate(-20px, 20px) scale(0.97); }
}

/* ═══════ LAYOUT ═══════ */
.app-wrapper {
  position: relative; z-index: 2;
  display: flex; min-height: 100vh;
}

/* ═══════ SIDEBAR ═══════ */
.sidebar {
  width: 272px; min-height: 100vh;
  background: var(--bg-sidebar);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 10;
}
.sidebar-header {
  padding: 26px 22px 22px;
  border-bottom: 1px solid var(--border-sidebar);
}
.logo-area {
  display: flex; align-items: center; gap: 13px;
}
.logo-mark {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800; font-size: 17px;
  color: #0f172a; letter-spacing: -0.5px;
  box-shadow: 0 4px 16px rgba(45,212,191,0.3);
  flex-shrink: 0;
}
.logo-text { display: flex; flex-direction: column; gap: 2px; }
.logo-text .firm-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 14.5px;
  color: #f1f5f9; letter-spacing: -0.3px; line-height: 1.2;
}
.logo-text .firm-sub {
  font-size: 11px; color: #64748b;
  font-weight: 400; letter-spacing: 0.2px;
}

.sidebar-nav { flex: 1; padding: 14px 10px; overflow-y: auto; }

.nav-section-label {
  font-size: 10px; font-weight: 600; color: #475569;
  text-transform: uppercase; letter-spacing: 1.5px;
  padding: 14px 12px 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all var(--transition-fast);
  color: var(--text-sidebar); font-size: 13.5px;
  font-weight: 450; position: relative; margin-bottom: 2px;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--bg-sidebar-hover); color: #cbd5e1;
}
.nav-item.active {
  background: var(--bg-sidebar-active);
  color: var(--text-sidebar-active);
}
.nav-item.active::before {
  content: ''; position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: #2dd4bf; border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.6; }
.nav-item.active svg { opacity: 1; }
.nav-item .badge {
  margin-left: auto; background: #e11d48; color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}
.nav-item.disabled {
  opacity: 0.45; pointer-events: none;
}

.sidebar-footer {
  padding: 14px 10px;
  border-top: 1px solid var(--border-sidebar);
}
.user-card {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  cursor: pointer; transition: background var(--transition-fast);
}
.user-card:hover { background: var(--bg-sidebar-hover); }
.user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700; font-size: 12px; color: #0f172a;
}
.user-info { display: flex; flex-direction: column; gap: 1px; }
.user-info .name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.user-info .role { font-size: 11px; color: #64748b; }

/* ═══════ MAIN CONTENT ═══════ */
.main-content { margin-left: 272px; flex: 1; min-height: 100vh; }

/* ═══════ TOP BAR ═══════ */
.top-bar {
  height: 66px; display: flex; align-items: center;
  justify-content: space-between; padding: 0 36px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px);
  position: sticky; top: 0; z-index: 5;
}
.page-title-area h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 21px; font-weight: 700;
  letter-spacing: -0.5px; color: var(--text-primary);
}
.page-title-area .breadcrumb {
  font-size: 12px; color: var(--text-muted); margin-top: 1px;
}
.top-bar-actions { display: flex; align-items: center; gap: 10px; }

.search-box {
  display: flex; align-items: center;
  background: var(--bg-input); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 8px 14px; gap: 8px;
  transition: all var(--transition-fast);
}
.search-box:focus-within {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08); background: #fff;
}
.search-box svg { width: 16px; height: 16px; color: var(--text-muted); }
.search-box input {
  background: transparent; border: none; outline: none;
  font-size: 13px; color: var(--text-primary);
  font-family: inherit; width: 200px;
}
.search-box input::placeholder { color: var(--text-muted); }

.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg-input); color: var(--text-primary); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.has-notification { position: relative; }
.icon-btn.has-notification::after {
  content: ''; position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; background: var(--accent-coral);
  border-radius: 50%; border: 2px solid #fff;
}

/* ═══════ DASHBOARD ═══════ */
.dashboard-content { padding: 32px 36px; max-width: 1400px; }

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0d3b3a 100%);
  border-radius: var(--radius-lg); padding: 34px 38px;
  margin-bottom: 28px; position: relative; overflow: hidden;
  animation: fadeSlideUp 0.6s ease-out; box-shadow: var(--shadow-lg);
}
.welcome-banner::before {
  content: ''; position: absolute; top: -50px; right: -50px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(45,212,191,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.welcome-banner h2 {
  font-family: 'Outfit', sans-serif; font-size: 25px;
  font-weight: 700; letter-spacing: -0.5px;
  color: #f1f5f9; margin-bottom: 8px; position: relative;
}
.welcome-banner .greeting-accent {
  background: linear-gradient(135deg, #2dd4bf, #5eead4);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.welcome-banner p {
  color: #94a3b8; font-size: 14px; line-height: 1.65;
  max-width: 620px; position: relative;
}

/* Stats Row */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 22px 24px;
  transition: all var(--transition-fast);
  animation: fadeSlideUp 0.6s ease-out;
  position: relative; box-shadow: var(--shadow-xs);
}
.stat-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.stat-card .stat-icon {
  width: 42px; height: 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.stat-card .stat-icon svg { width: 20px; height: 20px; }
.stat-card .stat-icon.teal { background: var(--accent-teal-dim); color: var(--accent-teal); }
.stat-card .stat-icon.gold { background: var(--accent-gold-dim); color: var(--accent-gold); }
.stat-card .stat-icon.coral { background: var(--accent-coral-dim); color: var(--accent-coral); }
.stat-card .stat-icon.blue { background: var(--accent-blue-dim); color: var(--accent-blue); }

.stat-card .stat-value {
  font-family: 'Outfit', sans-serif; font-size: 30px;
  font-weight: 700; letter-spacing: -1px;
  color: var(--text-primary); margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 13px; color: var(--text-muted); font-weight: 450;
}
.stat-card .stat-change {
  position: absolute; top: 22px; right: 24px;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 6px;
}
.stat-change.up { color: var(--status-success); background: var(--status-success-bg); }
.stat-change.neutral { color: var(--accent-blue); background: var(--accent-blue-dim); }

/* Section Header */
.section-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 18px;
}
.section-header h3 {
  font-family: 'Outfit', sans-serif; font-size: 18px;
  font-weight: 600; letter-spacing: -0.3px;
}
.section-header .view-all {
  font-size: 13px; color: var(--accent-teal);
  cursor: pointer; font-weight: 500;
  transition: opacity var(--transition-fast); text-decoration: none;
}
.section-header .view-all:hover { opacity: 0.7; }

/* Agent Cards */
.agents-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-bottom: 32px;
}
.agent-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 26px 28px;
  cursor: pointer; transition: all var(--transition-medium);
  position: relative; overflow: hidden;
  animation: fadeSlideUp 0.6s ease-out both;
  box-shadow: var(--shadow-xs); text-decoration: none; color: inherit;
  display: block;
}
.agent-card::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0; height: 3px;
  background: var(--card-accent, var(--accent-teal));
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--transition-medium);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.agent-card:hover::after { transform: scaleX(1); }
.agent-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: transparent;
}
.agent-card.planned { opacity: 0.55; cursor: default; }
.agent-card.planned:hover { transform: none; box-shadow: var(--shadow-xs); }
.agent-card.planned::after { display: none; }

.agent-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 16px;
}
.agent-icon {
  width: 50px; height: 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.agent-icon.teal { background: var(--accent-teal-dim); }
.agent-icon.gold { background: var(--accent-gold-dim); }
.agent-icon.coral { background: var(--accent-coral-dim); }
.agent-icon.blue { background: var(--accent-blue-dim); }
.agent-icon.violet { background: var(--accent-violet-dim); }

.agent-status {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  padding: 5px 11px; border-radius: 20px;
  background: var(--status-success-bg); color: var(--status-success);
}
.agent-status .dot {
  width: 6px; height: 6px; background: var(--status-success);
  border-radius: 50%; animation: pulse 2s ease-in-out infinite;
}
.agent-status.building { background: var(--status-warning-bg); color: var(--status-warning); }
.agent-status.building .dot { background: var(--status-warning); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.agent-card h4 {
  font-family: 'Outfit', sans-serif; font-size: 16.5px;
  font-weight: 600; letter-spacing: -0.3px;
  margin-bottom: 8px; color: var(--text-primary);
}
.agent-card .agent-desc {
  font-size: 13.5px; color: var(--text-secondary);
  line-height: 1.55; margin-bottom: 18px;
}
.agent-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.agent-tag {
  font-size: 11px; font-weight: 500;
  padding: 4px 10px; border-radius: 6px;
  background: var(--bg-input); color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Bottom Grid */
.bottom-grid {
  display: grid; grid-template-columns: 1fr 380px; gap: 18px;
}
.activity-panel, .quick-actions-panel {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 26px 28px;
  animation: fadeSlideUp 0.6s ease-out 0.3s both;
  box-shadow: var(--shadow-xs);
}
.panel-title {
  font-family: 'Outfit', sans-serif; font-size: 16px;
  font-weight: 600; margin-bottom: 18px; color: var(--text-primary);
}

.activity-item {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--border-subtle);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0; margin-top: 2px;
}
.activity-dot.teal { background: var(--accent-teal-dim); }
.activity-dot.gold { background: var(--accent-gold-dim); }
.activity-dot.coral { background: var(--accent-coral-dim); }
.activity-text { flex: 1; }
.activity-text .desc {
  font-size: 13.5px; color: var(--text-primary); line-height: 1.5; margin-bottom: 3px;
}
.activity-text .time { font-size: 12px; color: var(--text-muted); }

/* Quick Actions */
.quick-action-btn {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 13px 16px;
  background: var(--bg-input); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); cursor: pointer;
  transition: all var(--transition-fast); margin-bottom: 10px;
  color: var(--text-primary); font-family: inherit;
  font-size: 13.5px; font-weight: 500; text-align: left;
  text-decoration: none;
}
.quick-action-btn:last-child { margin-bottom: 0; }
.quick-action-btn:hover {
  background: var(--bg-card-hover); border-color: var(--accent-teal);
  transform: translateX(4px); box-shadow: var(--shadow-sm);
}
.quick-action-btn .qa-icon {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex-shrink: 0;
}
.quick-action-btn .qa-icon.teal { background: var(--accent-teal-dim); }
.quick-action-btn .qa-icon.gold { background: var(--accent-gold-dim); }
.quick-action-btn .qa-icon.coral { background: var(--accent-coral-dim); }
.quick-action-btn .qa-icon.blue { background: var(--accent-blue-dim); }
.quick-action-btn .qa-arrow {
  margin-left: auto; color: var(--text-muted);
  transition: all var(--transition-fast);
}
.quick-action-btn:hover .qa-arrow {
  transform: translateX(3px); color: var(--accent-teal);
}

/* ═══════ DETAIL / AGENT VIEWS ═══════ */
.detail-header {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 28px; animation: fadeSlideUp 0.4s ease-out;
}
.back-btn {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs); text-decoration: none;
}
.back-btn:hover {
  background: var(--bg-input); color: var(--text-primary);
  border-color: var(--border-medium);
}
.back-btn svg { width: 18px; height: 18px; }
.detail-title h2 {
  font-family: 'Outfit', sans-serif; font-size: 23px;
  font-weight: 700; letter-spacing: -0.5px;
}
.detail-title p {
  font-size: 13.5px; color: var(--text-secondary); margin-top: 2px;
}

/* Tabs */
.tabs {
  display: flex; gap: 2px; background: var(--bg-input);
  border: 1px solid var(--border-subtle); border-radius: 10px;
  padding: 4px; margin-bottom: 24px; width: fit-content;
  animation: fadeSlideUp 0.45s ease-out 0.05s both;
}
.tab {
  padding: 8px 18px; border-radius: 7px;
  font-size: 13px; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: all var(--transition-fast);
  border: none; background: transparent;
  font-family: inherit; text-decoration: none;
  display: inline-block;
}
.tab:hover { color: var(--text-secondary); }
.tab.active {
  background: #fff; color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Form Container */
.form-container {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 34px;
  animation: fadeSlideUp 0.5s ease-out 0.1s both;
  box-shadow: var(--shadow-xs);
}
.form-section-title {
  font-family: 'Outfit', sans-serif; font-size: 13px;
  font-weight: 700; color: var(--accent-teal);
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 18px; margin-bottom: 28px;
}
.form-grid.full { grid-template-columns: 1fr; }
.form-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
  font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); letter-spacing: 0.2px;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px; background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); color: var(--text-primary);
  font-family: inherit; font-size: 14px;
  transition: all var(--transition-fast); outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,0.08); background: #fff;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { cursor: pointer; }

.form-group .checkbox-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.form-group .checkbox-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent-teal);
}

.form-actions {
  display: flex; gap: 12px; justify-content: flex-end; margin-top: 8px;
}

.btn {
  padding: 10px 22px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all var(--transition-fast);
  display: inline-flex; align-items: center; gap: 8px;
  border: none; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-teal) 0%, #0f766e 100%);
  color: #fff; box-shadow: 0 4px 14px rgba(13,148,136,0.25);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}
.btn-secondary {
  background: #fff; color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
  background: var(--bg-input); color: var(--text-primary);
}
.btn-danger {
  background: var(--accent-coral-dim); color: var(--accent-coral);
  border: 1px solid rgba(225,29,72,0.2);
}
.btn-danger:hover { background: rgba(225,29,72,0.12); }

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg); padding: 48px;
  text-align: center; margin-bottom: 28px;
  transition: all 0.3s; cursor: pointer; background: var(--bg-input);
}
.upload-zone:hover {
  border-color: var(--accent-teal); background: var(--accent-teal-dim);
}
.upload-zone .upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-zone .upload-title {
  font-size: 16px; font-weight: 600;
  color: var(--text-primary); margin-bottom: 6px;
}
.upload-zone .upload-sub { color: var(--text-muted); font-size: 13px; }

/* ═══════ DATA TABLE / LIST ═══════ */
.data-list { margin-top: 16px; }
.data-item {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 16px 20px;
  margin-bottom: 10px; display: flex;
  align-items: center; justify-content: space-between;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-xs);
}
.data-item:hover {
  border-color: var(--border-medium);
  transform: translateX(4px); box-shadow: var(--shadow-sm);
}
.data-item .item-info { display: flex; align-items: center; gap: 20px; flex: 1; }
.data-item .item-name {
  font-weight: 600; font-size: 15px; min-width: 200px;
}
.data-item .item-meta {
  font-size: 13px; color: var(--text-muted);
}
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 6px;
  font-size: 12.5px; font-weight: 600;
}
.status-badge.success { background: var(--status-success-bg); color: var(--status-success); }
.status-badge.warning { background: var(--status-warning-bg); color: var(--status-warning); }
.status-badge.error { background: var(--accent-coral-dim); color: var(--accent-coral); }
.status-badge.neutral { background: var(--bg-input); color: var(--text-muted); }

/* ═══════ FLASH MESSAGES ═══════ */
.flash-message {
  padding: 14px 20px; border-radius: var(--radius-md);
  margin-bottom: 20px; font-size: 14px; font-weight: 500;
  animation: fadeSlideUp 0.3s ease-out;
}
.flash-message.success {
  background: var(--status-success-bg); color: var(--status-success);
  border: 1px solid rgba(5,150,105,0.2);
}
.flash-message.error {
  background: var(--accent-coral-dim); color: var(--accent-coral);
  border: 1px solid rgba(225,29,72,0.2);
}
.flash-message.info {
  background: var(--accent-blue-dim); color: var(--accent-blue);
  border: 1px solid rgba(37,99,235,0.2);
}

/* ═══════ LOGIN PAGE ═══════ */
.login-wrapper {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, #0d3b3a 100%);
  position: relative;
}
.login-wrapper::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(45,212,191,0.12) 0%, transparent 70%);
}
.login-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 48px 44px; width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative; z-index: 1;
  animation: fadeSlideUp 0.5s ease-out;
}
.login-card .login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-card .login-logo .logo-mark {
  margin: 0 auto 16px;
}
.login-card .login-logo h2 {
  font-family: 'Outfit', sans-serif; font-size: 22px;
  font-weight: 700; color: var(--text-primary);
}
.login-card .login-logo p {
  font-size: 14px; color: var(--text-muted); margin-top: 4px;
}

/* ═══════ METRICS ROW ═══════ */
.metrics-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.metric-card {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 20px 22px;
  box-shadow: var(--shadow-xs);
}
.metric-card .metric-label {
  font-size: 12.5px; color: var(--text-muted); font-weight: 500; margin-bottom: 6px;
}
.metric-card .metric-value {
  font-family: 'Outfit', sans-serif; font-size: 26px;
  font-weight: 700; color: var(--text-primary); letter-spacing: -0.5px;
}

/* ═══════ EMPTY STATE ═══════ */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h4 {
  font-family: 'Outfit', sans-serif; font-size: 18px;
  color: var(--text-secondary); margin-bottom: 8px;
}
.empty-state p { font-size: 14px; }

/* ═══════ ANIMATIONS ═══════ */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 1200px) {
  .agents-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .main-content { margin-left: 0; }
  .agents-grid { grid-template-columns: 1fr; }
  .bottom-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .dashboard-content { padding: 24px 20px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ═══════ SCROLLBAR ═══════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* ═══════════════════════════════════════════════════════════
   BUCHFÜHRUNGS-AGENT PHASE 1 – CSS-Ergänzungen
   Am Ende der bestehenden style.css einfügen!
   ═══════════════════════════════════════════════════════════ */

/* --- Filter-Bar --- */
.filter-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.filter-form {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.875rem;
    background: white;
    min-width: 160px;
    cursor: pointer;
}
.filter-group select:focus {
    border-color: #0d9488;
    outline: none;
    box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.15);
}

/* --- Grid Layouts --- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.grid-sidebar {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
}
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}
.form-grid-inline {
    display: grid;
    grid-template-columns: 130px 140px 1fr auto auto auto;
    gap: 0.5rem;
    align-items: end;
}
@media (max-width: 1024px) {
    .grid-2, .grid-sidebar, .detail-grid { grid-template-columns: 1fr; }
    .form-grid-3 { grid-template-columns: 1fr 1fr; }
    .form-grid-inline { grid-template-columns: 1fr 1fr; }
}

/* --- Upload Zone --- */
.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fafbfc;
}
.upload-zone:hover { border-color: #0d9488; background: #f0fdfa; }
.upload-zone.drag-over { border-color: #0d9488; background: #ccfbf1; }
.upload-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.file-list { display: flex; flex-direction: column; gap: 0.25rem; }
.file-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; background: #f8fafc;
    border-radius: 6px; font-size: 0.875rem;
}

/* --- Alert-Boxen --- */
.alert { padding: 1rem 1.25rem; border-radius: 10px; margin-bottom: 1.5rem; font-size: 0.9rem; }
.alert-warning { background: #fffbeb; border: 1px solid #f59e0b; color: #92400e; }
.alert-warning a { color: #d97706; font-weight: 600; }

/* --- Stat-Liste (Dashboard) --- */
.stat-list { display: flex; flex-direction: column; gap: 0.5rem; }
.stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.625rem 0; border-bottom: 1px solid #f1f5f9;
}
.stat-row:last-child { border-bottom: none; }
.stat-label { font-size: 0.9rem; }
.stat-label a { color: #334155; }
.stat-label a:hover { color: #0d9488; }
.stat-value { font-weight: 600; color: #475569; font-size: 0.85rem; }

/* --- Badges erweitert --- */
.badge-blue { background: #eff6ff; color: #2563eb; }
.badge-teal { background: #f0fdfa; color: #0d9488; }
.badge-coral { background: #fff1f2; color: #e11d48; }
.badge-gold { background: #fffbeb; color: #d97706; }
.badge-violet { background: #f5f3ff; color: #7c3aed; }
.badge-muted { background: #f1f5f9; color: #94a3b8; }

/* --- Status-Badges --- */
.status-neu { background: #eff6ff; color: #2563eb; }
.status-verarbeitet { background: #fffbeb; color: #d97706; }
.status-gebucht { background: #f0fdfa; color: #0d9488; }
.status-vorschlag { background: #f5f3ff; color: #7c3aed; }
.status-bestaetigt { background: #ecfdf5; color: #059669; }

/* --- Text-Farben --- */
.text-teal { color: #0d9488; }
.text-coral { color: #e11d48; }
.text-gold { color: #d97706; }
.text-blue { color: #2563eb; }
.text-muted { color: #94a3b8; }

/* --- Buchungs-Karten (Detail-Seite) --- */
.buchung-card {
    border: 1px solid #e2e8f0; border-radius: 10px;
    padding: 1rem 1.25rem; margin-bottom: 0.75rem; transition: all 0.2s;
}
.buchung-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.buchung-vorschlag { border-left: 3px solid #7c3aed; }
.buchung-bestaetigt { border-left: 3px solid #059669; background: #fafffe; }
.buchung-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.buchung-datum { margin-left: auto; color: #64748b; font-size: 0.85rem; }
.buchung-konten { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.konto-box {
    display: flex; flex-direction: column; background: #f8fafc;
    padding: 0.5rem 0.75rem; border-radius: 8px; flex: 1;
}
.konto-label { font-size: 0.7rem; text-transform: uppercase; color: #94a3b8; font-weight: 600; }
.konto-nr { font-weight: 700; font-size: 1.1rem; color: #1e293b; font-family: 'DM Sans', monospace; }
.konto-name { font-size: 0.8rem; color: #64748b; }
.konto-pfeil { font-size: 1.25rem; color: #cbd5e1; }
.buchung-details { display: flex; flex-wrap: wrap; gap: 0.75rem; font-size: 0.875rem; margin-bottom: 0.5rem; }
.buchung-betrag { font-weight: 600; color: #1e293b; }
.buchung-ust { color: #7c3aed; }
.buchung-text { color: #64748b; }
.buchung-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 0.5rem; }

/* --- Kontierungs-Hinweis --- */
.kontierung-hint {
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 8px;
    padding: 0.75rem 1rem; font-size: 0.875rem; color: #1e40af; margin-top: 0.5rem;
}
.quick-buttons { display: flex; flex-wrap: wrap; gap: 0.375rem; }

/* --- Offene Posten Zeilen --- */
.row-warning { background: #fffbeb; }
.row-danger { background: #fff5f5; }
.row-privat { background: #f8fafc; opacity: 0.7; }

/* --- List Navigation (Kontoauszug-Sidebar) --- */
.list-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.list-nav-item {
    display: block; padding: 0.75rem 1rem; border-radius: 8px;
    text-decoration: none; color: #334155; transition: all 0.15s; border: 1px solid transparent;
}
.list-nav-item:hover { background: #f0fdfa; border-color: #99f6e4; }
.list-nav-item.active { background: #f0fdfa; border-color: #0d9488; color: #0d9488; }
.list-nav-title { font-weight: 600; font-size: 0.9rem; }
.list-nav-meta { font-size: 0.8rem; color: #64748b; margin-top: 0.15rem; }

/* --- Summen-Bar --- */
.summen-bar {
    display: flex; gap: 2rem; flex-wrap: wrap;
    padding: 1rem 1.25rem; background: #f8fafc; border-radius: 8px; font-size: 0.9rem;
}

/* --- Detail Meta --- */
.detail-meta { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.9rem; }

/* --- Breadcrumb --- */
.breadcrumb { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #94a3b8; margin-bottom: 0.25rem; }
.breadcrumb a { color: #64748b; text-decoration: none; }
.breadcrumb a:hover { color: #0d9488; }

/* --- Inline Forms --- */
.inline-form-sm { display: flex; align-items: center; gap: 0.375rem; }
.inline-form-sm input[type="date"] { padding: 0.25rem 0.5rem; font-size: 0.8rem; border: 1px solid #d1d5db; border-radius: 6px; }

/* --- Empty States --- */
.empty-state { text-align: center; padding: 3rem 2rem; }
.empty-state-sm { text-align: center; padding: 1.5rem 1rem; }
.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.empty-state h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: #475569; }
.empty-state p { color: #94a3b8; font-size: 0.9rem; margin-bottom: 1rem; }

/* --- Buttons erweitert --- */
.btn-teal { background: #0d9488; color: white; border: none; }
.btn-teal:hover { background: #0f766e; }
.btn-coral { background: #e11d48; color: white; border: none; }
.btn-coral:hover { background: #be123c; }
.btn-xs { padding: 0.2rem 0.5rem; font-size: 0.75rem; border-radius: 5px; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1rem; }
.btn-ghost { background: transparent; border: 1px solid #e2e8f0; color: #475569; }
.btn-ghost:hover { background: #f8fafc; }

/* --- Form Hints & Labels --- */
.form-hint { font-size: 0.8rem; color: #94a3b8; margin: 0.15rem 0 0.25rem; }
label.required::after { content: ' *'; color: #e11d48; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: #0d9488; }
.form-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }

/* --- Clickable Rows & Actions --- */
.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f0fdfa; }
.action-buttons { display: flex; gap: 0.25rem; }
.header-actions { display: flex; gap: 0.375rem; align-items: center; }
