/* Manny's private analytics page (manny.php). Builds on branch.css. */

.manny-page { min-height: 100vh; background: #303537; }
.manny-page .accent { color: #ff9800; }
.manny-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logout-form { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.manny-button { font: 500 16px "Cabin", sans-serif; color: #303537; background: #ff9800; border: 1px solid #ff9800; border-radius: 4px; padding: 10px 22px; cursor: pointer; transition: background .18s ease, color .18s ease; }
.manny-button:hover { background: #ffad33; }
.manny-button.ghost { background: transparent; color: #ececeb; border-color: #ffffff40; padding: 6px 14px; font-size: 14px; }
.manny-button.ghost:hover { border-color: #ff9800; color: #ff9800; }
.manny-button:focus-visible, .pin-form input:focus-visible, .visitor summary:focus-visible { outline: 2px solid #ff9800; outline-offset: 4px; }

/* Login */
.manny-login { max-width: 460px; padding: 96px 0 120px; }
.manny-login h1 { font-weight: 400; font-size: 28px; margin: 0 0 8px; }
.pin-form { display: flex; gap: 12px; margin-top: 28px; }
.pin-form input { width: 11ch; font: 24px/1 "Ubuntu Mono", monospace; letter-spacing: 6px; color: #ececeb; background: #262a2b; border: 1px solid #ffffff30; border-radius: 4px; padding: 10px 14px; }
.manny-error, .manny-notice, .manny-warning { margin: 20px 0 0; padding: 10px 14px; border-radius: 4px; font-size: 15px; }
.manny-error { background: #ff980020; border-left: 3px solid #ff9800; }
.manny-notice { background: #ffffff10; border-left: 3px solid #b7bbbb; }
.manny-warning { background: #ffffff08; color: #b7bbbb; font-size: 14px; }

/* Dashboard */
.manny-header { padding: 56px 0 32px; }
.manny-header h1 { font-weight: 400; font-size: 28px; margin: 0 0 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: #ffffff0a; border: 1px solid #ffffff18; border-radius: 6px; }
.stat-value { font-size: 34px; line-height: 1.1; color: #ff9800; }
.stat-label { font-size: 14px; line-height: 1.4; color: #c5c8c8; }
.manny-note { margin: 14px 0 0; }

.manny-panel { margin-top: 40px; padding-top: 28px; border-top: 1px solid #ffffff20; }
.manny-panel h2 { font-size: 22px; margin: 0 0 18px; }
.manny-panel h2 .aside { margin-left: 10px; }
.manny-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 48px; }

.day-chart { display: block; width: 100%; height: auto; max-height: 240px; }
.day-hit { fill: transparent; }
.day-bar { fill: #ff9800b3; }
.day-bar.today { fill: #ff9800; }
.day-chart g:hover .day-bar { fill: #ffc266; }
.day-chart g:hover .day-hit { fill: #ffffff0a; }
.day-label { fill: #b7bbbb; font: 9px "Ubuntu Mono", monospace; text-anchor: middle; }

.page-list, .recent-list, .visit-times { list-style: none; margin: 0; padding: 0; }
.page-list li { display: grid; grid-template-columns: minmax(0, 1fr) 90px 48px; align-items: center; gap: 12px; padding: 6px 0; }
.page-list meter { width: 100%; height: 8px; }
.num { font-family: "Ubuntu Mono", monospace; text-align: right; }

.recent-list { max-height: 420px; overflow-y: auto; }
.recent-list li { display: grid; grid-template-columns: 96px 100px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-bottom: 1px solid #ffffff10; font-size: 15px; }
.recent-list time, .visit-times time { font-family: "Ubuntu Mono", monospace; color: #c5c8c8; }
.where { color: #b7bbbb; }

.visitor-head, .visitor summary { display: grid; grid-template-columns: minmax(0, 1.4fr) 70px minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.visitor-head { padding: 0 14px 8px 34px; font: 13px "Ubuntu Mono", monospace; color: #b7bbbb; }
.visitor { border-top: 1px solid #ffffff12; }
.visitor summary { position: relative; padding: 10px 14px 10px 34px; cursor: pointer; list-style: none; font-size: 15px; }
.visitor summary::-webkit-details-marker { display: none; }
.visitor summary::before { content: "▸"; position: absolute; left: 12px; color: #ff9800; transition: transform .15s ease; }
.visitor[open] summary::before { transform: rotate(90deg); }
.visitor summary:hover { background: #ffffff08; }
.visitor summary .num { text-align: left; }
.visitor code { font-family: "Ubuntu Mono", monospace; color: #b7bbbb; font-size: 13px; }
.visitor > .aside, .visit-times { margin: 0 0 14px 34px; }
.visit-times { max-height: 260px; overflow-y: auto; }
.visit-times li { padding: 3px 0; font-size: 14px; }
.visit-times .where { margin-left: 10px; }

@media (max-width: 820px) {
  .manny-columns { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .branch-shell { padding: 28px 20px; }
  .visitor-head { display: none; }
  .visitor summary { grid-template-columns: 1fr auto; row-gap: 2px; }
  .visitor summary span:nth-child(3), .visitor summary span:nth-child(4) { font-size: 13px; color: #b7bbbb; }
  .recent-list li { grid-template-columns: 80px 1fr; }
  .recent-list .where { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .visitor summary::before { transition: none; } }

/* Locations */
.loc { color: #c5c8c8; font-size: 13px; }
.recent-list .loc { grid-column: 2 / -1; margin-top: -4px; }
.visitor summary .loc { font-size: 12px; }
.visit-times .loc { margin-left: 10px; }
.where-columns { gap: 0 48px; }
.where-heading { margin: 0 0 8px; font-size: 15px; font-family: "Ubuntu Mono", monospace; color: #b7bbbb; }
.place-list { list-style: none; margin: 0 0 12px; padding: 0; max-height: 420px; overflow-y: auto; }
.place-list li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px solid #ffffff10; font-size: 15px; }
.manny-panel code { font-family: "Ubuntu Mono", monospace; }
.manny-footer { margin: 48px 0 0; padding-top: 18px; border-top: 1px solid #ffffff20; }
