:root {
  color-scheme: light;
  --bg: #f4f7fa;
  --bg-accent: #e9eff5;
  --ink: #0b1b25;
  --muted: #5b6b76;
  --accent: #014b6e;
  --accent-dark: #013a55;
  --card: #ffffff;
  --line: #d9e3ea;
  --shadow: 0 18px 30px rgba(1, 75, 110, 0.12);
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --transition: 200ms ease;
}

* {
  box-sizing: border-box;
}

.low-shipping-shell {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  color: var(--ink);
  min-height: 100vh;
}

.page {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0 22px;
}

.topbar {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar h1 {
  font-family: "Fraunces", serif;
  font-size: 30px;
  margin: 0 0 6px;
}

.subtitle {
  margin: 0;
  color: var(--muted);
  max-width: 560px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(1, 75, 110, 0.12);
  color: var(--accent);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.topbar__credits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-end;
  min-width: 0;
}

.topbar__status,
.topbar__actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.topbar__status {
  gap: 8px;
}

.topbar__actions {
  gap: 10px;
}

.topbar__actions .credit-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #d8e7ef;
  background: #f8fbfd;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.stat-pill__value {
  color: var(--ink);
  font-weight: 700;
}

.stat-pill--credit {
  background: #ffffff;
}

.stat-pill--credit .stat-pill__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(1, 75, 110, 0.1);
  color: var(--accent);
}

.stat-pill--accent {
  background: rgba(1, 75, 110, 0.12);
  border-color: rgba(1, 75, 110, 0.3);
  color: var(--ink);
}

