/* ========================================
   LST PAGE - Modern Darkmode Design
   ======================================== */

:root {
  /* Farben - Mapped to theme.css JCP Dark Theme */
  --bg-primary: #07080a;
  --bg-secondary: #0e1015;
  --bg-tertiary: #12141a;
  --bg-card: #0e1015;
  --bg-hover: #13161d;

  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);

  --accent: #e30613;
  --accent-hover: #ff1a1a;
  --accent-light: #ff4d4d;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.12);
  --border-color: rgba(255, 255, 255, 0.06);

  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #0dcaf0;

  /* Shadows */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition: 0.2s ease;
  --glass: none;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

img, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-break: break-word;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #444;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #333 var(--bg-primary);
}

/* ========================================
   Global Skeleton Loading & Shimmer Utilities
   ======================================== */
@keyframes skeleton-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  display: inline-block;
}

.skeleton-bar {
  display: block;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
}

.skeleton-row td {
  padding: 14px 16px !important;
  vertical-align: middle;
}

.skeleton-fade-in {
  animation: skeletonFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes skeletonFadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

/* ========================================
   Layout
   ======================================== */

.container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.main-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  box-sizing: border-box;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-primary);
  border-right: 1px solid var(--border);
  padding: 0;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  background-color: var(--bg-primary);
}

.sidebar-logo-img {
  height: 2.2rem !important;
  width: auto !important;
  margin-right: 12px;
  object-fit: contain;
  vertical-align: middle;
}

.sidebar-logo h1 {
  font-size: 1.5rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo {
  height: 3.5rem !important;
  width: auto !important;
  margin-right: 15px;
  object-fit: contain;
  vertical-align: middle;
}

.sidebar-logo i {
  font-size: 1.8rem;
}

.sidebar-nav {
  padding: 0 10px;
  overflow-y: auto;
  flex: 1;
}

/* Custom Scrollbar for Sidebar */
.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  color: var(--text-secondary);
  border-radius: 8px;
  margin-bottom: 5px;
  transition: var(--transition);
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-left: none;
}

.sidebar-nav a.active {
  border-left: none;
}

.sidebar-nav i {
  width: 20px;
  text-align: center;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  margin-left: 260px;
  padding: 30px;
  padding-bottom: 80px;
}

.page-header {
  margin-bottom: 30px;
}

.page-title {
  font-size: 2rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 15px;
}

.page-title i,
.page-header h1 i,
.page-header h2 i {
  display: none !important;
}

/* ========================================
   Header & Profil
   ======================================== */

.user-profile {
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  flex: 1;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.user-details {
  flex: 1;
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.logout-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 5px;
  transition: var(--transition);
}

.logout-btn:hover {
  background-color: var(--danger);
  color: white;
}

/* ========================================
   Cards
   ======================================== */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  box-shadow: none;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light) 50%, transparent);
}

.card:hover {
  border-color: var(--border);
  transform: none;
  background: var(--bg-card);
  box-shadow: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-body {
  color: var(--text-secondary);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Stats Cards */
.stat-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 25px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
  box-shadow: none;
}

.stat-card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
  background: var(--bg-card);
}

.stat-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--text-primary);
  flex-shrink: 0;
}

.stat-icon i {
  color: var(--text-primary);
}

.stat-info h3 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.stat-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 5px;
}

/* ========================================
   Forms
   ======================================== */

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--f-accent-glow);
  background: rgba(0, 0, 0, 0.5);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

select.form-control {
  cursor: pointer;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 8px;
  font-family: 'Outfit', 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #ffffff;
  box-shadow: none !important;
  transform: none !important;
}

.btn:active {
  transform: scale(0.98) !important;
}

/* Style 1: Solid Ausgefüllter Button (Primary / Dark Filled) */
.btn-primary,
.btn-filled {
  background: #1a1d24 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
}

