:root {
  --nav: #171a24;
  --brand: #263184;
  --brand-dark: #1d276f;
  --coral: #f05a47;
  --teal: #178b73;
  --ink: #1b1d24;
  --muted: #656b78;
  --line: #e2e5ea;
  --surface: #ffffff;
  --canvas: #f4f6f8;
  --success: #14745a;
  --warning: #9a650f;
  --danger: #b13f3b;
  --shadow: 0 18px 54px rgba(26, 30, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "Avenir Next", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.platform-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--nav);
  text-decoration: none;
}

.brand-lockup img {
  width: 38px;
  height: 38px;
}

.brand-name {
  font-size: 20px;
  font-weight: 750;
}

.brand-name span {
  color: var(--coral);
}

.platform-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.platform-nav a,
.link-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #444a57;
  text-decoration: none;
  cursor: pointer;
}

.platform-nav a:hover,
.link-button:hover {
  color: var(--brand);
}

.page {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

h2 {
  margin-bottom: 14px;
  font-size: 21px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.muted {
  color: var(--muted);
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

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

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

.button.secondary:hover {
  border-color: #b9bfca;
  background: #f8f9fb;
}

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

.grid-admin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 38px;
  padding-top: 32px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

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

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table a {
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.status {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border-radius: 4px;
  background: #eef0ff;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.status.active {
  background: #eaf7f2;
  color: var(--success);
}

.form-panel {
  align-self: start;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #cbd0d9;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(38, 49, 132, 0.12);
}

.field .helptext {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.errorlist {
  margin: 5px 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 12px;
  list-style: none;
}

.messages {
  display: grid;
  gap: 8px;
  width: min(1240px, calc(100% - 48px));
  margin: 16px auto 0;
}

.message {
  padding: 12px 15px;
  border-left: 3px solid var(--brand);
  background: #fff;
}

.message.success {
  border-left-color: var(--success);
}

.login-layout {
  display: grid;
  min-height: calc(100vh - 68px);
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
}

.login-context {
  display: flex;
  min-height: 560px;
  align-items: flex-end;
  padding: 64px;
  background:
    linear-gradient(rgba(23, 26, 36, 0.58), rgba(23, 26, 36, 0.83)),
    url("/static/assets/pdf-master-test2-ks-bts-single-large-4x5-linkedin-4x5-1785142195634-pyutzl.e5ef8565e1ce.png") center 42% / cover;
  color: #fff;
}

.login-context > div {
  max-width: 620px;
}

.login-context h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.login-panel {
  display: flex;
  align-items: center;
  padding: 48px;
  background: #fff;
}

.login-panel form,
.login-panel .auth-copy {
  width: min(100%, 430px);
  margin: 0 auto;
}

.auth-intro {
  margin-bottom: 28px;
}

.auth-intro img {
  width: 46px;
  height: 46px;
  margin-bottom: 20px;
}

.full-button {
  width: 100%;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 38px;
  padding-top: 32px;
}

.stack {
  display: grid;
  gap: 28px;
}

.one-time-link {
  margin-bottom: 24px;
  padding: 16px;
  border-left: 4px solid var(--teal);
  background: #eaf7f2;
}

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

.copy-row input {
  min-width: 0;
  flex: 1;
  padding: 10px;
  border: 1px solid #b9d8cf;
  background: #fff;
}

.empty-state {
  padding: 42px 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 900px) {
  .grid-admin,
  .detail-grid,
  .login-layout {
    grid-template-columns: 1fr;
  }

  .login-context {
    min-height: 300px;
    padding: 36px 28px;
  }

  .login-panel {
    padding: 40px 28px 64px;
  }

  .platform-bar {
    padding: 0 20px;
  }

  .platform-nav .nav-label {
    display: none;
  }
}

@media (max-width: 620px) {
  .page,
  .messages {
    width: min(100% - 28px, 1240px);
  }

  .page {
    padding-top: 24px;
  }

  .page-header {
    display: block;
  }

  .page-header .button {
    margin-top: 16px;
  }

  .data-table {
    display: block;
    overflow-x: auto;
  }

  .brand-name {
    font-size: 17px;
  }
}
