:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #d8e0eb;
  --text: #142033;
  --muted: #5f6c82;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --danger: #c2410c;
  --danger-hover: #9a3412;
  --success: #047857;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: linear-gradient(180deg, #eef5ff 0%, var(--bg) 100%);
  color: var(--text);
}

.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px;
}

.page-header,
.panel-head,
.inline-actions,
.header-actions,
.link-list-row,
.action-stack,
.days-picker {
  display: flex;
  align-items: center;
}

.page-header,
.panel-head {
  justify-content: space-between;
  gap: 16px;
}

.page-header {
  margin-bottom: 24px;
}

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

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 22px;
}

.subtle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 14px 40px rgba(20, 32, 51, 0.08);
  margin-bottom: 24px;
}

.grid-form {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 20px;
}

.account-form {
  grid-template-columns: 180px 1.8fr 1fr 180px;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  min-height: 72px;
  resize: vertical;
}

button,
.ghost-link {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
}

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

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

.secondary-button,
.ghost-link {
  background: #e9f0ff;
  color: var(--accent);
}

.danger-button {
  background: #fff0eb;
  color: var(--danger);
}

.danger-button:hover {
  background: #fed7c7;
}

.inline-actions {
  gap: 10px;
}

.days-picker {
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.table-shell {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1180px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  vertical-align: top;
  text-align: left;
}

.data-table th {
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: #fbfdff;
}

.compact-input {
  min-width: 120px;
}

.wide-input {
  min-width: 220px;
}

.comment-input {
  min-width: 280px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.link-list-row {
  gap: 8px;
}

.link-list-row input {
  flex: 1;
}

.action-stack {
  gap: 8px;
  flex-wrap: wrap;
  min-width: 180px;
}

.views-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #ecfdf3;
  color: var(--success);
  font-weight: 700;
}

.muted-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.account-link,
.scenario-link {
  color: var(--accent);
  text-decoration: none;
}

.status-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.account-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  background: #111827;
  color: #fff;
  padding: 12px 14px;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(17, 24, 39, 0.25);
}

@media (max-width: 1100px) {
  .grid-form,
  .account-form {
    grid-template-columns: 1fr 1fr;
  }
}
