/* ============================================================================
   Evotic — Home page + bottom nav + drawers (Phase 7.5 batch B)
   ============================================================================ */

.home-body {
  padding: 0;
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
}

/* ───── Top app header ───── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}
.app-header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
}
.app-header-logo {
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.app-header-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.app-header-name {
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}
.app-header-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.05em;
}
.app-header-env {
  padding: 4px 10px;
  background: var(--green-bg);
  color: var(--green);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  border: none;
}

/* ───── Home shell ───── */
.home-shell {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.home-welcome {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-welcome h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}
.home-welcome p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}
.home-welcome code {
  font-size: 11px;
  background: var(--skeleton);
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.section-title i { color: var(--primary); font-size: 12px; }

/* ───── Quick actions grid ───── */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  background: var(--card-bg);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast), box-shadow var(--t-base);
}
.quick-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.quick-tile:active { transform: scale(0.96); }
.quick-tile-ic {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.quick-tile-label {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
}

/* ───── Push section (override style.css to fit card style) ───── */
.push-section {
  padding: 16px;
}
.push-section .section-title { margin-bottom: 8px; }
.push-section .hint {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.push-section .push-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.push-section .push-actions .btn {
  width: auto;
  padding: 8px 14px;
  font-size: 13px;
}

.home-footer {
  text-align: center;
  margin: 8px 0 0;
}
.diag-hint {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}
.diag-hint a { color: var(--text-faint); }

/* ============================================================================
   Bottom nav (sticky, 4 items + FAB central)
   ============================================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding-bottom: var(--safe-bottom);
}
.nav-items {
  max-width: var(--max-w);
  margin: 0 auto;
  height: var(--bottom-nav-h);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  position: relative;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: transparent;
  border: none;
  margin: 0;
  padding: 6px 4px;
  text-decoration: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: var(--font);
  height: var(--bottom-nav-h);
  transition: color var(--t-fast);
  border-radius: 0;
}
.nav-btn:hover, .nav-btn:active { background: transparent; color: var(--primary); }
.nav-icon { font-size: 18px; }
.nav-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.02em; }

.nav-fab {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--primary-grad);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transform: translateY(-14px);
  transition: transform var(--t-fast);
}
.nav-fab:hover { transform: translateY(-16px); }
.nav-fab:active { transform: translateY(-12px) scale(0.94); }

/* ============================================================================
   Drawer (bottom sheet)
   ============================================================================ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-base), visibility var(--t-base);
}
.drawer.open {
  visibility: visible;
  opacity: 1;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.drawer-card {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: var(--r-2xl) var(--r-2xl) 0 0;
  padding: 12px 18px max(20px, calc(var(--safe-bottom) + 20px));
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--t-slow);
}
.drawer.open .drawer-card { transform: translateY(0); }
.drawer-handle {
  width: 44px; height: 5px;
  border-radius: var(--r-pill);
  background: var(--text-faint);
  margin: 0 auto 12px;
}
.drawer-title {
  font-size: 17px;
  font-weight: 900;
  color: var(--text);
  margin: 0 0 14px;
}
.drawer-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 12px;
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: none;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background var(--t-fast);
}
.drawer-item i {
  width: 24px;
  text-align: center;
  color: var(--primary);
  font-size: 16px;
}
.drawer-item:hover, .drawer-item:active { background: var(--skeleton); }
.drawer-logout { color: var(--red); margin-top: 8px; border-top: 1px solid var(--border); padding-top: 18px; }
.drawer-logout i { color: var(--red); }
