/* The client site's own styles (analytics.marketian.net), on top of panel.css.
   Linked from templates/portal/_head.html. Nothing here changes a class the back office uses. */

/* --- Sidebar and account menu: "Sign out" is a button (a form post), made to look like the links */
.side-nav form, .menu form { margin: 0; }
.side-nav button {
  display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 12px;
  border: 0; border-radius: 8px; background: none; color: var(--muted);
  font: inherit; font-weight: 550; text-align: left; cursor: pointer;
}
.side-nav button svg { width: 16px; height: 16px; }
.side-nav button:hover { background: var(--surface); color: var(--text); }
.nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu button {
  display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 7px; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
}
.menu button:hover { background: var(--surface); }

/* --- Date range: "Custom" opens a small box with two dates ------------------- */
.range-custom { position: relative; }
.range-custom summary {
  list-style: none; padding: 6px 12px; border-radius: 7px; color: var(--muted);
  font-weight: 550; white-space: nowrap; cursor: pointer; user-select: none;
}
.range-custom summary::-webkit-details-marker { display: none; }
.range-custom summary:hover { color: var(--text); }
.range-custom summary.active { background: var(--primary-soft); color: var(--primary); }
.range .range-dates {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 15; width: 240px;
  display: grid; gap: 10px; padding: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(14, 26, 54, 0.12);
}
.range-dates label { display: grid; gap: 4px; }
.range-dates label span { font-size: 12px; font-weight: 600; color: var(--muted); }
.range .range-dates button, .range .range-dates button:hover {
  height: 36px; padding: 0 14px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 600; text-align: center;
}
.range .range-dates button:hover { background: var(--primary-dark); }

/* --- Reports of one service, side by side ------------------------------------ */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs a { padding: 8px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 550; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { border-bottom-color: var(--primary); color: var(--primary); }

/* --- Report table ------------------------------------------------------------- */
.table th a { display: inline-block; }
.table th a:hover { color: var(--text); text-decoration: none; }
.table th[aria-sort] a { color: var(--primary); }
.unit { margin-left: 1px; color: var(--muted); font-size: 12px; font-weight: 550; }
.cell-link { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.table-foot { padding: 12px 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.empty strong { display: block; margin-bottom: 4px; color: var(--text); font-size: 15px; }

/* --- Profile -------------------------------------------------------------------- */
.narrow { max-width: 560px; }
.notice p + p { margin-top: 4px; }

@media (max-width: 900px) {
  .table-foot { padding: 10px 14px; }
}

@media (max-width: 560px) {
  .page-head .actions { width: 100%; }
  .range-custom { flex: 1; text-align: center; }
  .range .range-dates { text-align: left; width: min(240px, calc(100vw - 48px)); }
}
