:root {
  --ink: #172033;
  --muted: #667085;
  --line: #d8e0ea;
  --paper: #fff;
  --soft: #f5f7fb;
  --brand: #1d4ed8;
  --brand-dark: #163b9d;
  --success: #067647;
  --warning: #92400e;
  --danger: #b42318;
  --shadow: 0 18px 44px rgba(23, 32, 51, .10);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 0%, rgba(29, 78, 216, .12), transparent 30rem),
    radial-gradient(circle at 100% 10%, rgba(15, 118, 110, .10), transparent 28rem),
    linear-gradient(180deg, #eef4fb 0%, #f8fafc 58%, #eef6f4 100%);
}

a { color: inherit; }

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

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

.app-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-brand img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(23, 32, 51, .16);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: clamp(24px, 4vw, 34px); }

.subtle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel,
.form-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 26px;
}

.form-grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

label {
  display: block;
  margin: 0 0 7px;
  color: #344054;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 144px;
  resize: vertical;
  line-height: 1.55;
}

input[readonly] {
  background: var(--soft);
  color: var(--muted);
}

.actions-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.btn,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover,
button:hover { background: var(--brand-dark); }

.btn.secondary,
button.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}

.btn.secondary:hover,
button.secondary:hover { background: var(--soft); }

.notice {
  padding: 14px;
  border-radius: 8px;
  margin: 18px 0;
  line-height: 1.55;
  font-weight: 700;
}

.notice.warning {
  background: #fffbeb;
  border: 1px solid #fedf89;
  color: var(--warning);
}

.notice.error {
  background: #fef3f2;
  border: 1px solid #fecdca;
  color: var(--danger);
}

.preview-list {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.preview-item {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.preview-item strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.preview-item p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.success-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  background: #dcfae6;
  color: var(--success);
  font-size: 30px;
  font-weight: 900;
}

.footer {
  text-align: center;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 680px;
}

@media (max-width: 760px) {
  .app-shell { padding: 18px; }
  .app-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .form-card { padding: 20px; }
  .actions-row,
  .actions-row form,
  .btn,
  button { width: 100%; }
}
