/* ═══════════════════════════════════════════════════════════════════
   Admin Portal — Additional Styles
   ─────────────────────────────────────────────────────────────────
   Extends the base design system (tokens.css, style.css) with
   admin-specific components used in the dashboard template.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Trend badges ─────────────────────────────────────────────── */
.trend-up   { color: var(--color-success); font-size: var(--text-2xs); font-weight: var(--fw-semibold); display:flex;align-items:center;gap:2px; }
.trend-down { color: var(--color-danger);  font-size: var(--text-2xs); font-weight: var(--fw-semibold); display:flex;align-items:center;gap:2px; }
.trend-neutral { color: var(--color-text-muted); font-size: var(--text-2xs); }

/* ── Schedule timeline ───────────────────────────────────────── */
.schedule-item {
  display: flex;
  gap: var(--sp-4);
  align-items: stretch;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.schedule-item:last-child { border-bottom: none; }
.schedule-item__time {
  width: 60px;
  flex-shrink: 0;
  text-align: right;
  padding-right: var(--sp-4);
}
.schedule-item__time-start { font-family: var(--font-display); font-size: var(--text-md); line-height: 1; color: var(--color-text); }
.schedule-item__time-end   { font-size: var(--text-2xs); color: var(--color-text-muted); }
.schedule-item__line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.schedule-item__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid var(--color-surface);
  box-shadow: 0 0 0 2px var(--color-primary-mist);
  flex-shrink: 0;
}
.schedule-item__dot--full    { background: var(--color-success); box-shadow: 0 0 0 2px var(--color-success-mist); }
.schedule-item__dot--warning { background: var(--color-warning); box-shadow: 0 0 0 2px var(--color-warning-mist); }
.schedule-item__dot--idle    { background: var(--color-text-muted); box-shadow: 0 0 0 2px var(--clr-light-200); }
.schedule-item__track { flex: 1; width: 2px; background: var(--color-border); margin-top: 2px; min-height: 32px; }
.schedule-item:last-child .schedule-item__track { display: none; }

.schedule-item__body { flex: 1; padding-top: 0; min-width: 0; }
.schedule-item__class-name  { font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--color-text); margin-bottom: var(--sp-1); }
.schedule-item__meta        { font-size: var(--text-xs); color: var(--color-text-muted); display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.schedule-item__meta i      { font-size: .8rem; }
.schedule-item__actions     { display: flex; align-items: center; gap: var(--sp-2); flex-shrink: 0; align-self: flex-start; }

/* ── Member list item ────────────────────────────────────────── */
.member-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--color-border);
}
.member-row:last-child { border-bottom: none; }
.member-row__info  { flex: 1; min-width: 0; }
.member-row__name  { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--color-text); }
.member-row__email { font-size: var(--text-2xs); color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Revenue mini chart ──────────────────────────────────────── */
.mini-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 40px;
}
.mini-bar-chart__bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--color-primary-mist);
  transition: background var(--t-fast);
}
.mini-bar-chart__bar:hover { background: var(--color-primary-light); }
.mini-bar-chart__bar--active { background: var(--color-primary); }

/* ── Quick-add button row ─────────────────────────────────────── */
.quick-add-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}

/* ── Admin topbar context ─────────────────────────────────────── */
.admin-topbar-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--r-pill);
  padding: var(--sp-2) var(--sp-4);
}

/* ── Admin login page ─────────────────────────────────────────── */
.admin-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
}
.admin-login__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  padding: var(--sp-10);
  width: 100%;
  max-width: 420px;
}
.admin-login__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.admin-login__logo img { height: 32px; }
.admin-login__logo span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: var(--fw-medium);
}
.admin-login__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  margin-bottom: var(--sp-2);
  text-align: center;
}
.admin-login__subtitle {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--sp-6);
}

/* ── Overrides for Admin Layout ───────────────────────────────── */
.app-shell__content .page-header {
  background-color: transparent;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0;
}

/* ── Custom Gantt Tooltip ────────────────────────────────────── */
.gantt-bar {
  position: absolute;
  border-radius: inherit;
}

.gantt-bar[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  padding: 4px 8px;
  background-color: var(--color-surface, #fff);
  color: var(--color-text, #333);
  border: 1px solid var(--color-border, #ddd);
  border-radius: 4px;
  font-size: 0.7rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  transition-delay: 0.2s;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.gantt-bar[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

/* ── Instant Tooltip ─────────────────────────────────────────── */
.instant-tooltip {
  position: relative;
  cursor: help;
}
.instant-tooltip .tooltip-text {
  visibility: hidden;
  width: max-content;
  max-width: 250px;
  background-color: var(--color-text);
  color: var(--color-surface);
  text-align: center;
  border-radius: var(--r-sm);
  padding: var(--sp-2) var(--sp-3);
  position: absolute;
  z-index: 1050;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.1s;
  font-size: var(--text-xs);
  font-weight: normal;
  pointer-events: none;
  white-space: normal;
  box-shadow: var(--shadow-sm);
}
.instant-tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--color-text) transparent transparent transparent;
}
.instant-tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}
