/* PresentTool™ Dashboard — App-shell chrome (v3.7.0)
   Top-nav · mobile-bar · command-palette · main-layout · empty-state */

/* ───── Topnav ───── */
.app-topnav {
  height: var(--pt-nav-h);
  background: var(--pt-surface-0);
  border-bottom: 1px solid var(--pt-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 18px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-topnav .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--pt-sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--pt-text);
  text-decoration: none;
  letter-spacing: 0;
}
.app-topnav .brand:hover { text-decoration: none; }
.app-topnav .brand .logo-dot {
  width: 16px; height: 16px;
  border-radius: 3px;
  background: url("../assets/_mark.png") no-repeat center / contain;
  flex: 0 0 auto;
}
.app-topnav .brand .wordmark sup {
  font-size: 9px;
  font-weight: 500;
  color: var(--pt-text-muted);
  margin-left: -2px;
}

.app-topnav .tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  margin-left: 12px;
}
.app-topnav .tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pt-text-muted);
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.app-topnav .tab svg { width: 15px; height: 15px; }
.app-topnav .tab:hover { background: var(--pt-surface-2); color: var(--pt-text); text-decoration: none; }
.app-topnav .tab.is-active {
  color: var(--pt-text);
  background: var(--pt-accent-soft);
}
.app-topnav .tab.is-active svg { color: var(--pt-primary); }

.app-topnav .right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.app-topnav .lang-toggle {
  font-family: var(--pt-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  border-radius: 6px;
  color: var(--pt-text-muted);
  padding: 0 7px;
  height: 28px;
}
.app-topnav .lang-toggle:hover { background: var(--pt-surface-3); color: var(--pt-text); }
.app-topnav .theme-toggle {
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
}
.app-topnav .theme-toggle:hover { background: var(--pt-surface-3); }
.app-topnav .search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  border-radius: 7px;
  padding: 6px 10px;
  font-size: 12.5px;
  color: var(--pt-text-muted);
  height: 32px;
}
.app-topnav .search-btn svg { width: 13px; height: 13px; }
.app-topnav .search-btn .hint { font-size: 12px; }
.app-topnav .search-btn kbd {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--pt-text-muted);
}
.app-topnav .search-btn:hover { background: var(--pt-surface-3); }

.app-topnav .credits-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pt-accent-soft);
  border: 1px solid var(--pt-accent-mid);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pt-primary);
  text-decoration: none;
  height: 30px;
}
.app-topnav .credits-pill svg { width: 13px; height: 13px; }
.app-topnav .credits-pill .unit { font-weight: 400; font-size: 11px; opacity: 0.7; }
.app-topnav .credits-pill:hover { background: var(--pt-accent-mid); text-decoration: none; }

.app-topnav .icon-btn,
.app-topnav .avatar {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  color: var(--pt-text);
  position: relative;
}
.app-topnav .icon-btn:hover { background: var(--pt-surface-3); }
.app-topnav .icon-btn svg { width: 15px; height: 15px; }
.app-topnav .icon-btn .bell-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: var(--pt-destructive);
  border-radius: 50%;
  border: 1.5px solid var(--pt-surface-0);
}
.app-topnav .avatar {
  background: var(--pt-primary);
  color: white;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  border-color: transparent;
  cursor: pointer;
}
.app-topnav .avatar:hover { background: #6E3610; }

/* ───── Avatar dropdown ───── */
.avatar-wrap { position: relative; }
.avatar-menu[hidden] { display: none !important; }
.avatar-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--pt-surface-0);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius-md);
  box-shadow: var(--pt-shadow-modal);
  padding: 6px;
  z-index: 60;
  animation: avatar-menu-in 0.12s ease-out;
}
@keyframes avatar-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.avatar-menu-head {
  padding: 8px 10px 10px;
  border-bottom: 1px solid var(--pt-border);
  margin-bottom: 4px;
}
.avatar-menu-head .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pt-text);
  line-height: 1.3;
  word-break: break-word;
}
.avatar-menu-head .email {
  font-size: 11.5px;
  color: var(--pt-text-muted);
  margin-top: 2px;
  word-break: break-all;
}
.avatar-menu-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--pt-text);
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.avatar-menu-row svg { width: 14px; height: 14px; color: var(--pt-text-muted); flex: 0 0 auto; }
.avatar-menu-row:hover { background: var(--pt-surface-2); text-decoration: none; }
.avatar-menu-row.danger { color: var(--pt-destructive); }
.avatar-menu-row.danger svg { color: var(--pt-destructive); }
.avatar-menu-row.danger:hover { background: rgba(176,58,46,0.08); }

