/*
  Assessor dashboard styling — desktop, content-dense.
  Per Assessor Dashboard design spec §3 / §5 / §6.
  Loaded after app.css.
*/

body { background: var(--ea-surface); }

.ea-topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ea-navy);
  color: white;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 32px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}
.ea-topbar-brand {
  font-size: 18px;
  font-weight: 600;
  color: white;
  text-decoration: none;
  white-space: nowrap;
}
.ea-topbar-brand .console {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}
.ea-tabs {
  display: flex;
  gap: 24px;
  flex: 1;
}
.ea-tab {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 14px;
  padding: 8px 4px;
  border-bottom: 2px solid transparent;
}
.ea-tab.active { color: white; border-bottom-color: white; }
.ea-tab .badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 999px;
  margin-left: 4px;
  font-weight: 600;
}
.ea-topbar-right { display: flex; gap: 16px; align-items: center; }
.ea-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--ea-accent); color: white;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
}

.ea-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px;
}

.ea-page-title {
  font-size: 24px; font-weight: 600; color: var(--ea-navy);
  margin: 0 0 4px 0;
}
.ea-page-subtitle { color: var(--ea-text-2); font-size: 14px; margin-bottom: 32px; }

/* ---- Stats row ---- */
.ea-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.ea-stat-card {
  background: var(--ea-card); border: 1px solid var(--ea-border);
  border-radius: var(--ea-radius-card); padding: 20px;
}
.ea-stat-number {
  font-size: 28px; font-weight: 600; color: var(--ea-navy);
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.ea-stat-number.critical { color: var(--ea-critical); }
.ea-stat-number.success  { color: var(--ea-success); }
.ea-stat-label  { font-size: 13px; color: var(--ea-text-2); margin-top: 6px; }
.ea-stat-sub    { font-size: 12px; color: var(--ea-text-muted); margin-top: 4px; }

/* ---- Filter row ---- */
.ea-filters {
  display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; align-items: center;
}
.ea-filters input[type=search] {
  flex: 1; min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--ea-border); border-radius: 6px; font-size: 14px;
  font-family: inherit;
}
.ea-filters select {
  padding: 8px 12px; border: 1px solid var(--ea-border); border-radius: 6px;
  font-size: 14px; background: white; font-family: inherit;
}