/* Meesho login status indicator */
.meesho-status { gap: 7px; cursor: default; }
.meesho-status__dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  transition: background 0.3s;
}
.meesho-status__label { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.meesho-status--unknown .meesho-status__dot { background: #9CA3AF; }
.meesho-status--unknown .meesho-status__label { color: #9CA3AF; }
.meesho-status--logged-in .meesho-status__dot { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.meesho-status--logged-in .meesho-status__label { color: #059669; }
.meesho-status--logged-out .meesho-status__dot { background: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.15); }
.meesho-status--logged-out .meesho-status__label { color: #DC2626; }

.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.layout--split {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--panel-accent, #014b6e), #cfe2ed);
  opacity: 0.9;
}

.panel--create {
  --panel-accent: #014b6e;
}

.panel--selection {
  --panel-accent: #6a90a7;
  background: #f7fafc;
}

.panel--results {
  --panel-accent: #98b4c4;
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.panel__header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.panel__header--divider {
  padding-bottom: 12px;
  border-bottom: 1px solid #e4ecf2;
}

.form-block {
  display: grid;
  gap: 10px;
}

.form-label {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.callout {
  border-radius: var(--radius-md);
  background: #f1f6f9;
  border: 1px solid #d7e5ee;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--muted);
}

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

.callout--compact {
  padding: 10px 12px;
}

.gallery-price-summary {
  display: grid;
  gap: 4px;
}

.gallery-savings-row {
  margin-top: 10px;
  display: grid;
  grid-template-columns: auto 120px 1fr;
  align-items: center;
  gap: 10px;
}

.gallery-savings-label {
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}

.gallery-savings-input {
  width: 100%;
  border: 1px solid #c9d7e0;
  border-radius: 8px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
}

.gallery-savings-result {
  text-align: right;
  color: #0a6d2f;
  font-weight: 700;
  font-size: large;
}

.file-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(1, minmax(260px, 1fr));
  align-items: start;
}

.file-card {
  border-radius: var(--radius-md);
  border: 1px solid #d8e3ea;
  background: #f9fbfd;
  min-width: 0;
  padding: 12px;
}

.is-processing .file-list,
.is-processing .upload {
  pointer-events: none;
  opacity: 0.7;
}

.is-processing .btn {
  pointer-events: none;
  opacity: 0.7;
}

.is-processing .btn--credit {
  pointer-events: auto;
  opacity: 1;
}

.btn--credit {
  opacity: 1;
}

.is-processing .select2-container--default .select2-selection--multiple {
  background: #f2f4f7;
  border-color: #d5dee5;
  color: #7a8794;
}

.is-processing .select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #e4e9ee;
  border-color: #cfd8e0;
  color: #6b7784;
}

.is-processing .file-card__name,
.is-processing .file-card__error,
.is-processing .file-card input[type="text"] {
  color: #7a8794;
}

.is-processing .file-card input[type="text"] {
  background: #f2f4f7;
  border-color: #d5dee5;
}

.is-processing .file-card__preview {
  opacity: 0.6;
}

.file-card__body{
    padding: 12px 0px;
}

.file-card__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
}

.file-card__preview {
  width: 100%;
  height: 120px;
  border-radius: 14px;
  background: #eef4f8;
  border: 1px dashed #c7d8e2;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-card__preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.file-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-card__name {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.category-select-wrapper {
  width: 100%;
  display: grid;
  gap: 6px;
}

.category-select__label {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.category-select-wrapper .select2-container {
  width: 100% !important;
}

.select2-container--default .select2-dropdown {
  z-index: 2000;
}

.select2-container--default .select2-selection--multiple {
  border-radius: var(--radius-sm);
  border: 1px solid #c9d7e0;
  min-height: 40px;
  padding: 4px 6px;
  background: #ffffff;
  font-family: inherit;
  box-shadow: 0 10px 18px rgba(1, 75, 110, 0.08);
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin: 2px 0 0 0;
  padding: 4px 8px;
  line-height: 1.2;
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: var(--accent-dark);
  color: #ffffff;
}

.select2-container--default .select2-selection--multiple.is-invalid {
  border-color: #f04438;
  background: #fff5f3;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  background-color: #e8f2ff;
  border: 1px solid #c7d8e2;
  border-radius: 12px;
  color: #0b3b6c;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  color: #0b3b6c;
}

.select2-container--default .select2-results__option[aria-selected="true"],
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #cfe2ed;
  color: var(--ink);
}

.select2-option__title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.select2-option__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.category-picker {
  width: 100%;
}

.category-picker__label {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.category-picker__toggle {
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sm);
  border: 1px solid #c9d7e0;
  padding: 8px 10px;
  background: #ffffff;
  display: grid;
  gap: 4px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(1, 75, 110, 0.08);
  position: relative;
  padding-right: 36px;
}

.category-picker__toggle.is-invalid {
  border-color: #f04438;
  background: #fff5f3;
}

.category-picker__title {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
}

.category-picker__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.category-picker__chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--muted);
}

.category-picker__helper {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.file-card__error {
  font-size: 11px;
  color: #b42318;
}

.file-card__error.is-hidden {
  display: none;
}

.category-picker__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.category-picker__tag {
  background: rgba(1, 75, 110, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 999px;
}

.category-menu {
  position: absolute;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid #d2dee6;
  box-shadow: var(--shadow);
  max-height: 320px;
  overflow: auto;
  z-index: 50;
}

.category-menu__search {
  background: #ffffff;
  padding: 6px 4px 10px;
  border-bottom: 1px solid #e3edf4;
  margin-bottom: 6px;
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9;
}

.category-menu__search input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid #c9d7e0;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
  background: #ffffff;
  color: var(--ink);
}

.category-menu__list {
  display: grid;
  gap: 6px;
  padding: 8px;
}

.category-menu__option {
  position: relative;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #f9fbfd;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
  padding-left: 34px;
}

.category-menu__option:hover {
  border-color: #b8cddb;
  background: #eff5f9;
}

.category-menu__option[data-selected="true"] {
  border-color: rgba(1, 75, 110, 0.5);
  background: rgba(1, 75, 110, 0.12);
}

.category-menu__check {
  position: absolute;
  left: 10px;
  top: 12px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid #b8cddb;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--accent);
  background: #ffffff;
}

.category-menu__title {
  font-weight: 600;
  font-size: 13px;
}

.category-menu__subtitle {
  font-size: 12px;
  color: var(--muted);
}

.category-menu__footer {
  border-top: 1px solid #e3edf4;
  padding: 8px 4px 4px;
  display: flex;
  justify-content: flex-end;
  position: sticky;
  bottom: 0;
  z-index: 99;
  background-color: #ffffff;
}

.panel__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.panel__actions--generate {
  margin-top: 14px;
}

#extensionCheckBtn {
  padding: 11px 16px;
  font-size: 14px;
  box-shadow: none;
}

.upload {
  border: 1px dashed #b9cdda;
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  background: linear-gradient(135deg, #f5f9fc, #ffffff);
  position: relative;
}

.upload input {
  display: none;
}

.upload:hover {
  border-color: var(--accent);
  background: #edf4f8;
}

.upload--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.upload--disabled:hover {
  border-color: #b9cdda;
  background: linear-gradient(135deg, #f5f9fc, #ffffff);
}

.upload__body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.upload__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.upload__body p {
  margin: 0;
  font-weight: 600;
}

.upload__hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.credit-btn {
  border: none;
  background: var(--accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 12px 20px rgba(1, 75, 110, 0.25);
}

.credit-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  color: white;
}

.credit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid #b9cdda;
  box-shadow: none;
}

.btn--ghost:hover {
  background: #eef5f9;
  transform: translateY(-1px);
  color: var(--accent-dark);
}

.btn--small {
  padding: 8px 12px;
  font-size: 13px;
  box-shadow: none;
}

.btn--text {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid #cfe0ea;
  background: #ffffff;
  color: var(--accent);
  box-shadow: none;
}

.btn--text:hover {
  background: #edf6fb;
  color: var(--accent-dark);
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

/* ── Guide trigger button ── */
/* ── Meesho login warning banner ── */
.meesho-login-warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff8e6;
  border: 1px solid #f5a623;
  border-radius: 10px;
  padding: 14px 14px 14px 14px;
  margin-bottom: 12px;
  position: relative;
}
.meesho-login-warning__icon {
  flex-shrink: 0;
  color: #d97706;
  margin-top: 1px;
}
.meesho-login-warning__body {
  flex: 1;
  font-size: 13px;
  color: #7c5800;
}
.meesho-login-warning__body strong {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 4px;
}
.meesho-login-warning__body p {
  margin: 0 0 8px;
  line-height: 1.5;
}
.meesho-login-warning__steps {
  margin: 0;
  padding-left: 18px;
  line-height: 1.7;
}
.meesho-login-warning__steps a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.meesho-login-warning__steps a:hover { text-decoration: underline; }
.meesho-login-warning__close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  color: #a87c30;
  cursor: pointer;
  padding: 2px 4px;
}
.meesho-login-warning__close:hover { color: #92400e; }

.guide-trigger-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #b9cdda;
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  white-space: nowrap;
}
.guide-trigger-btn:hover {
  background: #eef5f9;
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}

/* ── Guide modal card (wider) ── */
.modal__card--guide {
  max-width: 600px;
  max-height: 88vh;
  overflow-y: auto;
}

/* ── Guide steps ── */
.guide-steps {
  display: flex;
  flex-direction: column;
  margin-top: 16px;
}
.guide-steps--modal { margin-top: 12px; }
.guide-step {
  display: flex;
  gap: 14px;
  padding-bottom: 18px;
  position: relative;
}
.guide-step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--line);
}
.guide-step__num {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.guide-step__content { padding-top: 5px; }
.guide-step__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.guide-step__desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.guide-step__desc strong { color: var(--ink); }
.guide-step__desc em { font-style: normal; color: var(--accent); }
.guide-box__note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  background: #f0f7fb;
  border: 1px solid #c7dfe9;
  border-radius: 8px;
  font-size: 12.5px;
  color: #2b5f7a;
  line-height: 1.5;
}
.guide-box__note strong { color: var(--accent-dark); }

