/* ==========================================================================
   Fishing Catch Log App - Design System & Modern Styling
   ========================================================================== */

:root {
  /* Color Palette - Deep Marine Dark */
  --bg-dark: #070f18;
  --bg-deep: #0d1b2a;
  --bg-card: rgba(15, 32, 53, 0.75);
  --bg-card-hover: rgba(22, 45, 74, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-glass: rgba(255, 255, 255, 0.12);
  --border-cyan: rgba(0, 242, 254, 0.3);
  
  /* Accent Colors */
  --cyan-main: #00f2fe;
  --cyan-glow: rgba(0, 242, 254, 0.4);
  --teal-accent: #4facfe;
  --coral-accent: #ff6b6b;
  --gold-accent: #ffd166;
  --purple-accent: #a29bfe;
  
  /* Location Badges */
  --badge-boat-bg: rgba(58, 134, 255, 0.25);
  --badge-boat-border: #3a86ff;
  --badge-shore-bg: rgba(6, 214, 160, 0.25);
  --badge-shore-border: #06d6a0;

  /* Typography */
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-dim: #6e7681;
  --font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shadows & Glass */
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 242, 254, 0.05);
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.25);
  --backdrop-blur: blur(12px);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background: radial-gradient(circle at 50% 0%, #112845 0%, #070f18 70%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: #1b365d;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--cyan-main);
}

/* Header & Navigation */
.app-header {
  background: rgba(7, 15, 24, 0.85);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.8rem 1.5rem;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--cyan-main), var(--teal-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}

.brand-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  background: linear-gradient(90deg, #ffffff, var(--cyan-main));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-subtitle {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cyan-main);
  letter-spacing: 0.08em;
  opacity: 0.9;
  margin-top: 1px;
}

.nav-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.55rem 1.2rem;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-btn:hover {
  color: var(--text-main);
}

.nav-btn.active {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.2), rgba(79, 172, 254, 0.2));
  color: var(--cyan-main);
  border: 1px solid var(--border-cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.btn-add-primary {
  background: linear-gradient(135deg, var(--cyan-main), var(--teal-accent));
  color: #070f18;
  font-weight: 700;
  border: none;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-add-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
}

/* Main Container */
.main-container {
  max-width: 1280px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.5rem;
}

/* Quick Summary Bar */
.stats-summary-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.summary-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.summary-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--cyan-main);
}

.summary-info .val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
}

.summary-info .lbl {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Filter Bar */
.filter-section {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  box-shadow: var(--shadow-card);
}

.search-input-wrap {
  flex: 1 1 240px;
  position: relative;
}

.search-input-wrap input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem 0.6rem 2.4rem;
  color: var(--text-main);
  font-size: 0.9rem;
}

.search-input-wrap input:focus {
  outline: none;
  border-color: var(--cyan-main);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: var(--cyan-main);
}

/* Catch Log Grid */
.catch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* Individual Catch Card */
.catch-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  position: relative;
}

.catch-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-cyan);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px var(--cyan-glow);
  background: var(--bg-card-hover);
}

.card-img-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background: #050b12;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.catch-card:hover .card-img {
  transform: scale(1.05);
}

.card-location-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-boat {
  background: var(--badge-boat-bg);
  border: 1px solid var(--badge-boat-border);
  color: #70a6ff;
}

.badge-shore {
  background: var(--badge-shore-bg);
  border: 1px solid var(--badge-shore-border);
  color: #52b788;
}

.card-date-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-body {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

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

.species-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.location-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-metrics {
  display: flex;
  gap: 1rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.metric-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cyan-main);
}

.metric-val.gold {
  color: var(--gold-accent);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.tag-pill {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--text-muted);
}

.card-footer {
  padding: 0.8rem 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.2);
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--cyan-main);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.btn-card-action:hover {
  color: #ffffff;
  text-decoration: underline;
}

.btn-delete {
  color: var(--coral-accent);
}
.btn-delete:hover {
  color: #ff9999;
}

