/* =====================================================
   Fischerverein-App - Stylesheet
   Optimiert für ältere Mitglieder: große Schrift,
   große Knöpfe, hoher Kontrast.
   ===================================================== */

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: #F5EFE3;
  color: #2A2A28;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

/* ----- Layout ----- */

.view {
  min-height: 100vh;
  min-height: 100dvh;
}

.view-center {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  padding: 20px;
}

/* ----- Karten ----- */

.card-wide {
  width: 100%;
  max-width: 440px;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(31, 58, 68, 0.08);
}

.form-section {
  background: white;
  border-radius: 24px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

/* ----- Typografie ----- */

.title-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 40px;
  color: #1F3A44;
  margin: 0 0 24px 0;
  line-height: 1.1;
}

.subtitle {
  font-size: 20px;
  color: #5C5852;
  margin: 0;
}

.section-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 26px;
  color: #1F3A44;
  margin: 24px 0 16px 0;
}

.label {
  display: block;
  font-size: 17px;
  font-weight: 500;
  color: #2A2A28;
  margin-bottom: 12px;
}

.label-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 500;
  color: #2A2A28;
  margin-bottom: 16px;
}

.label-with-icon svg {
  color: #1F3A44;
}

.help-text {
  font-size: 14px;
  color: #9A8F7E;
  text-align: center;
  margin: 0;
}

.welcome-header {
  text-align: center;
  margin-bottom: 32px;
}

.welcome-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #1F3A44;
  color: #E8C887;
  margin-bottom: 20px;
}

.welcome-header .title-display {
  font-size: 48px;
  margin-bottom: 8px;
}

/* ----- Eingabefelder ----- */

.input {
  width: 100%;
  font-size: 18px;
  padding: 16px 18px;
  border: 2px solid #D4C8B0;
  border-radius: 16px;
  background-color: #FAF6EF;
  color: #2A2A28;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: #1F3A44;
}

.input-large {
  font-size: 22px;
  padding: 18px;
}

