/* ─── Spendenboxen-Tracker Custom Styles ─── */

/* ─── Base ────────────────────────────────────── */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #f8fafc;
  min-height: 100vh;
}

/* ─── Form Elements ───────────────────────────── */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #1f2937;
  background-color: #fff;
  transition: all 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input::placeholder {
  color: #9ca3af;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

textarea.form-input {
  resize: vertical;
}

/* ─── Buttons ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #3b82f6;
  color: #fff;
}
.btn-primary:hover:not(:disabled) {
  background-color: #2563eb;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}
.btn-secondary:hover:not(:disabled) {
  background-color: #e5e7eb;
}

.btn-danger {
  background-color: #ef4444;
  color: #fff;
}
.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.btn-sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
}

/* ─── Login Screen ────────────────────────────── */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.login-card {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* ─── Public Scan Screen ──────────────────────── */
.public-scan-container {
  min-height: 100vh;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
}

/* ─── Sidebar Navigation ──────────────────────── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo h1 {
  color: #fff;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sidebar-logo p {
  color: #94a3b8;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  margin-bottom: 0.125rem;
}

.nav-item:hover {
  color: #e2e8f0;
  background-color: rgba(255, 255, 255, 0.06);
}

.nav-item.nav-active {
  color: #fff;
  background-color: #3b82f6;
}

.nav-item .nav-icon {
  font-size: 1.125rem;
  width: 1.5rem;
  text-align: center;
}

/* ─── Main Content ────────────────────────────── */
.main-content {
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
}

/* ─── Mobile Bottom Navigation ────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  z-index: 40;
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  padding: 0.375rem 0.75rem;
  color: #6b7280;
  font-size: 0.625rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: color 0.15s;
  text-decoration: none;
}

.mobile-nav-item .mobile-nav-icon {
  font-size: 1.25rem;
}

.mobile-nav-item.mobile-nav-active {
  color: #3b82f6;
}

/* ─── Notification Container ──────────────────── */
#notification-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  max-width: 400px;
}

/* ─── Responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-bottom: 5rem;
  }

  .mobile-nav {
    display: block;
  }

  .login-card {
    padding: 2rem;
  }

  .public-scan-container {
    padding: 1rem 0.75rem;
  }
}

/* ─── Scrollbar ───────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* ─── Print ───────────────────────────────────── */
@media print {
  .sidebar,
  .mobile-nav,
  #notification-container {
    display: none !important;
  }
  .main-content {
    margin-left: 0;
    padding: 0;
  }
}

/* ─── Animations ──────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#app-content {
  animation: fadeIn 0.2s ease-out;
}