/* Job Tracker — the workbook, on the web.
   Deliberately plain: this is a working screen Kendi reads on a phone between
   other things, not a marketing page. The one piece of colour that carries
   meaning is the repost highlight, kept the same yellow the workbook used. */

/* The browser hides [hidden] elements with display:none, but that rule loses to
   any class selector that sets display. app.js hides the gate by setting the
   attribute, so without this the spinner sits there for ever above a perfectly
   working page. Applies to everything here, not just the gate. */
[hidden] { display: none !important; }

.jt-gate {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #667;
}

.jt-gate .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d9d9e3;
  border-top-color: #766df4;
  border-radius: 50%;
  animation: jt-spin 0.8s linear infinite;
}

@keyframes jt-spin { to { transform: rotate(360deg); } }

.jt-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 16px 64px;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #23252a;
}

.jt-narrow { max-width: 560px; }

.jt-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.jt-wrap h1 { font-size: 24px; margin: 0 0 4px; }
.jt-muted { color: #6b7280; }
.jt-small { font-size: 13px; }
.jt-link { color: #766df4; text-decoration: none; }
.jt-link:hover { text-decoration: underline; }

.jt-btn {
  appearance: none;
  border: 0;
  background: #766df4;
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
}
.jt-btn:disabled { opacity: 0.6; cursor: default; }

.jt-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 10px; }

.jt-tab {
  appearance: none;
  border: 1px solid #e3e3ea;
  background: #fff;
  color: #444;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 14px;
  cursor: pointer;
}
.jt-tab-on { background: #766df4; border-color: #766df4; color: #fff; }

.jt-input {
  border: 1px solid #dcdce4;
  border-radius: 7px;
  padding: 6px 8px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  max-width: 100%;
}
.jt-search { width: 100%; margin-bottom: 12px; }

/* Wide content scrolls inside its own box; the page itself never does. */
.jt-scroll { overflow-x: auto; border: 1px solid #ececf2; border-radius: 10px; }

.jt-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.jt-table th, .jt-table td { padding: 9px 11px; text-align: left; vertical-align: top; }
.jt-table thead th {
  background: #2f5496;              /* the workbook's header blue */
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
.jt-table tbody tr { border-top: 1px solid #f0f0f5; }
.jt-table tbody tr:nth-child(even) { background: #fafaff; }
.jt-row-warn, .jt-table tbody tr.jt-row-warn:nth-child(even) { background: #fff2cc; }

.jt-warn { color: #92400e; font-size: 13px; }

.jt-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 12px;
  background: #eef0f6;
  color: #40465a;
  white-space: nowrap;
}
.jt-pill-rejected { background: #fde8e8; color: #9b1c1c; }
.jt-pill-reviewing { background: #e8f2fd; color: #1c4f9b; }
.jt-pill-applied { background: #e9f6ec; color: #1c7a3a; }

.jt-flash { margin-left: 8px; font-size: 12px; }
.jt-ok { color: #1c7a3a; }
.jt-bad { color: #9b1c1c; }

/* Phone: the table becomes one card per row, each cell labelled. A ten-column
   table on a 390px screen is unreadable however much it scrolls. */
@media (max-width: 720px) {
  .jt-scroll { border: 0; }
  .jt-table thead { display: none; }
  .jt-table, .jt-table tbody, .jt-table tr, .jt-table td { display: block; width: 100%; }
  .jt-table tbody tr {
    border: 1px solid #ececf2;
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 4px 2px;
    background: #fff;
  }
  .jt-table tbody tr:nth-child(even) { background: #fff; }
  .jt-row-warn, .jt-table tbody tr.jt-row-warn:nth-child(even) { background: #fff2cc; }
  .jt-table td {
    display: flex;
    gap: 10px;
    padding: 5px 11px;
    border: 0;
  }
  .jt-table td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    color: #6b7280;
    font-size: 13px;
  }
  /* A row with nothing in it is noise on a small screen. */
  .jt-table td:empty { display: none; }
}
