@import url("https://fonts.googleapis.com/css2?family=Mulish:wght@400;500;600;700&display=swap");

:root {
  --primary: #712fff;
  --primary-soft: rgba(113, 47, 255, 0.1);
  --text: #272b2f;
  --muted: #838e9b;
  --alert: #ff005c;
  --bg: #f3f4f5;
  --card-radius: 20px;
}

* {
  box-sizing: border-box;
  font-family: "Mulish", sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

.page {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

header.list-view {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-radius: var(--card-radius);
  padding: 0.8rem 1.8rem;
  min-height: 4.5rem;
  margin-bottom: 1rem;
}

h1.list-view {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
}

.card {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.5rem 1.8rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-weight: 600;
}

input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #d9dde2;
  border-radius: 8px;
  margin-bottom: 1rem;
}

button,
.btn {
  border: none;
  border-radius: 20px;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  cursor: pointer;
}

button.primary {
  background: var(--primary);
  color: #fff;
}

button.secondary {
  background: var(--primary-soft);
  color: var(--primary);
}

button.danger {
  background: #ffe5ef;
  color: var(--alert);
}

.error {
  color: var(--alert);
  min-height: 1.25rem;
}

.success {
  color: #0a7a43;
  min-height: 1.25rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #eef0f2;
}

th {
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--card-radius);
  padding: 1.5rem;
  width: min(420px, 92vw);
}

.modal h2 {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-wide {
  width: min(640px, 92vw);
}

.error-log {
  max-height: 50vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.85rem;
  background: #f6f6f6;
  padding: 0.75rem;
  border-radius: 4px;
  margin: 0;
}

.hint {
  color: #666;
  font-size: 0.9rem;
  margin: 0.25rem 0 1rem;
}
