body {
  background: radial-gradient(circle at top, #fff6e6 0%, var(--bg) 50%, #e9e1d4 100%);
}

.app {
  width: 100%;
  margin: 0;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.top-bar {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.top-title {
  font-size: 22px;
  font-weight: 600;
}

.top-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  align-items: end;
}

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

.status.error {
  color: var(--danger);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-actions {
  display: flex;
  justify-content: flex-end;
}

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

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--panel-border);
  font-size: 13px;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.cell-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c8bfb3;
  background: #fff;
  font-size: 13px;
  font-family: "Space Grotesk", sans-serif;
  box-shadow: inset 0 1px 2px rgba(28, 27, 26, 0.08);
}

.cell-input:focus {
  outline: 2px solid rgba(29, 124, 111, 0.2);
  border-color: var(--accent);
}

.cell-input[readonly] {
  background: #f3efe8;
  color: var(--muted);
}

.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px;
  border: 1px solid #c8bfb3;
  border-radius: 8px;
  background: #fff;
  min-height: 40px;
}

.tag {
  background: rgba(29, 124, 111, 0.12);
  color: var(--accent-strong);
  padding: 4px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.tag button {
  background: transparent;
  border: none;
  color: var(--accent-strong);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  box-shadow: none;
}

.tags-input input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 120px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.modal {
  width: min(640px, 100%);
}

.modal-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.modal-body .field input,
.modal-body .field select {
  width: 100%;
}

.modal-body .field select {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #c8bfb3;
  font-size: 13px;
  font-family: "Space Grotesk", sans-serif;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(28, 27, 26, 0.08);
}

.modal-body .field.inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.modal-body .field.inline input {
  width: auto;
}

@media (max-width: 700px) {
  .app {
    padding: 20px 16px 32px;
  }

  .table-wrap table {
    min-width: 600px;
  }
}
