/**
 * Styling für das Benutzerdashboard und die Abonnementverwaltung
 */

/* Dashboard Styles */
:root {
  --dashboard-header-height: 60px;
  --dashboard-sidebar-width: 250px;
  --dashboard-bg: #f5f7fa;
  --dashboard-card-bg: #ffffff;
  --dashboard-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --dashboard-border-radius: 12px;
  --dashboard-transition: all 0.3s ease;
  --dashboard-success: #34c759;
  --dashboard-warning: #ff9500;
  --dashboard-error: #ff3b30;
  --dashboard-info: #007aff;
}

body.dashboard-body {
  background-color: var(--dashboard-bg);
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  min-height: 100vh;
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  min-height: 100vh;
}

.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--dashboard-header-height);
  background-color: var(--dashboard-card-bg);
  box-shadow: var(--dashboard-shadow);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

.dashboard-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  color: var(--primary-color);
  text-decoration: none;
}

.dashboard-logo img {
  height: 32px;
}

.dashboard-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dashboard-header-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--dashboard-transition);
}

.dashboard-header-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 30px;
  transition: var(--dashboard-transition);
}

.user-profile:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Sidebar */
.dashboard-sidebar {
  position: fixed;
  top: var(--dashboard-header-height);
  left: 0;
  width: var(--dashboard-sidebar-width);
  height: calc(100vh - var(--dashboard-header-height));
  background-color: var(--dashboard-card-bg);
  box-shadow: var(--dashboard-shadow);
  padding: 20px 0;
  overflow-y: auto;
  z-index: 90;
  transition: var(--dashboard-transition);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav-item {
  margin-bottom: 5px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--dashboard-transition);
  border-left: 3px solid transparent;
}

.sidebar-nav-link:hover {
  background-color: rgba(0, 0, 0, 0.03);
  color: var(--primary-color);
}

.sidebar-nav-link.active {
  background-color: rgba(74, 20, 140, 0.05);
  color: var(--primary-color);
  border-left-color: var(--primary-color);
  font-weight: 500;
}

.sidebar-nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.sidebar-nav-text {
  flex: 1;
}

.sidebar-section {
  margin-top: 30px;
  padding: 0 20px;
}

.sidebar-section-title {
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
  letter-spacing: 1px;
  padding-left: 10px;
}

/* Main Content Area */
.dashboard-main {
  flex: 1;
  margin-left: var(--dashboard-sidebar-width);
  margin-top: var(--dashboard-header-height);
  padding: 30px;
  min-height: calc(100vh - var(--dashboard-header-height));
}

.dashboard-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.dashboard-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: -15px;
  margin-bottom: 30px;
}

/* Dashboard Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background-color: var(--dashboard-card-bg);
  border-radius: var(--dashboard-border-radius);
  box-shadow: var(--dashboard-shadow);
  padding: 20px;
  transition: var(--dashboard-transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  background-color: rgba(74, 20, 140, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 20px;
}

.stat-value {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 12px;
}

.stat-change-positive {
  color: var(--dashboard-success);
}

.stat-change-negative {
  color: var(--dashboard-error);
}

/* Data Cards */
.data-card {
  background-color: var(--dashboard-card-bg);
  border-radius: var(--dashboard-border-radius);
  box-shadow: var(--dashboard-shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.data-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.data-card-title {
  font-size: 18px;
  font-weight: 600;
}

.data-card-actions {
  display: flex;
  gap: 10px;
}

.data-card-action {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--dashboard-transition);
}

.data-card-action:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
}

/* Dashboard Tables */
.dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.dashboard-table th {
  text-align: left;
  padding: 12px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-color);
}

.dashboard-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.dashboard-table tr:last-child td {
  border-bottom: none;
}

.dashboard-table tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.status-active {
  background-color: rgba(52, 199, 89, 0.1);
  color: var(--dashboard-success);
}

.status-pending {
  background-color: rgba(255, 149, 0, 0.1);
  color: var(--dashboard-warning);
}

.status-inactive {
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--dashboard-error);
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-primary);
  cursor: pointer;
}

/* Responsive Design for Dashboard */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .dashboard-sidebar {
    width: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease, width 0s linear 0.3s;
  }
  
  .dashboard-sidebar.open {
    width: 250px;
    transform: translateX(0);
    transition: transform 0.3s ease;
  }
  
  .dashboard-main {
    margin-left: 0;
    padding: 20px;
  }
  
  .mobile-menu-btn {
    display: block;
  }

  .sidebar-overlay {
    position: fixed;
    top: var(--dashboard-header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--dashboard-header-height));
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 85;
  }
  
  .sidebar-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .user-info {
    display: none;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .dashboard-header {
    padding: 0 15px;
  }
  
  .dashboard-main {
    padding: 15px;
  }

  .data-card {
    padding: 15px;
  }
  
  .dashboard-table {
    display: block;
    overflow-x: auto;
  }
}
