/* STARQstrom Partner Portal - Custom Styles */

:root {
  --primary: #7ED321;
  --primary-dark: #5EA118;
  --primary-light: #A8E65C;
  --primary-50: #f4fce8;
  --primary-100: #e6f7cc;
  --primary-200: #cdef99;
  --primary-300: #b4e766;
  --primary-400: #9bdf33;
  --primary-500: #7ED321;
  --primary-600: #5EA118;
  --primary-700: #4A7F13;
  --primary-800: #365D0E;
  --primary-900: #223B09;
  --dark: #111111;
  --dark-sidebar: #1a1a1a;
}

/* Sidebar */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background-color: var(--dark-sidebar);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo .logo-starq {
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.sidebar-logo .logo-strom {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  color: #ffffff;
  background-color: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
  color: var(--primary);
  background-color: rgba(126, 211, 33, 0.1);
  border-right: 3px solid var(--primary);
}

.sidebar-nav a svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.sidebar-user {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #111;
}

.sidebar-user-name {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
}

.sidebar-user-role {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Main Content */
.main-content {
  margin-left: 260px;
  min-height: 100vh;
  background-color: #f9fafb;
}

.page-header {
  padding: 1.5rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.page-header p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.page-body {
  padding: 1.5rem 2rem;
}

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.kpi-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.kpi-card-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
}

.kpi-card-value {
  margin-top: 0.5rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
}

.kpi-card-change {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.kpi-card-change.positive {
  color: var(--primary-dark);
}

.kpi-card-change.negative {
  color: #ef4444;
}

/* Charts */
.chart-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.chart-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 1rem;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.data-table tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  border-bottom: 1px solid #f3f4f6;
}

.data-table tbody tr:hover {
  background-color: #f9fafb;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-green {
  background-color: var(--primary-50);
  color: var(--primary-700);
}

.badge-yellow {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-red {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-gray {
  background-color: #f3f4f6;
  color: #374151;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #111;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-secondary {
  background-color: #ffffff;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #f9fafb;
}

/* Search */
.search-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.5rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #ffffff;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 211, 33, 0.15);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2rem;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.75rem 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
}

.tab:hover {
  color: #111827;
}

.tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

/* Form Elements */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background-color: #ffffff;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(126, 211, 33, 0.15);
}

/* Result Card (Preisberechnung) */
.result-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 0.75rem;
  padding: 1.5rem;
  color: #ffffff;
}

.result-card .result-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-card .result-value {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.result-card .result-unit {
  font-size: 1rem;
  font-weight: 400;
  color: #9ca3af;
}

/* Price Breakdown */
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row-label {
  font-size: 0.875rem;
  color: #9ca3af;
}

.price-row-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

/* Utility */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.mt-6 { margin-top: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* MatchPoint Integration Badge */
.matchpoint-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary-50), #ffffff);
  border: 1px solid var(--primary-200);
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--primary-700);
  text-decoration: none;
  transition: all 0.15s ease;
}

.matchpoint-badge:hover {
  background: var(--primary-50);
  border-color: var(--primary);
}
