:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --line: #d9e0e8;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --danger: #b42318;
  --shadow: 0 16px 40px rgb(30 41 59 / 10%);
}

* {
  box-sizing: border-box;
}

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

button,
input {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

.workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.upload-panel {
  position: sticky;
  top: 24px;
  padding: 22px;
}

.list-panel {
  min-height: calc(100vh - 64px);
  padding: 22px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

h2 {
  font-size: 22px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
}

.drop-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #fbfcfd;
  cursor: pointer;
  text-align: center;
  padding: 20px;
  transition: border-color 160ms ease, background 160ms ease;
}

.drop-zone.dragging {
  border-color: var(--accent);
  background: #ecfdf5;
}

.drop-zone input {
  display: none;
}

.drop-title,
.drop-note {
  display: block;
}

.drop-title {
  font-size: 18px;
  font-weight: 700;
}

.drop-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.actions,
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #fff;
  background: var(--accent);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.secondary:hover {
  background: #dce4ec;
}

.danger {
  background: var(--danger);
}

.danger:hover {
  background: #8f1d14;
}

.icon-button {
  width: 40px;
  padding: 0;
  color: var(--text);
  background: #edf2f7;
  font-size: 20px;
}

.status {
  min-height: 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.preview-link {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef2f6;
}

.preview-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-meta {
  display: grid;
  gap: 4px;
  padding: 12px;
  min-width: 0;
}

.image-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

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

.card-actions {
  margin: 0;
  padding: 0 12px 12px;
}

.card-actions button {
  flex: 1;
  min-width: 0;
  padding: 0 10px;
  font-size: 13px;
}

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

  .upload-panel {
    position: static;
  }
}
