* {
  box-sizing: border-box;
}

:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --muted: #667085;
  --text: #101828;
  --line: #e4e7ec;
  --soft: #f9fafb;
  --primary: #175cd3;
  --primary-dark: #1849a9;
  --success: #067647;
  --error: #b42318;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
}

.page-shell {
  min-height: 100vh;
  padding: 28px 16px;
}

.app-card {
  max-width: 1280px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 34px rgba(16, 24, 40, 0.08);
}

.app-header h1 {
  margin: 0 0 8px;
  font-size: 32px;
}

.app-header p {
  margin: 0 0 24px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

.dropzone {
  border: 2px dashed #98a2b3;
  border-radius: 18px;
  background: var(--soft);
  height: 100px;
  min-height: unset!important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px!important;
}

.dropzone .dz-message {
  margin: 0;
  text-align: center;
}

.dropzone .dz-message strong {
  display: block;
  font-size: 18px;
  margin: 5px auto;
}

.dropzone .dz-message span {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.dropzone .dz-message small {
  color: var(--muted);
}

.workspace {
  margin-top: 20px;
}

.toolbar {
  display: grid;
  grid-template-columns: auto;
  gap: 15px;
  align-items: start;
  margin-bottom: 20px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-group.compact .meta-box {
  min-height: 44px;
}

label {
  font-weight: 700;
  font-size: 14px;
}

select,
input[type="range"] {
  width: 100%;
}

select {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
}

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

.quality-wrap span {
  min-width: 48px;
  text-align: right;
  font-weight: 700;
}

.meta-box {
  display: flex;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  word-break: break-all;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: start;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: #eaecf0;
  color: var(--text);
}

.main-grid {
  display: grid;
  grid-template-columns: auto 350px;
  gap: 20px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
  padding: 18px;
}

.panel-head h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.panel-head p {
  margin: 0 0 14px;
  color: var(--muted);
}

.croppie-mount {
  min-height: 460px;
  display: block;
  align-items: center;
  justify-content: center;
}

.cr-boundary {
  border: 1px solid #d0d5dd;
  background: #fff;
}

.cr-slider-wrap {
  margin-top: 18px;
}

.dropzone .dz-preview .dz-details .dz-filename,
.dropzone .dz-preview .dz-progress,
.dropzone .dz-preview .dz-details .dz-size {

  display: none!important;
}

.preview-stage {
  width: 100%;
  min-height: 280px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
}

.preview-stage img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

.preview-placeholder {
  color: var(--muted);
  padding: 20px;
  text-align: center;
}

.preview-meta {
  display: grid;
  gap: 10px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.meta-row span {
  color: var(--muted);
}

.message {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  display: none;
}

.message.success {
  color: var(--success);
  margin: 0 0 15px 0;
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.message.error {
  color: var(--error);
  margin: 0 0 15px 0;
  font-size: 15px;
  font-weight: 600;
  display: block;
}

.dropzone .dz-preview {
  height: 65px!important;
  min-height: unset!important;
}

.dropzone .dz-preview .dz-image {
  border-radius: 10px;
  overflow: hidden;
  width: 50px!important;
  height: 50px!important;
  position: relative;
  display: block;
  z-index: 10;
  margin: 0 auto!important;
}

.dropzone .dz-preview .dz-image img {
  display: block!important;
  width: 100%!important;
  height: auto!important;
}


.zoom-label {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #475467;
}


@media (max-width: 900px) {

.preview-stage {
  width: fit-content;
}
.preview-stage img {
  display: block;
  max-width: 350px;
  max-height: unset;
}


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

@media (max-width: 640px) {
  .app-card {
    padding: 16px;
  }


}