:root {
  color-scheme: light;
  --ink: #1f1a16;
  --muted: #74685f;
  --line: #ead9ca;
  --panel: #fffdf9;
  --bg: #fff8ef;
  --accent: #d9772f;
  --accent-dark: #b95c19;
  --ginger: #d9772f;
  --cream: #fff3df;
  --charcoal: #241d19;
  --calico-black: #2b211c;
  --calico-rust: #9f4822;
  --warn: #b26a00;
  --bad: #b73124;
  --good: #3f7c45;
  --shadow: 0 18px 50px rgba(99, 58, 24, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, #fff8ef 0%, #fff1dc 36%, #f8e3cc 68%, #f7f1e9 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid #e2c7ad;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 16px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(83, 47, 18, 0.07);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

button:hover,
.button-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(83, 47, 18, 0.14);
}

.button-link {
  min-height: 40px;
  border: 1px solid #e2c7ad;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 9px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf4;
  box-shadow: 0 12px 28px rgba(217, 119, 47, 0.3);
}

button.danger {
  border-color: #efb59a;
  color: var(--bad);
  background: #fff4ed;
}

.primary-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fffaf4;
  font-weight: 800;
}

button.primary:hover {
  background: var(--accent-dark);
}

.app-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
  gap: 24px;
  padding: 22px;
}

.sidebar {
  position: sticky;
  top: 22px;
  height: calc(100vh - 44px);
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: rgba(255, 253, 249, 0.9);
  color: var(--ink);
  border: 1px solid rgba(255, 247, 236, 0.94);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  color: transparent;
  background: linear-gradient(90deg, var(--calico-black), var(--ginger) 52%, var(--calico-rust));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand::before {
  content: "";
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: url("/static/applykitty-logo.svg") center / cover no-repeat;
  box-shadow: 0 6px 16px rgba(83, 47, 18, 0.16);
}

.muted {
  color: var(--muted);
  margin: 6px 0 0;
}

.sidebar .muted {
  color: var(--muted);
}

nav {
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 22px;
  background: #fff4e5;
  border: 1px solid #ead9ca;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 800;
}

nav a:hover {
  background: #fff;
  color: var(--calico-rust);
}

.guardrail,
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 6px;
  border-top: 1px solid #ead9ca;
  padding-top: 18px;
  color: #5c493b;
  font-size: 14px;
}

.sidebar-footer strong {
  color: var(--ink);
}

.sidebar-footer span {
  color: var(--muted);
}

.auth-user-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.support-coffee {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #ead9ca;
  border-radius: 18px;
  background: linear-gradient(135deg, #fffdf9 0%, #fff2df 100%);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(83, 47, 18, 0.08);
}

.support-coffee span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.support-coffee strong {
  font-size: 15px;
}

.support-coffee button {
  width: 100%;
  margin-top: 4px;
  padding: 0 12px;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(36, 29, 25, 0.46);
}

.support-modal.hidden {
  display: none;
}

.support-modal-open {
  overflow: hidden;
}

.support-dialog {
  position: relative;
  width: min(460px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid #f0d5bd;
  border-radius: 24px;
  background: #fffdf9;
  box-shadow: 0 24px 70px rgba(36, 29, 25, 0.28);
}

.support-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}

.support-kicker {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.support-dialog h2 {
  margin: 0;
  font-size: 30px;
}

.coffee-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.coffee-options button {
  min-height: 68px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border-radius: 16px;
  white-space: normal;
}

.coffee-options button.selected {
  border-color: var(--accent);
  background: #fff2df;
  color: var(--accent-dark);
  box-shadow: 0 12px 26px rgba(217, 119, 47, 0.18);
}

.coffee-options strong {
  font-size: 18px;
}

.support-qr-wrap {
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid #ead9ca;
  border-radius: 18px;
  background: #fff8ef;
}

.support-qr-wrap img {
  width: min(300px, 100%);
  height: auto;
  display: block;
  border-radius: 14px;
}

.support-message {
  display: grid;
  gap: 8px;
  color: #3b3142;
  font-size: 13px;
  font-weight: 800;
}

.support-message textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}

.support-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(135deg, rgba(217, 119, 47, 0.22), rgba(43, 33, 28, 0.28)),
    rgba(31, 26, 22, 0.62);
}

