:root {
  --bg: #fff5bc;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.97);
  --line: rgba(159, 174, 203, 0.36);
  --muted: #667085;
  --text: #172033;
  --brand: #ff8700;
  --brand-dark: #e66d00;
  --teal: #0aa9b2;
  --teal-dark: #087f88;
  --danger: #c93636;
  --danger-bg: #fff0f0;
  --soft: #fff8df;
  --shadow: 0 22px 60px rgba(82, 64, 20, 0.16);
  --inner-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 8%, rgba(181, 226, 82, 0.48) 0 15%, transparent 31%),
    radial-gradient(circle at 100% 58%, rgba(9, 195, 197, 0.62) 0 20%, transparent 37%),
    radial-gradient(circle at 42% 100%, rgba(255, 216, 88, 0.46) 0 24%, transparent 48%),
    linear-gradient(135deg, #fff8d3 0%, #fffbea 37%, #eaf5d7 68%, #b8ebe7 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64) 0 30%, transparent 30.2%),
    linear-gradient(138deg, transparent 0 58%, rgba(255, 255, 255, 0.34) 58.2% 74%, transparent 74.2%);
}

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

button {
  border: 0;
}

.workspace-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.side-nav,
.list-panel,
.detail-panel,
.placeholder-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow), var(--inner-shadow);
  backdrop-filter: blur(14px);
}

