/* ══════════════════════════════════════════
   AVU Eduroam Portál — layout.css
   ══════════════════════════════════════════ */

:root {
  --sidebar-width: 250px;
  --navbar-height: 54px;
  --bg:       #f5f5f3;
  --surface:  #ffffff;
  --surface2: #f0f0ee;
  --border:   rgba(0, 0, 0, 0.09);
  --accent:   #3b7fa3;
  --accent2:  #7c3aed;
  --text:     #1a1a18;
  --muted:    #6b6b68;
  --danger:   #dc2626;
}

*, *::before, *::after { box-sizing: border-box; }

@font-face {
    font-family: 'avuregular';
    src: url('/assets/css/avu_regular-webfont.woff2') format('woff2'),
         url('/assets/css/avu_regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;

}

body {
  font-family: 'avuregular', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* žádná mřížka na pozadí v portálu */
body::before { display: none; }

/* ─── NAVBAR ─── */
.top-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.1rem;
  z-index: 100;
  gap: 0.75rem;
}

.nav-brand {
  font-family: 'avuregular', sans-serif;
  font-size: 1rem;
  font-weight: 100;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -0.01em;
  background: none;
  -webkit-text-fill-color: unset;
}

.nav-spacer { flex: 1; }
.nav-links { display: flex; align-items: center; gap: 2px; }

.nav-link {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: 7px;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface2); }

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  border-radius: 30px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text);
}

.nav-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  font-weight: 100;
  flex-shrink: 0;
}

.btn-logout {
  background: transparent;
  color: var(--muted) !important;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.38rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.btn-logout:hover {
  background: var(--surface2);
  border-color: rgba(0,0,0,0.18);
  color: var(--text) !important;
}

.hamburger-btn {
  background: none; border: none; cursor: pointer;
  width: 34px; height: 34px; border-radius: 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0; transition: background 0.15s; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--surface2); }
.hamburger-btn span {
  display: block; width: 18px; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, width 0.25s ease;
  transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  top: var(--navbar-height); left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--navbar-height));
  background: var(--surface);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 90;
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar.open { transform: translateX(0); }
.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.sidebar-section { padding: 1rem 0.75rem 0.4rem; }

.sidebar-label {
  font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: rgba(0,0,0,0.3);
  padding: 0 0.4rem; margin-bottom: 3px;
}

.sidebar-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.52rem 0.65rem; border-radius: 8px;
  color: var(--muted); font-size: 0.865rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.sidebar-item:hover { color: var(--text); background: var(--surface2); }
.sidebar-item.active {
  color: var(--text);
  background: var(--surface2);
  font-weight: 600;
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 22%; bottom: 22%;
  width: 2.5px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.sidebar-item i {
  width: 16px; text-align: center;
  font-size: 0.85rem; flex-shrink: 0;
  color: rgba(0,0,0,0.3);
  transition: color 0.15s;
}
.sidebar-item:hover i,
.sidebar-item.active i { color: var(--accent); }

.sidebar-badge {
  margin-left: auto;
  background: var(--text); color: var(--surface);
  font-size: 0.63rem; font-weight: 700;
  padding: 2px 6px; border-radius: 20px;
}

.sidebar-divider { height: 1px; background: var(--border); margin: 0.5rem 0.75rem; }

.sidebar-footer { margin-top: auto; padding: 0.75rem; border-top: 1px solid var(--border); }

.user-card {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0.4rem; border-radius: 8px;
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--text); color: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.8rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sidebar-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.2);
  z-index: 80;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.visible { opacity: 1; pointer-events: all; }

/* ─── MAIN ─── */
.main-wrapper {
  padding-top: var(--navbar-height);
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (min-width: 1024px) {
  .main-wrapper.sidebar-pushed { margin-left: var(--sidebar-width); }
  .sidebar-overlay { display: none !important; }
}

.main-content { padding: 2rem 1.75rem; max-width: 1000px; margin: 0 auto; }

.page-title {
  font-family: 'avuregular', sans-serif;
  font-size: 1.5rem; font-weight: 100;
  color: var(--text); margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}
.page-subtitle { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

/* ─── STATS ─── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px; margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem 1.25rem;
  transition: border-color 0.2s;
}
.stat-card:hover { border-color: rgba(42,92,230,0.25); }
.stat-label { font-size: 0.73rem; color: var(--muted); font-weight: 500; margin-bottom: 0.35rem; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-value { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.stat-delta { font-size: 0.72rem; color: #16a34a; margin-top: 0.2rem; }

/* ─── CONTENT GRID ─── */
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 768px) { .content-grid { grid-template-columns: 1fr; } }

.card-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 13px; padding: 1.25rem 1.35rem;
}
.card-box-title {
  font-weight: 100; font-size: 0.875rem;
  color: var(--text); margin-bottom: 0.9rem;
  display: flex; align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* tagy */
.tags-wrap { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.5rem; }
.group-tag {
  font-size: 0.7rem; font-weight: 600; padding: 2px 9px; border-radius: 20px;
  background: rgba(42,92,230,0.08); color: var(--accent);
  border: 1px solid rgba(42,92,230,0.15);
}

.list-row {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.845rem; color: var(--muted);
}
.list-row:last-child { border-bottom: none; }
.list-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.list-dot.purple { background: var(--accent2); }
.list-dot.green { background: #16a34a; }
.list-row-label { flex: 1; color: var(--text); }
.tag-pill {
  font-size: 0.67rem; font-weight: 600; padding: 2px 8px; border-radius: 20px;
  background: var(--surface2); color: var(--muted);
  border: 1px solid var(--border);
}
.tag-pill.green {
  background: #f0fdf4; color: #166534;
  border-color: rgba(22,101,52,0.15);
}

.profile-row {
  display: flex; gap: 0.5rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.845rem;
}
.profile-row:last-child { border-bottom: none; }
.profile-key {
  color: var(--muted); width: 105px; flex-shrink: 0;
  font-size: 0.75rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.04em;
  padding-top: 1px;
}
.profile-val { color: var(--text); }

/* ─── LOGIN ─── */
.login-body {
  font-family: 'avuregular', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* jemná mřížka jen na login stránce */
/* .login-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
} */

.login-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.781), 0 1px 4px rgba(0,0,0,0.04);
  position: relative;
}

/* tenká modrá linka nahoře */
.login-card::before {
  content: '';
  position: absolute;
  top: -1px; left: 15%; right: 15%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.brand {
  font-family: 'avuregular', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.2rem;
  background: none;
  -webkit-text-fill-color: unset;
}

.brand-sub {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 1.75rem;
}

.field label.label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.input, .input:focus {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  box-shadow: none;
  transition: border-color 0.15s;
  height: 42px;
}
.input:focus {
  border-color: var(--accent);
  outline: none;
  background: var(--surface);
}
.input::placeholder { color: rgba(0,0,0,0.25); }

.control.has-icons-left .icon,
.control.has-icons-right .icon { color: var(--muted); }

.btn-submit {
  width: 100%;
  height: 44px;
  background: var(--text);
  border: none;
  border-radius: 8px;
  color: var(--surface);
  font-family: 'avuregular', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}
.btn-submit:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); opacity: 1; }

.error-box {
  background: #fef2f2;
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--danger);
  font-size: 0.83rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.info-box {
  background: var(--bg);
  border: 1px solid rgba(31, 120, 202, 0.2);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  color: var(--accent);
  font-size: 0.83rem;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ad-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.73rem;
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.ad-note i { color: var(--accent); font-size: 0.75rem; }
