:root {
  --color-primary: #0e7c86;
  --color-accent: #a3212b;
  --color-bg: #f5f4f1;
  --color-bg-alt: #e9e7e2;
  --color-text: #1c1c1e;
  --color-muted: #6e6e73;
  --color-border: #e0ddd7;
  --color-chrome: #05202b;
  --color-chrome-text: #d6d5d2;
  --color-danger: #c9432e;
  --color-ok: #2f9e44;
  --color-warn: #e8a33d;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.5;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 15%, rgba(14,124,134,0.20), transparent 40%),
    radial-gradient(circle at 88% 8%, rgba(163,33,43,0.16), transparent 35%),
    radial-gradient(circle at 25% 85%, rgba(242,201,76,0.14), transparent 40%),
    radial-gradient(circle at 80% 75%, rgba(14,124,134,0.14), transparent 42%);
}

/* Liquid Glass dlaždice */
.glass-tile {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.10), inset 0 1px 0 rgba(255,255,255,0.7);
  position: relative;
  overflow: hidden;
}

.glass-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0) 45%);
  pointer-events: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  background: var(--color-chrome);
  color: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo-img {
  height: 38px;
  width: auto;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header nav a {
  color: var(--color-chrome-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-user {
  color: #fff;
  font-size: 0.9rem;
}

.inline-form { display: inline; }

/* Buttons */
.btn {
  display: inline-block;
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 12px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  transition: width 0.35s ease;
}

.btn:hover::before {
  width: 100%;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary::before {
  background: #ff2438;
}

.btn-primary:hover {
  box-shadow: 0 0 16px rgba(255,36,56,0.75), 0 0 36px rgba(255,36,56,0.45);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-chrome-text);
  color: #fff;
}

.btn-outline::before {
  background: rgba(255,255,255,0.15);
}

.btn-outline:hover {
  border-color: #fff;
  box-shadow: 0 0 14px rgba(255,255,255,0.35);
}

.btn-small {
  padding: 7px 16px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top left, #0e7c86, #05202b 70%);
  color: #fff;
  padding: 90px 0;
  text-align: center;
}

.hero-inner {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.hero-tagline {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #cfeceF;
}

/* Animovaná podmořská scéna v hero sekci */
.ocean-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  bottom: -30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.85), rgba(255,255,255,0.08));
  animation-name: rise;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: 0.8; }
  85% { opacity: 0.5; }
  100% { transform: translateY(-480px) scale(1.15); opacity: 0; }
}

.fish {
  position: absolute;
  width: 70px;
  z-index: 2;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.fish.fish-hidden {
  opacity: 0;
  pointer-events: none;
}

.fish-explosion-particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 5;
  animation: fish-explode 0.65s ease-out forwards;
}

@keyframes fish-explode {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

.fish svg {
  width: 100%;
  height: auto;
  display: block;
}

.fish-1 {
  top: 14%;
  opacity: 0.95;
  animation: swim-right 22s linear infinite;
}

.fish-2 {
  top: 30%;
  width: 78px;
  opacity: 0.9;
  animation: swim-left 19s linear infinite;
  animation-delay: -6s;
}

.fish-3 {
  top: 78%;
  width: 56px;
  opacity: 0.85;
  animation: swim-right 30s linear infinite;
  animation-delay: -12s;
}

.fish-4 {
  top: 46%;
  width: 42px;
  opacity: 0.9;
  animation: swim-left 14s linear infinite;
  animation-delay: -2s;
}

.fish-5 {
  top: 50%;
  width: 34px;
  opacity: 0.85;
  animation: swim-left 14s linear infinite;
  animation-delay: -3.5s;
}

@keyframes swim-right {
  0% { left: -12%; top: 14%; }
  50% { top: 10%; }
  100% { left: 106%; top: 16%; }
}

@keyframes swim-left {
  0% { left: 106%; top: 30%; transform: scaleX(-1); }
  50% { top: 26%; transform: scaleX(-1); }
  100% { left: -12%; top: 32%; transform: scaleX(-1); }
}

.hero-seahorse {
  position: absolute;
  bottom: 70px;
  width: 132px;
  z-index: 2;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.35));
  animation: bob 5s ease-in-out infinite;
}

.hero-seahorse-1 {
  left: 16%;
  width: 120px;
}

.hero-seahorse-2 {
  left: 66%;
  bottom: 110px;
  width: 90px;
  opacity: 0.85;
  animation-duration: 6.5s;
  animation-delay: -2s;
  transform: scaleX(-1);
}

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

.hero-seahorse-2 {
  animation-name: bob-flipped;
}

@keyframes bob-flipped {
  0%, 100% { transform: scaleX(-1) translateY(0) rotate(-3deg); }
  50% { transform: scaleX(-1) translateY(-10px) rotate(3deg); }
}