.auth-panel {
  width: min(460px, 100%);
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(52, 30, 15, 0.28);
}

.auth-panel h1 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.auth-panel h1::before {
  content: "";
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 50%;
  background: url("/static/applykitty-logo.svg") center / cover no-repeat;
  box-shadow: 0 8px 20px rgba(83, 47, 18, 0.16);
}

.auth-tabs,
.auth-form {
  display: grid;
  gap: 10px;
}

.auth-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.auth-active .app-shell {
  filter: blur(1px);
  pointer-events: none;
  user-select: none;
}

main {
  padding: 6px 6px 28px;
  display: grid;
  gap: 24px;
}

.user-profile-menu {
  position: fixed;
  top: 14px;
  right: 22px;
  z-index: 40;
  flex: 0 0 auto;
}

.user-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 5px 12px 5px 6px;
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(14px);
  max-width: 250px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf4;
  font-weight: 900;
}

.user-profile-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-chevron {
  color: var(--muted);
  font-size: 13px;
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 260px;
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.user-profile-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: #fff8ef;
}

.user-profile-card span:last-child {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.user-profile-dropdown a,
.user-profile-dropdown button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  padding: 8px 10px;
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.user-profile-dropdown a:hover,
.user-profile-dropdown button:hover {
  background: #fff4e5;
  transform: none;
  box-shadow: none;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 190px;
  padding: 28px;
  border-radius: 32px;
  background:
    linear-gradient(118deg, rgba(255, 247, 234, 0.98) 0%, rgba(255, 226, 188, 0.95) 46%, rgba(244, 214, 187, 0.9) 100%);
  border: 1px solid rgba(255, 247, 236, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tracking-hero-rail .topbar-actions {
  width: 100%;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: 44px;
  line-height: 0.98;
  max-width: 760px;
}

h2 {
  font-size: 22px;
  margin-bottom: 0;
}

.band {
  display: grid;
  gap: 16px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.status {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: #5b341b;
  background: #fff;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.4fr);
  gap: 16px;
}

.panel,
.role-card,
.selected-role,
.selected-empty {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(79, 40, 132, 0.08);
}

.notice {
  margin-top: 12px;
  border: 1px solid #efc28e;
  border-radius: 16px;
  background: #fff7e8;
  color: #6a3b12;
  padding: 10px;
  font-size: 14px;
}

.notice p {
  margin: 0 0 6px;
}

.notice p:last-child {
  margin-bottom: 0;
}

.debug-output {
  white-space: pre-wrap;
  margin: 10px 0 0;
  padding: 10px;
  border: 1px solid #ead49a;
  border-radius: 16px;
  background: #fffdf5;
  color: #3b2b00;
  font-size: 12px;
  overflow-x: auto;
}

.hidden {
  display: none;
}

label {
  display: grid;
  gap: 6px;
  color: #3b3148;
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

input:focus,
textarea:focus,
select:focus {
  outline: 3px solid rgba(217, 119, 47, 0.18);
  border-color: var(--ginger);
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid button {
  align-self: end;
}

.role-list {
  display: grid;
  gap: 10px;
}

.role-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.score {
  min-width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 1px solid #ead9ca;
  border-radius: 50%;
  font-weight: 800;
  background: #fff8ef;
}

.score.good {
  color: var(--good);
}

.score.warn {
  color: var(--warn);
}

.score.bad {
  color: var(--bad);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  border: 1px solid #ead9ca;
  border-radius: 999px;
  padding: 4px 8px;
  color: #6a3b12;
  font-size: 12px;
  background: #fff8ef;
  font-weight: 800;
}

.selected-role {
  border-color: #e5b98b;
  background: linear-gradient(135deg, #fff7ec, #fff);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.portal-plan {
  border-top: 1px solid var(--line);
  margin-top: 16px;
  padding-top: 16px;
}

.step-list {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
}

.account-card {
  display: grid;
  gap: 14px;
}

.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.account-card-head h2 {
  margin: 0;
}

.account-details {
  display: grid;
  gap: 10px;
  margin: 0;
}

.account-details div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.account-details div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.account-details dt {
  color: var(--muted);
  font-weight: 800;
}

.account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.account-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.toggle-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.toggle-row:last-child {
  border-bottom: 0;
}

.toggle-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.review-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
}

.review-table th,
.review-table td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 6px;
  vertical-align: top;
}

.review-table th {
  color: #3b3148;
  font-weight: 900;
}

.field-map th,
.field-map td {
  font-size: 14px;
}

.history-list {
  display: grid;
  gap: 8px;
}

.wishlist-panel {
  display: grid;
  gap: 12px;
}

.tracking-session-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  margin: -10px 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 0 10px 28px rgba(83, 47, 18, 0.08);
  width: fit-content;
}

.tracking-session-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 900;
}

.tracking-session-nav a:hover {
  color: #fffaf4;
  background: var(--accent);
}

.tracking-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 10px;
  margin-top: 24px;
  max-width: 680px;
}

.tracking-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  align-items: start;
}

.tracking-hero-copy {
  min-width: 0;
}

.tracking-hero-rail {
  display: grid;
  gap: 16px;
  justify-items: end;
  width: 100%;
}

.tracking-summary-card {
  min-height: 82px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(226, 199, 173, 0.9);
  border-radius: 8px;
  background: rgba(255, 253, 249, 0.8);
  box-shadow: 0 10px 24px rgba(83, 47, 18, 0.08);
}

.tracking-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tracking-summary-card strong {
  font-size: 30px;
  line-height: 1;
  color: var(--charcoal);
}

.tracking-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.tracking-main {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.wishlist-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.sponsor-search {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.sponsor-filter-grid {
  grid-template-columns: minmax(220px, 1.3fr) repeat(3, minmax(160px, 0.8fr)) auto;
}

.sponsor-results-table tbody tr {
  display: table-row;
}

.sponsor-results-table {
  min-width: 900px;
}

.sponsor-results-table tbody td {
  display: table-cell;
  color: var(--ink);
  background: #fffdf9;
}

.sponsor-results-table td:nth-child(3),
.sponsor-results-table td:nth-child(4) {
  display: table-cell;
}

.sponsor-results-table th:nth-child(1),
.sponsor-results-table td:nth-child(1) {
  min-width: 320px;
}

.sponsor-rows-list {
  display: grid;
  gap: 8px;
}

.sponsor-row,
.sponsor-row-empty {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(120px, 0.7fr) minmax(150px, 0.8fr) minmax(130px, 0.7fr);
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffdf9;
}

.sponsor-row span,
.sponsor-row-empty {
  color: var(--muted);
  font-size: 13px;
}

.sponsor-row-head {
  background: #fff8ef;
  color: #3b3148;
  font-weight: 900;
}

.sponsor-row-head span {
  color: #3b3148;
}

.sponsor-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 12px 0;
}

.wishlist-list {
  display: grid;
  gap: 8px;
}

.wishlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf2;
}

.wishlist-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.roles-toolbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 12px;
}