.btn-primary:hover,
.btn-filled:hover {
  background: #232730 !important;
  border-color: rgba(255, 255, 255, 0.25) !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Style 2: Outline Border Button (Secondary / Transparent) */
.btn-secondary,
.btn-outline,
.btn-outline-primary,
.btn-outline-secondary {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.btn-secondary:hover,
.btn-outline:hover,
.btn-outline-primary:hover,
.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Red Danger / Accent Button */
.btn-danger,
.btn-accent {
  background: #e30613 !important;
  border: 1px solid #e30613 !important;
  color: #ffffff !important;
}

.btn-danger:hover,
.btn-accent:hover {
  background: #c80511 !important;
  border-color: #c80511 !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Success Button */
.btn-success {
  background: #198754 !important;
  border: 1px solid #198754 !important;
  color: #ffffff !important;
}

.btn-success:hover {
  background: #146c43 !important;
  border-color: #146c43 !important;
  color: #ffffff !important;
  transform: none !important;
  box-shadow: none !important;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

/* ========================================
   Tables
   ======================================== */

.table-container,
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  display: block;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: var(--bg-tertiary);
}

/* ========================================
   Popup / Modal
   ======================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background-color: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid var(--border);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s ease;
}

.modal > form,
.modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
}

.modal-large {
  max-width: 950px !important;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title i {
  color: var(--text-muted);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 25px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 25px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* ========================================
   Login Page
   ======================================== */

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
      var(--bg-primary) 0%,
      var(--bg-secondary) 100%);
}

.login-container {
  width: 100%;
  max-width: 450px;
  padding: 20px;
}

.login-card {
  background-color: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 40px;
  box-shadow: var(--shadow-lg);
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 2rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.login-header h1 i {
  font-size: 2.5rem;
}

.login-header p {
  color: var(--text-secondary);
  margin-top: 10px;
}

.login-error {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 20px;
  color: var(--danger);
  display: none;
}

.login-error.show {
  display: block;
}

/* Login mit Hintergrundbild, Container rechts */
.login-wrapper.login-split {
  position: relative;
  justify-content: flex-end;
  padding: 0 6vw;
  overflow: hidden;
}

.login-split .login-bg {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  background-image: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.login-split .login-bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.login-split.has-bg .login-bg {
  animation: loginBgZoom 30s ease-out forwards;
}

.login-split.has-bg .login-bg-overlay {
  background: linear-gradient(90deg,
      rgba(11, 13, 15, 0.15) 0%,
      rgba(11, 13, 15, 0.35) 45%,
      rgba(11, 13, 15, 0.85) 100%);
}

.login-split .login-container {
  position: relative;
  z-index: 2;
}

.login-split.has-bg .login-card {
  background-color: rgba(20, 23, 27, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-color: rgba(255, 255, 255, 0.08);
}

.login-behoerde-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 16px 20px;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.login-behoerde-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
  text-decoration: none;
}

.login-behoerde-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.login-behoerde-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.login-behoerde-text strong {
  font-size: 0.95rem;
}

.login-behoerde-text small {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.login-behoerde-arrow {
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.login-behoerde-card:hover .login-behoerde-arrow {
  transform: translateX(3px);
  color: var(--text-primary);
}

@keyframes loginBgZoom {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

@media (max-width: 768px) {
  .login-wrapper.login-split {
    justify-content: center;
    padding: 0;
  }

  .login-split.has-bg .login-bg-overlay {
    background: rgba(11, 13, 15, 0.55);
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-split.has-bg .login-bg {
    animation: none;
  }
}

/* ========================================
   Webhook Embed Preview
   ======================================== */

.embed-preview {
  background-color: var(--bg-tertiary);
  border-radius: 4px;
  padding: 15px;
  margin-top: 20px;
}

.embed-preview h4 {
  margin-bottom: 15px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
}

.discord-embed {
  background-color: #36393f;
  border-radius: 4px;
  overflow: hidden;
}

.embed-header {
  padding: 15px;
  border-bottom: 1px solid #2f3136;
}

.embed-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.embed-title {
  margin-top: 10px;
  font-size: 1.1rem;
  font-weight: 600;
}

.embed-color-bar {
  width: 4px;
  background-color: #a81c1b;
}

.embed-content {
  display: flex;
  padding: 15px;
}

.embed-fields {
  flex: 1;
}

.embed-field {
  margin-bottom: 10px;
}

.embed-field-label {
  color: #b9bbbe;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 5px;
}

.embed-field-value {
  color: #dcddde;
}

.embed-footer {
  padding: 10px 15px;
  border-top: 1px solid #2f3136;
  font-size: 0.75rem;
  color: #72767d;
}

/* ========================================
   Badge / Tags
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background-color: rgba(40, 167, 69, 0.2);
  color: var(--success);
}

.badge-danger {
  background-color: rgba(220, 53, 69, 0.2);
  color: var(--danger);
}

.badge-warning {
  background-color: rgba(255, 193, 7, 0.2);
  color: var(--warning);
}

.badge-info {
  background-color: rgba(23, 162, 184, 0.2);
  color: var(--info);
}

.badge-primary {
  background-color: rgba(168, 28, 27, 0.2);
  color: var(--accent);
}

.badge-default {
  background-color: rgba(108, 117, 125, 0.2);
  color: #6c757d;
}

.badge-purple {
  background-color: rgba(147, 51, 234, 0.15);
  color: #a855f7;
}

/* ========================================
   List Items
   ======================================== */

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 10px;
  transition: var(--transition);
}

.list-item:hover {
  background-color: var(--bg-hover);
}

.list-item-info {
  flex: 1;
}

.list-item-title {
  font-weight: 600;
  margin-bottom: 3px;
}

.list-item-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.list-item-actions {
  display: flex;
  gap: 8px;
}

/* ========================================
   Actions Row
   ======================================== */

.actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  flex-wrap: wrap;
  gap: 15px;
}

.action-container {
  background: var(--bg-card);
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 25px;
  box-shadow: none;
}

.actions-row .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   Input Groups (Webhook)
   ======================================== */

.input-group {
  margin-bottom: 15px;
}

.input-group-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row .form-control {
  flex: 1;
}

/* ========================================
   Empty State
   ======================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: var(--text-muted);
}

.empty-state h3 {
  margin-bottom: 10px;
  color: var(--text-primary);
}

/* ========================================
   Loading Spinner
   ======================================== */

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.5rem;
  }
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* ========================================
   Utilities
   ======================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 10px;
}

.mt-2 {
  margin-top: 20px;
}

.mt-3 {
  margin-top: 30px;
}

.mb-1 {
  margin-bottom: 10px;
}

.mb-2 {
  margin-bottom: 20px;
}

.mb-3 {
  margin-bottom: 30px;
}

.d-flex {
  display: flex;
}

.gap-1 {
  gap: 10px;
}

.gap-2 {
  gap: 20px;
}

.flex-column {
  flex-direction: column;
}

.ms-auto {
  margin-left: auto;
}

.w-100 {
  width: 100%;
}

.hidden {
  display: none !important;
}

/* ========================================
   Tabs (Dienstplan)
   ======================================== */

/* ========================================
   Tabs & Sub-Navigation (Container Pill Style)
   ======================================== */

.tabs,
.tabs-sub,
.tabs-container .tabs {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 25px;
  background: var(--bg-card, #0e1015);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.06));
  border-radius: 8px;
  padding: 6px;
  box-shadow: none;
}

.tab-btn,
.tab-btn-sub {
  background: transparent;
  border: 1px solid transparent;
  padding: 8px 18px;
  color: var(--text-secondary, rgba(255, 255, 255, 0.55));
  font-size: 0.9rem;
  font-weight: 600;
  font-family: 'Outfit', 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  text-decoration: none;
}

.tab-btn:hover,
.tab-btn-sub:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active,
.tab-btn-sub.active {
  background: #1a1d24 !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #ffffff !important;
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none;
}

.tab-btn i,
.tab-btn-sub i {
  display: none !important;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ========================================
   Wichtiges (Dashboard)
   ======================================== */

.wichtiges-grid {
  display: grid;
  gap: 15px;
}

.wichtiges-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background-color: var(--bg-tertiary);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.wichtiges-item:hover {
  border-color: var(--accent);
}

.wichtiges-content {
  flex: 1;
}

.wichtiges-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.wichtiges-content p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.6;
}

.wichtiges-actions {
  margin-left: 15px;
}

/* ========================================
   SNA Page
   ======================================== */

.sna-top-nav {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

.sna-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.sna-category-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.sna-category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border-color: var(--accent);
}

.sna-category-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.sna-category-icon i {
  font-size: 36px;
  color: white;
}

.sna-category-card h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 1.2em;
}

.wizard-step h4 {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.wizard-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.wizard-btn {
  padding: 15px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1em;
}

.wizard-btn:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.algorithm-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.algo-btn {
  padding: 20px 30px;
  border: none;
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1em;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
}

.algo-btn:hover {
  background: var(--accent);
  color: white;
}

.algo-step {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.1em;
  line-height: 1.6;
}

.algo-step.current {
  background: linear-gradient(135deg, #dc3545, #c82333);
  color: white;
  font-weight: bold;
}

.algo-step.completed {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  text-decoration: line-through;
}

.notruf-question {
  text-align: center;
  padding: 20px;
}

.notruf-question h3 {
  margin-bottom: 30px;
  color: var(--text-primary);
}

.notruf-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 400px;
  margin: 0 auto;
}

.notruf-btn {
  padding: 20px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 1.1em;
  transition: all 0.2s;
}

.notruf-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.notruf-summary {
  background: var(--bg-tertiary);
  padding: 20px;
  border-radius: 12px;
  margin-top: 20px;
}

.notruf-summary h4 {
  margin-bottom: 15px;
  color: var(--text-primary);
}

.notruf-summary pre {
  white-space: pre-wrap;
  font-family: inherit;
  margin: 0;
}

.btn-warning {
  background-color: var(--warning);
  color: #000;
}

.btn-warning:hover {
  background-color: #e0a800;
}

.btn-info {
  background-color: rgba(13, 202, 240, 0.12);
  color: #0dcaf0;
  border: 1px solid rgba(13, 202, 240, 0.3);
}

.btn-info:hover {
  background-color: rgba(13, 202, 240, 0.25);
  color: #0dcaf0;
  border-color: rgba(13, 202, 240, 0.5);
}

.modal-large {
  max-width: 800px;
}

/* ========================================
   Custom Alerts
   ======================================== */

#custom-alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 15px;
  pointer-events: none;
}

.custom-alert {
  display: flex;
  align-items: stretch;
  min-width: 300px;
  max-width: 450px;
  border-radius: 12px;
  overflow: hidden;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  animation: slideInRight 0.3s ease forwards;
  font-family: inherit;
}

.custom-alert-success {
  background-color: #3b7447;
  /* Matches the user screenshot for success */
}

.custom-alert-danger {
  background-color: #8c3838;
  /* Matches the user screenshot for error */
}

.custom-alert-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  background-color: rgba(0, 0, 0, 0.15);
  font-size: 1.2rem;
}

.custom-alert-content {
  flex-grow: 1;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  font-size: 0.95rem;
  line-height: 1.4;
}

.custom-alert-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  cursor: pointer;
  background: transparent;
  opacity: 0.7;
  transition: opacity 0.2s;
  font-size: 1.2rem;
}

.custom-alert-close:hover {
  opacity: 1;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.inline-alert {
  animation: none;
  max-width: 100%;
}


/* ========================================
   Mobile Header Styling
   ======================================== */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: #0b0d0f;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.mobile-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-logo img {
  height: 25px;
}

.mobile-logo span {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--accent);
}