.side-nav {
  position: sticky;
  top: 24px;
  height: calc(100vh - 48px);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand-block {
  display: flex;
  align-items: flex-start;
}

.brand-logo {
  display: block;
  width: 172px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.eyebrow {
  margin: 0 0 5px;
  color: rgba(52, 64, 84, 0.72);
  font-size: 13px;
  letter-spacing: 0;
  font-weight: 700;
}

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

.nav-item {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.68);
}

.nav-item.active {
  background:
    linear-gradient(#fffdf3, #fffdf3) padding-box,
    linear-gradient(90deg, #12cfc1, #ff9900) border-box;
  border: 1px solid transparent;
  color: var(--teal-dark);
  box-shadow: 0 12px 26px rgba(255, 135, 0, 0.12);
}

.shutdown-nav-item {
  margin-top: auto;
  background: rgba(255, 240, 240, 0.72);
  color: var(--danger);
}

.shutdown-nav-item:hover {
  background: rgba(255, 224, 224, 0.9);
}

.nav-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--teal-dark);
  font-size: 13px;
}

.side-note {
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  line-height: 1.55;
  font-size: 13px;
}

.side-note strong,
.side-note span {
  display: block;
}

.workspace-main {
  min-width: 0;
}

.workspace-view {
  display: none;
}

.workspace-view.active {
  display: block;
}

.topbar,
.title-row,
.toolbar,
.copy-layout,
.panel-head,
.field-head,
.form-actions,
.status-row {
  display: flex;
}

.topbar {
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}

.title-row {
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

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

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.toolbar {
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.search-box {
  position: relative;
  flex: 1;
}

.search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-icon {
  position: absolute;
  left: 19px;
  bottom: 16px;
  width: 17px;
  height: 17px;
  border: 2px solid #374151;
  border-radius: 999px;
  pointer-events: none;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  right: -6px;
  bottom: -3px;
  border-radius: 999px;
  background: #374151;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-box span,
.field span,
.field-head span {
  display: block;
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.field span {
  margin-bottom: 7px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

.search-box input {
  height: 50px;
  padding-left: 54px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 26px rgba(82, 64, 20, 0.12), var(--inner-shadow);
}

textarea {
  min-height: 230px;
  padding: 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(10, 169, 178, 0.16);
}

.count {
  min-width: 76px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(82, 64, 20, 0.12), var(--inner-shadow);
}

.copy-layout {
  align-items: flex-start;
  gap: 24px;
}

.list-panel {
  flex: 1;
  min-width: 0;
  padding: 26px 22px;
}

.detail-panel {
  width: min(600px, 45vw);
  padding: 24px;
  position: sticky;
  top: 24px;
}

.panel-head {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.copy-list {
  display: grid;
  gap: 11px;
}

.case-row {
  position: relative;
  width: 100%;
  min-height: 62px;
  padding: 13px 20px;
  border: 1px solid rgba(207, 214, 226, 0.82);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-weight: 900;
  font-size: 17px;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04), var(--inner-shadow);
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.case-row:hover {
  transform: translateY(-1px);
  border-color: rgba(10, 169, 178, 0.5);
  background: #fff;
}

.case-row.active {
  border-color: transparent;
  background:
    linear-gradient(#fffdf3, #fffdf3) padding-box,
    linear-gradient(90deg, #12cfc1, #ff9900) border-box;
  color: #087f88;
  box-shadow: 0 12px 26px rgba(255, 135, 0, 0.14), 0 10px 24px rgba(10, 169, 178, 0.12);
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.preview-field {
  position: relative;
  min-height: 110px;
  border: 1px solid rgba(210, 218, 230, 0.78);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.045), var(--inner-shadow);
}

.preview-field::after {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 17px;
  box-shadow: 0 9px 18px rgba(17, 24, 39, 0.08);
}

.icon-case::after {
  content: "○";
  background: #ffe7a8;
  color: #ff8700;
}

.icon-title::after {
  content: "◇";
  background: #eef6ff;
  color: #0aa9b2;
}

.icon-price::after {
  content: "$";
  background: #ffe7a8;
  color: #ff8700;
  font-weight: 900;
}

.icon-location::after {
  content: "⌖";
  background: #bdeee7;
  color: #087f88;
  font-weight: 900;
}

.icon-category::after {
  content: "□";
  background: #ffe7a8;
  color: #ff8700;
}

.icon-condition::after {
  content: "⌂";
  background: #d7f1b7;
  color: #308a4b;
}

.preview-field.wide {
  grid-column: 1 / -1;
}

.preview-field.wide::after {
  content: none;
}

.field-head {
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.preview-value {
  min-height: 24px;
  padding-right: 42px;
  color: #1f2a44;
  line-height: 1.6;
  user-select: text;
  cursor: text;
  overflow-wrap: anywhere;
}

.preview-field.wide .preview-value {
  padding-right: 0;
}

.preview-value.multiline {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
}

.field {
  display: block;
  margin-bottom: 14px;
}

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

.primary-button,
.edit-button,
.ghost-button,
.danger-button,
.copy-button {
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

.primary-button {
  min-height: 46px;
  padding: 0 21px;
  background: linear-gradient(180deg, #ff9d19, #ff7600);
  color: #fff;
  box-shadow: 0 12px 24px rgba(255, 118, 0, 0.24);
}

.primary-button:hover {
  background: linear-gradient(180deg, #ffab2f, #e66d00);
}

.edit-button {
  min-height: 42px;
  padding: 0 16px;
  background: linear-gradient(180deg, #12aeb8, #087f88);
  color: #fff;
  box-shadow: 0 12px 24px rgba(8, 127, 136, 0.22);
}

.ghost-button {
  min-height: 38px;
  padding: 0 12px;
  background: rgba(239, 242, 247, 0.9);
  color: #344054;
}

.danger-button {
  min-height: 38px;
  padding: 0 12px;
  background: var(--danger-bg);
  color: var(--danger);
}

.copy-button {
  min-height: 28px;
  padding: 0 9px;
  background: rgba(239, 242, 247, 0.92);
  color: #344054;
  font-size: 13px;
}

.copy-button:hover,
.ghost-button:hover {
  background: #e2e7ef;
}

.purchase-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: purchaseBackdropIn 200ms ease-out both;
}

.purchase-prompt-open {
  overflow: hidden;
}

.purchase-dialog {
  position: relative;
  width: min(92vw, 620px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 32px 38px 28px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  outline: none;
  animation: purchaseDialogIn 220ms ease-out both;
}

.purchase-dialog-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.purchase-dialog-close:hover {
  background: #e4e7ec;
  transform: translateY(-1px);
}

.purchase-dialog-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding-right: 36px;
}

.purchase-dialog-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #fff7ed;
  font-size: 24px;
}

.purchase-dialog h2 {
  margin: 0 0 8px;
  color: #101828;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.purchase-dialog p {
  margin: 0;
  color: #475467;
  font-size: 17px;
  line-height: 1.65;
}

.purchase-dialog-promo {
  margin-top: 22px;
  padding: 13px 16px;
  border: 1px solid rgba(251, 146, 60, 0.24);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96), rgba(254, 243, 199, 0.72));
  color: #ea580c;
  font-size: 19px;
  font-weight: 800;
  text-align: center;
}

.purchase-dialog-price-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 138, 0, 0.22);
  border-radius: 22px;
  background: linear-gradient(135deg, #fffdf7, #fff7ed);
}

.purchase-price-copy {
  min-width: 0;
  text-align: center;
}

.purchase-price-lead,
.purchase-price-badge {
  display: block;
  color: #92400e;
  font-size: 18px;
  font-weight: 700;
}

.purchase-price-badge {
  margin-top: 4px;
}

.purchase-price-main {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  color: #dc2626;
}

.purchase-price-main strong {
  color: #ff2d2d;
  font-size: 82px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

.purchase-price-currency {
  font-size: 34px;
  font-weight: 800;
}

.purchase-price-unit {
  font-size: 30px;
  font-weight: 800;
}

.purchase-original-price {
  margin-top: 8px;
  color: #667085;
  font-size: 17px;
  font-weight: 600;
}

.purchase-original-price span {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.purchase-dialog-illustration {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.purchase-dialog-illustration svg {
  width: 64px;
  height: 64px;
}

.purchase-feature-list {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.purchase-feature-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  color: #344054;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.6;
}

.purchase-feature-list li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #16a34a;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
}

.purchase-dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.36fr) minmax(0, 0.64fr);
  gap: 12px;
  align-items: start;
  margin-top: 24px;
}

.purchase-dialog[data-purchase-kind="fifth"] .purchase-dialog-actions {
  grid-template-columns: 1fr;
}

.purchase-action-group {
  display: grid;
  gap: 8px;
}

.purchase-primary-button,
.purchase-secondary-button {
  min-height: 54px;
  border-radius: 14px;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.purchase-primary-button {
  background: linear-gradient(135deg, #ff8a00, #ff2d2d);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(255, 80, 0, 0.28);
}

.purchase-primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 18px 34px rgba(255, 80, 0, 0.34);
}

.purchase-secondary-button {
  background: #f2f4f7;
  color: #344054;
}

.purchase-secondary-button:hover {
  background: #e4e7ec;
  transform: translateY(-1px);
}

.purchase-action-note {
  color: #667085;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.purchase-safe-note {
  color: #344054;
}

@keyframes purchaseBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes purchaseDialogIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  .purchase-dialog-backdrop {
    padding: 12px;
  }

  .purchase-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px 18px 20px;
    border-radius: 20px;
  }

  .purchase-dialog-head {
    gap: 10px;
    padding-right: 32px;
  }

  .purchase-dialog-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 20px;
  }

  .purchase-dialog h2 {
    font-size: 26px;
  }

  .purchase-dialog p {
    font-size: 15px;
  }

  .purchase-dialog-promo {
    margin-top: 18px;
    font-size: 17px;
  }

  .purchase-dialog-price-card {
    grid-template-columns: 1fr;
    padding: 18px 16px;
  }

  .purchase-dialog-illustration {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 58px;
    height: 58px;
    opacity: 0.7;
  }

  .purchase-dialog-illustration svg {
    width: 42px;
    height: 42px;
  }

  .purchase-price-main {
    gap: 7px;
  }

  .purchase-price-main strong {
    font-size: 64px;
  }

  .purchase-price-currency {
    font-size: 27px;
  }

  .purchase-price-unit {
    font-size: 24px;
  }

  .purchase-feature-list li {
    font-size: 16px;
  }

  .purchase-dialog-actions {
    grid-template-columns: 1fr;
  }

  .purchase-action-primary {
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .purchase-dialog-backdrop,
  .purchase-dialog,
  .purchase-dialog-close,
  .purchase-primary-button,
  .purchase-secondary-button {
    animation: none;
    transition: none;
  }

  .purchase-dialog-close:hover,
  .purchase-primary-button:hover,
  .purchase-secondary-button:hover {
    transform: none;
  }
}

.form-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.form-actions .danger-button {
  margin-right: auto;
}

.empty-state {
  border: 1px dashed rgba(160, 174, 196, 0.86);
  border-radius: 10px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.55);
}

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

.placeholder-card {
  padding: 24px;
  min-height: 180px;
}

.placeholder-card h3 {
  margin-bottom: 10px;
}

.placeholder-card p {
  color: #475467;
  line-height: 1.7;
}

.info-grid {
  align-items: stretch;
}

.info-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.info-card .primary-button {
  justify-self: start;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(203, 213, 225, 0.62);
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list dt {
  color: #667085;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  color: #172033;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.jobs-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 24px;
}

.job-panel {
  min-height: 360px;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.job-form {
  display: grid;
  gap: 16px;
}

.upload-box {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1.5px dashed rgba(11, 132, 145, 0.45);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  cursor: pointer;
}

.upload-box input {
  display: none;
}

.upload-box span {
  font-size: 18px;
  font-weight: 900;
}

.upload-box small {
  color: #667085;
  line-height: 1.6;
}

.copy-picker {
  display: grid;
  gap: 12px;
}

.copy-picker .field {
  margin-bottom: 0;
}

.copy-picker-list {
  max-height: 270px;
  display: grid;
  gap: 8px;
  overflow: auto;
  padding-right: 4px;
}

.copy-picker-row {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.copy-picker-row:hover {
  border-color: rgba(10, 169, 178, 0.55);
  background: #fff;
}

.copy-picker-row.active {
  border-color: transparent;
  background:
    linear-gradient(#fffdf3, #fffdf3) padding-box,
    linear-gradient(90deg, #12cfc1, #ff9900) border-box;
  box-shadow: 0 10px 22px rgba(10, 169, 178, 0.12);
}

.copy-picker-row strong,
.copy-picker-row span {
  display: block;
}

.copy-picker-row strong {
  font-size: 15px;
  font-weight: 900;
}

.copy-picker-row span {
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.selected-copy-card {
  padding: 15px;
  border: 1px solid rgba(10, 169, 178, 0.26);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
}

.selected-copy-card h4 {
  margin: 0 0 7px;
  font-size: 18px;
}

.selected-copy-card p {
  margin-bottom: 10px;
  color: #475467;
  line-height: 1.5;
}

.selected-copy-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-copy-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(10, 169, 178, 0.1);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 900;
}

.image-sort-list,
.job-list {
  display: grid;
  gap: 10px;
}

.empty-state.compact {
  min-height: auto;
  padding: 18px;
}

.image-sort-item,
.job-row {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(203, 213, 225, 0.82);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.84);
}

.image-sort-item {
  grid-template-columns: 78px minmax(0, 1fr) auto;
}

.image-sort-item img {
  width: 78px;
  height: 62px;
  object-fit: cover;
  border-radius: 10px;
  background: #eef2f7;
}

.image-sort-item strong,
.job-row strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.image-sort-item span,
.job-row span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.sort-actions {
  display: flex;
  gap: 6px;
}

.sort-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: #eef2f7;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}

.sort-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.job-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.job-meta span {
  margin: 0;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #475467;
  font-weight: 800;
}

.job-meta .status-pill {
  background: rgba(255, 138, 0, 0.13);
  color: #b45309;
}

.job-delete-button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  color: #b42318;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.job-delete-button:hover {
  background: rgba(239, 68, 68, 0.18);
}

.status-row {
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #475467;
  font-weight: 800;
}

.status-dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: var(--teal);
}

.status-dot.muted {
  background: #98a2b3;
}

.status-dot.ok {
  background: #23a455;
}

.status-dot.warn {
  background: #ff9d19;
}

.status-dot.error {
  background: #c93636;
}

.fb-session-card .panel-head {
  align-items: flex-start;
}

.fb-session-details {
  margin-top: 14px;
  color: #667085;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.trial-showcase {
  margin-bottom: 24px;
}

.trial-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 18px;
  align-items: stretch;
}

.trial-hero-copy,
.trial-feature-panel,
.trial-buy-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow), var(--inner-shadow);
  backdrop-filter: blur(14px);
}

.trial-hero-copy {
  padding: 30px;
}

.trial-hero-copy h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.trial-subtitle {
  margin: 10px 0 18px;
  color: var(--teal-dark);
  font-size: 19px;
  font-weight: 900;
}

.trial-description {
  max-width: 720px;
  color: #344054;
  line-height: 1.75;
}

.trial-description p {
  margin: 0 0 8px;
}

.trial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.trial-note,
.trial-placeholder-text {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.trial-feature-panel {
  padding: 26px;
}

.trial-feature-panel h2,
.trial-buy-panel h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.trial-feature-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.trial-feature-list li {
  position: relative;
  padding-left: 27px;
  color: #344054;
  font-weight: 800;
  line-height: 1.55;
}

.trial-feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--teal-dark);
  font-weight: 900;
}

.trial-buy-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 22px 26px;
}

.trial-buy-panel p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.44);
  backdrop-filter: blur(4px);
}

.app-modal {
  position: relative;
  width: min(92vw, 560px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
  outline: none;
}

.app-modal h2 {
  margin-bottom: 12px;
  font-size: 28px;
}

.app-modal p {
  color: #475467;
  line-height: 1.75;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: #e4e7ec;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.modal-danger {
  min-height: 46px;
  padding: 0 18px;
}

.shutdown-result {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #fff8d3 0%, #fffbea 45%, #b8ebe7 100%);
  color: var(--text);
  font-family: "Microsoft JhengHei", "Noto Sans TC", Arial, sans-serif;
}

.shutdown-result section {
  width: min(92vw, 560px);
  padding: 32px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  text-align: center;
}

.shutdown-result h1 {
  margin: 0 0 12px;
  font-size: 32px;
}

.shutdown-result p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #172033;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workspace-shell {
    grid-template-columns: 1fr;
  }

  .side-nav {
    position: static;
    height: auto;
  }

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

  .side-note {
    display: none;
  }

  .copy-layout {
    display: block;
  }

  .jobs-layout {
    grid-template-columns: 1fr;
  }

  .trial-hero {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    width: 100%;
    margin-top: 18px;
    position: static;
  }
}

@media (max-width: 760px) {
  .workspace-shell {
    padding: 16px;
  }

  .nav-list,
  .placeholder-grid {
    grid-template-columns: 1fr;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .topbar,
  .toolbar,
  .trial-buy-panel,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .app-modal {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px 18px;
  }

  .trial-hero-copy {
    padding: 24px;
  }

  .trial-hero-copy h1 {
    font-size: 28px;
  }

  .field-grid,
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .case-row {
    min-height: 54px;
    font-size: 16px;
  }

  .image-sort-item,
  .job-row {
    grid-template-columns: 1fr;
  }

  .image-sort-item img {
    width: 100%;
    height: 160px;
  }

  .sort-actions,
  .job-meta {
    justify-content: flex-start;
  }
}
