* { box-sizing: border-box; }

:root {
  --fs-orange: #F57C00;
  --fs-orange-dark: #E66A00;
  --fs-charcoal: #1B1B1B;
  --fs-light: #F5F5F5;
  --fs-border: #E5E7EB;
  --fs-danger: #C81E1E;

  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--fs-charcoal);
  background: var(--fs-light);
  font-synthesis: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f3f4f6;
}

button, input, textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 700;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.primary {
  background: var(--fs-orange);
  color: white;
}

.primary:hover {
  background: var(--fs-orange-dark);
}

.secondary {
  background: white;
  color: #111827;
  border: 1px solid #d1d5db;
}

.danger {
  background: var(--fs-danger);
  color: white;
}

.success {
  background: var(--fs-orange);
  color: white;
}

.success:hover {
    background: var(--fs-green);
    filter: brightness(0.92);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 16px;
  color: white;
  background: var(--fs-orange);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 5vw, 2rem);
}

.eyebrow {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.8);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
}

main {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 24px 16px 80px;
}

section {
  margin-bottom: 34px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-actions input {
  min-width: 230px;
}

.badge {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: #e5e7eb;
  font-weight: 800;
}

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

.job-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(17,24,39,.06);
}

.job-card.running {
  border: 2px solid var(--fs-orange);
}

.job-meta {
  color: #6b7280;
  font-size: .92rem;
  line-height: 1.45;
}

.timer {
  margin: 18px 0;
  font-variant-numeric: tabular-nums;
  font-size: clamp(2rem, 10vw, 3.4rem);
  font-weight: 800;
  letter-spacing: .02em;
}

.status {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e5e7eb;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status.running {
  background: #fff1e6;
  color: var(--fs-orange-dark);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card-actions .complete {
  grid-column: 1 / -1;
}

input, textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px;
  background: white;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

dialog {
  width: min(560px, calc(100% - 24px));
  border: 0;
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
}

dialog::backdrop {
  background: rgba(17,24,39,.72);
}

dialog form,
#detailsContent {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.dialog-header,
.dialog-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.dialog-header h2 {
  margin: 0;
}

.dialog-actions {
  justify-content: flex-end;
}

.icon-button {
  min-width: 44px;
  width: 44px;
  padding: 0;
  font-size: 1.7rem;
  background: transparent;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  background: white;
  border: 1px solid #e5e7eb;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th, td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

th {
  background: #f9fafb;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.link-button {
  min-height: 36px;
  padding: 0 10px;
  background: #eef2ff;
  color: #3730a3;
}

.danger-link {
  background: #b91c1c;
  color: white;
}

.empty-state {
  color: #6b7280;
  padding: 18px 2px;
}

.session-list {
  margin: 0;
  padding-left: 20px;
}

@media (max-width: 640px) {
.app-header {
    align-items: flex-start;
    flex-wrap: wrap;
}

  .app-header .primary {
    min-height: 42px;
    padding: 0 12px;
  }

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

  .section-actions {
    width: 100%;
  }

  .section-actions input,
  .section-actions button {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
    .product-heading {
    width: 100%;
}

.header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.header-button {
    min-width: 0;
    white-space: nowrap;
    font-size: 0.85rem;
}
  }
}


@media (max-width: 640px) {
  .job-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .job-card {
    min-width: 0;
    aspect-ratio: 1 / 1.08;
    padding: 12px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
  }

  .job-card h3 {
    margin-bottom: 6px;
    font-size: 1rem;
    line-height: 1.15;
  }

  .job-meta {
    font-size: .76rem;
    line-height: 1.3;
  }

  .timer {
    margin: auto 0 10px;
    font-size: clamp(1.35rem, 8vw, 2rem);
  }

  .status {
    align-self: flex-start;
    font-size: .65rem;
    padding: 4px 7px;
  }

  .card-actions {
    gap: 6px;
  }

  .card-actions button {
    min-height: 38px;
    padding: 0 6px;
    border-radius: 9px;
    font-size: .78rem;
  }
}
/* ForgeSpace colour theme */

:root {
  --fs-orange: #f96401;
  --fs-background: #bfbfbf;
  --fs-charcoal: #111827;
  --fs-green: #166534;
  --fs-green-light: #dcfce7;
  --fs-red: #c81e1e;
  --fs-border: #d1d5db;
}

body {
  background: var(--fs-background);
}

.app-header {
  background: var(--fs-orange);
}

.eyebrow {
  color: white;
}

.app-header .primary {
  background: transparent;
  color: white;
}

.job-card {
  background: white;
}

.job-card.running {
  border: 2px solid var(--fs-green);
}

.status.running {
  background: var(--fs-green-light);
  color: var(--fs-green);
}

.success {
  background: var(--fs-green);
  color: white;
}

.primary {
  background: var(--fs-charcoal);
  color: white;
}

.secondary {
  background: white;
  color: var(--fs-charcoal);
  border: 1px solid var(--fs-border);
}

.product-heading {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-title h1 {
    margin: 0;
}

.fs-monogram {
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    color: white;
    line-height: 1;
    letter-spacing: -1px;
}
/* ===== ForgeSpace Header ===== */
/* ===== ForgeSpace Header ===== */

.product-heading {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.product-title h1 {
  margin: 0;
  color: white;
  font-family: "Orbitron", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fs-monogram {
  display: block;
  width: 64px;
  height: auto;
  flex-shrink: 0;
}

.business-name {
  margin: 3px 0 0 76px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
  font-weight: 500;
}
/* ===== Header actions ===== */

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

.header-button {
  background: transparent;
  color: white;
  padding: 0 10px;
}

.header-button:hover {
  background: rgba(255, 255, 255, 0.14);
}