/* ───── Main + Footer ───── */
.app-main {
  min-height: calc(100vh - var(--pt-nav-h));
  max-width: var(--pt-page-max);
  margin: 0 auto;
  padding: 32px 24px 80px;
}
.app-main:focus { outline: none; }

.boot-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 0;
  color: var(--pt-text-muted);
}

.view-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--pt-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* ───── Page-header (used by each view) ───── */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 28px;
  border-bottom: 1px solid var(--pt-border);
  margin-bottom: 32px;
}
.page-header .title-block .eyebrow {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pt-text-muted);
  margin-bottom: 6px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.page-header .title-block .eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--pt-primary);
}
.page-header .title-block .pt-h1 { font-size: 28px; }
.page-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ───── Mobile bottom-bar ───── */
.app-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  height: 60px;
  background: var(--pt-surface-0);
  border-top: 1px solid var(--pt-border);
  padding: 0 6px;
  justify-content: space-around;
  align-items: stretch;
}
.app-mobile-bar .mtab {
  flex: 1;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--pt-text-muted);
  text-decoration: none;
  position: relative;
}
.app-mobile-bar .mtab svg { width: 18px; height: 18px; }
.app-mobile-bar .mtab.is-active { color: var(--pt-primary); }
.app-mobile-bar .mtab.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 35%; right: 35%;
  height: 2px;
  background: var(--pt-primary);
  border-radius: 0 0 2px 2px;
}

/* ───── Command palette ───── */
.palette-overlay[hidden] { display: none !important; }
.palette-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,18,14,0.40);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 24px;
}
.palette-card {
  width: 100%;
  max-width: 560px;
  background: var(--pt-surface-0);
  border-radius: var(--pt-radius-lg);
  box-shadow: var(--pt-shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.palette-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--pt-border);
}
.palette-search svg { width: 16px; height: 16px; color: var(--pt-text-muted); }
.palette-search input {
  flex: 1;
  border: 0; outline: 0;
  font: inherit; font-size: 14.5px;
  background: transparent;
  color: var(--pt-text);
}
.palette-search .esc-pill {
  font-family: var(--pt-mono);
  font-size: 10.5px;
  background: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  color: var(--pt-text-muted);
  border-radius: 4px;
  padding: 2px 6px;
}
.palette-results {
  max-height: 60vh;
  overflow-y: auto;
}
.palette-group .head {
  font-family: var(--pt-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pt-text-muted);
  padding: 10px 14px 4px;
}
.palette-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  color: var(--pt-text);
  text-decoration: none;
  cursor: pointer;
}
.palette-row svg { width: 15px; height: 15px; color: var(--pt-text-muted); }
.palette-row:hover { background: var(--pt-surface-2); }

/* ───── Generic helpers used by multiple views ───── */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 32px 0 14px;
}
.section-head h2 {
  font-family: var(--pt-serif);
  font-weight: 500;
  font-style: italic;
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.005em;
}
.section-head .more {
  font-family: var(--pt-sans);
  font-size: 12px;
  color: var(--pt-text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-head .more:hover { color: var(--pt-text); text-decoration: none; }
.section-head .more svg { width: 11px; height: 11px; }
