/* Bottom navigation — крупные иконки, интуитивная структура */

:root {
  --nav-h: 88px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 8px 6px calc(8px + var(--safe-b));
  display: flex;
  align-items: stretch;
  gap: 2px;
  background: rgba(6, 10, 20, 0.96);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--gold-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 4px 2px;
  border-radius: 14px;
  transition: color 0.2s, background 0.2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  min-width: 0;
}

.nav-item:active { transform: scale(0.96); }

.nav-icon-wrap {
  position: relative;
  width: 48px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  transition: background 0.2s, transform 0.2s;
}

.nav-icon {
  font-size: 28px;
  line-height: 1;
  display: block;
}

.nav-label {
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.nav-item.active {
  color: var(--gold);
}

.nav-item.active .nav-icon-wrap {
  background: var(--gold-soft);
  box-shadow: 0 0 0 1px var(--gold-border);
}

.nav-item.active .nav-icon {
  transform: scale(1.05);
}

.nav-badge {
  position: absolute;
  top: 2px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(6, 10, 20, 0.9);
}

.nav-badge.warn { background: var(--warning); color: #1a1200; }
.nav-badge.ok { background: var(--success); color: #061018; }
.nav-badge.no { background: var(--danger); color: #fff; }

.nav-item.admin-only { display: none; }
body.is-admin .nav-item.admin-only { display: flex; }

/* Topbar */
.topbar {
  padding: 12px 16px 10px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 10, 20, 0.5);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar-brand .brand-logo {
  width: 40px;
  height: 40px;
}

.topbar-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.topbar-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.4;
}

.topbar-sub.live { color: var(--gold); font-weight: 600; }

.topbar-action .btn-sm {
  margin-top: 2px;
  white-space: nowrap;
}

/* Страницы без дублирующих заголовков */
.page-head { display: none; }

/* Hero на Сегодня */
.today-hero {
  background: linear-gradient(135deg, var(--gold-soft), rgba(10, 22, 40, 0.9));
  border: 1px solid var(--gold-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.today-hero h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}

.today-hero .hero-time {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.today-hero-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.today-hero-actions .btn-primary,
.today-hero-actions .btn-sm {
  flex: 1;
  margin: 0;
}

.today-slot.is-next {
  border-color: var(--gold-border);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.today-slot.is-past { opacity: 0.65; }

.today-mark-btn {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  font-size: 14px;
}

.fab-today {
  position: fixed;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  right: 16px;
  z-index: 90;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gold), #2a9d8f);
  color: #061018;
  border: none;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(78, 205, 196, 0.4);
  cursor: pointer;
  display: none;
}

.fab-today.visible { display: block; }

/* Профиль — сетка инструментов */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.tool-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.tool-tile:active {
  border-color: var(--gold-border);
  background: var(--gold-soft);
}

.tool-tile .tile-icon { font-size: 32px; line-height: 1; }

@media (min-width: 768px) {
  .bottom-nav {
    max-width: 760px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 22px 22px 0 0;
    padding-left: 12px;
    padding-right: 12px;
  }
  .nav-icon { font-size: 30px; }
  .nav-label { font-size: 11px; }
}
