/* ==========================================
   GROVE CUSTOMS PALETO BAY — BASE STYLES
   High-End Tuning-Tablet Design System (Carbon / Obsidian / Emerald Glass)
   ========================================== */

:root {
  color-scheme: dark;
  /* Carbon & Obsidian Surfaces */
  --bg-dark: #07090e;
  --bg-card: rgba(15, 20, 28, 0.82);
  --bg-card-solid: #0f141c;
  --bg-card-hover: rgba(23, 30, 42, 0.92);
  --bg-inset: rgba(6, 8, 13, 0.65);

  /* Refined Borders & Highlights */
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.045);
  --border-accent: rgba(16, 185, 129, 0.3);

  /* Refined Emerald Motorsport Accents (statt grellem Neon) */
  --primary-green: #10b981;
  --primary-green-bright: #34d399;
  --primary-green-glow: rgba(16, 185, 129, 0.25);
  --primary-dark-green: #059669;
  --accent-gold: #f59e0b;

  /* Typography Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --danger-red: #ef4444;

  /* Typography Families */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', "Courier New", monospace;

  /* Radii & Transitions */
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
  scrollbar-width: thin;
  scrollbar-color: rgba(16, 185, 129, 0.32) rgba(7, 9, 14, 0.6);
}

/* Globale edle Dark-Mode Scrollbars */
*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: rgba(7, 9, 14, 0.55);
  border-radius: 10px;
  margin: 4px 0;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.35), rgba(5, 150, 105, 0.45));
  border-radius: 10px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--primary-green-bright);
  box-shadow: 0 0 10px var(--primary-green-glow);
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  background-color: var(--bg-dark);
  background-image:
    radial-gradient(circle at 75% 0%, rgba(16, 185, 129, 0.075), transparent 45%),
    radial-gradient(circle at 15% 90%, rgba(5, 150, 105, 0.05), transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 36px 36px, 36px 36px;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

h1, h2, h3, h4, .card-title, .brand-title {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Master Layout */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Main Area on Right */
.main-wrapper {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-y: auto;
}

.main-content {
  flex: 1;
  padding: 2rem 2.5rem;
  max-width: 1660px;
  width: 100%;
  margin: 0 auto;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphic High-End Cards */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.4rem;
  box-shadow:
    0 12px 32px -6px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.055);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-accent {
  border-color: rgba(16, 185, 129, 0.28);
  box-shadow:
    0 14px 36px -6px rgba(0, 0, 0, 0.5),
    0 0 24px -8px rgba(16, 185, 129, 0.12),
    inset 0 1px 0 rgba(52, 211, 153, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-size: 1.14rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

/* Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 1024px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Forms & Inputs */
.form-group {
  margin-bottom: 0.95rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.form-control {
  width: 100%;
  padding: 0.62rem 0.9rem;
  background: var(--bg-inset);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}

.form-control::placeholder {
  color: #64748b;
}

.form-control:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.form-control:focus {
  background: rgba(10, 15, 23, 0.9);
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

select.form-control option {
  background: #0f141c;
  color: var(--text-main);
}

/* Tables */
.custom-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.custom-table th,
.custom-table td {
  padding: 0.78rem 0.95rem;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.87rem;
  vertical-align: middle;
}

.custom-table th {
  background: rgba(11, 15, 22, 0.94);
  backdrop-filter: blur(8px);
  color: #94a3b8;
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.74rem;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border-color);
}

.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.04);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  user-select: none;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  color: #03150e;
  font-weight: 700;
  border-color: rgba(52, 211, 153, 0.4);
  box-shadow:
    0 4px 14px rgba(16, 185, 129, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #6ee7b7 0%, #10b981 100%);
  box-shadow:
    0 6px 20px rgba(16, 185, 129, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.045);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-secondary.active {
  background: rgba(16, 185, 129, 0.16) !important;
  color: var(--primary-green-bright) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  font-weight: 700 !important;
  box-shadow:
    0 0 16px rgba(16, 185, 129, 0.14),
    inset 0 1px 0 rgba(52, 211, 153, 0.18) !important;
}

/* Größen-Modifikatoren für .btn */
.btn.btn-sm {
  padding: 0.38rem 0.78rem;
  font-size: 0.79rem;
  border-radius: 8px;
}

/* Standalone .btn-sm (ohne .btn Klasse) */
.btn-sm:not(.btn) {
  padding: 0.35rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  color: var(--primary-green-bright);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-sm:not(.btn):hover {
  background: rgba(16, 185, 129, 0.22);
  border-color: var(--primary-green-bright);
}

.btn-xs {
  padding: 0.24rem 0.58rem;
  font-size: 0.74rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: var(--transition);
}

.btn-del {
  padding: 0.26rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-del:hover {
  background: var(--danger-red);
  border-color: var(--danger-red);
  color: #fff;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger:hover {
  background: var(--danger-red);
  color: #fff;
  border-color: var(--danger-red);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}

.badge-gold {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fbbf24;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--primary-green-bright);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: rgba(15, 20, 28, 0.95);
  backdrop-filter: blur(12px);
  color: #fff;
  border: 1px solid var(--primary-green);
  border-left: 4px solid var(--primary-green-bright);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.85rem 1.35rem;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 20px rgba(16, 185, 129, 0.2);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Modal Component */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 1.5rem;
  animation: fadeIn 0.18s ease-out;
}

.modal-content {
  background: linear-gradient(180deg, #131924 0%, #0d121a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow:
    0 25px 65px rgba(0, 0, 0, 0.75),
    0 0 40px rgba(16, 185, 129, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  width: 100%;
  animation: modalScale 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from {
    transform: scale(0.95) translateY(8px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* Footer */
.app-footer {
  text-align: center;
  padding: 1.35rem 1.5rem;
  border-top: 1px solid var(--border-subtle);
  color: #64748b;
  font-size: 0.8rem;
  margin-top: auto;
}