.gallery-empty-highlight {
  border: 1px solid #f2d39a;
  background: #fff4dd;
  color: #7c4b00;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  padding: 12px 14px;
}

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

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

.image-grid--history {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 1140px;
  overflow: auto;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e3edf4;
  overflow: hidden;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 27, 37, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  z-index: 999;
}

.modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
}

.modal__card {
  position: relative;
  width: min(520px, 100%);
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 1;
}

.modal--warning {
  background: rgba(23, 18, 7, 0.58);
}

.modal--warning .modal__card {
  border-color: #f59e0b;
  box-shadow: 0 22px 70px rgba(120, 53, 15, 0.28);
}

.modal--warning .badge {
  background: #fff3cd;
  color: #92400e;
}

.modal--warning .modal__header h2 {
  color: #7c2d12;
}

.modal--warning .modal__subtitle {
  color: #5f4630;
  font-weight: 500;
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
}

.modal__header h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", serif;
  font-size: 24px;
}

.modal__subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal__form {
  display: grid;
  gap: 12px;
}

.input-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 600;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f7fafc;
  border: 1px solid #d9e3ea;
  border-radius: 12px;
  padding: 8px 12px;
}

.input-row input {
  border: none;
  background: transparent;
  font-size: 16px;
  width: 100%;
  outline: none;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

.input-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.credit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.is-hidden {
  display: none !important;
}

.credit-pill {
  border: 1px solid #d3e1ea;
  background: #ffffff;
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.credit-pill.is-active,
.credit-pill:hover {
  background: rgba(1, 75, 110, 0.12);
  border-color: rgba(1, 75, 110, 0.4);
}


.input-error {
  margin: 0;
  font-size: 12px;
  color: #a03232;
}

.price-grid {
  display: grid;
  gap: 10px;
  background: #f4f7fa;
  border: 1px solid #d9e3ea;
  border-radius: 14px;
  padding: 14px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
}

.price-row--total {
  font-weight: 700;
  color: var(--ink);
  font-size: 15px;
  border-top: 1px dashed #d3dfe8;
  padding-top: 10px;
}

.modal__note {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .modal__card {
    padding: 22px;
  }

  .modal__actions {
    width: 100%;
  }

  .modal__actions .btn {
    width: 100%;
  }
}

.image-card {
  background: #f9fbfd;
  border-radius: var(--radius-md);
  padding: 12px;
  border: 1px solid #dbe7ef;
  display: grid;
  gap: 8px;
  animation: fadeUp 300ms ease;
}

.image-card__preview {
  min-width: 100%;
  height: 220px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  border-radius: 12px;
  border: 1px solid #e3edf4;
  background: #ffffff;
}

.image-card__preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-card__preview:focus-visible {
  outline: 2px solid rgba(1, 75, 110, 0.6);
  outline-offset: 2px;
}

.modal--lightbox .modal__backdrop {
  background: rgba(11, 27, 37, 0.7);
}

.modal__card--lightbox {
  width: min(700px, 100%);
  max-height: calc(100vh - 48px);
  padding: 18px 20px 14px;
  gap: 10px;
}

.lightbox__stage {
  width: 100%;
  min-height: 280px;
  max-height: calc(100vh - 180px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f6fafc;
  border: 1px solid #d9e3ea;
  border-radius: 14px;
  overflow: hidden;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: calc(100vh - 400px);
  object-fit: contain;
}

.lightbox__caption {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.lightbox__actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.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;
}

.image-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.image-card__shipping {
  font-weight: 600;
  color: var(--accent);
}

.image-card__meta .image-card__note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid #f2d28b;
  border-radius: 6px;
  background: #fff8e6;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
  color: #7a4b00;
}

.image-card__meta .image-card__note::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d98500;
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.image-card__category {
  font-size: 12px;
  color: var(--muted);
}

.image-card__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.job-card {
  background: #f9fbfd;
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid #dbe7ef;
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.job-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.job-card__header .btn {
  white-space: nowrap;
}

.job-card__title {
  font-weight: 700;
  font-size: 16px;
}

.job-card__meta {
  font-size: 12px;
  color: var(--muted);
}

.history-filter {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
}

.history-filter__btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border, #d0dbe5);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.history-filter__btn:hover {
  border-color: var(--accent, #3a6fc4);
  color: var(--accent, #3a6fc4);
}

.history-filter__btn.is-active {
  background: var(--accent, #3a6fc4);
  border-color: var(--accent, #3a6fc4);
  color: #fff;
}

.job-type-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  margin-top: 3px;
}

.job-type-badge--web {
  background: #e8f0fb;
  color: #3a6fc4;
  border: 1px solid #b8d0f5;
}

.job-type-badge--desk {
  background: #e8f7ef;
  color: #1e7a45;
  border: 1px solid #a3dcb8;
}

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

.job-card__item {
  display: grid;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border: 1px solid #e3edf4;
  border-radius: var(--radius-sm);
  padding: 8px;
}

.job-card__preview {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.job-card__preview--skeleton {
  height: 190px;
  border-radius: 12px;
  background: linear-gradient(110deg, #eef3f7 30%, #f9fbfd 50%, #eef3f7 70%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
}

.job-card__preview--failed {
  min-height: 190px;
  height: auto;
  border-radius: 12px;
  background: linear-gradient(120deg, #fff1f2 0%, #fde7ea 45%, #f9d4da 100%);
  border: 1px dashed #f2a7b4;
  color: #9d2c3c;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 10px;
  text-align: center;
  padding: 14px 10px;
}

.job-card__preview--failed .credit-btn {
  align-self: center;
}

.job-card__failed-title {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.job-card__failed-title::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #f2a7b4;
  background: #fff5f6;
  color: #b02336;
  font-size: 12px;
  font-weight: 800;
}

.job-card__retry-message {
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.job-card__retry-message.is-error {
  color: #842029;
  background: #fff5f5;
  border: 1px solid #f1aeb5;
}

.job-card__retry-message.is-warning {
  color: #7a4d00;
  background: #fff8e5;
  border: 1px solid #ffe08a;
}

@keyframes skeletonShimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* ── No-match state: job card ── */
.job-card__preview--no-match {
  height: 190px;
  border-radius: 12px;
  background: #f8faff;
  border: 1.5px dashed #b3c8f7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 14px 12px;
}

.job-card__no-match-icon {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 2px;
}

.job-card__no-match-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #1a3578;
  letter-spacing: 0.01em;
}

.job-card__no-match-message {
  margin: 0;
  font-size: 10.5px;
  font-weight: 500;
  color: #4a6099;
  line-height: 1.4;
}

.job-card__no-match-credits {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #1a7a3c;
  background: #e6f7ed;
  border: 1px solid #a8ddb8;
  border-radius: 20px;
  padding: 2px 10px;
  letter-spacing: 0.02em;
}

/* ── No-match state: gallery banner ── */
.no-match-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 28px 28px;
  border-radius: 16px;
  background: #f8faff;
  border: 1.5px dashed #b3c8f7;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.no-match-banner__icon {
  font-size: 40px;
  line-height: 1;
}

.no-match-banner__title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #1a3578;
}

.no-match-banner__message {
  margin: 0;
  font-size: 14px;
  color: #4a6099;
  line-height: 1.6;
  max-width: 400px;
}

.no-match-banner__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.no-match-banner__credits {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1a7a3c;
  background: #e6f7ed;
  border: 1px solid #a8ddb8;
  border-radius: 20px;
  padding: 4px 16px;
  letter-spacing: 0.02em;
}

.no-match-banner__tip {
  margin: 0;
  font-size: 12px;
  color: #7a90ba;
  line-height: 1.5;
  border-top: 1px solid #dce8ff;
  padding-top: 12px;
  width: 100%;
}

.job-card__category {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  overflow: visible;
  word-break: break-word;
}

.job-card__category strong {
  color: var(--ink);
  font-weight: 700;
  flex: 1 1 auto;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.job-card__status {
  font-size: 12px;
  color: #5b7f92;
  font-weight: 600;
}

.job-card__charges {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  flex: 0 0 auto;
}

.job-card__charge {
  font-size: 11px;
  font-weight: 600;
  color: #0a6d2f;
  white-space: normal;
  text-align: right;
}

.retry-job-btn,
.retry-job-btn:hover {
  background: #fff6f7;
  padding: 7px 12px;
  font-size: 11px;
  color: #9d2c3c;
  border: 1px solid #e89eab;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.retry-job-btn.is-loading,
.retry-job-btn.is-loading:hover {
  background: #fff0f2;
  color: #7f2b37;
  border-color: #df8e9d;
}

.credit-history-panel {
  gap: 14px;
}

.credit-history-tabs {
  display: inline-flex;
  gap: 8px;
  background: #f2f7fb;
  border: 1px solid #d6e3ec;
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
}

.credit-tab {
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  cursor: pointer;
  transition: var(--transition);
}

.credit-tab:hover {
  color: var(--ink);
}

.credit-tab.is-active {
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 8px 16px rgba(1, 75, 110, 0.12);
}

.credit-tab-panel {
  display: grid;
  gap: 14px;
}

.history-table-wrap {
  width: 100%;
  max-height: 525px;
  overflow-x: auto;
  border: 1px solid #dbe7ef;
  border-radius: var(--radius-md);
}

.history-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: #ffffff;
}
.history-table th {
  position: sticky;
  top: 0;
}

.history-table th,
.history-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #edf3f7;
  font-size: 13px;
  vertical-align: middle;
}

.history-table th {
  font-size: 11px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--muted);
  background: #f8fbfd;
}

.history-table tbody tr:hover {
  background: #fafdff;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.transaction-totals {
  margin-left: auto;
  border: 1px solid #dbe7ef;
  border-radius: var(--radius-md);
  background: #fbfdff;
  padding: 10px 14px;
}

.transaction-totals__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid #edf3f7;
}

.transaction-totals__row:last-child {
  border-bottom: none;
}

.transaction-totals__label {
  color: var(--muted);
  font-size: 14px;
}

.transaction-totals__value {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.transaction-totals__row--total .transaction-totals__label,
.transaction-totals__row--total .transaction-totals__value {
  font-size: 18px;
  font-weight: 700;
}

.history-filter-form {
  display: flex;
  align-items: end;
  gap: 12px;
}

.history-range-fields {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.history-filter-group {
  display: grid;
  gap: 6px;
}

.history-filter-input {
  border: 1px solid #c9d7e0;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 11px;
  outline: none;
  min-width: 0;
}

.history-date-range-input {
  min-width: 220px;
  cursor: pointer;
}

.history-filter-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 1px;
}

.history-date-range-input:focus {
  border-color: var(--accent);
}

.history-filter-input:focus {
  border-color: var(--accent);
}

.table-link-id {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.table-link-id:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.history-image-link {
  display: inline-block;
}

.history-input-image {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dbe7ef;
  background: #f6fafc;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-pill.is-success {
  color: #0f7a3d;
  background: #ebf9f0;
  border-color: #b8e6c8;
}

.status-pill.is-failed {
  color: #b42318;
  background: #fff1f0;
  border-color: #f6c7c3;
}

.status-pill.is-other {
  color: #1f56a8;
  background: #eff5ff;
  border-color: #c7dafd;
}

.lg-backdrop.in {
  opacity: 0.7 !important;
}


@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .layout--split {
    grid-template-columns: 1fr;
  }

  .image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel {
    position: static;
  }

  .file-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 20px 14px 48px;
  }

  .topbar {
    padding: 18px;
    flex-direction: column;
    align-items: flex-start;
  }

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

  .topbar__status,
  .topbar__actions {
    justify-content: flex-start;
  }

  .topbar__actions .credit-btn,
  .topbar__actions .guide-trigger-btn {
    flex: 1 1 auto;
  }

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

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

  .image-grid {
    grid-template-columns: 1fr;
  }

  .modal__card--lightbox {
    padding: 14px 12px 12px;
  }

  .lightbox__stage {
    min-height: 220px;
    max-height: calc(100vh - 190px);
  }

  .lightbox__stage img {
    max-height: calc(100vh - 420px);
  }

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

  .credit-history-tabs {
    width: 100%;
  }

  .credit-tab {
    flex: 1 1 50%;
    text-align: center;
  }

  .history-filter-form {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .history-range-fields {
    width: 100%;
  }

  .transaction-totals {
    width: 100%;
    margin-left: 0;
  }
}
