﻿:root {
  --ink: #211a2e;
  --muted: #736b7e;
  --line: #e8e2ee;
  --surface: #ffffff;
  --soft: #f8f5fb;
  --violet: #8c5bd6;
  --green: #167b5b;
  --danger: #b13d52;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #fbfafc;
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

h2 {
  font-size: 1.15rem;
}

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

.add-button {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 2px solid var(--violet);
  border-radius: 999px;
  background: var(--surface);
  color: var(--violet);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.add-button:hover,
.add-button:focus-visible {
  background: var(--violet);
  color: white;
  transform: translateY(-1px);
}

.download-button,
.primary-button,
.secondary-button,
.icon-button,
.delete-button {
  border: 1px solid transparent;
  cursor: pointer;
}

.download-button {
  min-height: 44px;
  border-radius: 8px;
  padding: 0 16px;
  background: var(--green);
  color: white;
  font-weight: 700;
}

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

.sheet-panel {
  min-height: 420px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(37, 27, 55, 0.08);
}

.empty-state {
  display: grid;
  min-height: 420px;
  place-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--soft);
  color: #4a4057;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

td {
  font-size: 0.96rem;
}

.thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--soft);
}

.no-image {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border: 1px dashed #cfc3dc;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.72rem;
}

.delete-button {
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff0f3;
  color: var(--danger);
  font-weight: 700;
}

.modal {
  width: min(460px, calc(100% - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  box-shadow: 0 28px 80px rgba(26, 16, 38, 0.28);
}

.modal::backdrop {
  background: rgba(28, 20, 38, 0.42);
}

form {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.modal-header,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
}

label {
  display: grid;
  gap: 7px;
  color: #4c4358;
  font-size: 0.9rem;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d9d0e5;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
}

input:focus {
  border-color: var(--violet);
  outline: 3px solid rgba(140, 91, 214, 0.16);
}

.file-field input {
  padding: 10px;
}

.file-field span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
}

.primary-button {
  background: var(--violet);
  color: white;
}

.secondary-button {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

@media (max-width: 640px) {
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions {
    width: 100%;
    justify-content: space-between;
  }

  .download-button {
    flex: 1;
  }
}