.tracking-workbench {
  display: grid;
  gap: 16px;
  padding: 0;
  overflow: hidden;
}

.tracking-workbench-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 0;
}

.tracking-workbench-head h3 {
  margin: 0;
  font-size: 22px;
}

.tracking-workbench-statuses {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.bulk-apply-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 18px;
}

.bulk-apply-toolbar,
.bulk-apply-toolbar button,
.bulk-apply-toolbar .status,
.bulk-apply-toolbar .segmented-control span,
.bulk-apply-toolbar .check-control {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.bulk-apply-toolbar button,
.bulk-apply-toolbar .status,
.bulk-apply-toolbar .segmented-control span {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
}

.bulk-apply-toolbar .status {
  padding: 0 14px;
}

.tracking-filter-grid {
  display: grid;
  grid-template-columns: 1.25fr 1.4fr 1fr 1fr 1fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 14px 18px 18px;
  background: #fff8ef;
  border-top: 1px solid var(--line);
}

.tracking-filter-grid label {
  min-width: 0;
}

.tracking-filter-grid input {
  min-height: 42px;
  border-radius: 8px;
  background: #fffdf9;
}

.check-control,
.row-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 800;
  color: var(--ink);
}

.row-check {
  width: 32px;
  justify-content: center;
}

.row-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.row-check .ui-icon {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: transparent;
  background: #fffdf9;
}

