* {
  box-sizing: border-box;
}

body {
  margin: 0;

  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f5f7fb;

  color: #172033;
}


/*
 * =========================================================
 * TOP BAR
 * =========================================================
 */

.topbar {
  height: 70px;

  background: #ffffff;

  border-bottom:
    1px solid #e5e9f2;
}


.topbar-inner {
  width:
    min(
      1000px,
      calc(100% - 32px)
    );

  height: 100%;

  margin: auto;

  display: flex;

  align-items: center;

  justify-content: space-between;
}


.brand {
  font-size: 18px;

  font-weight: 700;
}


/*
 * =========================================================
 * LAYOUT
 * =========================================================
 */

.container {
  width:
    min(
      1000px,
      calc(100% - 32px)
    );

  margin:
    45px auto;
}


.page-header {
  margin-bottom: 25px;
}


/* Inline style attributes are blocked by the strict CSP, so spacing variants
   live here instead. */
.page-header--spaced {
  margin-top: 28px;
}

.page-header h1 {
  margin:
    10px 0 6px;

  font-size: 28px;
}


.page-header p {
  margin: 0;

  color: #687386;
}


/*
 * =========================================================
 * BUTTONS
 * =========================================================
 */

.primary-button {
  border: 0;

  border-radius: 9px;

  min-height: 44px;

  padding:
    0 18px;

  font-size: 14px;

  font-weight: 600;

  cursor: pointer;

  background: #5268ff;

  color: #ffffff;
}


.primary-button:hover {
  background: #4157e8;
}


.primary-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;
}


.secondary-button {
  min-height: 40px;

  padding: 0 15px;

  border: 1px solid #d8deea;

  border-radius: 8px;

  background: #ffffff;

  color: #31415f;

  font: inherit;

  font-weight: 600;

  cursor: pointer;
}


.secondary-button:hover:not(:disabled) {
  background: #f5f7fb;
}


.secondary-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;
}


.danger-button {
  border-color: #e8c4c4;

  color: #a13838;
}


.full-width {
  width: 100%;
}


.back-button {
  border: 0;

  background: transparent;

  padding: 0;

  color: #5268ff;

  font-size: 14px;

  cursor: pointer;
}


/*
 * =========================================================
 * CARD
 * =========================================================
 */

.card {
  background: #ffffff;

  border:
    1px solid #e5e9f2;

  border-radius: 16px;

  padding: 32px;

  box-shadow:
    0 10px 30px
    rgba(
      20,
      30,
      50,
      0.06
    );
}


/*
 * =========================================================
 * FORM
 * =========================================================
 */

.field {
  margin-bottom: 24px;
}


.field > label {
  display: block;

  font-weight: 600;

  margin-bottom: 9px;
}


input[type="text"],
input[type="number"],
select {
  width: 100%;

  height: 48px;

  border:
    1px solid #d8deea;

  border-radius: 9px;

  padding:
    0 14px;

  font-size: 15px;

  background: #ffffff;

  color: #172033;
}


input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
  outline: none;

  border-color: #5268ff;
}


/*
 * =========================================================
 * DROPZONE
 * =========================================================
 */

.dropzone {
  border:
    2px dashed #cbd2df;

  border-radius: 12px;

  min-height: 150px;

  display: flex;

  justify-content: center;

  align-items: center;

  text-align: center;

  cursor: pointer;

  transition:
    0.2s;
}


.dropzone:hover,
.dropzone.dragover {
  border-color: #5268ff;

  background: #f7f8ff;
}


.upload-icon {
  font-size: 30px;

  margin-bottom: 8px;
}


.dropzone strong,
.dropzone span {
  display: block;
}


.dropzone span {
  margin-top: 5px;

  color: #7b8495;

  font-size: 13px;
}


.selected-file {
  margin-top: 10px;

  padding:
    10px 12px;

  background: #f2f4f8;

  border-radius: 8px;

  font-size: 14px;
}


/*
 * =========================================================
 * RADIO
 * =========================================================
 */

.radio-group {
  display: flex;

  gap: 24px;
}


.radio {
  display: flex;

  gap: 8px;

  align-items: center;

  cursor: pointer;
}


.radio input {
  width: 17px;

  height: 17px;
}


/*
 * =========================================================
 * JOB HISTORY
 * =========================================================
 */

.jobs-container {
  display: flex;

  flex-direction: column;

  gap: 10px;
}


.job-card {
  background: #ffffff;

  border:
    1px solid #e5e9f2;

  border-radius: 12px;

  padding:
    18px 20px;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 20px;
}


.job-card-main {
  display: flex;

  align-items: center;

  gap: 14px;

  min-width: 0;
}


.job-icon {
  width: 38px;

  height: 38px;

  border-radius: 10px;

  display: flex;

  align-items: center;

  justify-content: center;

  background: #f0f3f8;

  font-weight: 700;
}


