:root {
  --bg: #f5f0e6;
  --surface: #ffffff;
  --text: #1a2233;
  --muted: #5c677d;
  --border: #dbe1ec;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 24px;
  --font: "Segoe UI", system-ui, sans-serif;
  --red: #e74c5a;
  --blue: #3b82f6;
  --green: #22c55e;
  --cyan: #06b6d4;
  --yellow: #f59e0b;
  --purple: #8b5cf6;
  --orange: #f97316;
  --pink: #ffb6c1;
  --light-blue: #87ceeb;
  --light-green: #90ee90;
  --light-cyan: #e0ffff;
  --beige: #f5deb3;
  --light-purple: #d8bfd8;
  --light-orange: #ffdab9;
}

[data-theme="dark"] {
  --bg: #0f1524;
  --surface: #171f31;
  --text: #eef2ff;
  --muted: #9aa7c0;
  --border: #2a3550;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f5f0e6"/></svg>');
}
a { color: inherit; }
img { max-width: 100%; display: block; }

.page { max-width: 1100px; margin: 0 auto; padding: 1rem; }

.hero {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: none;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
  z-index: -1;
}
.brand h1 { margin: 0; font-size: 2rem; font-weight: 800; }
.brand h1 a { text-decoration: none; background: linear-gradient(135deg, #ff6b35 0%, #f75c03 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.brand p { margin: .25rem 0 0; color: var(--muted); font-size: .95rem; }

.search label { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.search-row { display: flex; gap: .5rem; margin-top: .25rem; }
.search-row input {
  flex: 1;
  border: 2px solid #e0d5c5;
  border-radius: 12px;
  padding: .75rem 1rem;
  background: #fff9f0;
  color: var(--text);
  font-size: 1rem;
}
.search-row button, .btn-primary, .btn-secondary, .btn-outline, .hippo {
  border: 0;
  border-radius: 12px;
  padding: .75rem 1.25rem;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.search-row button:hover, .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.search-row button, .btn-primary { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: white; }
.btn-secondary { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%); color: var(--text); }
.btn-outline { background: transparent; border: 2px solid #e0d5c5; color: var(--text); }
.hippo { width: 100%; background: var(--purple); color: white; margin-top: .75rem; }

.search-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.search-tags span {
  font-size: .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .15rem .55rem;
  color: var(--muted);
}

.user-panel { min-width: 180px; background: white; padding: 1rem; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.user-top { display: flex; gap: .75rem; align-items: center; }
.avatar {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  background-size: cover; background-position: center;
  object-fit: cover;
}
.avatar.sm { width: 32px; height: 32px; border-radius: 8px; }
img.avatar {
  background: transparent;
}
.user-actions { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; flex-direction: column; }
.user-actions .btn-primary { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.user-actions .btn-secondary { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%); }
.notif-wrap { position: relative; margin-top: .5rem; }
.notif-dropdown {
  position: absolute; right: 0; top: 110%;
  width: 280px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: .5rem; z-index: 20;
}
.notif-item { padding: .5rem; border-bottom: 1px solid var(--border); font-size: .9rem; }
.notif-item.unread { background: rgba(59,130,246,.08); }

/* NOVÉ - CEDULKY V NAVIGACI */
.signs {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin: 24px 6px 18px;
}

.signs-rektorat {
  display: flex; /* Použijeme flex pro menší podnavigaci */
  flex-wrap: wrap; /* Aby se cedulky zalomily, pokud se nevejdou */
  gap: .5rem;
  margin-top: -.5rem;
}

.signs-rektorat .sign {
  grid-column: unset; /* Odstraníme grid omezení pro podnavigaci */
  padding: 10px 12px 16px; /* Menší padding pro podnavigaci */
  font-size: .9rem; /* Menší font */
}

.sign {
  text-decoration: none;
  font-weight: 800;
  color: #1a1a1a;
  background: #fff;
  padding: 14px 10px 20px;
  text-align: center;
  border-radius: 14px;
  box-shadow: 0 18px 34px rgba(20, 26, 40, 0.12);
  transform: rotate(-1deg);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sign::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 6px;
  height: 18px;
  background: #cfa975;
  transform: translateX(-50%);
  border-radius: 10px;
  box-shadow: inset 0 0 0 2px #ad7f49;
}

.sign:hover {
  transform: translateY(-4px) rotate(1deg);
  box-shadow: 0 16px 26px rgba(20, 26, 40, 0.16);
}

.s-rektorat { background: #fff1f1; border: 2px solid #FFD1DC; }
.s-fakulty { background: #f1f6ff; border: 2px solid #ADD8E6; }
.s-kurzy { background: #f1fff5; border: 2px solid #B2FBA5; }
.s-rozvrh { background: #f1fbff; border: 2px solid #ADD8E6; }
.s-nauctura { background: #fff7e8; border: 2px solid #FFFACD; }
.s-vypisky { background: #f7f1ff; border: 2px solid #C3B1E1; }
.s-doucovani { background: #fff2e8; border: 2px solid #FFDAB9; }

.layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}
.main-col, .side-col { display: flex; flex-direction: column; gap: 1rem; }

.feature, .panel, .catalog, .schedule, .stats, .birthdays, .mini-calendar, .activity, .testimonial {
  background: var(--surface);
  border: none;
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.feature { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; align-items: center; }
.feature h2 { margin: 0 0 .35rem; }
.feature .muted, .muted { color: var(--muted); }
.feature-media .poster {
  min-height: 140px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59,130,246,.25), rgba(139,92,246,.25));
}
.link { color: var(--blue); font-weight: 600; }

.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.panel h3, .catalog h3, .schedule h3 { margin-top: 0; }
.note-list { margin: 0; padding-left: 1.1rem; }
.catalog-list, .schedule-grid { display: grid; gap: .5rem; }
.catalog-item, .schedule-item {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 12px;
}

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: .85rem; }

.mini-calendar { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; text-align: center; }
.day b { display: block; font-size: 1.3rem; }
.day i { display: block; font-size: .75rem; color: var(--muted); }

.activity-head, .activity-row {
  display: flex; justify-content: space-between; gap: .5rem;
  font-size: .9rem; padding: .35rem 0;
}
.activity-head { color: var(--muted); border-bottom: 1px solid var(--border); }

.pill-grid { display: flex; flex-wrap: wrap; gap: .35rem; }
.pill-grid span {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px; padding: .25rem .6rem; font-size: .85rem;
}

.question-form label { display: block; margin: .65rem 0 .25rem; font-weight: 600; }
.question-form input, .question-form select, .question-form textarea, .auth-form input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: .65rem .75rem; background: var(--bg); color: var(--text);
}
.question-form textarea { min-height: 120px; resize: vertical; }

.footer {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin: 1.5rem 0 .5rem; color: var(--muted); font-size: .9rem;
}
.footer a { text-decoration: none; }

.flash { padding: .75rem 1rem; border-radius: 12px; margin: .75rem 0; }
.flash.success { background: rgba(34,197,94,.15); }
.flash.error { background: rgba(231,76,90,.15); }

.badge {
  display: inline-block; font-size: .72rem; padding: .1rem .45rem;
  border-radius: 999px; background: var(--bg); border: 1px solid var(--border);
}

/* NFP protokoly */
.nfp {
  display: grid;
  grid-template-columns: 36px 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}
.nfp-stripe {
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: white;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .5rem;
}
.nfp[data-color="green"] .nfp-stripe { background: #22c55e; }
.nfp[data-color="red"] .nfp-stripe { background: #ef4444; }
.nfp[data-color="orange"] .nfp-stripe { background: #f59e0b; }
.nfp[data-color="purple"] .nfp-stripe { background: #8b5cf6; }
.nfp[data-color="blue"] .nfp-stripe { background: #3b82f6; }
.nfp[data-color="gray"] .nfp-stripe { background: #64748b; }
.nfp-body { padding: 1rem; }
.nfp-head {
  margin-bottom: .75rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  flex-wrap: wrap;
}
.nfp-user {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-shrink: 0;
}
.nfp-header-right {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}
.nfp-desc {
  margin: 0;
  font-weight: 600;
}
.nfp-time {
  color: var(--muted);
  font-size: .82rem;
  cursor: help;
}
.nfp-toggle {
  flex-shrink: 0;
  padding: .25rem .5rem;
  border-radius: 6px;
}
.nfp-diff {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-top: .75rem;
}
.nfp-diff-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .75rem;
}
.nfp-diff-box h4 {
  margin: 0 0 .5rem;
  font-size: .85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.nfp-diff pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem;
  overflow: auto;
  font-size: .78rem;
  margin: 0;
  white-space: pre-wrap;
}
.nfp-diff pre.empty-value {
  color: var(--muted);
  font-style: italic;
}
.nfp-diff pre.filled-value {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
  color: #166534;
  font-weight: 700;
}
.nfp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--muted);
  font-size: .82rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.nfp-link {
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}
.nfp-link:hover {
  text-decoration: underline;
}

/* Kompaktní NFP */
.nfp-compact {
  margin: .5rem 0;
  border-radius: 12px;
}
.nfp-compact .nfp-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 0;
}
.nfp-compact .nfp-user {
  flex-shrink: 0;
}
.nfp-compact .nfp-header-right {
  flex-grow: 1;
}
.nfp-compact .nfp-desc {
  margin: 0 0 .25rem;
}
.nfp-compact .nfp-time {
  font-size: .78rem;
}
.nfp-compact .nfp-toggle {
  padding: .25rem .5rem;
  font-size: .8rem;
  border-radius: 6px;
}
.hidden {
  display: none;
}
.btn-sm {
  padding: .35rem .7rem;
  font-size: .85rem;
}


.auth-box {
  max-width: 420px; margin: 2rem auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.auth-form label { display: block; margin: .65rem 0 .25rem; }
.theme-toggle {
  position: fixed; bottom: 1rem; right: 1rem;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: 999px; padding: .5rem .85rem; cursor: pointer;
}

.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { border-bottom: 1px solid var(--border); padding: .55rem; text-align: left; }

/* Naučtura - články */
.article-header { margin-bottom: 1.5rem; }
.article-header h2 { margin: 0 0 .75rem; }
.article-meta { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.article-author { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.article-status { background: var(--blue); color: white; }
.laurel-points { background: var(--yellow); color: var(--text); }
.article-body { font-size: 1.05rem; line-height: 1.7; }
.article-body h1, .article-body h2, .article-body h3 { margin-top: 1.5rem; margin-bottom: .5rem; }
.article-body p { margin: .75rem 0; }
.article-source { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.article-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0; padding: 1rem; background: var(--bg); border-radius: 12px; }

.article-filters .status-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.article-filters .badge { cursor: pointer; transition: all .2s; }
.article-filters .badge:hover { opacity: .8; }
.article-filters .badge.active { background: var(--blue); color: white; border-color: var(--blue); }

.catalog-item-main { display: flex; flex-direction: column; gap: .25rem; }
.catalog-item-meta { display: flex; align-items: center; }

.form-actions { display: flex; gap: .5rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  background: var(--surface);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}
.cookie-buttons {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}
.cookie-buttons .btn-primary {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
}
.cookie-buttons .btn-secondary {
  background: transparent;
  border: 2px solid var(--border);
}
.cookie-buttons .btn-outline {
  background: transparent;
}