/* Dashboard Analytics Section */
.dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
}

.chart-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  box-shadow: var(--shadow-card);
}

.chart-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chart-container {
  position: relative;
  height: 260px;
  width: 100%;
}

/* Report Section */
.report-view {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

.report-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-glass);
  flex-wrap: wrap;
  gap: 1rem;
}

.report-btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.btn-export {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-export:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--cyan-main);
  color: var(--cyan-main);
}

.report-paper {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
  max-width: 900px;
  box-sizing: border-box;
  width: 100%;
}

.report-title {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #0b2545;
  margin-bottom: 0.3rem;
  border-bottom: 2px solid #0b2545;
  padding-bottom: 0.5rem;
}

.report-meta {
  text-align: right;
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 1.5rem;
}

.report-summary-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  background: #f0f4f8;
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  text-align: center;
}

.report-summary-lbl {
  font-size: 0.8rem;
  color: #555555;
  margin-bottom: 2px;
}

.report-summary-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0b2545;
}

.report-summary-val.gold {
  color: #d97706;
}

.report-table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.report-table th {
  background: #0b2545;
  color: #ffffff;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  text-align: left;
  white-space: nowrap;
}

.report-table td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.85rem;
}

.report-table tr:nth-child(even) {
  background: #f8f9fa;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 8, 14, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  box-sizing: border-box;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #0e1e30;
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px var(--cyan-glow);
  padding: 1.8rem;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border-glass);
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cyan-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
}

.btn-close-modal:hover {
  color: var(--coral-accent);
}

