/* v2 */
/* layout.css — Page layout, header, bottom navigation */
/* ============ Layout ============ */
.page-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-md);
  padding-top: calc(var(--header-height) + var(--spacing-md));
  overflow-x: hidden;
  animation: pageFadeIn 0.3s ease-out;
}

/* ============ Header ============ */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--header-height);
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-sm) var(--spacing-md);
  z-index: 100;
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.header__left {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.header__title {
  font-size: var(--font-size-lg);
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__subtitle {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.header__date {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
  font-weight: 500;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.header__admin,
.header__debug,
.header__theme,
.header__add-task {
  font-size: 1.2rem;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: transparent;
  text-decoration: none;
  cursor: pointer;
  line-height: 1;
  transition: all var(--transition-fast);
}

.header__admin:hover,
.header__debug:hover,
.header__theme:hover,
.header__add-task:hover {
  background: var(--bg-secondary);
  transform: scale(1.05);
}
.header__admin:active,
.header__debug:active,
.header__theme:active,
.header__add-task:active { transform: scale(0.9); background: var(--bg-tertiary, var(--bg-secondary)); }

.header__stats {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  white-space: nowrap;
}

@media (max-width: 400px) {
  .header__title { font-size: var(--font-size-base); }
  .header__subtitle {
    font-size: 9px;
    letter-spacing: 0.04em;
  }
  .header__date { font-size: 10px; }
  .header__stats { font-size: 10px; }
}

/* ============ Bottom Navigation ============ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06), 0 -1px 4px rgba(0,0,0,0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: var(--spacing-xs) var(--spacing-sm);
  min-width: 64px;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  position: relative;
}

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

.nav-item__icon {
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.nav-item__icon svg {
  width: 22px;
  height: 22px;
}

.nav-item__label {
  font-size: var(--font-size-xs);
  font-weight: 500;
}