.mobile-menu-toggle {
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

/* ========================================
   Global Media Queries
   ======================================== */
@media (max-width: 992px) {
  .mobile-header {
    display: flex;
    width: 100%;
    box-sizing: border-box;
  }

  .sidebar {
    display: none;
    /* Controlled by sidebar.css media queries */
  }

  /* Make sidebar visible when active */
  .sidebar.active {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    padding: 20px;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
  }

  .page-title {
    font-size: 1.5rem;
  }

  .container {
    padding: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .sna-categories {
    grid-template-columns: repeat(2, 1fr);
  }

  .kanban-board {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }

  .stats-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 14px;
  }
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr !important;
  }

  .stat-card {
    padding: 15px;
  }

  .page-header {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-header > div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .page-title {
    font-size: 1.35rem;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.85rem;
  }

  /* Responsive Tables */
  .table-container,
  .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
    margin: 0 0 1rem 0;
    padding: 0;
  }

  .table th,
  .table td {
    padding: 10px 8px;
    font-size: 0.82rem;
  }

  /* Cards */
  .card {
    padding: 16px 14px;
    border-radius: 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .card-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* Tabs */
  .tabs,
  .tabs-sub,
  .tabs-container .tabs {
    padding: 4px;
    gap: 4px;
    flex-wrap: wrap;
  }

  .tab-btn,
  .tab-btn-sub {
    padding: 6px 12px;
    font-size: 0.82rem;
  }

  /* Action containers & Rows */
  .action-container,
  .actions-row {
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap !important;
  }

  /* Modals */
  .modal-overlay {
    padding: 10px !important;
  }

  .modal,
  .modal-large,
  .modal-lg {
    width: 95% !important;
    max-width: calc(100vw - 20px) !important;
    max-height: 92vh !important;
    margin: 10px auto;
  }

  .sna-categories {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .stats-container {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Specific Fix: Dashboard Welcome Button Overlap */
  .card-welcome {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .card-welcome-actions {
    position: static !important;
    order: -1;
    /* Place above the welcome message on mobile */
    margin-bottom: 5px;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 12px 8px;
    padding-bottom: 70px;
  }

  .card {
    padding: 14px 10px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-header > *:not(.card-title) {
    width: 100%;
  }

  .card-title {
    font-size: 1.1rem;
  }

  .modal-body {
    padding: 15px;
  }

  .login-card {
    padding: 25px 20px;
  }

  .tab-btn,
  .tab-btn-sub {
    padding: 5px 9px;
    font-size: 0.78rem;
  }

  .action-container .btn,
  .actions-row .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .search-box,
  .search-box input,
  input[type="search"] {
    width: 100% !important;
    max-width: 100% !important;
  }

  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="datetime-local"],
  select.form-control,
  textarea.form-control {
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* ========================================
   Top Drawer Notification System
   ======================================== */
#top-drawer-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.top-drawer {
  pointer-events: auto;
  width: 90%;
  max-width: 500px;
  background: rgba(18, 21, 25, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 15px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin-bottom: 10px;
  animation: slideDownTop 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
}

.top-drawer-icon {
  width: 45px;
  height: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.top-drawer-content {
  flex: 1;
}

.top-drawer-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 4px;
  color: #fff;
}

.top-drawer-message {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.top-drawer-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.top-drawer-btn-primary,
.top-drawer-btn-secondary {
  padding: 8px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.top-drawer-btn-primary {
  background: var(--accent);
  color: #fff;
}

.top-drawer-btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

.top-drawer-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.top-drawer-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.top-drawer-success .top-drawer-icon {
  background: rgba(25, 135, 84, 0.2);
  color: #28a745;
}

.top-drawer-danger .top-drawer-icon {
  background: rgba(227, 6, 19, 0.2);
  color: var(--accent);
}

.top-drawer-info .top-drawer-icon {
  background: rgba(13, 202, 240, 0.2);
  color: #0dcaf0;
}

@keyframes slideDownTop {
  from {
    transform: translateY(-120%) scale(0.9);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes slideUpTop {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  to {
    transform: translateY(-120%) scale(0.9);
    opacity: 0;
  }
}

/* ========================================
   Light Mode Theme Overrides
   ======================================== */
[data-theme="light"], .light-mode {
  --bg-primary: #f4f6f8;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e9ecef;
  --bg-card: #ffffff;
  --bg-hover: #f1f3f5;

  --text-primary: #1a1d20;
  --text-secondary: #495057;
  --text-muted: #6c757d;

  --accent: #a81c1b;
  --accent-hover: #801514;
  --accent-light: #d32f2f;

  --border: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.12);
  --border-color: rgba(0, 0, 0, 0.08);

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);

  --f-bg: #f4f6f8;
  --f-card: #ffffff;
  --f-card-hover: #f1f3f5;
  --f-border: rgba(0, 0, 0, 0.08);
  --f-border-bright: rgba(0, 0, 0, 0.12);
  --f-text: #1a1d20;
  --f-text-muted: #6c757d;
}

[data-theme="light"] body, .light-mode body {
  background-color: #f4f6f8 !important;
  color: #1a1d20 !important;
}

[data-theme="light"] h1, [data-theme="light"] h2, [data-theme="light"] h3, 
[data-theme="light"] h4, [data-theme="light"] h5, [data-theme="light"] h6, 
[data-theme="light"] .page-title,
.light-mode h1, .light-mode h2, .light-mode h3, 
.light-mode h4, .light-mode h5, .light-mode h6, 
.light-mode .page-title {
  color: #1a1d20 !important;
}

[data-theme="light"] .sidebar, .light-mode .sidebar {
  background-color: #ffffff !important;
  border-right-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-logo, .light-mode .sidebar-logo {
  background-color: #ffffff !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .user-profile, .light-mode .user-profile {
  background-color: #ffffff !important;
  border-top-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .sidebar-nav a, .light-mode .sidebar-nav a {
  color: #495057 !important;
}

[data-theme="light"] .sidebar-nav a:hover, [data-theme="light"] .sidebar-nav a.active,
.light-mode .sidebar-nav a:hover, .light-mode .sidebar-nav a.active {
  background-color: rgba(168, 28, 27, 0.08) !important;
  color: #a81c1b !important;
}

[data-theme="light"] .card, .light-mode .card {
  background-color: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .card-header, .light-mode .card-header {
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .form-control, .light-mode .form-control {
  background: #f8f9fa !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1a1d20 !important;
}

[data-theme="light"] .form-control:focus, .light-mode .form-control:focus {
  border-color: #a81c1b !important;
  background: #ffffff !important;
  box-shadow: 0 0 10px rgba(168, 28, 27, 0.15) !important;
}

[data-theme="light"] .table, .light-mode .table {
  color: #1a1d20 !important;
}

[data-theme="light"] .table th, .light-mode .table th {
  border-bottom-color: rgba(0, 0, 0, 0.1) !important;
  color: #1a1d20 !important;
}

[data-theme="light"] .table td, .light-mode .table td {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

[data-theme="light"] .modal, .light-mode .modal {
  background-color: #ffffff !important;
  color: #1a1d20 !important;
  border-color: rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .modal-header, [data-theme="light"] .modal-footer,
.light-mode .modal-header, .light-mode .modal-footer {
  border-color: rgba(0, 0, 0, 0.08) !important;
}

[data-theme="light"] .select-dropdown-v2, .light-mode .select-dropdown-v2 {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important;
}

[data-theme="light"] .select-option-v2, .light-mode .select-option-v2 {
  color: #495057 !important;
}

[data-theme="light"] .select-option-v2:hover, .light-mode .select-option-v2:hover {
  background: rgba(168, 28, 27, 0.06) !important;
  color: #a81c1b !important;
}

[data-theme="light"] .select-trigger-v2, .light-mode .select-trigger-v2 {
  background: #ffffff !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1a1d20 !important;
}

[data-theme="light"] .mobile-header, .light-mode .mobile-header {
  background: #ffffff !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
  color: #1a1d20 !important;
}