.job-name {
  font-weight: 600;

  margin-bottom: 4px;

  overflow: hidden;

  text-overflow: ellipsis;
}


.job-date {
  color: #7b8495;

  font-size: 12px;
}

.job-version {
  display: inline-flex;
  align-items: center;
  margin-left: 2px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #234596;
  background: #eaf0fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.job-version.is-pending {
  color: #73809a;
  background: #f0f3f8;
}


.job-card-right {
  display: flex;

  align-items: center;

  gap: 12px;
}


/*
 * =========================================================
 * STATUS
 * =========================================================
 */

.status-badge {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding:
    6px 9px;

  border-radius: 20px;

  font-size: 10px;

  font-weight: 700;

  background: #eef1f7;
}


.status-badge.completed {
  background: #eaf8f0;

  color: #197342;
}


.status-badge.running {
  background: #eef1ff;

  color: #4b5ed4;
}


.status-badge.failed {
  background: #fff0f0;

  color: #b04444;
}


.status-badge.cancelled,
.status-badge.cancelling {
  background: #fff7e6;

  color: #8a641c;
}


.small-button {
  border:
    1px solid #d8deea;

  background: #ffffff;

  color: #172033;

  border-radius: 8px;

  min-height: 36px;

  padding:
    0 12px;

  display: inline-flex;

  align-items: center;

  text-decoration: none;

  font-size: 13px;

  font-weight: 600;

  cursor: pointer;
}


.small-button:hover {
  background: #f5f7fb;
}


/*
 * =========================================================
 * JOB DETAILS
 * =========================================================
 */

.job-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.dropzone.is-disabled,
.dropzone.is-disabled:hover {
  cursor: not-allowed;
  opacity: 0.54;
  transform: none;
  border-color: #c8d4e7;
  background: rgba(248, 250, 255, 0.72);
  box-shadow: none;
}

.job-modify-button {
  flex: 0 0 auto;
}

.access-users {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.access-user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #e5e9f2;
}

