/* ============================================================================
   Legacy bridge — maps existing markup class names onto the new design tokens.
   The Claude Design output (tokens/base/app.css) is kept pristine; this file
   adapts the app's current HTML structure to it so we can re-skin screen by
   screen without rewriting every view at once. Load LAST.
   ========================================================================= */

/* Page shell used by report form / show / index / item views */
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

/* Branded page header block */
.header {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
}
.ippra-logo h1 {
  color: var(--brand);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-1);
  text-transform: uppercase;
  letter-spacing: var(--heading-tracking);
}
.ippra-logo .subtitle {
  color: var(--brand);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--tracking-caps);
  margin-bottom: var(--space-2);
  display: block;
}
.header > p { color: var(--text-muted); font-size: var(--text-sm); }

/* Team-member bar at the top of the report form */
.meeting-info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.meeting-info .form-group:last-child { margin-bottom: 0; }
.form-group.full-width { width: 100%; }

/* Small helper/optional text */
.form-text {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.optional, .form-label .optional { color: var(--text-muted); font-weight: var(--weight-normal); }
.helper-text { font-size: var(--text-xs); color: var(--text-muted); margin-top: var(--space-1); }

/* Item date range row */
.date-fields-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

/* Form action row (save buttons) */
.form-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.actions-bar { display: flex; gap: var(--space-3); justify-content: center; margin-bottom: var(--space-5); flex-wrap: wrap; }

/* Outline button variant used by item "Remove" controls */
.btn-outline { background: transparent; color: var(--brand); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--brand-tint); color: var(--brand-dark); text-decoration: none; }

/* Auth card centering (sign-in uses .auth-container without the new .auth-shell) */
.auth-container { margin: var(--space-12) auto; }

/* Info tooltip (header "i" markers across reports/admin views) */
.info-tooltip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: var(--radius-pill);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: bold;
  cursor: help; vertical-align: middle; font-style: normal; position: relative; margin-left: 4px;
}
.info-tooltip:hover::after {
  content: attr(title);
  position: absolute; left: 50%; transform: translateX(-50%); top: 24px;
  background: var(--text-heading); color: #fff;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--text-xs); font-weight: var(--weight-normal);
  white-space: normal; width: 260px; text-align: left;
  z-index: 1001; box-shadow: var(--shadow-md); line-height: 1.4;
}

/* Compact inline filter row used in admin table headers */
.inline-filters { display: flex; gap: var(--space-3); align-items: center; flex-wrap: wrap; }
.inline-filters .form-control { width: auto; min-width: 150px; }

/* Report form sticky actions — floating buttons, no full-width bar behind them.
   The container ignores pointer events so the empty space around the buttons
   doesn't block the form content scrolling underneath. */
.form-footer {
  position: sticky;
  bottom: var(--space-5);
  z-index: 50;
  display: flex;
  gap: var(--space-3);
  justify-content: center;
  align-items: center;
  margin: var(--space-8) 0 0;
  padding: 0;
  background: none;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
  pointer-events: none;
}
.form-footer .btn { pointer-events: auto; }
.form-footer .btn-secondary { box-shadow: var(--shadow-md); }
/* Prominent green primary save — catches the eye against the crimson/cream UI */
.form-footer .btn-save {
  background-color: var(--success);
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--success) 45%, transparent);
}
.form-footer .btn-save:hover {
  background-color: var(--success-dark);
  color: #fff;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--success) 55%, transparent);
  transform: translateY(-1px);
}

/* Site footer — anchors the bottom of every page with breathing room */
.site-footer {
  margin-top: var(--space-16);
  background: var(--brand-darker);
  color: var(--on-brand-dim);
}
.site-footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.footer-brand strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  font-size: var(--text-md);
  color: var(--brand-contrast);
  letter-spacing: 0.02em;
}
.footer-brand span, .footer-brand .footer-link { font-size: var(--text-sm); color: var(--on-brand-dim); }
.footer-brand .footer-link { text-decoration: none; }
.footer-brand .footer-link:hover { color: var(--brand-contrast); text-decoration: underline; }
.footer-meta { font-size: var(--text-sm); color: var(--on-brand-dim); margin: 0; }

@media (max-width: 768px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
    padding: var(--space-10) var(--space-5);
  }
}