/* Form Styles */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-full {
  grid-column: span 2;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.report-toggle-label {
  font-size: 0.74rem;
  color: var(--cyan-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  user-select: none;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.report-toggle-label:hover {
  opacity: 1;
}

.report-toggle-cb {
  accent-color: var(--cyan-main);
  cursor: pointer;
  width: 14px;
  height: 14px;
}

.form-control {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-size: 0.95rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--cyan-main);
  box-shadow: 0 0 8px var(--cyan-glow);
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.radio-toggle-group {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  width: 100%;
  box-sizing: border-box;
}

.radio-toggle-btn {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.radio-toggle-btn.active-boat {
  background: var(--badge-boat-bg);
  color: #70a6ff;
  border: 1px solid var(--badge-boat-border);
}

.radio-toggle-btn.active-shore {
  background: var(--badge-shore-bg);
  color: #52b788;
  border: 1px solid var(--badge-shore-border);
}

.img-preview-box {
  width: 100%;
  min-height: 120px;
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
  cursor: pointer;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.img-preview-box:hover {
  border-color: var(--cyan-main);
}

.img-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  width: 100%;
  align-items: center;
}

.preview-thumb-item {
  position: relative;
  width: 125px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-cyan);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  background: rgba(8, 20, 34, 0.8);
  display: flex;
  flex-direction: column;
}

.preview-thumb-img-wrap {
  position: relative;
  width: 100%;
  height: 80px;
}

.preview-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-caption-input {
  width: 100%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #00f2fe;
  font-size: 0.73rem;
  padding: 4px 6px;
  box-sizing: border-box;
  text-align: center;
  border-top: 1px solid rgba(0, 242, 254, 0.2);
  outline: none;
}

.preview-caption-input:focus {
  background: rgba(0, 242, 254, 0.15);
  color: #ffffff;
}

.badge-hero-photo {
  position: absolute;
  top: 3px;
  left: 3px;
  background: rgba(255, 209, 102, 0.95);
  color: #070f18;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  z-index: 5;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

.preview-reorder-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  padding: 2px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-move-photo {
  background: transparent;
  border: none;
  color: var(--cyan-main);
  font-size: 0.76rem;
  font-weight: bold;
  cursor: pointer;
  padding: 1px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.btn-move-photo:hover {
  background: rgba(0, 242, 254, 0.25);
  color: #ffffff;
}

.btn-remove-photo {
  position: absolute;
  top: 3px;
  right: 3px;
  background: rgba(230, 57, 70, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  z-index: 5;
  transition: transform 0.2s;
}

.btn-remove-photo:hover {
  transform: scale(1.15);
  background: #ff4d4d;
}

/* Card Multi-Photo Grid Layouts */
.card-photo-grid {
  display: grid;
  width: 100%;
  height: 100%;
  gap: 2px;
  background: #0b1b2d;
}

.card-photo-grid.grid-count-1 { grid-template-columns: 1fr; }
.card-photo-grid.grid-count-2 { grid-template-columns: repeat(2, 1fr); }
.card-photo-grid.grid-count-3 { grid-template-columns: repeat(3, 1fr); }
.card-photo-grid.grid-count-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.card-photo-grid.grid-count-5 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }
.card-photo-grid.grid-count-6 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr); }

.card-photo-item {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.card-photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: pointer;
}

.card-photo-item img:hover {
  transform: scale(1.08);
}

/* Detail Modal Photo Gallery */
.detail-photo-gallery {
  margin-bottom: 1rem;
}

.detail-photo-main {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.detail-caption-badge {
  display: inline-block;
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-main);
  font-size: 0.84rem;
  padding: 4px 12px;
  border-radius: 14px;
  margin-top: 6px;
  font-weight: 600;
}

.detail-photo-thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-top: 0.5rem;
  padding-bottom: 4px;
}

.detail-thumb-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.detail-thumb-img.active, .detail-thumb-img:hover {
  border-color: var(--cyan-main);
  opacity: 1;
  transform: scale(1.03);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-glass);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 600;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

/* Detail Modal Specifics */
.detail-img-banner {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.detail-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--cyan-main);
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.3rem;
  margin: 1rem 0 0.6rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.8rem;
  border-radius: var(--radius-md);
}

.detail-item-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.detail-item-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ffffff;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.empty-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Print Styles */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  .app-header, .filter-section, .stats-summary-bar, .report-header-controls, .nav-tabs, .btn-add-primary {
    display: none !important;
  }
  .main-container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .report-view {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
  }
  .report-paper {
    box-shadow: none !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .app-header {
    padding: 0.6rem 1rem;
  }

  .header-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .brand {
    justify-content: center;
  }

  .nav-tabs {
    justify-content: center;
    width: 100%;
  }

  .nav-btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.4rem;
    font-size: 0.8rem;
  }

  .btn-add-primary {
    width: 100%;
    justify-content: center;
    padding: 0.7rem;
  }

  .main-container {
    padding: 0 0.8rem;
    margin: 1rem auto 2rem;
  }

  .stats-summary-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .summary-card {
    padding: 0.75rem;
    gap: 0.5rem;
  }

  .summary-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .summary-info .val {
    font-size: 1.1rem;
  }

  .summary-info .lbl {
    font-size: 0.72rem;
  }

  .filter-section {
    padding: 0.8rem;
    gap: 0.6rem;
  }

  .filter-group {
    width: 100%;
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  /* Form & Modal Mobile Fixes */
  .modal-overlay {
    padding: 0.4rem;
  }

  .modal-content {
    padding: 1.2rem 0.8rem;
    max-height: 94vh;
    border-radius: 12px;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .form-full {
    grid-column: span 1;
  }

  .form-control {
    font-size: 16px; /* Prevents auto-zoom on mobile safari/chrome */
    padding: 0.55rem 0.7rem;
  }

  .radio-toggle-group {
    flex-direction: column;
    gap: 4px;
  }

  .radio-toggle-btn {
    padding: 0.55rem 0.4rem;
    font-size: 0.82rem;
    text-align: center;
  }

  .form-actions {
    flex-direction: column-reverse;
    gap: 0.6rem;
  }

  .form-actions button {
    width: 100%;
    justify-content: center;
  }

  /* Report Section Mobile Fixes */
  .report-view {
    padding: 1rem 0.75rem;
  }

  .report-header-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
  }

  .report-header-controls h2 {
    font-size: 1.15rem;
    text-align: center;
  }

  .report-btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    width: 100%;
  }

  .btn-export {
    width: 100%;
    justify-content: center;
    padding: 0.6rem 0.4rem;
    font-size: 0.8rem;
  }

  .report-paper {
    padding: 1.2rem 0.75rem;
    border-radius: 6px;
  }

  .report-title {
    font-size: 1.2rem;
  }

  .report-meta {
    font-size: 0.75rem;
    text-align: center;
    margin-bottom: 1rem;
  }

  .report-summary-boxes {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
  }

  .report-summary-val {
    font-size: 1.15rem;
  }

  .report-table {
    min-width: 560px; /* Horizontally scrolls smoothly inside white paper */
  }

  .report-table th, .report-table td {
    padding: 0.45rem 0.4rem;
    font-size: 0.78rem;
  }
}