.access-user:last-child { border-bottom: 0; }
.access-user strong, .access-user small { display: block; }
.access-user small { color: #657795; margin-top: 4px; }

.oasis-allowlist-form {
  display: flex;
  align-items: end;
  gap: 14px;
}

.oasis-allowlist-form .field { flex: 1; margin: 0; }
.access-help { color: #657795; font-size: 14px; margin: 12px 0; }
.oasis-allowlist { display: grid; gap: 8px; }
.oasis-allowlist-entry {
  background: #f6faef;
  border: 1px solid #dfedc7;
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #23477f;
  font-weight: 600;
}

.local-password-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #cfdcf4;
  border-radius: 12px;
  background: #f7faff;
}

.local-password-panel h2 { margin: 0; font-size: 18px; }
.local-password-panel p { color: #657795; margin: 6px 0 14px; }
.checkbox-field { display: flex; align-items: center; gap: 8px; color: #425573; font-size: 14px; }
.local-password-actions { display: flex; gap: 10px; margin-top: 16px; }
.runtime-settings-card { max-width: 900px; }
.runtime-settings-intro {
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid #dce6f5;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6f9ff, #fbfdf7);
}
.runtime-settings-intro h2 { margin: 0 0 6px; font-size: 18px; }
.runtime-settings-intro p { margin: 0; color: #657795; }
.runtime-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.runtime-settings-grid .field { margin-bottom: 18px; }
.runtime-settings-actions { align-items: center; }
.runtime-settings-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 30px 0 20px;
  color: #657795;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.runtime-settings-divider::before,
.runtime-settings-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #d9e3f2;
}
.claude-credential-panel {
  padding: 20px;
  border: 1px solid #d7e4f5;
  border-radius: 14px;
  background: linear-gradient(135deg, #fbfdff, #f7fbf4);
}
.claude-credential-panel h2 { margin: 0 0 6px; font-size: 18px; }
.claude-credential-panel p { max-width: 670px; margin: 0; color: #657795; line-height: 1.55; }
.claude-credential-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0;
  padding: 12px 14px;
  border: 1px solid #dce6f5;
  border-radius: 10px;
  background: #fff;
  color: #657795;
  font-size: 14px;
}
.claude-credential-status strong {
  color: #244681;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: .04em;
}
.claude-credential-panel .field { margin-bottom: 0; }
.credential-message { display: inline-block; margin-top: 12px; }

@media (max-width: 640px) {
  .access-user { align-items: flex-start; flex-direction: column; }
  .oasis-allowlist-form { align-items: stretch; flex-direction: column; }
  .repository-catalogue-toolbar { grid-template-columns: 1fr; row-gap: 12px; }
  .repository-pagination { align-items: stretch; flex-direction: column; }
  .project-search-control { max-width: none; width: 100%; }
  .catalogue-create-button { width: 100%; }
  .repository-pagination > div { justify-content: space-between; }
  .runtime-settings-grid { grid-template-columns: 1fr; }
  .claude-credential-status { align-items: flex-start; flex-direction: column; }
}

.job-status-row > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-status-row .status-label { margin-bottom: 0; }


.status-label {
  font-size: 12px;

  color: #7b8495;

  margin-bottom: 7px;
}


/*
 * =========================================================
 * PROGRESS
 * =========================================================
 */

.progress-bar {
  height: 8px;

  background: #e9edf4;

  border-radius: 20px;

  overflow: hidden;

  margin:
    20px 0;
}


.progress-fill {
  height: 100%;

  width: 0%;

  background: #5268ff;

  transition:
    width 0.4s;
}


/*
 * =========================================================
 * LOGS
 * =========================================================
 */

.logs {
  border:
    1px solid #202635;

  border-radius: 10px;

  overflow: hidden;

  background: #11151e;
}


.logs-header {
  padding:
    10px 14px;

  background: #1b2130;

  color: #b9c2d4;

  font-size: 12px;

  font-weight: 600;
}


.logs pre {
  margin: 0;

  padding: 16px;

  height: 320px;

  overflow: auto;

  color: #d6dbea;

  font-family:
    Consolas,
    monospace;

  font-size: 12px;

  line-height: 1.6;

  white-space: pre-wrap;
}


/*
 * =========================================================
 * SUCCESS
 * =========================================================
 */

.success-box {
  margin-top: 20px;

  padding: 18px;

  border-radius: 10px;

  background: #eefaf3;

  border:
    1px solid #bfe8ce;

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;
}


.success-box p {
  margin:
    5px 0 0;

  color: #547161;

  font-size: 13px;
}


.download-button {
  background: #1d8f52;

  color: #ffffff;

  border-radius: 9px;

  min-height: 44px;

  padding:
    0 16px;

  display: inline-flex;

  align-items: center;

  text-decoration: none;

  font-size: 13px;

  font-weight: 600;

  white-space: nowrap;
}


/*
 * =========================================================
 * ERROR
 * =========================================================
 */

.error-box {
  margin-top: 20px;

  padding: 18px;

  border-radius: 10px;

  background: #fff1f1;

  border:
    1px solid #f0c1c1;
}


.error-box p {
  color: #8a4545;

  white-space: pre-wrap;
}

.token-usage {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dbe4f4;
  border-radius: 10px;
  background: #f8fbff;
  color: #51617c;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.token-usage strong {
  color: #1f407f;
  font-size: 15px;
}

.google-login { margin-top: 18px; }

.google-button {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid #cfd9e9;
  border-radius: 12px;
  color: #263754;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(28, 53, 105, 0.08);
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.google-button:hover {
  transform: translateY(-1px);
  border-color: #aebed8;
  box-shadow: 0 10px 20px rgba(28, 53, 105, 0.13);
}

.google-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 850;
  background: linear-gradient(135deg, #4285f4 0 27%, #34a853 27% 50%, #fbbc05 50% 74%, #ea4335 74%);
}


/*
 * =========================================================
 * EMPTY / LOADING
 * =========================================================
 */

.loading {
  padding: 50px;

  text-align: center;

  color: #7b8495;
}


.empty-state {
  background: #ffffff;

  border:
    1px solid #e5e9f2;

  border-radius: 16px;

  padding: 60px 30px;

  text-align: center;
}


.empty-state h2 {
  margin:
    0 0 8px;
}


.empty-state p {
  color: #687386;

  margin:
    0 0 22px;
}


[hidden] {
  display: none !important;
}

/*
 * =========================================================
 * MOBILE
 * =========================================================
 */

@media (
  max-width: 650px
) {

  .container {
    margin:
      25px auto;
  }


  .topbar-inner {
    width:
      calc(100% - 24px);
  }


  .brand {
    font-size: 15px;
  }


  .card {
    padding: 22px;
  }


  .job-card {
    align-items: flex-start;

    flex-direction: column;
  }


  .job-card-right {
    width: 100%;

    justify-content: space-between;
  }


  .success-box {
    flex-direction: column;

    align-items: stretch;
  }


  .download-button {
    justify-content: center;
  }
}


.job-actions {
  display: flex;

  gap: 10px;

  margin: 18px 0;
}


/*
 * GitHub project lifecycle
 */

.status-badge.publishing {
  background: #f0ecff;

  color: #6b4bd4;
}


.status-badge.conflict {
  background: #fff4e5;

  color: #a15c00;
}


.success-box {
  flex-wrap: wrap;
}


.github-info {
  flex-basis: 100%;

  width: 100%;

  margin-top: 4px;

  padding-top: 12px;

  border-top: 1px solid #bfe8ce;

  display: flex;

  flex-direction: column;

  gap: 6px;
}


.github-row {
  display: flex;

  gap: 12px;

  font-size: 13px;

  align-items: baseline;
}


.github-key {
  color: #547161;

  min-width: 90px;

  font-weight: 600;
}


.github-value {
  color: #172033;

  word-break: break-all;
}


.github-value a {
  color: #1d8f52;

  text-decoration: none;
}


.github-value a:hover {
  text-decoration: underline;
}


.github-note {
  font-size: 13px;

  color: #547161;
}


.error-box .download-button {
  margin-top: 14px;
}


#modifyPrompt {
  width: 100%;

  box-sizing: border-box;

  padding: 12px;

  border: 1px solid #d8deea;

  border-radius: 8px;

  font: inherit;

  resize: vertical;
}


.project-busy {
  margin-top: 4px;

  font-size: 12px;

  color: #8a641c;
}


.small-button:disabled {
  opacity: 0.6;

  cursor: not-allowed;
}


/*
 * Authentication controls
 */

.auth-actions {
  display: flex;

  align-items: center;

  gap: 12px;
}

.file-mention-menu {
  position: relative;
  z-index: 5;
  display: grid;
  max-height: 280px;
  margin-top: 8px;
  overflow: auto;
  border: 1px solid #cbd8ec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(30, 41, 75, 0.14);
}

.file-mention-option {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.file-mention-option:last-child { border-bottom: 0; }
.file-mention-option:hover,
.file-mention-option:focus-visible { background: #f2f6ff; outline: none; }
.file-mention-path {
  overflow-wrap: anywhere;
  color: #273653;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 750;
}
.file-mention-source { color: var(--muted); font-size: 11px; }
.file-mention-help { margin-top: 8px; }
.file-mention-help strong { color: var(--primary); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }

.job-prompt-panel {
  margin: 18px 0 2px;
  border: 1px solid #dce5f2;
  border-radius: 13px;
  overflow: hidden;
  background: #f8faff;
}

.job-prompt-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  color: #273653;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.job-prompt-panel summary::-webkit-details-marker { display: none; }
.job-prompt-panel summary::before { content: "▸"; color: var(--primary); transition: transform 160ms ease; }
.job-prompt-panel[open] summary::before { transform: rotate(90deg); }
.job-prompt-panel summary > span:first-child { margin-right: auto; }
.job-prompt-panel-hint { color: var(--muted); font-size: 11px; font-weight: 650; }
.job-prompt-panel[open] .job-prompt-panel-hint { font-size: 0; }
.job-prompt-panel[open] .job-prompt-panel-hint::after { content: "Hide full request"; font-size: 11px; }
.job-prompt-panel pre {
  max-height: 360px;
  margin: 0;
  padding: 0 14px 14px;
  overflow: auto;
  color: #34415d;
  font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.claude-usage-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 46px;
  padding: 4px 5px 4px 10px;
  border: 1px solid #d8e5c6;
  border-radius: 14px;
  color: #61708d;
  background: linear-gradient(135deg, #fbfdf8, #f2f8e9);
  box-shadow: 0 5px 14px rgba(56, 98, 35, 0.07);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.claude-usage-header[data-state="available"] {
  border-color: rgba(121, 181, 65, 0.48);
  background: linear-gradient(135deg, #fcfef9, #f0f8e6);
}

.claude-usage-header[data-state="error"] {
  border-color: #efc8c8;
  background: #fff7f7;
}

.claude-usage-title {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-right: 5px;
  color: #40516e;
  font-size: 12px;
  font-weight: 800;
}

.claude-usage-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(141, 198, 63, 0.16);
}

.claude-usage-window {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 6px;
  min-width: 74px;
  padding: 5px 7px;
  border: 1px solid rgba(210, 224, 195, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.78);
}

.claude-usage-window-top {
  display: contents;
}

.claude-usage-window-label {
  align-self: center;
  color: #64718a;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.claude-usage-window strong {
  color: #244794;
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.claude-usage-meter {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf8;
}

.claude-usage-meter > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6ea92c, var(--lime));
  transition: width 260ms ease;
}

.claude-usage-window small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #758096;
  font-size: 11px;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.claude-usage-refresh {
  width: 33px;
  height: 33px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #cbdcf4;
  border-radius: 10px;
  color: #234596;
  background: #f4f8ff;
  font: inherit;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.claude-usage-refresh:hover { background: #e4eefc; }
.claude-usage-refresh span { display: inline-block; }
.claude-usage-refresh:focus-visible {
  outline: 3px solid rgba(141, 198, 63, 0.56);
  outline-offset: 2px;
}
.claude-usage-refresh:disabled { cursor: wait; opacity: 0.62; }
.claude-usage-refresh.is-refreshing span { animation: spin 750ms linear infinite; }

.notification-enable-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border: 1px solid #cbdcf4;
  border-radius: 11px;
  color: #234596;
  background: #f7faff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-enable-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-enable-button:disabled { cursor: not-allowed; opacity: 0.6; }

.notification-enable-button:hover { background: #eaf1ff; }
.notification-enable-button:focus-visible,
.conversion-notification-dismiss:focus-visible {
  outline: 3px solid rgba(141, 198, 63, 0.56);
  outline-offset: 2px;
}

.notification-enable-button.is-enabled {
  border-color: #bddc99;
  color: #35671a;
  background: #f2fae9;
}

.conversion-notification-toast {
  position: fixed;
  z-index: 100;
  right: 22px;
  bottom: 22px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: min(460px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid #bddd96;
  border-radius: 16px;
  color: #263957;
  background: linear-gradient(135deg, #fcfef9, #eff9e6);
  box-shadow: 0 18px 46px rgba(25, 53, 104, 0.22);
  animation: conversion-notification-in 340ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.conversion-notification-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, #4f8f22, #8dc63f);
  box-shadow: 0 0 0 5px rgba(141, 198, 63, 0.16);
  font-weight: 900;
}

.conversion-notification-toast.is-status-only {
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(240px, calc(100vw - 32px));
}

.conversion-notification-toast strong { display: block; color: #17346f; font-size: 14px; }
.conversion-notification-toast p { margin: 3px 0 0; color: #596b87; font-size: 13px; line-height: 1.35; }
.conversion-notification-dismiss {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #61708d;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.conversion-notification-dismiss:hover { color: #17346f; background: rgba(35, 69, 150, 0.08); }

@keyframes conversion-notification-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


.auth-email {
  font-size: 13px;

  color: #5a6478;
}


#loginError {
  margin-bottom: 14px;
}


/* CSP-safe visual refresh: no remote assets or inline behaviour required. */
:root {
  --ink: #17346f;
  --muted: #61708d;
  --line: #dce5f2;
  --surface: rgba(255, 255, 255, 0.9);
  --canvas: #f5f8fc;
  --primary: #234596;
  --primary-dark: #173575;
  --lime: #8dc63f;
  --cyan: #8dc63f;
  --shadow: 0 18px 55px rgba(23, 52, 111, 0.12);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at 8% -8%, rgba(141, 198, 63, 0.18), transparent 30rem),
    radial-gradient(circle at 96% 0%, rgba(35, 69, 150, 0.13), transparent 26rem),
    var(--canvas);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.3;
  background-image: linear-gradient(rgba(35, 69, 150, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(35, 69, 150, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.topbar {
  height: 78px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(223, 230, 242, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.topbar-inner,
.container {
  width: min(1120px, calc(100% - 40px));
}

.container {
  margin: 62px auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 12px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.brand:hover { transform: translateY(-1px); }

.brand-logo {
  display: block;
  width: clamp(180px, 20vw, 248px);
  height: auto;
}

.brand:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible,
.small-button:focus-visible,
.back-button:focus-visible,
.download-button:focus-visible {
  outline: 3px solid rgba(141, 198, 63, 0.56);
  outline-offset: 4px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), #315aaa);
  box-shadow: 0 8px 18px rgba(35, 69, 150, 0.26);
}

.brand-copy,
.brand-eyebrow,
.brand-name { display: block; }

.brand-eyebrow {
  margin-bottom: 1px;
  color: #7a879f;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-name-primary { color: var(--primary); }
.brand-name-accent { color: var(--lime); }

.page-header { margin-bottom: 28px; }

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.page-header p {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1rem;
}

#historyView > .page-header:first-child {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

#historyView > .page-header:first-child .primary-button {
  flex: 0 0 auto;
  padding: 12px 18px;
}

.access-management-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.access-management-header > .secondary-button { flex: 0 0 auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.repository-catalogue-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(120px, 1fr);
  align-items: center;
  width: min(100%, 680px);
  column-gap: 18px;
  margin: 0 0 20px;
}

.project-search-control {
  display: flex;
  align-items: center;
  min-width: min(100%, 420px);
  max-width: none;
  width: 100%;
  overflow: hidden;
  border: 1px solid #cbd7eb;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(28, 53, 105, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-search-control:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(35, 69, 150, 0.13), 0 10px 24px rgba(28, 53, 105, 0.1);
  transform: translateY(-1px);
}

.project-search-control > span {
  display: flex;
  width: 48px;
  align-self: stretch;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  padding-bottom: 2px;
  background: linear-gradient(135deg, #edf5e2, #f7fbf1);
}

.project-search-control input {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0 15px;
  color: var(--ink);
  font-size: 1.05rem;
  background: transparent;
  box-shadow: none;
}

.project-search-control input:focus { box-shadow: none; }
.project-search-control input::placeholder { color: #7a879f; }

.project-attribution {
  margin-top: 6px;
  color: #516482;
  font-size: 0.78rem;
  line-height: 1.45;
}

.repository-results-summary {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}


.project-open-button {
  display: block;
  max-width: 100%;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 750;
  line-height: 1.35;
  overflow: hidden;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.project-open-button:hover,
.project-open-button:focus-visible {
  color: var(--primary);
  text-decoration-color: currentColor;
}

.project-activity-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.project-activity-card { padding: clamp(22px, 3vw, 34px); }

.project-activity-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.project-activity-metadata span {
  padding: 8px 11px;
  border: 1px solid #dce5f2;
  border-radius: 10px;
  color: var(--muted);
  background: #f8fbff;
  font-size: 0.82rem;
}

.project-activity-metadata strong { color: var(--ink); }
.project-repository-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
}
.project-repository-link:hover { color: var(--primary); }
.project-repository-link:hover strong { color: var(--primary); text-decoration: underline; }
.project-repository-link span { color: var(--primary); font-size: 0.9em; }

.project-activity-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.project-activity-section-heading h2 {
  margin: 0 0 3px;
  color: var(--ink);
  font-size: 1.22rem;
}

.project-activity-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-conversions-pagination { margin-bottom: 0; }
.compact-empty-state { padding: 40px 24px; }

/* Listing cards must remain visibly distinct from the canvas even when a
 * browser does not support backdrop filters. */
#historyView .job-card,
#projectActivityView .job-card,
#historyView .empty-state,
#projectActivityView .empty-state {
  background: #ffffff;
}

.repository-description {
  max-width: 680px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.repository-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.repository-page-count {
  min-width: 84px;
  text-align: center;
  font-weight: 700;
}

.project-setup-grid {
  display: grid;
  max-width: 800px;
  gap: 20px;
}

.project-setup-card { position: relative; }

.project-setup-heading {
  display: flex;
  align-items: flex-start;
  margin-bottom: 24px;
}

.project-setup-heading h2 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.16rem;
  letter-spacing: -0.03em;
}

.project-setup-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.project-create-card {
  overflow: hidden;
  border-color: rgba(35, 69, 150, 0.24);
  background: linear-gradient(135deg, #234596, #173575);
}

.project-create-card::after {
  position: absolute;
  top: -74px;
  right: -69px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: rgba(141, 198, 63, 0.7);
  content: "";
}

.project-create-card .project-setup-heading { position: relative; z-index: 1; }
.project-create-card .project-setup-heading h2 { color: #ffffff; }
.project-create-card .project-setup-heading p { color: rgba(255, 255, 255, 0.76); }
.project-create-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.project-create-layout .project-setup-heading { margin-bottom: 0; }

.project-create-card .primary-button {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    min-width: 190px;
    font-size: 1rem;
    color: var(--primary-dark);
    background: #fff;
    box-shadow: 0 10px 20px rgba(9, 30, 78, 0.28);
    text-shadow: none;
}

#repositoryUrlForm { margin-top: 24px; }

.repository-url-control {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid #d4ddea;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.repository-url-control:focus-within {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(35, 69, 150, 0.14);
}

.repository-url-control > span {
  display: grid;
  width: 48px;
  height: 50px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 800;
  background: #edf7df;
}

.repository-url-control input[type="url"] {
  width: 100%;
  min-width: 0;
  height: 50px;
  border: 0;
  border-radius: 0;
  padding: 0 14px;
  background: transparent;
  box-shadow: none;
}

.repository-url-control input[type="url"]:focus { box-shadow: none; }

.repository-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border: 1px solid #f1c8c8;
  border-radius: 14px;
  color: #873c3c;
  background: #fff5f5;
}

.repository-message[data-kind="duplicate"] {
  border-color: #cfe6ad;
  color: #38551a;
  background: #f3fae9;
}

.repository-message-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 850;
  background: #b94a4a;
}

.repository-message[data-kind="duplicate"] .repository-message-icon { background: var(--lime); }
.repository-message strong { display: block; font-size: 0.9rem; }
.repository-message p { margin: 2px 0 0; font-size: 0.86rem; }

.repository-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 30px 0 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.repository-divider::before,
.repository-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.repository-list { display: grid; gap: 10px; }

.repository-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.repository-row strong,
.repository-row span,
.repository-row small { display: block; }
.repository-row strong { color: var(--ink); }
.repository-row span { margin-top: 3px; color: var(--muted); font-size: 0.9rem; }
.repository-row small { margin-top: 6px; color: var(--primary); font-weight: 700; }

#loginView {
  width: min(100%, 560px);
  margin: max(4vh, 24px) auto 0;
  animation: rise-in 440ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#loginView .page-header { text-align: center; }
#loginView .page-header p { margin-right: auto; margin-left: auto; }

.card,
.job-card,
.empty-state {
  border-color: rgba(223, 230, 242, 0.88);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card {
  border-radius: 22px;
  padding: clamp(24px, 4vw, 38px);
}

.card.project-create-card {
  background: linear-gradient(135deg, #234596, #173575);
}

#loginView .card { position: relative; overflow: hidden; }

#loginView .card::before {
  content: "";
  position: absolute;
  width: 13rem;
  height: 13rem;
  top: -10rem;
  right: -7rem;
  border-radius: 50%;
  background: rgba(141, 198, 63, 0.16);
}

.auth-card {
  width: min(100%, 860px);
  margin: 0 auto;
}

.auth-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, 0.85fr);
  gap: 18px;
  align-items: stretch;
}

.auth-panel {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid #dce5f2;
  border-radius: 16px;
  background: #ffffff;
}

.auth-panel--signin { box-shadow: 0 10px 24px rgba(28, 53, 105, 0.07); }

.auth-panel--signup {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-color: #d1e6ad;
  background: linear-gradient(150deg, #f7fbf0, #eef7df);
}

.auth-panel-heading { margin-bottom: 24px; }

.auth-panel-heading h2 {
  margin: 5px 0 7px;
  color: var(--ink);
  font-size: 1.28rem;
  letter-spacing: -0.035em;
}

.auth-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.auth-panel-kicker {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-panel--signup .secondary-button {
  border-color: #b7d287;
  color: #33541a;
  background: #ffffff;
}

.auth-signup-form {
  max-width: 540px;
  margin: 28px auto 0;
  padding-top: 4px;
}

.field { margin-bottom: 22px; }

.field > label {
  color: #273653;
  font-size: 0.88rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid #d4ddea;
  border-radius: 12px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.02);
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="url"],
select { height: 50px; }

textarea {
  min-height: 126px;
  padding-top: 13px;
  padding-bottom: 13px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(35, 69, 150, 0.14);
}

.field:focus-within > label { color: var(--primary); }

.reference-images { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.reference-image-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.reference-image-preview { display: flex; align-items: center; gap: 6px; }
.reference-image-preview img { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; }
.reference-image-preview .small-button { min-height: 30px; padding: 0 8px; }

.template-source-field { margin-top: 22px; }
.field-help { margin: 6px 0 12px; color: var(--muted); font-size: 14px; }
.template-source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.template-source-name { min-width: 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }

.project-files-card { margin-bottom: 20px; }
.project-files-header,
.project-upload-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.project-files-header h2 { margin: 0 0 6px; color: var(--ink); font-size: 20px; }
.project-files-header p { max-width: 760px; margin: 0; color: var(--muted); line-height: 1.55; }
.project-files-upload-actions { flex: 0 0 auto; }
.project-files-summary {
  margin: 20px 0 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: #f8faff;
  font-size: 13px;
  font-weight: 650;
}
.project-files-list { display: grid; gap: 12px; }
.project-upload-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.project-upload-heading strong { color: var(--ink); overflow-wrap: anywhere; }
.project-upload-meta { margin-top: 6px; color: var(--muted); font-size: 12px; }
.project-file-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #234596;
  background: #eaf0fc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.project-file-badge.is-additional { color: #3b6b15; background: #edf7df; }
.project-original-download { flex: 0 0 auto; text-decoration: none; }
.project-upload-card details { margin-top: 14px; }
.project-upload-card summary { cursor: pointer; color: var(--primary); font-weight: 750; }
.project-file-select-all {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.project-file-tree { max-height: 340px; margin: 0; padding: 0; overflow: auto; list-style: none; border: 1px solid var(--line); border-radius: 10px; }
.project-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 7px 10px;
  border-bottom: 1px solid #edf1f7;
}
.project-file-row:last-child { border-bottom: 0; }
.project-file-choice { display: flex; align-items: center; gap: 9px; min-width: 0; }
.project-file-path { min-width: 0; color: #35415b; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.project-file-size { color: var(--muted); font-size: 11px; white-space: nowrap; }
.project-file-download { color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.project-file-download:hover { text-decoration: underline; }
.compact-empty { min-height: 76px; }

.primary-button,
.download-button {
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #315aaa, var(--primary-dark));
  box-shadow: 0 10px 20px rgba(23, 53, 117, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.primary-button:hover:not(:disabled),
.download-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 14px 26px rgba(23, 53, 117, 0.3);
}

.secondary-button,
.small-button {
  border-color: #d8e0ed;
  border-radius: 11px;
  color: #35415b;
  background: rgba(255, 255, 255, 0.8);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.secondary-button:hover:not(:disabled),
.small-button:hover {
  transform: translateY(-1px);
  border-color: #bdc8dc;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(30, 41, 75, 0.09);
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--primary);
  font-weight: 750;
  transition: transform 180ms ease, color 180ms ease;
}

.back-button:hover { transform: translateX(-3px); color: var(--primary-dark); }

.dropzone {
  min-height: 176px;
  border-color: #c8d4e7;
  border-radius: 18px;
  background: rgba(248, 250, 255, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.dropzone:hover,
.dropzone.dragover {
  transform: translateY(-2px);
  border-color: var(--primary);
  background: rgba(246, 251, 238, 0.94);
  box-shadow: 0 14px 28px rgba(35, 69, 150, 0.12);
}

.upload-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 10px;
  border-radius: 16px;
  color: var(--primary);
  font-size: 25px;
  background: #edf7df;
}

.job-card {
  border-radius: 18px;
  padding: 18px 20px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.job-card:hover {
  transform: translateY(-2px);
  border-color: #ccd7ea;
  box-shadow: 0 16px 28px rgba(30, 41, 75, 0.1);
}

.job-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--primary);
  background: linear-gradient(135deg, #e9f0fc, #eef8df);
}

.job-name { color: var(--ink); font-weight: 750; }

.status-badge {
  padding: 7px 10px;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.progress-bar { height: 10px; background: #e8edf6; }

.progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  box-shadow: 0 0 16px rgba(141, 198, 63, 0.38);
}

.progress-fill.is-active {
  background-image: linear-gradient(90deg, var(--primary) 0%, #3d69a8 38%, var(--lime) 50%, #3d69a8 62%, var(--primary) 100%);
  background-size: 220% 100%;
  animation: active-progress 1.8s linear infinite;
}

.status-badge.is-active {
  animation: status-pulse 1.5s ease-in-out infinite;
}

.logs {
  border-color: #1e293b;
  border-radius: 16px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.16);
}

.logs-header { letter-spacing: 0.07em; text-transform: uppercase; }
.success-box { border-radius: 16px; }

.loading {
  display: grid;
  place-items: center;
  min-height: 120px;
}

.loading::before {
  content: "";
  width: 22px;
  height: 22px;
  margin-bottom: 10px;
  border: 3px solid #e3ebf8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 750ms linear infinite;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(360deg); } }

@keyframes active-progress {
  from { background-position: 100% 0; }
  to { background-position: -120% 0; }
}

@keyframes status-pulse {
  50% { transform: scale(1.05); box-shadow: 0 0 0 5px rgba(141, 198, 63, 0.14); }
}

@media (max-width: 700px) {
  .project-activity-header,
  .project-activity-section-heading,
  .access-management-header {
    align-items: stretch;
    flex-direction: column;
  }

  .project-activity-header > .primary-button { align-self: flex-start; }
  .access-management-header > .secondary-button { align-self: flex-start; }
  .auth-card-grid { grid-template-columns: 1fr; }
  .project-files-header,
  .project-upload-heading { flex-direction: column; }
  .project-original-download,
  .project-files-upload-actions .small-button { width: 100%; text-align: center; }
  .project-file-row { grid-template-columns: minmax(0, 1fr) auto; }
  .project-file-size { display: none; }
}

@media (max-width: 920px) {
  .auth-email { display: none; }
  .auth-actions { gap: 8px; }
}

@media (max-width: 650px) {
  .topbar { height: auto; min-height: 70px; }
  .topbar-inner,
  .container { width: calc(100% - 28px); }
  .topbar-inner { min-height: 70px; padding: 9px 0; flex-wrap: wrap; gap: 7px 12px; }
  .auth-actions { width: 100%; justify-content: flex-end; flex-wrap: wrap; }
  .container { margin: 38px auto; }
  .brand-logo { width: min(210px, 62vw); }
  .claude-usage-header { margin-right: auto; }
  .notification-enable-button { padding: 8px; }
  .claude-usage-title > span:last-child,
  .claude-usage-reset-word { display: none; }
  .claude-usage-title { padding-right: 1px; }
  .claude-usage-window { min-width: 68px; }
  .card { border-radius: 18px; }
  .project-create-layout { align-items: stretch; flex-direction: column; }
  .project-create-card .primary-button { width: 100%; }
  #historyView > .page-header:first-child,
  .repository-row { align-items: stretch; flex-direction: column; }
  #historyView > .page-header:first-child .primary-button,
  .repository-row .small-button { width: 100%; }
}

@media (max-width: 520px) {
  .conversion-notification-toast {
    right: 14px;
    bottom: 14px;
    width: calc(100vw - 28px);
    gap: 9px;
  }
  .conversion-notification-toast .small-button { padding: 7px 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
