:root {
  font-family: "Segoe UI", Arial, sans-serif;
  color: #193b52;
  background: #ecf3f5;
  font-synthesis: none;
  --blue: #157db6;
  --muted: #658096;
  --line: #dce7ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 0.875rem;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  border: 1px solid #cddfe9;
  background: white;
  color: #195073;
  border-radius: 9px;
  padding: 11px 16px;
  font-weight: 600;
}
button:hover {
  background: #edf6fb;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
button.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}
button.danger {
  color: #a53440;
}
a {
  color: #087ab5;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid #cedee9;
  border-radius: 8px;
  background: white;
  color: #23465d;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #82caed;
  outline-offset: 2px;
}
textarea {
  resize: vertical;
  min-height: 105px;
}
label {
  display: block;
  font-weight: 600;
  margin-bottom: 7px;
  color: #365d73;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 1.875rem;
  letter-spacing: -0.7px;
  line-height: 1.2;
}
h2 {
  font-size: 1.1875rem;
}
h3 {
  font-size: 0.9375rem;
}
p {
  line-height: 1.65;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.75rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.625rem;
  font-weight: 700;
  color: #4089b0;
  margin-bottom: 12px;
}
.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  padding: 32px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ecf3f5;
}
.brand {
  position: relative;
  display: block;
  line-height: 0;
  margin-bottom: 45px;
}
.brand-logo {
  width: 100%;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 66% 100%, 66% 55%, 0 55%);
}
.brand-wordmark {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  clip-path: inset(55% 34% 11% 0);
  transform: translateX(5%);
}
nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin: 5px 0;
  border-radius: 10px;
  color: #607c8f;
  font-weight: 600;
}
nav a.active {
  background: var(--blue);
  color: white;
}
nav a:hover {
  text-decoration: none;
  background: #dcebf2;
}
nav a.active:hover {
  background: #1474aa;
}
.nav-icon {
  font-size: 1.25rem;
  width: 22px;
  text-align: center;
}
.nav-label {
  margin: 23px 15px 8px;
  text-transform: uppercase;
  font-size: 0.625rem;
  letter-spacing: 1.6px;
  color: #8399a7;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}
.local-note {
  font-size: 0.6875rem;
  color: #6c8d9f;
  line-height: 1.8;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line);
}
.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}
.avatar {
  background: #fff1db;
  color: #b87924;
  border: 2px solid white;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
}
.account > div:nth-child(2) {
  flex: 1;
}
.account button {
  border: 0;
  background: transparent;
  padding: 8px;
}
.workspace {
  min-width: 0;
  padding: 0 38px 26px;
  background: var(
    --workspace-background,
    linear-gradient(30deg, #31bda950, transparent 65%),
    linear-gradient(125deg, #497eac, #7c79bb 65%, #88b8cc)
  );
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #e5eef7;
  font-size: 0.75rem;
}
.topbar a {
  color: #fff;
}
.topbar .pill {
  background: #ffffff19;
  color: white;
}
.page-heading {
  background: white;
  border-radius: 19px;
  padding: 30px 32px;
  margin-bottom: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.page-heading p {
  margin-top: 9px;
  max-width: 710px;
  color: var(--muted);
}
.notice {
  padding: 16px 22px;
  background: #e9faf4;
  color: #347365;
  border-radius: 12px;
  border: 1px solid #ccece2;
  display: flex;
  gap: 12px;
  margin-bottom: 23px;
}
.notice.warning {
  background: #fff7e8;
  border-color: #f0dfbb;
  color: #8a6824;
}
.notice strong {
  display: block;
}
.panel {
  background: white;
  border: 1px solid #e1e9ef;
  border-radius: 17px;
  overflow: hidden;
  margin-bottom: 22px;
}
.panel-head {
  padding: 23px 26px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.panel-body {
  padding: 26px;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
}
.toolbar input {
  min-width: 180px;
}
.toolbar select {
  width: auto;
  min-width: 170px;
}
.tabs {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tabs button {
  border-color: #b9d7e9;
  background: #ffffffde;
}
.tabs button.active {
  background: #edf9ff;
  border-color: #208fc5;
  color: #05699e;
  box-shadow: inset 0 -2px #1686be;
}
.library {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
}
.categories {
  padding: 20px 12px;
  background: #f8fbfd;
  border-right: 1px solid var(--line);
}
.categories button {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  width: 100%;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  padding: 11px;
  border-radius: 7px;
  font-weight: 500;
}
.categories button.active {
  background: #e5f1f9;
  color: #0876b0;
  font-weight: 650;
}
.categories h3 {
  font-size: 0.625rem;
  letter-spacing: 1.4px;
  color: #7492a5;
  padding: 8px 11px 14px;
}
.count {
  font-size: 0.6875rem;
  color: #7893a3;
}
.file-list {
  min-width: 0;
}
.file-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 19px 24px;
  border-bottom: 1px solid #e9eff4;
}
.file-row:last-child {
  border: 0;
}
.file-icon {
  background: #edf6fd;
  color: #388cb7;
  border: 1px solid #d6e9f5;
  border-radius: 10px;
  min-width: 43px;
  height: 49px;
  display: grid;
  place-items: center;
  font-size: 0.625rem;
  font-weight: 750;
}
.file-info {
  flex: 1;
  min-width: 0;
}
.file-info h3 {
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.file-info p {
  font-size: 0.75rem;
  color: #7490a4;
  margin-top: 5px;
}
.file-row button {
  font-size: 0.75rem;
  padding: 9px 12px;
}
.pill {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf2f6;
  color: #597488;
  white-space: nowrap;
}
.pill.published,
.pill.ready,
.pill.accepted,
.pill.completed {
  background: #e0f5ed;
  color: #227964;
}
.pill.modifications,
.pill.needs_review,
.pill.needs_information {
  background: #fff1d9;
  color: #966318;
}
.pill.submitted,
.pill.in_review,
.pill.queued {
  background: #e6f1fc;
  color: #2878b1;
}
.pill.rejected,
.pill.failed {
  background: #fdebf0;
  color: #b14a61;
}
.empty {
  padding: 54px 30px;
  text-align: center;
  color: #7690a0;
}
.empty h2 {
  color: #375b73;
  margin-bottom: 10px;
}
.empty button {
  margin-top: 20px;
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.field {
  margin-bottom: 20px;
}
.field:last-child {
  margin-bottom: 0;
}
.field p {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
.span-2 {
  grid-column: 1/-1;
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  align-items: center;
}
.actions.left {
  justify-content: flex-start;
  flex-wrap: wrap;
}
.upload {
  border: 1px dashed #aacee3;
  background: #f5faff;
  border-radius: 12px;
  padding: 25px;
  margin: 18px 0;
}
.upload input {
  margin-top: 12px;
  background: white;
}
.steps {
  padding: 24px;
}
.step {
  display: flex;
  gap: 13px;
  margin: 0 0 25px;
}
.step:last-child {
  margin-bottom: 0;
}
.step-number {
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eaf4fc;
  color: #167eb6;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.step p {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
}
.request-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px 125px;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}
.request-row:last-child {
  border: 0;
}
.request-row h3 {
  font-size: 0.9375rem;
  margin-bottom: 7px;
}
.request-row p {
  font-size: 0.75rem;
  color: var(--muted);
}
.back {
  display: inline-block;
  color: #dff1fc;
  margin-bottom: 13px;
  font-size: 0.75rem;
}
.detail-text {
  white-space: pre-wrap;
  color: #476c82;
}
.history {
  padding: 0;
  list-style: none;
}
.history li {
  padding: 13px 0;
  border-bottom: 1px solid #e5edf3;
}
.history p {
  font-size: 0.75rem;
  color: #7290a3;
}
.comment {
  padding: 17px;
  background: #f5f9fc;
  border: 1px solid #e4edf3;
  border-radius: 10px;
  margin-bottom: 12px;
}
.comment.admin {
  background: #edf8fc;
}
.comment .meta {
  font-size: 0.6875rem;
  color: #7390a3;
  margin-bottom: 6px;
}
.comment p {
  white-space: pre-wrap;
}
.subtle {
  color: #638297;
  font-size: 0.75rem;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 400;
}
.check input {
  width: 17px;
  margin: 3px 0;
}
.footer {
  display: flex;
  justify-content: space-between;
  color: #d9eaf5;
  font-size: 0.6875rem;
  margin-top: 27px;
}
.error {
  background: #fdebf0;
  color: #99324e;
  padding: 13px;
  border-radius: 8px;
  margin: 12px 0;
}
.login {
  max-width: 465px;
  margin: 8vh auto;
  background: white;
  border: 1px solid #d9e6ed;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 70px #35566c12;
}
.login-logo {
  max-width: 240px;
  margin: 0 auto 30px;
}
.login h1 {
  font-size: 1.5625rem;
  margin-bottom: 10px;
}
.login form {
  margin-top: 28px;
}
.login button {
  width: 100%;
}
.login .small {
  margin-top: 20px;
}
.loading {
  padding: 50px;
  text-align: center;
}
#toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  padding: 13px 22px;
  background: #163e56;
  color: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px #1c385733;
  display: none;
  z-index: 100;
}
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: #14354d88;
  display: grid;
  place-items: center;
  padding: 30px;
  z-index: 20;
}
.dialog {
  max-width: 920px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  background: white;
  border-radius: 16px;
  padding: 28px;
}
.dialog header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}
.extracted {
  white-space: pre-wrap;
  max-height: 450px;
  overflow: auto;
  background: #f5f8fa;
  padding: 20px;
  font-size: 0.75rem;
  line-height: 1.7;
}
.badge-line {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px;
}
.project-card {
  background: white;
  border-radius: 15px;
  padding: 27px;
}
.project-card h2 {
  margin: 18px 0 10px;
}
.project-card p {
  color: var(--muted);
  font-size: 0.8125rem;
  margin-bottom: 22px;
}
.busy {
  pointer-events: none;
  opacity: 0.65;
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .workspace {
    padding: 0 22px 22px;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .library {
    grid-template-columns: 185px 1fr;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .panel-head {
    align-items: flex-start;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    height: auto;
    position: static;
    padding: 15px;
  }
  .brand {
    width: 180px;
    margin: 0 0 12px;
  }
  .sidebar-bottom,
  .nav-label {
    display: none;
  }
  nav {
    display: flex;
    flex-wrap: wrap;
  }
  nav a {
    padding: 10px;
    font-size: 0.75rem;
    margin: 2px;
  }
  .workspace {
    padding: 0 14px 20px;
  }
  .topbar {
    height: 45px;
  }
  .page-heading {
    padding: 23px;
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 1.5625rem;
  }
  .library {
    display: block;
  }
  .categories {
    display: flex;
    overflow: auto;
    border-bottom: 1px solid var(--line);
  }
  .categories h3 {
    display: none;
  }
  .categories button {
    width: auto;
    white-space: nowrap;
  }
  .form-grid {
    display: block;
  }
  .file-row {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .request-row {
    grid-template-columns: 1fr;
  }
  .toolbar input {
    min-width: 120px;
  }
  .dialog-backdrop {
    padding: 12px;
  }
}
.template-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  gap: 24px;
  margin-top: 24px;
}
.template-card {
  border-radius: 18px;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
}
.template-card-body {
  padding: 24px;
}
.template-card-body h2 {
  margin: 12px 0;
}
.template-card-body p {
  line-height: 1.6;
}
.template-preview {
  display: block;
  width: 100%;
  aspect-ratio: 16/9;
  background: #f0f6f9;
  object-fit: contain;
  border: 1px solid #d4e5ee;
}
.template-awaiting {
  aspect-ratio: 16/9;
  padding: 65px 24px;
  text-align: center;
  background: #edf6fa;
  color: #17384a;
  font-size: 1.5rem;
}
.template-awaiting span {
  display: block;
  font-size: 0.875rem;
  margin-top: 10px;
}
.template-workspace {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}
.template-workspace.wide-preview {
  display: block;
}
.template-workspace .panel {
  margin-bottom: 24px;
}
.layout-choices {
  border: 0;
  padding: 0;
  margin: 22px 0;
}
.layout-choices legend {
  font-weight: 700;
  margin-bottom: 12px;
}
.layout-choice {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  align-items: flex-start;
  border-bottom: 1px solid #e5edf1;
  cursor: pointer;
}
.layout-choice input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin: 3px 0;
}
.layout-choice small {
  display: block;
  line-height: 1.45;
  color: #587388;
  margin-top: 4px;
}
.layout-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.layout-tabs .selected {
  background: #187fba;
  color: #fff;
}
.source-colours {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.source-colours button {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid #c5d9e3;
  border-radius: 4px;
}
#template-config input[type="color"] {
  padding: 4px;
  height: 42px;
}
#template-publish {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid #d4e5ee;
}
#source-style details {
  margin: 18px 0;
}
#source-style summary {
  cursor: pointer;
  font-weight: 600;
}
@media (max-width: 1150px) {
  .template-workspace {
    grid-template-columns: 1fr;
  }
}