/* ---- Queue rows ---- */
.ea-row {
  display: grid;
  grid-template-columns: 4px 48px 1fr auto auto auto auto auto;
  gap: 16px;
  align-items: center;
  background: var(--ea-card);
  border: 1px solid var(--ea-border);
  border-radius: var(--ea-radius-card);
  margin-bottom: 10px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.ea-row:hover { box-shadow: var(--ea-shadow); }
.ea-row .rail { background: var(--ea-accent); height: 100%; min-height: 64px; }
.ea-row .rail.urgent { background: var(--ea-critical); }
.ea-row .rail.borderline { background: var(--ea-warning); }
.ea-row .rail.routine { background: var(--ea-accent); }
.ea-row .av {
  width: 40px; height: 40px; margin-left: 8px;
  border-radius: 50%; background: var(--ea-navy); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 14px;
}
.ea-row .who { padding: 16px 0; }
.ea-row .who .name { font-size: 14px; font-weight: 600; color: var(--ea-text); }
.ea-row .who .org  { font-size: 13px; color: var(--ea-text-2); margin-top: 2px; }

.ea-row .findings { font-size: 13px; color: var(--ea-text-2); white-space: nowrap; }
.ea-row .findings .red { color: var(--ea-critical); font-weight: 600; }

.ea-row .pill { padding-right: 8px; }
.ea-row .time { font-size: 13px; color: var(--ea-text-muted); padding-right: 16px; white-space: nowrap; }
.ea-row .review-btn {
  background: var(--ea-accent); color: white;
  padding: 8px 16px; border-radius: 6px;
  font-size: 14px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
  margin-right: 16px;
}

/* ---- Pills (size + colour reuse from app.css base) ---- */
.ea-pill.conf-high     { background: #E3F1EA; color: var(--ea-success); }
.ea-pill.conf-medium   { background: #FBEFDC; color: var(--ea-warning); }
.ea-pill.conf-low      { background: #F8DEDC; color: var(--ea-critical); }
.ea-pill.tier-prof     { background: var(--ea-soft-navy); color: var(--ea-navy); }
.ea-pill.tier-standard { background: #EEF0F4; color: var(--ea-text-2); }

/* ---- Empty state ---- */
.ea-empty {
  text-align: center; padding: 64px 32px;
  color: var(--ea-text-muted); font-size: 14px;
}

/* ---- Create assessment dialog (lightweight) ---- */
.ea-toolbar {
  display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap;
}
.ea-toolbar form { display: flex; gap: 8px; flex-wrap: wrap; }
.ea-toolbar input[type=text], .ea-toolbar input[type=email] {
  padding: 8px 12px; border: 1px solid var(--ea-border); border-radius: 6px;
  font-size: 14px; font-family: inherit;
}
.ea-toolbar button {
  background: var(--ea-navy); color: white; border: 0;
  padding: 8px 16px; border-radius: 6px; font-size: 14px; cursor: pointer;
  font-weight: 600;
}
.ea-toolbar button.secondary {
  background: white; color: var(--ea-navy);
  border: 1px solid var(--ea-navy);
}

/* ---- Responsive: phone-friendly inbox + read-only review ---- */
/* Sign-off screen is deliberately not collapsed — too much going on for phone. */
@media (max-width: 720px) {
  .ea-topbar { padding: 0 12px; gap: 12px; height: 56px; }
  .ea-topbar-brand .console { display: none; }
  .ea-tabs { gap: 12px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .ea-tab { font-size: 13px; padding: 6px 2px; white-space: nowrap; }

  .ea-content { padding: 16px 12px; max-width: none; }

  .ea-page-title { font-size: 20px; }
  .ea-page-subtitle { font-size: 13px; }

  /* Inbox stats — 2x2 instead of 1x4 */
  .ea-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
  .ea-stat-number { font-size: 22px; }
  .ea-stat-card { padding: 14px; }

  /* Filter row — stack instead of inline */
  .ea-filters { flex-direction: column; gap: 8px; }
  .ea-filters input[type=search], .ea-filters select { width: 100%; }

  /* Queue rows — vertical collapse, hide some columns */
  .ea-row {
    grid-template-columns: 4px 1fr auto;
    grid-template-areas:
      "rail who time"
      "rail findings findings"
      "rail pills action";
    padding: 4px 4px 12px 0;
  }
  .ea-row .rail { grid-area: rail; min-height: 100%; }
  .ea-row .av { display: none; }
  .ea-row .who { grid-area: who; padding: 12px 4px 0 12px; }
  .ea-row .findings { grid-area: findings; padding: 0 16px 4px 12px; }
  .ea-row .pill { grid-area: pills; padding: 0 4px 0 12px; }
  .ea-row .pill + .pill { padding-left: 0; }
  .ea-row .time { grid-area: time; padding: 12px 16px 0 0; align-self: start; }
  .ea-row .review-btn { grid-area: action; margin-right: 16px; }

  /* Assessor toolbar — stack form fields */
  .ea-toolbar form { width: 100%; }
  .ea-toolbar input[type=text], .ea-toolbar input[type=email] { width: 100%; }
  .ea-toolbar button { width: 100%; }

  /* Review screen (A2) — collapse three columns to one stack */
  .ea-a2-grid { grid-template-columns: 1fr !important; }
  .ea-a2-bottom { grid-template-columns: 1fr !important; }

  /* Sign-off screen — keep two-column on tablet, single on phone */
  .ea-signoff-grid { grid-template-columns: 1fr !important; }
  .ea-signoff-grid iframe { height: 500px !important; }
}