.row-check input:checked + .ui-icon {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.check-control input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff8ef;
}

.segmented-control label {
  margin: 0;
}

.segmented-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-control span {
  display: block;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}

.segmented-control input:checked + span {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(225, 115, 39, 0.18);
}

.icon-text-btn,
.icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ui-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
}

.ui-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tracking-table-panel {
  max-height: 650px;
  padding: 0;
  overflow: auto;
}

.tracking-table-panel .review-table {
  margin: 0;
}

.tracking-table-panel thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff8ef;
  box-shadow: inset 0 -1px 0 var(--line);
}

.tracking-table-panel tbody tr {
  background: #fffdf9;
}

.tracking-table-panel tbody tr:nth-child(even) {
  background: #fffaf2;
}

.tracking-table-panel tbody tr:hover {
  background: #fff3df;
}

.tracking-company-name {
  display: block;
  color: var(--charcoal);
  font-weight: 900;
}

.tracking-role-title {
  display: block;
  max-width: 340px;
  color: var(--ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.tracking-workflow-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff8ef;
  color: #5b341b;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  max-width: 100%;
}

.tracking-workflow-pill {
  color: #3b3148;
  background: #fffdf9;
  max-width: 112px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bulk-queue-panel {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 249, 0.98), rgba(255, 248, 239, 0.98));
}

.bulk-queue-panel-hero {
  position: static;
  width: 100%;
  min-height: 210px;
  margin-top: 10px;
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(83, 47, 18, 0.12);
}

.bulk-queue-panel-hero .bulk-queue-list {
  max-height: 230px;
}

.bulk-queue-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bulk-queue-head h3 {
  margin: 0;
  font-size: 22px;
}

.bulk-queue-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #f2dfca;
}

.bulk-queue-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  transition: width 180ms ease;
}

.bulk-queue-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}

.bulk-queue-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: 0 8px 18px rgba(83, 47, 18, 0.06);
}

.bulk-queue-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fffaf4;
  font-weight: 900;
  font-size: 13px;
}

.bulk-queue-item strong,
.bulk-queue-item span {
  display: block;
}

.bulk-queue-item span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.bulk-queue-meta {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.queue-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: #fff8ef;
  border: 1px solid var(--line);
  color: var(--ink);
}

.queue-manual {
  color: var(--bad);
  background: #fff0ee;
  border-color: #f1b5ac;
}

.queue-review {
  color: #0f5ea8;
  background: #edf6ff;
  border-color: #acd2f1;
}

.queue-applied {
  color: var(--good);
  background: #eef8ef;
  border-color: #b7dbbb;
}

.queue-queued {
  color: var(--warn);
  background: #fff7e8;
  border-color: #eccb95;
}

.table-panel {
  overflow-x: auto;
}

.scan-log {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf9;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  font-size: 13px;
}

.scan-log:empty {
  display: none;
}

.scan-log-title {
  color: var(--ink);
  font-weight: 900;
  margin-bottom: 6px;
}

.scan-log ol {
  margin: 0;
  padding-left: 20px;
}

.scan-log li {
  margin: 4px 0;
}

.scan-log li span {
  display: inline-block;
  min-width: 48px;
  color: #5b341b;
  font-weight: 800;
}

.scan-log-warn {
  color: var(--warn);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
}

.pagination:empty {
  display: none;
}

.pagination-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-actions span {
  color: var(--ink);
  font-weight: 800;
}

.roles-table {
  min-width: 1120px;
}

