/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
:root {
  --background: #eef2f7;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --canvas: #dfe5ec;
  --text: #1f2937;
  --muted: #667085;
  --border: #d6dde7;
  --primary: #3157d5;
  --primary-dark: #2444af;
  --accent: #7c3aed;
  --success: #16845b;
  --shadow: 0 18px 45px rgba(35, 48, 72, 0.11);
  --radius-large: 22px;
  --radius-medium: 15px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  padding: 12px 24px;
  -webkit-backdrop-filter: blur(16px);
          backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 9px 24px rgba(49, 87, 213, 0.26);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 19px;
  letter-spacing: -0.02em;
}

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

.status-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid #cfe7dd;
  border-radius: 999px;
  background: #eefaf5;
  padding: 0 14px;
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}

.status-pill > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(22, 132, 91, 0.11);
}

.workspace {
  display: grid;
  min-height: 0;
  grid-template-columns: 290px minmax(360px, 1fr) 285px;
  grid-gap: 14px;
  gap: 14px;
  padding: 14px;
}

.tool-panel,
.inspector-panel,
.canvas-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel,
.inspector-panel {
  padding: 20px;
}

.panel-label {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.tool-button {
  display: flex;
  width: 100%;
  min-height: 86px;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.tool-button:hover {
  border-color: #bdc9ff;
  background: #f0f3ff;
  transform: translateY(-1px);
}

.tool-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  font-size: 21px;
}

.tool-button strong,
.tool-button small {
  display: block;
}

.tool-button strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.tool-button small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.canvas-panel {
  display: grid;
  min-height: 620px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #d9dfe7 25%, transparent 25%),
    linear-gradient(-45deg, #d9dfe7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #d9dfe7 75%),
    linear-gradient(-45deg, transparent 75%, #d9dfe7 75%),
    var(--canvas);
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
  padding: 32px;
}

.canvas-empty {
  width: min(560px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.93);
  padding: 54px 42px;
  text-align: center;
  box-shadow: 0 25px 70px rgba(34, 46, 69, 0.16);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.upload-icon {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto 23px;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, #e9edff, #f1eaff);
  font-size: 36px;
}

.canvas-empty h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.canvas-empty p {
  max-width: 470px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.primary-button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  padding: 0 24px;
  color: #ffffff;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(49, 87, 213, 0.26);
}

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

.canvas-empty > span {
  display: block;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.empty-inspector {
  border: 1px dashed var(--border);
  border-radius: var(--radius-medium);
  background: var(--surface-soft);
  padding: 22px;
}

.empty-inspector strong {
  display: block;
  margin-bottom: 7px;
}

.empty-inspector p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.statusbar {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 0 22px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .workspace {
    grid-template-columns: 240px minmax(360px, 1fr);
  }

  .inspector-panel {
    display: none;
  }
}

@media (max-width: 760px) {
  .topbar {
    min-height: 68px;
    padding-inline: 14px;
  }

  .brand span {
    display: none;
  }

  .status-pill {
    font-size: 0;
    padding-inline: 12px;
  }

  .workspace {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .tool-panel {
    order: 2;
  }

  .canvas-panel {
    min-height: 480px;
    padding: 14px;
  }

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

  .tool-button {
    min-height: 116px;
    flex-direction: column;
  }

  .canvas-empty {
    padding: 38px 22px;
  }

  .statusbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding-block: 8px;
  }
}

@media (max-width: 480px) {
  .tool-list {
    grid-template-columns: 1fr;
  }

  .canvas-empty h1 {
    font-size: 32px;
  }
}

/* v3.0b — Upload and photo workspace */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  padding: 0 14px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.topbar-button:hover {
  border-color: #aebce8;
  background: #f4f6ff;
}

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

.hidden-file-input {
  display: none;
}

.canvas-panel.drag-active {
  outline: 3px solid rgba(49, 87, 213, 0.38);
  outline-offset: -8px;
}

.canvas-empty.drag-active {
  border-color: #9cacef;
  background: rgba(245, 247, 255, 0.97);
  transform: scale(1.01);
}

.photo-stage {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
}

.photo-preview {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(24, 35, 55, 0.24);
}

.drop-overlay {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border: 3px dashed rgba(49, 87, 213, 0.75);
  border-radius: 20px;
  background: rgba(238, 242, 255, 0.9);
  color: var(--primary-dark);
  font-size: 24px;
  font-weight: 900;
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.tool-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tool-button:disabled:hover {
  border-color: transparent;
  background: var(--surface-soft);
  transform: none;
}

.photo-inspector {
  display: grid;
  grid-gap: 18px;
  gap: 18px;
}

.inspector-heading {
  min-width: 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.inspector-heading strong,
.inspector-heading span {
  display: block;
}

.inspector-heading strong {
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-heading span {
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.photo-details {
  display: grid;
  grid-gap: 0;
  gap: 0;
  margin: 0;
}

.photo-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf0f5;
  padding: 11px 0;
}

.photo-details dt {
  color: var(--muted);
  font-size: 12px;
}

.photo-details dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.expiration-note {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  border: 1px solid #d8def6;
  border-radius: 13px;
  background: #f4f6ff;
  padding: 14px;
}

.expiration-note strong {
  color: var(--primary-dark);
  font-size: 12px;
}

.expiration-note span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.inspector-actions {
  display: grid;
  grid-gap: 9px;
  gap: 9px;
}

.secondary-action,
.danger-action {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

.secondary-action {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.secondary-action:hover {
  border-color: #aebce8;
  background: #f4f6ff;
}

.danger-action {
  border: 1px solid #efc3c3;
  background: #fff5f5;
  color: #b42318;
  cursor: pointer;
}

.danger-action:hover {
  background: #feecec;
}

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

.error-message {
  display: grid;
  grid-gap: 5px;
  gap: 5px;
  margin-top: 18px;
  border: 1px solid #efc3c3;
  border-radius: 13px;
  background: #fff5f5;
  padding: 14px;
  color: #b42318;
}

.error-message strong {
  font-size: 12px;
}

.error-message span {
  font-size: 12px;
  line-height: 1.45;
}

@media (max-width: 1080px) {
  .photo-preview {
    max-height: calc(100vh - 220px);
  }
}

@media (max-width: 760px) {
  .topbar-actions {
    gap: 8px;
  }

  .topbar-button {
    min-height: 36px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .photo-stage {
    min-height: 430px;
  }

  .photo-preview {
    max-height: 430px;
  }

  .drop-overlay {
    inset: 10px;
    font-size: 19px;
  }
}

/* v3.0c — Working edit controls */

.edit-tool-card {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  border: 1px solid #cfd7f5;
  border-radius: 16px;
  background: #f7f8ff;
  padding: 14px;
}

.edit-tool-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.edit-tool-heading > span:last-child {
  display: grid;
  min-width: 0;
  grid-gap: 3px;
  gap: 3px;
}

.edit-tool-heading strong {
  display: block;
  font-size: 14px;
  line-height: 1.2;
}

.edit-tool-heading small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.edit-control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 7px;
  gap: 7px;
}

.edit-control-grid button,
.history-controls button {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8def2;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 7px 6px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
}

.edit-control-grid button:hover,
.history-controls button:hover {
  border-color: #9daee9;
  background: #eef1ff;
}

.edit-control-grid button:disabled,
.history-controls button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.history-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 7px;
  gap: 7px;
}

.history-controls .reset-edit-button {
  border-color: #efc6c6;
  color: #ad2929;
}

.editing-status {
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.tool-disabled {
  cursor: default;
  opacity: 0.6;
}

.editing-overlay {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(247, 249, 255, 0.76);
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

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

  .history-controls {
    grid-template-columns: 1fr;
  }
}

/* v3.0d — Visual crop selection */

.start-crop-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #9daee9;
  border-radius: 11px;
  background: #ffffff;
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.start-crop-button:hover,
.start-crop-button.active {
  background: #e9edff;
  border-color: var(--primary);
}

.start-crop-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.crop-workspace {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 560px;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  touch-action: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.crop-workspace.crop-mode-active {
  cursor: crosshair;
}

.crop-hit-area {
  position: absolute;
  z-index: 5;
  cursor: crosshair;
  background: rgba(0, 0, 0, 0.48);
  touch-action: none;
}

.crop-selection {
  position: absolute;
  z-index: 7;
  border: 2px solid #ffffff;
  outline: 1px solid rgba(35, 58, 170, 0.95);
  background: transparent;
  cursor: move;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(0, 0, 0, 0.35);
  touch-action: none;
}

.crop-grid-line {
  position: absolute;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.65);
}

.crop-grid-v1,
.crop-grid-v2 {
  top: 0;
  bottom: 0;
  width: 1px;
}

.crop-grid-v1 {
  left: 33.333%;
}

.crop-grid-v2 {
  left: 66.666%;
}

.crop-grid-h1,
.crop-grid-h2 {
  right: 0;
  left: 0;
  height: 1px;
}

.crop-grid-h1 {
  top: 33.333%;
}

.crop-grid-h2 {
  top: 66.666%;
}

.crop-handle {
  position: absolute;
  z-index: 9;
  width: 18px;
  height: 18px;
  border: 2px solid #2448c9;
  border-radius: 50%;
  background: #ffffff;
  padding: 0;
  box-shadow: 0 2px 8px rgba(20, 30, 60, 0.32);
}

.crop-handle-nw {
  top: -10px;
  left: -10px;
  cursor: nwse-resize;
}

.crop-handle-ne {
  top: -10px;
  right: -10px;
  cursor: nesw-resize;
}

.crop-handle-sw {
  bottom: -10px;
  left: -10px;
  cursor: nesw-resize;
}

.crop-handle-se {
  right: -10px;
  bottom: -10px;
  cursor: nwse-resize;
}

.crop-size-label {
  position: absolute;
  right: 7px;
  bottom: 7px;
  border-radius: 7px;
  background: rgba(20, 28, 48, 0.82);
  padding: 4px 7px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
}

.crop-toolbar {
  position: absolute;
  z-index: 15;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.96);
  padding: 10px;
  box-shadow: 0 12px 38px rgba(20, 30, 60, 0.28);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
}

.crop-ratios,
.crop-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.crop-ratios button,
.crop-toolbar-actions button {
  min-height: 34px;
  border: 1px solid #d4daf1;
  border-radius: 9px;
  background: #ffffff;
  padding: 0 11px;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.crop-ratios button:hover,
.crop-ratios button.active {
  border-color: #8fa3ed;
  background: #e9edff;
  color: var(--primary-dark);
}

.crop-toolbar-actions .apply-crop-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.crop-toolbar button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 850px) {
  .crop-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .crop-toolbar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* v3.0e — Enhancement and adjustment controls */

.adjustment-card {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  border: 1px solid #cfd7f5;
  border-radius: 16px;
  background: #f7f8ff;
  padding: 14px;
}

.auto-enhance-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #8fa3ed;
  border-radius: 11px;
  background: linear-gradient(145deg, #3157d5, #5534b8);
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(49, 87, 213, 0.22);
}

.auto-enhance-button:hover {
  filter: brightness(1.06);
}

.auto-enhance-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.adjustment-sliders {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
}

.adjustment-sliders label {
  display: grid;
  grid-gap: 6px;
  gap: 6px;
}

.adjustment-sliders label > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.adjustment-sliders strong,
.adjustment-sliders output {
  font-size: 11px;
}

.adjustment-sliders output {
  min-width: 42px;
  color: var(--primary-dark);
  font-weight: 850;
  text-align: right;
}

.adjustment-sliders input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.adjustment-sliders input[type="range"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.adjustment-actions {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  grid-gap: 7px;
  gap: 7px;
}

.adjustment-actions button {
  min-height: 39px;
  border: 1px solid #d8def2;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text);
  padding: 6px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.adjustment-actions button:hover {
  border-color: #9daee9;
  background: #eef1ff;
}

.adjustment-actions .apply-adjustments-button {
  border-color: var(--primary);
  background: var(--primary);
  color: #ffffff;
}

.adjustment-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.adjustment-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

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

/* v3.0f — Background removal */

.photo-preview {
  background-color: #ffffff;
  background-image:
    linear-gradient(
      45deg,
      #dfe3ea 25%,
      transparent 25%
    ),
    linear-gradient(
      -45deg,
      #dfe3ea 25%,
      transparent 25%
    ),
    linear-gradient(
      45deg,
      transparent 75%,
      #dfe3ea 75%
    ),
    linear-gradient(
      -45deg,
      transparent 75%,
      #dfe3ea 75%
    );
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.background-removal-card {
  border-color: #d5c6f3;
  background:
    linear-gradient(
      145deg,
      #fbf9ff,
      #f4f1ff
    );
}

.remove-background-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #7354c8;
  border-radius: 11px;
  background:
    linear-gradient(
      145deg,
      #6240bd,
      #3f58cc
    );
  color: #ffffff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(83, 60, 174, 0.22);
}

.remove-background-button:hover {
  filter: brightness(1.07);
}

.remove-background-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.background-removal-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

/* v3.0g — Background Studio */

.background-studio-card {
  border-color: #bdd7cc;
  background:
    linear-gradient(
      145deg,
      #fbfffd,
      #f1faf5
    );
}

.background-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 7px;
  gap: 7px;
}

.background-presets button {
  min-height: 36px;
  border: 1px solid #d7e2dc;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.background-presets button:hover {
  border-color: #4d9b74;
  background: #edf8f2;
}

.background-presets button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.custom-background-color {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.custom-background-color input[type="color"] {
  width: 48px;
  height: 34px;
  border: 1px solid #ccd8d1;
  border-radius: 8px;
  background: #ffffff;
  padding: 3px;
  cursor: pointer;
}

.apply-background-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #33825b;
  border-radius: 11px;
  background:
    linear-gradient(
      145deg,
      #398e63,
      #28734e
    );
  color: #ffffff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.apply-background-button:hover {
  filter: brightness(1.06);
}

.apply-background-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.background-studio-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

/* v3.0h — Background removal modes */

.background-mode-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 7px;
  gap: 7px;
}

.background-mode-selector button {
  min-height: 36px;
  border: 1px solid #d8d4ec;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  padding: 6px 8px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.background-mode-selector button:hover,
.background-mode-selector button.active {
  border-color: #7354c8;
  background: #f1edff;
  color: #4a3198;
}

.background-mode-selector button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* v3.0i — Export panel */

.export-panel {
  display: grid;
  grid-gap: 12px;
  gap: 12px;
  border: 1px solid #cfd8eb;
  border-radius: 16px;
  background:
    linear-gradient(
      145deg,
      #fbfcff,
      #f4f7fd
    );
  padding: 14px;
}

.export-heading {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.export-heading strong {
  font-size: 14px;
}

.export-heading span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.export-format-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 7px;
  gap: 7px;
}

.export-format-options button {
  min-height: 36px;
  border: 1px solid #d6ddeb;
  border-radius: 9px;
  background: #ffffff;
  color: var(--text);
  font-family: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.export-format-options button:hover,
.export-format-options button.active {
  border-color: #536fd2;
  background: #eef2ff;
  color: #324aa0;
}

.export-format-options button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.export-quality-control,
.export-background-control {
  display: grid;
  grid-gap: 7px;
  gap: 7px;
}

.export-quality-control > span,
.export-background-control > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.export-quality-control strong {
  color: var(--text);
}

.export-quality-control input[type="range"] {
  width: 100%;
}

.export-background-control input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid #d2d9e6;
  border-radius: 8px;
  background: #ffffff;
  padding: 3px;
  cursor: pointer;
}

.export-download-button {
  width: 100%;
  min-height: 42px;
  border: 1px solid #3158b9;
  border-radius: 11px;
  background:
    linear-gradient(
      145deg,
      #416cd5,
      #2f55b7
    );
  color: #ffffff;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.export-download-button:hover {
  filter: brightness(1.06);
}

.export-download-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.export-panel small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-align: center;
}

/* v3.0j — Compact left tool panel */

.tool-panel {
  padding: 12px;
}

.tool-panel .panel-label {
  margin-bottom: 9px;
}

.tool-panel .tool-list {
  gap: 7px;
}

.tool-panel .edit-tool-card,
.tool-panel .adjustment-card {
  gap: 8px;
  border-radius: 13px;
  padding: 10px;
}

.tool-panel .edit-tool-heading {
  gap: 9px;
}

.tool-panel .edit-tool-heading > span:last-child {
  gap: 1px;
}

.tool-panel .edit-tool-heading strong {
  font-size: 13px;
}

.tool-panel .edit-tool-heading small {
  font-size: 10px;
  line-height: 1.2;
}

.tool-panel .edit-control-grid,
.tool-panel .history-controls,
.tool-panel .adjustment-actions {
  gap: 5px;
}

.tool-panel .edit-control-grid button,
.tool-panel .history-controls button {
  min-height: 34px;
  padding: 5px 4px;
}

.tool-panel .auto-enhance-button {
  min-height: 36px;
}

.tool-panel .adjustment-sliders {
  gap: 8px;
}

.tool-panel .adjustment-sliders label {
  gap: 3px;
}

.tool-panel .adjustment-actions button {
  min-height: 34px;
  padding: 4px;
}

.tool-panel .adjustment-note {
  line-height: 1.25;
}


/* v3.0k — Truly compact tool column */

.tool-panel {
  padding: 8px;
}

.tool-panel .tool-list {
  gap: 5px;
}

.tool-panel .edit-tool-card,
.tool-panel .adjustment-card {
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
}

.tool-panel .edit-tool-heading {
  align-items: center;
  gap: 7px;
}

.tool-panel .edit-tool-heading > span:first-child {
  transform: scale(0.86);
  transform-origin: center;
}

.tool-panel .edit-tool-heading strong {
  font-size: 12px;
  line-height: 1.1;
}

.tool-panel .edit-tool-heading small {
  display: none;
}

.tool-panel .edit-control-grid,
.tool-panel .history-controls,
.tool-panel .adjustment-actions {
  gap: 4px;
}

.tool-panel .edit-control-grid button,
.tool-panel .history-controls button,
.tool-panel .adjustment-actions button {
  min-height: 30px;
  padding: 3px 4px;
  border-radius: 8px;
  font-size: 9px;
}

.tool-panel .auto-enhance-button {
  min-height: 32px;
  border-radius: 9px;
  font-size: 10px;
}

.tool-panel .adjustment-sliders {
  grid-template-columns: 1fr 1fr;
  gap: 7px 9px;
}

.tool-panel .adjustment-sliders label {
  gap: 1px;
}

.tool-panel .adjustment-sliders label > span {
  gap: 4px;
}

.tool-panel .adjustment-sliders strong,
.tool-panel .adjustment-sliders output {
  font-size: 9px;
}

.tool-panel .adjustment-sliders output {
  min-width: 30px;
}

.tool-panel .adjustment-note,
.tool-panel .editing-status {
  display: none;
}


/* v3.0l — Let side panels fit their content */

.workspace {
  align-items: start;
}

.tool-panel,
.inspector-panel {
  align-self: start;
}


/* v3.1b — Resize and size presets */

.resize-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 5px;
  gap: 5px;
}

.resize-presets button {
  min-height: 30px;
  border: 1px solid #d8def2;
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
  font-family: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.resize-dimensions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  grid-gap: 6px;
  gap: 6px;
}

.resize-dimensions label {
  display: grid;
  grid-gap: 3px;
  gap: 3px;
}

.resize-dimensions label span,
.resize-enlarge-option {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.resize-dimensions input {
  width: 100%;
  min-width: 0;
  height: 30px;
  border: 1px solid #d8def2;
  border-radius: 8px;
  padding: 4px 6px;
  font-family: inherit;
  font-size: 10px;
}

.resize-dimensions > span {
  padding-bottom: 7px;
  font-weight: 900;
}

.resize-enlarge-option {
  display: flex;
  align-items: center;
  gap: 6px;
}

.apply-resize-button {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  background: var(--primary);
  color: #ffffff;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.resize-presets button:disabled,
.apply-resize-button:disabled,
.resize-dimensions input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}