/* Quick Selection Chips */
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.4rem;
}

.quick-chip {
  background: rgba(0, 242, 254, 0.1);
  border: 1px solid var(--border-cyan);
  color: var(--cyan-main);
  font-size: 0.76rem;
  padding: 2px 8px;
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quick-chip:hover {
  background: var(--cyan-main);
  color: #070f18;
  transform: translateY(-1px);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.quick-chip.preset-tag {
  border-color: rgba(255, 209, 102, 0.4);
  color: var(--gold-accent);
  background: rgba(255, 209, 102, 0.1);
}

.quick-chip.preset-tag:hover {
  background: var(--gold-accent);
  color: #070f18;
}

/* Preset Management View */
.presets-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.preset-card {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
}

.preset-card h3 {
  font-size: 1.2rem;
  color: var(--cyan-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preset-item-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 0.85rem;
  margin: 4px;
}

.btn-del-chip {
  background: transparent;
  border: none;
  color: var(--coral-accent);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0 2px;
}

.btn-del-chip:hover {
  color: #ff9999;
}

/* Report View Mode Switcher */
.report-type-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
}

.btn-toggle-mode {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-toggle-mode.active {
  background: var(--cyan-main);
  color: #070f18;
  font-weight: 700;
  box-shadow: 0 0 10px var(--cyan-glow);
}

/* Printable Card Sheet Paper (.report-card-paper) */
.report-card-paper {
  background: #ffffff;
  color: #1a1a1a;
  padding: 2.2rem;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
  margin-bottom: 2rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  page-break-inside: avoid;
  border: 1px solid #ddd;
}

.card-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #00b4d8;
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
}

.card-paper-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0b2545;
}

.card-paper-meta {
  font-size: 0.82rem;
  color: #666;
}

.card-paper-species-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  background: #f0f8ff;
  padding: 0.8rem 1.2rem;
  border-radius: 6px;
  border-left: 4px solid #00f2fe;
}

.card-paper-species {
  font-size: 1.8rem;
  font-weight: 800;
  color: #0b1b2d;
}

.card-paper-badge {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0077b6;
  background: #e0f2fe;
  padding: 4px 12px;
  border-radius: 20px;
}

.card-paper-photo-wrap {
  width: 100%;
  margin-bottom: 1.2rem;
}

.card-paper-photo-wrap img {
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.card-paper-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.card-paper-box {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.9rem;
}

.card-paper-box-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0077b6;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #d0d0d0;
  padding-bottom: 4px;
}

.card-paper-item {
  font-size: 0.85rem;
  margin-bottom: 4px;
  line-height: 1.4;
}

.card-paper-item strong {
  color: #111;
}

/* Print Only Optimizations */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }
  header, .stats-summary-bar, .filter-section, .report-header-controls, .report-mode-bar, .modal-overlay, .presets-view, .dashboard-view, .catch-grid {
    display: none !important;
  }
  #tabReport {
    display: block !important;
    padding: 0 !important;
  }
  .report-paper, .report-card-paper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
}