.roles-table th,
.roles-table td {
  font-size: 14px;
}

.roles-table thead th {
  background: #fff8ef;
}

.tracking-table-panel .roles-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.tracking-table-panel .roles-table th,
.tracking-table-panel .roles-table td {
  padding: 10px 8px;
  line-height: 1.22;
}

.tracking-table-panel .roles-table th:first-child,
.tracking-table-panel .roles-table td:first-child {
  width: 48px;
  text-align: center;
}

.tracking-table-panel .roles-table th:nth-child(2),
.tracking-table-panel .roles-table td:nth-child(2) {
  width: 13%;
}

.tracking-table-panel .roles-table th:nth-child(3),
.tracking-table-panel .roles-table td:nth-child(3) {
  width: 24%;
}

.tracking-table-panel .roles-table th:nth-child(4),
.tracking-table-panel .roles-table td:nth-child(4) {
  width: 15%;
}

.tracking-table-panel .roles-table th:nth-child(5),
.tracking-table-panel .roles-table td:nth-child(5) {
  width: 13%;
}

.tracking-table-panel .roles-table th:nth-child(6),
.tracking-table-panel .roles-table td:nth-child(6) {
  width: 12%;
}

.tracking-table-panel .roles-table th:nth-child(7),
.tracking-table-panel .roles-table td:nth-child(7) {
  width: 10%;
}

.tracking-table-panel .roles-table th:nth-child(8),
.tracking-table-panel .roles-table td:nth-child(8) {
  width: 8%;
}

.tracking-table-panel .roles-table th:nth-child(9),
.tracking-table-panel .roles-table td:nth-child(9) {
  width: 54px;
  text-align: center;
}

.tracking-table-panel .roles-table th,
.tracking-table-panel .roles-table td,
.tracking-table-panel .roles-table td * {
  min-width: 0;
}

.tracking-table-panel .roles-table td {
  overflow-wrap: anywhere;
}

.tracking-table-panel .tracking-status-select {
  min-width: 0;
  padding: 8px 7px;
  border-radius: 999px;
  font-size: 13px;
}

.tracking-table-panel .icon-link {
  gap: 4px;
  font-size: 13px;
}

.tracking-table-panel .move-history-btn {
  width: 38px;
  min-height: 38px;
  padding: 0;
  justify-content: center;
}

.tracking-table-panel .move-history-btn span:not(.ui-icon) {
  display: none;
}

.application-detail {
  display: grid;
  gap: 16px;
}

.application-detail.hidden {
  display: none;
}

.table-sort {
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font-weight: 800;
}

@media (max-width: 900px) {
  .app-shell,
  .profile-grid,
  .form-grid,
  .result-grid,
  .roles-toolbar,
  .account-grid,
  .tracking-topbar,
  .tracking-dashboard,
  .tracking-filter-grid,
  .tracking-summary-grid,
  .sponsor-search,
  .sponsor-filter-grid,
  .sponsor-row,
  .sponsor-row-empty {
    grid-template-columns: 1fr;
  }

  .sponsor-pagination {
    justify-content: flex-start;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar {
    display: grid;
  }

  .topbar-actions,
  .bulk-apply-toolbar,
  .tracking-session-nav,
  .pagination {
    justify-content: flex-start;
  }

  .tracking-session-nav {
    width: 100%;
    border-radius: 16px;
  }

  .tracking-workbench-head,
  .bulk-queue-head {
    display: grid;
  }

  .tracking-hero-rail {
    justify-items: stretch;
  }

  .bulk-queue-panel-hero {
    min-height: 0;
  }

  .user-profile-name {
    max-width: 96px;
  }

  .user-profile-menu {
    top: 10px;
    right: 12px;
  }

  .segmented-control {
    width: 100%;
    align-items: stretch;
  }

  .segmented-control label {
    flex: 1;
  }

  .segmented-control span {
    text-align: center;
  }

  .bulk-queue-panel {
    position: static;
  }

  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  h1 {
    font-size: 34px;
  }

  .coffee-options {
    grid-template-columns: 1fr;
  }
}
