/* Strasys-branded styles for the doc-review app.
   Palette mirrors strasys-report.css (slate / dark-green / innovation-green / mint).
*/

:root {
  --strasys-slate:             #454753;
  --strasys-deep-slate:        #353740;
  --strasys-dark-green:        #167984;
  --strasys-innovation-green:  #52B4A9;
  --strasys-grey:              #ECECF0;
  --strasys-vibrant-orange:    #E94E1B;
  --mint-tint:                 #E6F5F2;
  --nhs-blue:                  #005EB8;
  --bg-page:                   #FAFAFB;
  --rule:                      rgba(69, 71, 83, 0.14);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--strasys-slate);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--strasys-dark-green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Top bar */
.topbar {
  background: var(--strasys-deep-slate);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  letter-spacing: 0.04em;
}
.topbar .brand {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.topbar .brand .accent { color: var(--strasys-innovation-green); }
.topbar .nav { display: flex; gap: 18px; flex: 1; margin-left: 32px; }
.topbar .nav a {
  color: rgba(255,255,255,0.78);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none;
}
.topbar .nav a:hover, .topbar .nav a.active { color: #fff; }
.topbar .userbox { font-size: 12px; color: rgba(255,255,255,0.78); }
.topbar .userbox a { color: rgba(255,255,255,0.78); margin-left: 12px; }

/* Breadcrumbs */
.breadcrumb {
  font-size: 12px;
  color: rgba(69,71,83,0.65);
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.breadcrumb a { color: var(--strasys-dark-green); }
.breadcrumb .sep { color: rgba(69,71,83,0.35); }
.breadcrumb .current { color: var(--strasys-deep-slate); font-weight: 600; }

/* Page actions row */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0 24px;
}
.actions .spacer { flex: 1; }

/* Page chrome */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}
.container--narrow { max-width: 540px; }

h1, h2, h3 { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; color: var(--strasys-deep-slate); margin-top: 0; letter-spacing: -0.01em; }
h1 { font-size: 28px; margin-bottom: 12px; }
h2 { font-size: 20px; margin-bottom: 8px; }
h3 { font-size: 16px; margin-bottom: 6px; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--strasys-innovation-green);
  margin-bottom: 6px;
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 20px 24px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  margin-bottom: 16px;
}

/* Forms */
form { margin: 0; }
label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--strasys-deep-slate);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 12px 0 4px;
}
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], textarea, select {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--strasys-slate);
}
textarea { font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace; font-size: 12px; resize: vertical; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--strasys-innovation-green);
  box-shadow: 0 0 0 3px rgba(82, 180, 169, 0.18);
}

button, .btn {
  display: inline-block;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--strasys-dark-green);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
button:hover, .btn:hover { background: var(--strasys-innovation-green); }
button.secondary, .btn.secondary { background: #fff; color: var(--strasys-dark-green); border: 1px solid var(--strasys-dark-green); }
button.danger, .btn.danger { background: var(--strasys-vibrant-orange); }

/* Tables / lists */
.list { list-style: none; padding: 0; margin: 0; }
.list li { border-bottom: 1px solid var(--rule); padding: 10px 0; display: flex; align-items: center; gap: 12px; }
.list li:last-child { border-bottom: none; }
.list .meta { color: rgba(69,71,83,0.7); font-size: 12px; }

/* Banners */
.banner {
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}
.banner--info { background: var(--mint-tint); border-left: 3px solid var(--strasys-innovation-green); color: var(--strasys-dark-green); }
.banner--warn { background: rgba(233, 78, 27, 0.08); border-left: 3px solid var(--strasys-vibrant-orange); color: var(--strasys-deep-slate); }

.lock-banner {
  background: rgba(233, 78, 27, 0.08);
  border-left: 3px solid var(--strasys-vibrant-orange);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  margin: 8px 0;
}

/* Diff view */
.diff-orig { background: rgba(233, 78, 27, 0.06); border-left: 3px solid var(--strasys-vibrant-orange); padding: 6px 10px; margin: 4px 0; white-space: pre-wrap; font-size: 12px; }
.diff-new { background: var(--mint-tint); border-left: 3px solid var(--strasys-innovation-green); padding: 6px 10px; margin: 4px 0; white-space: pre-wrap; font-size: 12px; }

/* Pills / role chips */
.chip { display: inline-block; padding: 2px 8px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; }
.chip--author { background: var(--strasys-dark-green); color: #fff; }
.chip--reviewer { background: var(--mint-tint); color: var(--strasys-dark-green); }
.chip--readonly { background: var(--strasys-grey); color: var(--strasys-slate); }
.chip--internal { background: var(--strasys-deep-slate); color: #fff; }
.chip--client { background: var(--nhs-blue); color: #fff; }
.chip--external { background: var(--strasys-vibrant-orange); color: #fff; }

/* Editor layout */
.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.editor-grid > section { background: #fff; border: 1px solid var(--rule); border-radius: 6px; padding: 16px 20px; }
.editor-grid h3 { margin-bottom: 8px; }
@media (max-width: 900px) { .editor-grid { grid-template-columns: 1fr; } }

/* Split-pane workspace editor (slice 13 Phase A) */
.ws-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 0 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 12px;
}
.ws-toolbar .breadcrumb { margin: 0; }
.ws-toolbar .chip { font-size: 10px; padding: 1px 6px; }

/* Smaller variant of .btn for the action toolbar so the top strip stays
   in one line and doesn't push the editor down the page. */
.btn-sm, button.btn-sm {
  display: inline-block;
  padding: 3px 9px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--strasys-dark-green);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.4;
}
.btn-sm:hover, button.btn-sm:hover { background: var(--strasys-innovation-green); }
.btn-sm.secondary, button.btn-sm.secondary {
  background: #fff; color: var(--strasys-dark-green); border-color: var(--strasys-dark-green);
}
.btn-sm.secondary:hover, button.btn-sm.secondary:hover {
  background: var(--mint-tint); text-decoration: none;
}

.split-pane {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 12px;
  /* Maximise vertical space for the doc + editor by leaving only what the
     compact toolbar and base chrome actually need. */
  height: calc(100vh - 170px);
  min-height: 520px;
}
.split-pane .preview {
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  overflow: hidden;
}
.split-pane .preview iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
.split-pane .right-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}
.split-pane .section-list {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 10px 14px;
  /* Capped so it can't push the editor pane off-screen on a small viewport. */
  max-height: 240px;
  overflow-y: auto;
  flex-shrink: 0;
}
.split-pane .section-list h3 {
  margin: 0 0 6px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--strasys-deep-slate);
}
.split-pane .section-list ul {
  list-style: none; padding: 0; margin: 0;
}
.split-pane .section-list li {
  padding: 5px 0;
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 12px;
}
.split-pane .section-list li:last-child { border-bottom: 0; }
.split-pane .section-list a {
  color: var(--strasys-deep-slate);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}
.split-pane .section-list a:hover { color: var(--strasys-dark-green); text-decoration: underline; }
.split-pane .section-list .section-meta { font-size: 10px; padding-left: 4px; }

.split-pane .editor-pane {
  flex: 1;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 16px 20px;
  overflow-y: auto;
  min-height: 200px;
}
.split-pane .editor-pane summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--strasys-deep-slate);
  margin: 8px 0;
}

@media (max-width: 960px) {
  .split-pane {
    grid-template-columns: 1fr;
    height: auto;
  }
  .split-pane .preview { height: 60vh; }
}

/* Footer */
.footer { color: rgba(69,71,83,0.55); font-size: 11px; text-align: center; padding: 24px 0; }
