:root {
  --brand-start: #2f6bff;
  --brand-end: #7c4dff;
  --bg: #0b1120;
  --bg-card: #141b2e;
  --bg-elevated: #182034;
  --border: #1f2a44;
}

html, body {
  background: var(--bg);
}

#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  padding-top: env(safe-area-inset-top);
  backdrop-filter: blur(10px);
  background: rgba(11, 17, 32, 0.85) !important;
  border-bottom: 1px solid var(--border) !important;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(11, 17, 32, 0.92) !important;
  border-top: 1px solid var(--border) !important;
  backdrop-filter: blur(10px);
}

.bottom-nav .nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 0.7rem;
  padding: 0.5rem 0 0.4rem;
  color: #7c8aad !important;
}

.bottom-nav .nav-link.active {
  color: #fff !important;
}

.bottom-nav .nav-icon {
  font-size: 1.15rem;
  line-height: 1;
  padding: 5px 18px;
  border-radius: 999px;
}

.bottom-nav .nav-link.active .nav-icon {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end));
  box-shadow: 0 4px 14px rgba(47, 107, 255, 0.5);
}

/* --- Cards --- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.1rem;
}

/* --- Buttons --- */

.btn {
  border-radius: 999px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-start), var(--brand-end)) !important;
  border-color: transparent !important;
  box-shadow: 0 6px 18px rgba(47, 107, 255, 0.4);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  filter: brightness(1.08);
}

.btn-outline-secondary {
  border-color: var(--border);
  color: #b6c0d9;
}

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(96px + env(safe-area-inset-bottom));
  width: 56px;
  height: 56px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 8;
  padding: 0;
}

/* --- Icon badges (location icons) --- */

.icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: linear-gradient(135deg, var(--icon-a, var(--brand-start)), var(--icon-b, var(--brand-end)));
}

.location-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}

.icon-badge.type-kuehlschrank { --icon-a: #2f6bff; --icon-b: #4fa8ff; }
.icon-badge.type-gefrierschrank { --icon-a: #7c4dff; --icon-b: #4f6bff; }
.icon-badge.type-speisekammer { --icon-a: #12b886; --icon-b: #34d6ab; }
.icon-badge.type-sonstige { --icon-a: #5b6a8c; --icon-b: #8a97b8; }

.icon-badge.type-regal, .icon-badge.type-werkzeug { --icon-a: #8a5a3b; --icon-b: #c9924f; }
.icon-badge.type-geraetehaus, .icon-badge.type-gewaechshaus, .icon-badge.type-beet { --icon-a: #1f9d55; --icon-b: #5fd483; }

.icon-badge.module-keller { --icon-a: #8a5a3b; --icon-b: #c9924f; }
.icon-badge.module-garten { --icon-a: #1f9d55; --icon-b: #5fd483; }

.icon-badge i,
.nav-icon i,
.item-thumb-empty i {
  color: #fff;
}

.item-thumb-empty i {
  color: #7c8aad;
  font-size: 1.1rem;
}

/* --- Badges / chips --- */

.badge {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* --- Item rows --- */

.min-w-0 {
  min-width: 0;
}

.qty-controls .btn {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  line-height: 1;
}

.qty-controls .qty {
  min-width: 34px;
  text-align: center;
  font-weight: 600;
}

.list-group-item {
  background: var(--bg-card);
  border-color: var(--border);
}

.item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
}

.item-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  font-size: 1.2rem;
  cursor: default;
}

.item-photo-preview {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0.75rem;
  display: block;
}

/* --- Auth screen --- */

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 0%, rgba(47, 107, 255, 0.18), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(124, 77, 255, 0.16), transparent 50%);
}

.auth-box {
  width: 100%;
  max-width: 380px;
}

.auth-box h1 {
  background: linear-gradient(135deg, #7fb0ff, #c3a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.form-control,
.form-select {
  background-color: var(--bg-elevated);
  border-color: var(--border);
  color: #e8ecf5;
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-elevated);
  border-color: var(--brand-start);
  box-shadow: 0 0 0 0.2rem rgba(47, 107, 255, 0.25);
  color: #e8ecf5;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.boot {
  height: 100vh;
}
