:root {
  --app-bg: #eef1f4;
  --app-surface: #ffffff;
  --app-surface-2: #e6eaee;
  --app-text: #1d242c;
  --app-muted: #66707a;
  --app-line: rgba(29, 36, 44, 0.1);
  --app-border: #c5ced8;
  --app-accent: #5b6d7c;
  --app-accent-2: #4f8f86;
  --app-accent-soft: #dfe6ec;
  --app-sidebar: #2a3038;
  --app-sidebar-text: #c5ccd3;
  --app-sidebar-active: #4d5d6c;
  --app-shadow: 0 10px 30px rgba(29, 36, 44, 0.07);
  --kpi-1: linear-gradient(135deg, #e8eef3, #f7f9fb);
  --kpi-2: linear-gradient(135deg, #e7f3f1, #f6fbfa);
  --kpi-3: linear-gradient(135deg, #eceff2, #f8f9fa);
  --kpi-4: linear-gradient(135deg, #e6eef4, #f5f8fb);
  --kpi-icon-1: #5b6d7c;
  --kpi-icon-2: #4f8f86;
  --kpi-icon-3: #6b7580;
  --kpi-icon-4: #5a7d96;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #2c323a;
  --app-surface: #3a414b;
  --app-surface-2: #454d57;
  --app-text: #e8eaed;
  --app-muted: #a7afb8;
  --app-line: #4a535e;
  --app-border: #9aa7b4;
  --app-accent: #8a97a5;
  --app-accent-2: #6fbfb4;
  --app-accent-soft: rgba(138, 151, 165, 0.18);
  --app-sidebar: #242a32;
  --app-sidebar-text: #c0c6cd;
  --app-sidebar-active: #4d5d6c;
  --app-shadow: 0 16px 40px rgba(12, 14, 18, 0.35);
  --kpi-1: linear-gradient(160deg, #424a54, #3a414b);
  --kpi-2: linear-gradient(160deg, #3a4a4c, #3a414b);
  --kpi-3: linear-gradient(160deg, #40464e, #3a414b);
  --kpi-4: linear-gradient(160deg, #3a4752, #3a414b);
  --kpi-icon-1: #9aa7b4;
  --kpi-icon-2: #7dcec4;
  --kpi-icon-3: #b4bac1;
  --kpi-icon-4: #8eb0c8;
}

html,
body {
  background: var(--app-bg);
  color: var(--app-text);
  font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
}

#root {
  min-height: 100vh;
}

/* ——— Login folgt Light/Dark ——— */
div.flex.min-h-screen.items-center.justify-center.bg-gray-100 {
  position: relative;
  background: var(--app-bg) !important;
  padding: 2rem 1rem;
}

.gm-login-theme {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.gm-lang-switch {
  display: inline-flex;
  align-items: center;
}

.gm-lang-select {
  height: 2.2rem;
  border: 1px solid var(--app-line);
  border-radius: 0.5rem;
  background: var(--app-surface-2);
  color: var(--app-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0 0.55rem;
  cursor: pointer;
}

.gm-login-theme .gm-lang-select {
  background: var(--app-surface);
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 .w-full.max-w-sm {
  max-width: 26rem;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 h1.text-2xl.font-bold.text-gray-900 {
  font-size: 0;
  color: transparent !important;
  line-height: 0;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 h1.text-2xl.font-bold.text-gray-900::before {
  content: "";
  display: block;
  width: 18.5rem;
  height: 13.75rem;
  margin: 0 auto 0.5rem;
  background: url("/GolfMaster_Logo.png") center / contain no-repeat;
  filter: drop-shadow(0 10px 20px rgba(29, 36, 44, 0.22));
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 p.text-gray-600 {
  color: var(--app-muted) !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 form.bg-white {
  background: var(--app-surface) !important;
  border: 1px solid var(--app-line);
  border-radius: 1.1rem !important;
  box-shadow: var(--app-shadow) !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 input {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
  border: 1px solid var(--app-line) !important;
  border-radius: 0.55rem !important;
  padding: 0.7rem 0.85rem !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 input:focus {
  outline: none;
  border-color: var(--app-accent) !important;
  box-shadow: 0 0 0 3px var(--app-accent-soft);
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 .text-center.text-sm {
  color: var(--app-muted) !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 .bg-orange-600 {
  background-color: var(--app-accent) !important;
  color: #fff !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 .hover\:bg-orange-700:hover {
  background-color: #4a5b69 !important;
  color: #fff !important;
}

div.flex.min-h-screen.items-center.justify-center.bg-gray-100 .focus\:ring-orange-500:focus {
  --tw-ring-color: rgb(91 109 124 / 0.45) !important;
}

/* ——— Eingeloggte App ——— */
.min-h-screen.bg-gray-50,
.gm-preview {
  display: grid !important;
  grid-template-columns: 16.5rem minmax(0, 1fr);
  grid-template-rows: 3.75rem minmax(0, 1fr);
  min-height: 100vh;
  background: var(--app-bg) !important;
  color: var(--app-text);
}

.gm-app-header {
  grid-column: 2;
  grid-row: 1;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 3.75rem;
  box-sizing: border-box;
  padding: 0 1.15rem;
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-line);
  box-shadow: none;
}

html[data-theme="dark"] .gm-app-header {
  border-bottom-color: #2e343c;
}

.gm-header-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.gm-header-tools {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.gm-header-account {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0.9rem;
  border-left: 1px solid var(--app-line);
}

.gm-app-header .gm-theme-toggle {
  padding: 0.15rem 0;
}

.gm-header-back[hidden] {
  display: none !important;
}

.gm-sidebar-brand,
.gm-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
  box-sizing: border-box;
  min-height: 4.6rem;
  padding: 0.7rem 0.5rem 0.75rem;
  margin: 0;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  justify-content: flex-start;
}

.gm-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.gm-brand-email {
  margin-top: 0.18rem;
  color: #9aa3ad;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gm-sidebar-brand::before,
.gm-brand::before {
  content: "";
  width: 3.15rem;
  height: 3.15rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  background: url("/GolfMaster_Logo_350x350.png") center / cover no-repeat;
}

.gm-sidebar-brand:has(.gm-brand-logo)::before,
.gm-brand:has(.gm-brand-logo)::before {
  display: none;
}

.gm-brand-logo {
  width: 3.15rem;
  height: 3.15rem;
  flex-shrink: 0;
  border-radius: 0.7rem;
  object-fit: cover;
  display: block;
}

.gm-header-search {
  position: relative;
  flex: 1 1 auto;
  max-width: 22rem;
  margin-right: auto;
}

.gm-header-search input {
  width: 100%;
  height: 2.25rem;
  border: 0 !important;
  border-radius: 0.5rem !important;
  padding: 0 1rem 0 2.35rem !important;
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' stroke='%66707a' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3-3'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: 0.75rem 50% !important;
  background-size: 1rem !important;
}

.gm-header-search input::placeholder {
  color: #9aa3ad;
}

.gm-header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.gm-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--app-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.gm-user-avatar {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  object-fit: cover;
  background: #5b6d7c;
  flex-shrink: 0;
}

.gm-user-email {
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--app-text);
  font-size: 0.8rem;
  font-weight: 600;
}

.gm-header-logout {
  border: 1px solid var(--app-line);
  background: var(--app-surface-2);
  color: var(--app-text);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.38rem 0.9rem;
}

.gm-header-logout:hover {
  background: var(--app-accent-soft);
  color: var(--app-text);
}

.gm-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  color: var(--app-text);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 0.65rem;
}

.gm-back::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M15.5 19.5 8 12l7.5-7.5 1.5 1.5L11 12l6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M15.5 19.5 8 12l7.5-7.5 1.5 1.5L11 12l6 6z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.gm-back:hover {
  background: var(--app-surface-2);
  color: var(--app-text);
}

.gm-app-header .gm-theme-toggle {
  display: inline-flex;
  flex-shrink: 0;
}

.min-h-screen.bg-gray-50 > nav.bg-white.shadow-md,
.gm-preview > nav.bg-white.shadow-md {
  grid-column: 1;
  grid-row: 1 / -1;
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  max-width: 16.5rem;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: var(--app-sidebar) !important;
  border: 0 !important;
  box-shadow: none !important;
  align-items: stretch !important;
  text-align: left !important;
}

.min-h-screen.bg-gray-50 > nav .max-w-7xl,
.gm-preview > nav .max-w-7xl,
nav.gm-nav-ready > .max-w-7xl {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  flex: 0 0 0 !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  pointer-events: none;
}

.min-h-screen.bg-gray-50 > nav .hidden.sm\:ml-6.sm\:flex,
.gm-preview > nav .hidden.sm\:ml-6.sm\:flex {
  display: flex !important;
  flex-direction: column;
  margin-left: 0 !important;
  gap: 0.3rem;
}

.min-h-screen.bg-gray-50 > nav .sm\:space-x-8 > :not([hidden]) ~ :not([hidden]),
.gm-preview > nav .sm\:space-x-8 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.min-h-screen.bg-gray-50 > nav a.inline-flex.items-center,
.gm-preview > nav a.inline-flex.items-center {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  justify-content: flex-start;
  border: 0 !important;
  border-radius: 0.75rem !important;
  padding: 0.7rem 0.8rem !important;
  color: var(--app-sidebar-text) !important;
  font-size: 0.95rem !important;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.min-h-screen.bg-gray-50 > nav a.inline-flex.items-center::before,
.gm-preview > nav a.inline-flex.items-center::before {
  content: none;
}

.min-h-screen.bg-gray-50 > nav a[data-gm-icon]::before,
.gm-preview > nav a[data-gm-icon]::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  margin-right: 0.7rem;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--gm-icon) center / contain no-repeat;
  mask: var(--gm-icon) center / contain no-repeat;
}

.min-h-screen.bg-gray-50 > nav a[data-gm-icon="dashboard"]::before,
.gm-preview > nav a[data-gm-icon="dashboard"]::before {
  --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M3 3h8v8H3V3zm10 0h8v5h-8V3zM3 13h8v8H3v-8zm10 7h8v5h-8v-5zm0-7h8v5h-8v-5z'/%3E%3C/svg%3E");
}

.min-h-screen.bg-gray-50 > nav a[data-gm-icon="golf"]::before,
.gm-preview > nav a[data-gm-icon="golf"]::before {
  --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M14 3.5 6 13h5l-1 8 8-9.5h-5L14 3.5z'/%3E%3C/svg%3E");
}

.min-h-screen.bg-gray-50 > nav a[data-gm-icon="admin"]::before,
.gm-preview > nav a[data-gm-icon="admin"]::before {
  --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-3.3 0-8 1.7-8 5v1h16v-1c0-3.3-4.7-5-8-5z'/%3E%3C/svg%3E");
}

.gm-sidebar-foot {
  margin-top: auto;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding: 0.7rem 0.5rem 0.9rem;
  background: var(--app-sidebar);
}

.gm-sidebar-foot .gm-theme-toggle {
  width: auto;
  justify-content: flex-start;
  background: transparent;
  color: #d7dce2;
  border: 0;
}

nav.gm-nav-ready .sm\:space-x-8,
nav.gm-nav-ready .flex.justify-between.h-16 {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
}

.gm-nav-tree {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
  overflow: auto;
  gap: 0.12rem;
  margin: 0;
  padding: 0.15rem 0.5rem;
}

.gm-nav-section {
  margin: 0.2rem 0.55rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b93a0;
}

.gm-nav-group {
  position: relative;
}

.gm-nav-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.05rem;
  margin: 0;
  padding: 0.42rem 0.4rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: #b7bec8 !important;
  font-size: 0.84rem !important;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.gm-nav-item:hover {
  color: #f3f5f7 !important;
  background: rgba(255, 255, 255, 0.05);
}

.gm-nav-item.gm-nav-active {
  color: #fff !important;
  background: transparent;
  font-weight: 600;
}

.gm-nav-item[data-gm-icon]::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  margin-right: 0.55rem;
  flex-shrink: 0;
  opacity: 0.9;
  background: currentColor;
  -webkit-mask: var(--gm-icon) center / contain no-repeat;
  mask: var(--gm-icon) center / contain no-repeat;
}

.gm-nav-item[data-gm-icon="dashboard"] { --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 4h7v7H4V4zm9 0h7v4h-7V4zM4 13h7v7H4v-7zm9 2h7v5h-7v-5z'/%3E%3C/svg%3E"); }
.gm-nav-item[data-gm-icon="golf"] { --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2c.6 4.6 3 7.2 6 9-3.4 1.2-6 4.4-6 9 0-4.6-2.6-7.8-6-9 3-1.8 5.4-4.4 6-9zm0 11.2a2.2 2.2 0 1 1 0 4.4 2.2 2.2 0 0 1 0-4.4z'/%3E%3C/svg%3E"); }
.gm-nav-item[data-gm-icon="admin"] { --gm-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a4 4 0 1 0-4-4 4 4 0 0 0 4 4zm0 2c-3.3 0-8 1.7-8 5v1h16v-1c0-3.3-4.7-5-8-5z'/%3E%3C/svg%3E"); }

.gm-nav-caret {
  position: absolute;
  top: 0.42rem;
  right: 0.35rem;
  width: 1.35rem;
  height: 1.35rem;
  border: 0;
  background: transparent;
  color: #8b93a0;
  cursor: pointer;
  border-radius: 0.3rem;
}

.gm-nav-caret::before {
  content: "";
  display: block;
  width: 0.55rem;
  height: 0.55rem;
  margin: 0.22rem auto 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

.gm-nav-group.is-open .gm-nav-caret::before {
  transform: rotate(45deg);
  margin-top: 0.12rem;
}

.gm-nav-sub {
  display: none;
  padding: 0.05rem 0 0.25rem;
}

.gm-nav-group.is-open .gm-nav-sub {
  display: flex;
  flex-direction: column;
}

.gm-nav-sub a {
  display: flex;
  align-items: center;
  padding: 0.32rem 0.7rem 0.32rem 2.15rem;
  color: #9aa3b0 !important;
  font-size: 0.8rem !important;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0.35rem;
}

.gm-nav-sub a::before {
  content: "";
  width: 0.35rem;
  height: 1px;
  margin-right: 0.55rem;
  background: currentColor;
  opacity: 0.7;
}

.gm-nav-sub a:hover,
.gm-nav-sub a.gm-nav-active {
  color: #fff !important;
}

.min-h-screen.bg-gray-50 > nav .flex.justify-between.h-16,
.gm-preview > nav .flex.justify-between.h-16 {
  flex-direction: column;
  height: 100%;
  min-height: 0;
  align-items: stretch;
  gap: 1.5rem;
  padding: 0;
}

.min-h-screen.bg-gray-50 > nav .flex-shrink-0,
.gm-preview > nav .flex-shrink-0 {
  display: none !important;
}

.min-h-screen.bg-gray-50 > nav .flex.justify-between.h-16 > .flex.items-center:last-child,
.gm-preview > nav .flex.justify-between.h-16 > .flex.items-center:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.min-h-screen.bg-gray-50 > nav .flex.justify-between.h-16 > .flex:first-child,
.gm-preview > nav .flex.justify-between.h-16 > .flex:first-child {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.min-h-screen.bg-gray-50 > nav a.inline-flex.items-center:hover,
.gm-preview > nav a.inline-flex.items-center:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff !important;
}

.min-h-screen.bg-gray-50 > nav a.inline-flex.items-center.gm-nav-active,
.gm-preview > nav a.inline-flex.items-center.gm-nav-active {
  background: var(--app-sidebar-active) !important;
  color: #fff !important;
}

.min-h-screen.bg-gray-50 > nav .flex.items-center:last-child,
.gm-preview > nav .flex.items-center:last-child {
  margin-top: auto;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.min-h-screen.bg-gray-50 > nav .text-gray-500,
.gm-preview > nav .text-gray-500 {
  color: var(--app-sidebar-text) !important;
  margin-right: 0 !important;
  font-size: 0.78rem;
  word-break: break-all;
}

.min-h-screen.bg-gray-50 > nav button.bg-red-600,
.gm-preview > nav button.bg-red-600 {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #d7dce2 !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 999px !important;
}

.min-h-screen.bg-gray-50 > nav button.bg-red-600:hover,
.gm-preview > nav button.bg-red-600:hover {
  background: rgba(255, 255, 255, 0.16) !important;
  color: #fff !important;
}

.min-h-screen.bg-gray-50 > main,
.gm-preview > main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  max-width: none !important;
  margin: 0 !important;
  padding: 1.25rem 1.5rem 2rem !important;
}

.gm-topbar {
  display: none !important;
}

.gm-topbar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--app-text);
}

.gm-topbar-sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--app-muted);
}

.gm-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  border: 0;
  background: transparent;
  color: var(--app-text);
  border-radius: 0;
  padding: 0.15rem 0;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.gm-theme-toggle:hover {
  background: transparent;
}

.gm-theme-label {
  display: inline;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
}

.gm-theme-switch {
  position: relative;
  width: 2.05rem;
  height: 1.15rem;
  border-radius: 999px;
  background: #c5cce0;
  flex-shrink: 0;
}

html[data-theme="dark"] .gm-theme-switch {
  background: var(--app-accent);
}

.gm-theme-switch::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

html[data-theme="dark"] .gm-theme-switch::after {
  transform: translateX(0.9rem);
}

.min-h-screen.bg-gray-50 h1,
.gm-preview h1 {
  color: var(--app-text) !important;
}

.min-h-screen.bg-gray-50 .gm-kpi-num,
.gm-preview .gm-kpi-num {
  font-family: "Segoe UI", "Helvetica Neue", Arial, system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums lining-nums !important;
  font-feature-settings: "tnum" 1, "lnum" 1, "zero" 1 !important;
  letter-spacing: 0.03em;
  font-weight: 700 !important;
}

.min-h-screen.bg-gray-50 .text-gray-800,
.min-h-screen.bg-gray-50 .text-gray-900,
.gm-preview .text-gray-800,
.gm-preview .text-gray-900 {
  color: var(--app-text) !important;
}

.min-h-screen.bg-gray-50 .text-gray-500,
.min-h-screen.bg-gray-50 .text-gray-600,
.gm-preview .text-gray-500,
.gm-preview .text-gray-600 {
  color: var(--app-muted) !important;
}

.min-h-screen.bg-gray-50 .bg-green-600,
.gm-preview .bg-green-600 {
  background: var(--app-accent) !important;
  color: #fff !important;
}

.min-h-screen.bg-gray-50 .hover\:bg-green-700:hover,
.gm-preview .hover\:bg-green-700:hover {
  background: #4a5b69 !important;
  color: #fff !important;
}

.min-h-screen.bg-gray-50 .focus\:ring-green-500:focus,
.min-h-screen.bg-gray-50 .focus\:border-green-500:focus,
.gm-preview .focus\:ring-green-500:focus,
.gm-preview .focus\:border-green-500:focus {
  --tw-ring-color: rgb(91 109 124 / 0.45) !important;
  border-color: var(--app-accent) !important;
}

.min-h-screen.bg-gray-50 .bg-white,
.gm-preview .bg-white {
  background: var(--app-surface) !important;
}

.min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow,
.min-h-screen.bg-gray-50 .bg-white.p-6.rounded-lg.shadow,
.min-h-screen.bg-gray-50 a.p-6.bg-white.rounded-lg.shadow,
.gm-preview .bg-white.rounded-lg.shadow,
.gm-preview .bg-white.p-6.rounded-lg.shadow,
.gm-preview a.p-6.bg-white.rounded-lg.shadow {
  border: 1px solid var(--app-line);
  border-radius: 1.15rem !important;
  box-shadow: var(--app-shadow) !important;
}

.min-h-screen.bg-gray-50 a.p-6.bg-white.rounded-lg.shadow:hover,
.gm-preview a.p-6.bg-white.rounded-lg.shadow:hover {
  border-color: var(--app-accent);
  transform: translateY(-1px);
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(1),
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(1) {
  background: var(--kpi-1) !important;
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(2),
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(2) {
  background: var(--kpi-2) !important;
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(3),
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(3) {
  background: var(--kpi-3) !important;
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(4),
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(4) {
  background: var(--kpi-4) !important;
}

/* KPI-Karten: Icon-Fläche oben rechts (Users / Players / Clubs / Devices) */
.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow h3::after,
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow h3::after {
  content: "";
  float: right;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  background-color: var(--kpi-icon-1);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 58%;
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(2) h3::after,
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(2) h3::after {
  background-color: var(--kpi-icon-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(3) h3::after,
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(3) h3::after {
  background-color: var(--kpi-icon-3);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 21v-6h6v6'/%3E%3C/svg%3E");
}

.min-h-screen.bg-gray-50 .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(4) h3::after,
.gm-preview .grid.lg\:grid-cols-4 > .bg-white.p-6.rounded-lg.shadow:nth-child(4) h3::after {
  background-color: var(--kpi-icon-4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='7' y='2' width='10' height='20' rx='2'/%3E%3Cpath d='M11 18h2'/%3E%3C/svg%3E");
}

.min-h-screen.bg-gray-50 table,
.gm-preview table {
  color: var(--app-text);
}

.min-h-screen.bg-gray-50 thead,
.gm-preview thead {
  background: var(--app-surface-2) !important;
}

.min-h-screen.bg-gray-50 input,
.min-h-screen.bg-gray-50 select,
.min-h-screen.bg-gray-50 textarea,
.gm-preview input,
.gm-preview select,
.gm-preview textarea {
  background: var(--app-surface) !important;
  color: var(--app-text);
  border-color: var(--app-border) !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 input,
html[data-theme="dark"] .min-h-screen.bg-gray-50 select,
html[data-theme="dark"] .min-h-screen.bg-gray-50 textarea,
html[data-theme="dark"] .gm-preview input,
html[data-theme="dark"] .gm-preview select,
html[data-theme="dark"] .gm-preview textarea,
html[data-theme="dark"] .gm-desc-lang-select,
html[data-theme="dark"] .gm-lang-select,
html[data-theme="dark"] div.flex.min-h-screen.items-center.justify-center.bg-gray-100 input {
  border-color: #9aa7b4 !important;
}

.min-h-screen.bg-gray-50 .bg-gray-50,
.min-h-screen.bg-gray-50 .bg-gray-100,
.min-h-screen.bg-gray-50 .bg-gray-200,
.gm-preview .bg-gray-50,
.gm-preview .bg-gray-100,
.gm-preview .bg-gray-200 {
  background: var(--app-surface-2) !important;
  color: var(--app-text);
}

.min-h-screen.bg-gray-50 .gm-header-search input,
.gm-preview .gm-header-search input {
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
}

@media (max-width: 900px) {
  .min-h-screen.bg-gray-50,
  .gm-preview {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .gm-app-header {
    flex-wrap: wrap;
    height: auto;
    padding: 0.7rem 0.85rem;
  }

  .gm-brand {
    min-width: 0;
  }

  .gm-header-search {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }

  .min-h-screen.bg-gray-50 > nav.bg-white.shadow-md,
  .gm-preview > nav.bg-white.shadow-md {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
  }

  .min-h-screen.bg-gray-50 > main,
  .gm-preview > main {
    grid-column: 1;
    grid-row: 3;
  }

  .min-h-screen.bg-gray-50 > nav .flex.justify-between.h-16,
  .gm-preview > nav .flex.justify-between.h-16 {
    flex-direction: row;
    height: auto;
    padding: 0.6rem 0;
  }

  .min-h-screen.bg-gray-50 > nav .hidden.sm\:ml-6.sm\:flex,
  .gm-preview > nav .hidden.sm\:ml-6.sm\:flex {
    flex-direction: row;
    margin-left: 0 !important;
  }
}

.min-h-screen.bg-gray-50 .bg-green-100,
.gm-preview .bg-green-100 {
  background: var(--app-accent-soft) !important;
}

.min-h-screen.bg-gray-50 .text-green-800,
.gm-preview .text-green-800 {
  color: var(--app-accent) !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .bg-green-100,
html[data-theme="dark"] .gm-preview .bg-green-100 {
  background: rgba(138, 151, 165, 0.22) !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .text-green-800,
html[data-theme="dark"] .gm-preview .text-green-800 {
  color: #d5dbe2 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .bg-red-100,
html[data-theme="dark"] .gm-preview .bg-red-100 {
  background: rgba(138, 151, 165, 0.18) !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .text-red-800,
html[data-theme="dark"] .gm-preview .text-red-800 {
  color: #d7dce2 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .text-red-600,
html[data-theme="dark"] .gm-preview .text-red-600 {
  color: #9aa7b4 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .hover\:bg-gray-50:hover,
html[data-theme="dark"] .gm-preview .hover\:bg-gray-50:hover {
  background: #454d57 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .divide-gray-200 > :not([hidden]) ~ :not([hidden]),
html[data-theme="dark"] .gm-preview .divide-gray-200 > :not([hidden]) ~ :not([hidden]) {
  border-color: #2a3038 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .hover\:bg-red-50:hover,
html[data-theme="dark"] .gm-preview .hover\:bg-red-50:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y,
.gm-preview .bg-white.rounded-lg.shadow-sm.divide-y {
  background: transparent !important;
  box-shadow: none !important;
  display: grid;
  gap: 0.85rem;
  border: 0 !important;
}

.min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y > :not([hidden]) ~ :not([hidden]),
.gm-preview .bg-white.rounded-lg.shadow-sm.divide-y > :not([hidden]) ~ :not([hidden]) {
  border-top-width: 0 !important;
}

.min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y > div,
.gm-preview .bg-white.rounded-lg.shadow-sm.divide-y > div {
  background: var(--app-surface) !important;
  border: 1px solid var(--app-border) !important;
  border-radius: 18px !important;
  padding: 1.05rem 1.2rem !important;
  box-shadow: 0 10px 28px rgba(20, 28, 40, 0.07);
}

.min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y > div:hover,
.gm-preview .bg-white.rounded-lg.shadow-sm.divide-y > div:hover {
  border-color: #8a97a5 !important;
  box-shadow: 0 14px 32px rgba(20, 28, 40, 0.1);
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y > div,
html[data-theme="dark"] .gm-preview .bg-white.rounded-lg.shadow-sm.divide-y > div {
  background: #323941 !important;
  border-color: #454d57 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .bg-white.rounded-lg.shadow-sm.divide-y > div:hover,
html[data-theme="dark"] .gm-preview .bg-white.rounded-lg.shadow-sm.divide-y > div:hover {
  background: #3a424b !important;
  border-color: #5b6672 !important;
}

.min-h-screen.bg-gray-50 .bg-white.p-6.rounded-xl.shadow-sm,
.gm-preview .bg-white.p-6.rounded-xl.shadow-sm {
  border: 1px solid var(--app-border);
  box-shadow: 0 10px 24px rgba(20, 28, 40, 0.06);
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 .bg-white.p-6.rounded-xl.shadow-sm,
html[data-theme="dark"] .gm-preview .bg-white.p-6.rounded-xl.shadow-sm {
  border-color: #454d57;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

.min-h-screen.bg-gray-50 svg.text-green-600,
.gm-preview svg.text-green-600 {
  color: var(--app-accent) !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 svg.text-green-600,
html[data-theme="dark"] .gm-preview svg.text-green-600 {
  color: #c5ced8 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 a.text-green-600,
html[data-theme="dark"] .gm-preview a.text-green-600 {
  color: #d5dbe2 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 th[style*="background-color"],
html[data-theme="dark"] .min-h-screen.bg-gray-50 td[style*="background-color"],
html[data-theme="dark"] .gm-preview th[style*="background-color"],
html[data-theme="dark"] .gm-preview td[style*="background-color"] {
  color: #374151 !important;
  font-weight: 600 !important;
  border-color: #6b7785 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 tbody.divide-y > tr + tr > td[style*="background-color"],
html[data-theme="dark"] .gm-preview tbody.divide-y > tr + tr > td[style*="background-color"] {
  border-top-color: #6b7785 !important;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 td.text-sm.font-medium.text-gray-900:not([style*="background"]),
html[data-theme="dark"] .gm-preview td.text-sm.font-medium.text-gray-900:not([style*="background"]) {
  color: var(--app-text) !important;
}

.min-h-screen.bg-gray-50 .mb-8 > .flex.items-center.gap-4 > button.bg-gray-700,
.gm-preview .mb-8 > .flex.items-center.gap-4 > button.bg-gray-700 {
  display: none !important;
}

.min-h-screen.bg-gray-50 a.gm-course-card,
.gm-preview a.gm-course-card {
  display: block;
  text-decoration: none;
  background: #f3f5f7 !important;
  border: 1.5px solid #c5ced8 !important;
  border-radius: 14px !important;
  padding: 1rem 1.15rem !important;
  box-shadow: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.min-h-screen.bg-gray-50 a.gm-course-card:hover,
.gm-preview a.gm-course-card:hover {
  background: #e9eef2 !important;
  border-color: #8a97a5 !important;
  transform: translateY(-1px);
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 a.gm-course-card,
html[data-theme="dark"] .gm-preview a.gm-course-card {
  background: #3a424b !important;
  border: 1.5px solid #6b7785 !important;
  box-shadow: none;
}

html[data-theme="dark"] .min-h-screen.bg-gray-50 a.gm-course-card:hover,
html[data-theme="dark"] .gm-preview a.gm-course-card:hover {
  background: #454d57 !important;
  border-color: #9aa7b4 !important;
}

.gm-desc-block {
  margin: 0.85rem 0 0 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem 1rem;
  align-items: center;
  background: var(--app-surface);
  border: 1.5px solid var(--app-border);
  border-radius: 14px;
  padding: 1rem 1.15rem 1.15rem !important;
}

.gm-desc-block > h3,
.gm-desc-block > label {
  margin: 0 !important;
  grid-column: 1;
  grid-row: 1;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--app-text) !important;
}

.gm-desc-langs {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 0 !important;
  margin: 0 !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.gm-desc-block > .relative,
.gm-desc-block > textarea {
  grid-column: 1 / -1;
  grid-row: 2;
}

.gm-desc-langs > button {
  display: none !important;
}

.gm-desc-lang-wrap {
  position: relative;
  width: 100%;
  max-width: 18rem;
}

.gm-desc-lang-select {
  display: block;
  width: 100%;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 1.5px solid var(--app-border) !important;
  border-radius: 10px !important;
  background: var(--app-surface-2) !important;
  color: var(--app-text) !important;
  font: inherit;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  padding: 0.7rem 2.4rem 0.7rem 0.95rem !important;
  cursor: pointer;
}

.gm-desc-lang-select:hover,
.gm-desc-lang-select:focus {
  border-color: #8a97a5 !important;
  outline: none;
}

.gm-desc-lang-chevron {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--app-muted);
  display: flex;
}

html[data-theme="dark"] .gm-desc-block {
  background: #323941;
  border-color: #9aa7b4;
}

html[data-theme="dark"] .gm-desc-lang-select {
  background: #2c333b !important;
  border-color: #9aa7b4 !important;
  color: #e8edf2 !important;
}

.gm-file-field {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 3.1rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface-2);
}

.gm-file-field input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.gm-file-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 9px;
  background: var(--app-accent);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.55rem 0.95rem;
  cursor: pointer;
}

.gm-file-btn:hover {
  background: #4a5b69;
}

.gm-file-name {
  min-width: 0;
  color: var(--app-muted);
  font-size: 0.86rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-theme="dark"] .gm-file-field {
  background: #2c333b;
  border-color: #9aa7b4;
}

html[data-theme="dark"] .gm-file-btn:hover {
  background: #6b7785;
}

.gm-facilities {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.65rem !important;
}

.gm-facility-item {
  display: flex !important;
  align-items: center !important;
  gap: 0.7rem !important;
  margin: 0 !important;
  padding: 0.75rem 0.9rem !important;
  border: 1.5px solid var(--app-border);
  border-radius: 12px;
  background: var(--app-surface-2);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
  user-select: none;
}

.gm-facility-item:hover {
  border-color: #8a97a5;
}

.gm-facility-item.gm-facility-checked {
  border-color: var(--app-accent);
  background: var(--app-accent-soft);
}

.gm-facility-item input[type="checkbox"] {
  width: 1.05rem !important;
  height: 1.05rem !important;
  margin: 0 !important;
  accent-color: var(--app-accent);
  border-radius: 0.3rem !important;
  flex-shrink: 0;
  pointer-events: none;
}

.gm-facility-item label {
  flex: 1;
  margin: 0 !important;
  color: var(--app-text) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer;
  pointer-events: none;
}

html[data-theme="dark"] .gm-facility-item {
  background: #2c333b;
  border-color: #5b6672;
}

html[data-theme="dark"] .gm-facility-item:hover,
html[data-theme="dark"] .gm-facility-item.gm-facility-checked {
  border-color: #9aa7b4;
  background: #3a424b;
}

@media (max-width: 700px) {
  .gm-facilities {
    grid-template-columns: 1fr !important;
  }
}