.input-size {
  font-size: 28px;
  text-align: center;
  font-weight: 500;
  color: #1F3A44;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231F3A44' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

/* ----- Knöpfe ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  padding: 14px 22px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.15s;
  text-decoration: none;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: #1F3A44;
  color: #F5EFE3;
}

.btn-secondary {
  background-color: #E5DCC8;
  color: #2A2A28;
}

.btn-danger {
  background-color: #A85432;
  color: white;
}

.btn-large {
  width: 100%;
  font-size: 19px;
  padding: 18px 22px;
}

.btn-fab {
  width: 100%;
  font-size: 19px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(31, 58, 68, 0.3);
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(245, 239, 227, 0.15);
  color: #F5EFE3;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: #1F3A44;
  font-size: 17px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 0;
  margin-bottom: 16px;
}

.btn-text {
  background: none;
  border: none;
  color: #5C5852;
  font-size: 16px;
  font-family: inherit;
  cursor: pointer;
  padding: 12px;
  width: 100%;
  text-align: center;
}

/* ----- Fischart-Auswahl ----- */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-fish {
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  padding: 16px 12px;
  border: 2px solid #E5DCC8;
  background-color: #FAF6EF;
  color: #2A2A28;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-fish.selected {
  background-color: #1F3A44;
  border-color: #1F3A44;
  color: #F5EFE3;
}

.btn-choice {
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  padding: 24px 12px;
  border: 2px solid #E5DCC8;
  background-color: #FAF6EF;
  color: #2A2A28;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}

.btn-choice-released.selected {
  background-color: #7A9B6E;
  border-color: #7A9B6E;
  color: white;
}

.btn-choice-taken.selected {
  background-color: #A85432;
  border-color: #A85432;
  color: white;
}

/* ----- Header ----- */

.header {
  background-color: #1F3A44;
  color: #F5EFE3;
  padding: 32px 0 28px 0;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.header-eyebrow {
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 4px 0;
}

.header-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  line-height: 1.1;
}

/* ----- Statistik ----- */

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: -20px;
  margin-bottom: 28px;
}

.stat-card {
  background: white;
  border-radius: 16px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

.stat-number {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  color: #1F3A44;
  line-height: 1;
}

.stat-accent {
  color: #C8924C;
}

.stat-label {
  font-size: 12px;
  color: #5C5852;
  margin-top: 4px;
}

/* ----- Rekord-Banner ----- */

.record-banner {
  background-color: #FBF1DC;
  border: 1px solid #E8C887;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.record-icon {
  background-color: #C8924C;
  color: white;
  border-radius: 50%;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.record-text {
  flex: 1;
  font-size: 14px;
  color: #5C5852;
}

.record-text strong {
  color: #1F3A44;
}

/* ----- Fang-Liste ----- */

.catch-card {
  background: white;
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

.catch-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.catch-main {
  flex: 1;
  min-width: 0;
}

.catch-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.catch-fish {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #1F3A44;
  margin: 0;
}

.catch-size {
  font-size: 22px;
  font-weight: 500;
  color: #C8924C;
}

.catch-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 15px;
  color: #5C5852;
  margin-bottom: 10px;
}

.catch-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.catch-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.catch-status-released {
  background-color: #E8F0E2;
  color: #4A7050;
}

.catch-status-taken {
  background-color: #F5DDD0;
  color: #7A3920;
}

.catch-delete {
  background: none;
  border: none;
  color: #A85432;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ----- FAB-Container ----- */

.fab-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 0 24px 0;
  pointer-events: none;
  background: linear-gradient(to top, #F5EFE3 60%, transparent);
}

.fab-container .container {
  pointer-events: auto;
}

main {
  padding-bottom: 120px;
}

/* ----- Empty State ----- */

.empty-state {
  background: white;
  border-radius: 24px;
  padding: 48px 24px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

.empty-state p {
  font-size: 17px;
  color: #5C5852;
  margin: 0 0 8px 0;
}

/* ----- Fehlermeldungen ----- */

.error-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #F5DDD0;
  color: #7A3920;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 16px;
  margin-bottom: 16px;
}

.error-msg::before {
  content: "⚠";
  font-size: 20px;
  flex-shrink: 0;
}

/* ----- Erfolgs-Overlay ----- */

.success-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(31, 58, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s;
}

.success-card {
  background: white;
  border-radius: 24px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #7A9B6E;
  margin-bottom: 16px;
}

.success-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  color: #1F3A44;
  margin: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ----- Offline-Indikator ----- */

.offline-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #C8924C;
  color: white;
  padding: 8px 16px;
  text-align: center;
  font-size: 14px;
  z-index: 50;
}

/* ----- Loading ----- */

.loading-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 26px;
  color: #1F3A44;
}

/* ----- Hilfsklassen ----- */

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ----- Admin-Seite ----- */

.admin-table {
  width: 100%;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
  border-collapse: collapse;
  margin-bottom: 16px;
}

.admin-table th {
  background-color: #1F3A44;
  color: #F5EFE3;
  padding: 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
}

.admin-table td {
  padding: 12px;
  border-bottom: 1px solid #E5DCC8;
  font-size: 15px;
}

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

.admin-tabs {
  display: flex;
  gap: 4px;
  background-color: white;
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

.admin-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #5C5852;
  cursor: pointer;
}

.admin-tab.active {
  background-color: #1F3A44;
  color: #F5EFE3;
}

.export-card {
  background: linear-gradient(135deg, #1F3A44, #2C5161);
  color: #F5EFE3;
  border-radius: 24px;
  padding: 28px;
  margin-bottom: 24px;
}

.export-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 24px;
  margin: 0 0 8px 0;
}

.export-card p {
  margin: 0 0 18px 0;
  opacity: 0.85;
}

.btn-export {
  background-color: #E8C887;
  color: #1F3A44;
  font-weight: 600;
}

@media (max-width: 480px) {
  .header-title { font-size: 28px; }
  .title-display { font-size: 36px; }
  .welcome-header .title-display { font-size: 42px; }
  .stat-number { font-size: 24px; }
}

/* =====================================================
   Login / Registrierung / Menü (v2)
   ===================================================== */

.form-row {
  margin-bottom: 18px;
}

.label-optional {
  color: #9A8F7E;
  font-weight: 400;
  font-size: 14px;
  margin-left: 6px;
}

.link {
  color: #1F3A44;
  font-weight: 500;
  text-decoration: underline;
}

.help-text a {
  color: #1F3A44;
  font-weight: 500;
}

/* Menü-Overlay */

.menu-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(31, 58, 68, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.2s;
}

.menu-card {
  background: white;
  border-radius: 24px;
  padding: 28px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.menu-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 600;
  color: #1F3A44;
  margin: 0 0 4px 0;
}

.menu-subtitle {
  font-size: 17px;
  color: #2A2A28;
  margin: 0;
}

.menu-email {
  font-size: 15px;
  color: #5C5852;
  margin: 4px 0 0 0;
}

.menu-divider {
  border: none;
  border-top: 1px solid #E5DCC8;
  margin: 18px 0;
}

.btn-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: #FAF6EF;
  border: 2px solid #E5DCC8;
  border-radius: 14px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 16px;
  color: #2A2A28;
  cursor: pointer;
  margin-bottom: 8px;
  text-align: left;
}

.btn-menu-item svg {
  color: #1F3A44;
  flex-shrink: 0;
}

/* Mitglieder-Karten im Admin */

.member-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(31, 58, 68, 0.05);
}

.member-card-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.member-info {
  flex: 1;
  min-width: 250px;
}

.member-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 600;
  color: #1F3A44;
  margin: 0 0 8px 0;
}

.member-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.member-link {
  color: #2A2A28;
  text-decoration: none;
  font-size: 15px;
}

.member-link:hover {
  text-decoration: underline;
}

.member-meta {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: #9A8F7E;
}

.member-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 8px 14px;
  font-size: 14px;
}

.btn-secondary {
  background-color: #E5DCC8;
  color: #2A2A28;
}