.reef-coral {
  position: absolute;
  bottom: -6px;
  z-index: 1;
  width: auto;
  filter: drop-shadow(0 6px 8px rgba(0,0,0,0.35));
}

@media (prefers-reduced-motion: reduce) {
  .bubble, .fish {
    animation: none;
  }
}

/* Sections */
.section {
  padding: 60px 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section h2 {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.lead-text {
  color: var(--color-muted);
  max-width: 700px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.service-card {
  padding: 22px;
}

.service-card h3 {
  margin-top: 0;
  font-weight: 600;
  color: var(--color-primary);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.gallery-item {
  height: 180px;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  color: #fff;
  font-weight: 600;
}

/* CTA */
.cta-section {
  text-align: center;
}

.cta-inner {
  max-width: 600px;
}

/* Login */
.login-section {
  display: flex;
  justify-content: center;
}

.login-box {
  padding: 40px;
  max-width: 420px;
  width: 100%;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
}

.login-form label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
}

.login-form input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 1rem;
}

.login-form button {
  margin-top: 20px;
}

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  margin-top: 16px;
  font-size: 0.9rem;
}

.alert-error {
  background: #fdecea;
  color: var(--color-danger);
}

/* Dashboard */
.dashboard-header {
  padding-bottom: 20px;
}

.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.subheading {
  margin-bottom: 20px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}

.info-card {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-label {
  font-size: 0.78rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-value {
  font-size: 1.2rem;
  font-weight: 600;
}

/* Parameter cards */
.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.param-card {
  padding: 18px;
  border-left: 5px solid #ccc;
}

.param-card.status-ok { border-left-color: var(--color-ok); }
.param-card.status-low { border-left-color: var(--color-warn); }
.param-card.status-high { border-left-color: var(--color-danger); }

.param-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.param-label {
  font-weight: 600;
  font-size: 0.9rem;
}

.status-badge {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 700;
  color: #fff;
}

.status-badge-ok { background: var(--color-ok); }
.status-badge-low { background: var(--color-warn); }
.status-badge-high { background: var(--color-danger); }

.param-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.param-unit {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-muted);
}

.param-range {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin-top: 4px;
}

.param-recommendation {
  margin-top: 10px;
  background: #fff6ea;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #7a5510;
}

/* Service log */
.service-log-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-entry {
  padding: 18px 20px;
}

.service-entry-head {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.checklist {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4px 12px;
  font-size: 0.87rem;
}

.checklist-item {
  padding-left: 22px;
  position: relative;
}

.checklist-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1px solid var(--color-muted);
}

.checklist-item.done {
  color: inherit;
}

.checklist-item.done::before {
  background: var(--color-ok);
  border-color: var(--color-ok);
}

.checklist-item.done::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 5px;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(40deg);
}

.checklist-item.skipped {
  color: var(--color-muted);
  text-decoration: line-through;
}

.service-notes {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.service-measurements {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.measurement-chip {
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--color-text);
}

.measurement-chip.chip-ok {
  background: #d9f2df;
  color: #1e6b34;
}

.measurement-chip.chip-warn {
  background: #fdedc9;
  color: #8a5a10;
}

.measurement-chip.chip-danger {
  background: #fbdad5;
  color: #a4291d;
}

/* Charts */
.chart-hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 20px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
}

.chart-card {
  padding: 18px;
}

.chart-card h4 {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--color-primary);
}

/* Life book */
.lifebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.animal-photo {
  height: 140px;
}

.animal-body {
  padding: 16px;
}

.animal-body h4 {
  margin: 0 0 4px;
}

.animal-species {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
}

.animal-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 10px 0;
  font-size: 0.85rem;
}

.animal-illnesses {
  font-size: 0.82rem;
  background: #fdecea;
  color: var(--color-danger);
  padding: 8px 10px;
  border-radius: 6px;
}

.animal-illnesses ul {
  margin: 4px 0 0;
  padding-left: 16px;
}

.animal-illnesses-none {
  background: #eaf7ec;
  color: #2f6e3f;
}

/* Fotky akvária */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.photo-image {
  height: 160px;
}

.photo-body {
  padding: 16px;
}

.photo-date {
  font-size: 0.8rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.photo-caption {
  margin: 6px 0 0;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: var(--color-chrome);
  color: var(--color-chrome-text);
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}

/* Admin */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-secondary::before {
  background: rgba(0,0,0,0.06);
}

.btn-secondary:hover {
  border-color: var(--color-primary);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-danger::before {
  background: #e05a45;
}

.empty-state {
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 20px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 640px;
  padding: 24px;
  margin-bottom: 30px;
}

.admin-form label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-top: 10px;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 1rem;
  font-family: inherit;
}

.admin-form-row {
  display: flex;
  gap: 12px;
}

.admin-form-row > * {
  flex: 1;
}

.admin-checklist-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.admin-checklist-form label {
  font-weight: 400;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
