:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #182230;
  --muted: #5a687a;
  --border: #dde3ec;
  --primary: #27569b;
  --primary-hover: #1d437a;
  --accent: #e8eef7;
  --green-bg: #e6f6ec;
  --green-text: #156d38;
  --amber-bg: #fff4e5;
  --amber-text: #9a5200;
  --red-bg: #fdecec;
  --red-text: #a52424;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(17, 29, 48, 0.06);
}

* { box-sizing: border-box; }

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

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

.hidden { display: none !important; }

/* Hero */
.hero {
  position: relative;
  color: #fff;
  padding: 44px 0 32px;
  overflow: hidden;
  background: #142642;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
  filter: blur(1px);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(20, 38, 66, 0.92), rgba(39, 86, 155, 0.78));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
}

.hero-sub {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 680px;
}

/* Auth Bar */
.auth-bar {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}

.auth-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-form input {
  flex: 1;
  min-width: 210px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  font-size: 0.95rem;
}

.auth-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

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

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 14px;
}

.stat-val {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-lbl {
  font-size: 0.82rem;
  opacity: 0.88;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: #ffb703;
  color: #182230;
}
.btn-primary:hover { background: #faa307; }

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

.btn-secondary {
  background: #fff;
  color: var(--text);
}
.btn-secondary:hover { background: #edf1f7; }

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.25); }

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
}

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

.tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.search-wrap input {
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  min-width: 240px;
  font-size: 0.95rem;
  background: var(--surface);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(17, 29, 48, 0.1);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--border);
}

.card-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 700;
}

.card-meta {
  font-size: 0.84rem;
  color: var(--muted);
}

.pill {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}

.pill-green { background: var(--green-bg); color: var(--green-text); }
.pill-amber { background: var(--amber-bg); color: var(--amber-text); }
.pill-red { background: var(--red-bg); color: var(--red-text); }

.card-excerpt {
  font-size: 0.9rem;
  color: #364152;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px solid #f0f3f7;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 22, 38, 0.58);
  backdrop-filter: blur(3px);
}

.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: 16px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f0f3f7;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.detail-header {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.detail-avatar {
  width: 78px;
  height: 78px;
  font-size: 1.4rem;
}

.blog-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin: 14px 0;
  white-space: pre-wrap;
}

.info-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-size: 0.94rem;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-family: inherit;
  font-size: 0.94rem;
}

.form-group textarea {
  min-height: 130px;
  resize: vertical;
}

.comments-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.comment-item {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  padding: 20px 0 36px;
}

/* Anketa a vzpomínky */
.extras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
}

.poll-group {
  margin-bottom: 14px;
}

.poll-group h4 {
  margin: 0 0 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

.poll-row {
  margin-bottom: 7px;
  font-size: 0.88rem;
}

.poll-row-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}

.poll-track {
  height: 8px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
}

.poll-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.memory-card {
  background: #f8fafc;
  border-left: 3px solid #ffb703;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.memory-author {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.panel select,
.panel input,
.panel textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.9rem;
}
