:root {
  --accent: #d52b1e;
  --accent-hover: #b8241a;
  --accent-pressed: #991b13;
  --accent-light: #f7d4d0;
  --accent-lighter: #fdf3f2;
  --brand-primary: #0b6e88;
  --brand-primary-light: #dff4f3;
  --bg: #faf9f8;
  --surface: #ffffff;
  --ink: #323130;
  --muted: #605e5c;
  --subtle: #797775;
  --line: #edebe9;
  --line-strong: #d2d0ce;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 6.4px 14.4px rgba(0, 0, 0, 0.13), 0 1.2px 3.6px rgba(0, 0, 0, 0.11);
  --radius: 6px;
  --radius-sm: 3px;
  --speed: 130ms;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.suite-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.suite-header.compact {
  box-shadow: none;
}

.nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 190px;
}

.brand-mark {
  width: 44px;
  height: 40px;
  flex: none;
  object-fit: contain;
}

.brand-mark::after {
  content: none;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  font-weight: 700;
}

.brand-wordmark {
  color: var(--brand-primary);
  font-family: "Arial Black", "Liberation Sans", "Arial Nova", "Segoe UI", Arial, sans-serif;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.brand .brand-wordmark {
  display: inline-flex;
  align-items: baseline;
}

.brand-segment {
  --stripe-color: var(--brand-primary);
  display: inline-block;
  color: var(--stripe-color);
}

.brand-pdf {
  --stripe-color: var(--accent);
  margin-left: 0.04em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand-segment {
    background-image: repeating-linear-gradient(
      to bottom,
      var(--stripe-color) 0,
      var(--stripe-color) 0.105em,
      transparent 0.105em,
      transparent 0.16em
    );
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
  }
}

@media (forced-colors: active) {
  .brand-segment {
    background: none;
    color: CanvasText;
    -webkit-text-fill-color: CanvasText;
  }
}

.brand small {
  color: var(--muted);
  font-size: 11.5px;
}

.nav-links {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.nav-links a:hover,
.back-link:hover {
  color: var(--accent);
}

.nav-spacer {
  flex: 1;
}

.header-action,
.primary-action,
.run-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 0 15px;
  transition: background var(--speed), border-color var(--speed), color var(--speed);
}

.header-action:hover,
.primary-action:hover,
.run-button:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.run-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.back-link {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.status-pill {
  min-width: 92px;
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  background: var(--accent-lighter);
  color: var(--accent-pressed);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  text-align: center;
}

.hero {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #faf9f8 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 40px;
  align-items: end;
  padding: 50px 0 34px;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border: 1px solid var(--accent-light);
  border-radius: 999px;
  background: var(--accent-lighter);
  color: var(--accent-pressed);
  font-size: 12px;
  font-weight: 750;
  padding: 6px 12px;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  color: #201f1e;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: 0;
  line-height: 1.04;
}

.hero p {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.search {
  position: relative;
  align-self: end;
}

.search input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  padding: 0 16px 0 46px;
}

.search input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 -1px var(--accent), var(--shadow);
}

.search svg {
  position: absolute;
  top: 50%;
  left: 17px;
  color: var(--muted);
  transform: translateY(-50%);
}

.tools-section {
  padding: 24px 0 72px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  padding: 0 14px;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tool-card {
  position: relative;
  display: grid;
  min-height: 164px;
  grid-template-rows: auto auto 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  padding: 18px;
  transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed);
}

.tool-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-icon,
.tool-head-icon {
  display: grid;
  place-items: center;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  background: var(--accent-lighter);
  color: var(--accent);
}

.tool-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 15px;
}

.tool-card h3 {
  margin: 0 0 5px;
  font-size: 16px;
  letter-spacing: 0;
}

.tool-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.tool-card .tag {
  position: absolute;
  top: 15px;
  right: 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  padding: 3px 8px;
}

.suite-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  padding: 24px 0;
  text-align: center;
}

/* ---------- SuccessFactors-inspired home dashboard ---------- */
.success-home {
  min-height: 100vh;
  background: linear-gradient(180deg, #28aaa9 0%, #0f7595 100%);
}

.success-home .sf-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-top: 3px solid #0a789f;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.sf-nav {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid #d9d9d9;
  background: #f6f6f6;
  padding: 0 42px;
}

.success-home .brand {
  min-width: 164px;
}

.success-home .brand-mark {
  width: 44px;
  height: 38px;
}

.success-home .brand-mark::after {
  display: none;
}

.success-home .brand .brand-wordmark {
  color: var(--brand-primary);
  font-size: 25px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.success-home .brand .brand-wordmark .brand-pdf {
  --stripe-color: var(--accent);
}

.success-home .brand small {
  color: #8a8886;
  font-size: 10px;
}

.sf-breadcrumb {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #605e5c;
  font-size: 13px;
  font-weight: 500;
}

.sf-breadcrumb a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
}

.sf-breadcrumb a:hover {
  color: var(--accent);
}

.home-glyph svg {
  width: 20px;
  height: 20px;
}

.sf-search {
  position: relative;
  width: min(360px, 34vw);
  margin-left: auto;
}

.sf-search input {
  width: 100%;
  height: 40px;
  border: 1px solid #d2d0ce;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  outline: none;
  padding: 0 12px 0 38px;
}

.sf-search input:focus {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 -1px var(--accent);
}

.sf-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  color: #605e5c;
  transform: translateY(-50%);
}

.sf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #605e5c;
  font-size: 13px;
}

.sf-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: #605e5c;
}

.sf-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-lighter);
  color: var(--accent-pressed);
  font-size: 12px;
  font-weight: 800;
}

.sf-user {
  white-space: nowrap;
}

.sf-tabs {
  display: flex;
  min-height: 32px;
  align-items: stretch;
  gap: 4px;
  background: rgba(33, 166, 168, 0.96);
  padding-left: 48px;
}

.success-home .sf-tabs .chip {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  padding: 0 14px;
}

.success-home .sf-tabs .chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.success-home .sf-tabs .chip.active {
  background: rgba(0, 0, 0, 0.16);
  color: #fff;
}

.sf-workspace {
  min-height: calc(100vh - 88px);
  background: linear-gradient(180deg, #2db8b5 0%, #158aa0 54%, #126a91 100%);
  color: #fff;
  padding: 26px 0 80px 56px;
}

.sf-intro {
  max-width: 980px;
  margin: 0 0 16px;
}

.sf-intro h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  line-height: 1.2;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.24);
}

.sf-intro p {
  max-width: 620px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.sf-board {
  width: min(1180px, calc(100vw - 80px));
}

.dashboard-section {
  margin-top: 24px;
}

.dashboard-section:first-child {
  margin-top: 12px;
}

.dashboard-section h2 {
  margin: 0 0 12px 16px;
  color: #fff;
  font-size: 20px;
  font-weight: 650;
  line-height: 1.15;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.success-home .tool-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 1120px;
}

.success-home .tool-card {
  position: relative;
  width: 136px;
  height: 122px;
  min-height: 122px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  color: #333;
  overflow: hidden;
  padding: 10px 11px 10px;
  transform: none;
}

.success-home .tool-card:hover {
  border-color: rgba(213, 43, 30, 0.55);
  box-shadow: 0 0 0 2px rgba(213, 43, 30, 0.24), 0 4px 10px rgba(0, 0, 0, 0.18);
  transform: none;
}

.success-home .tool-card.featured {
  width: 136px;
}

.tile-title {
  min-height: 54px;
  padding-right: 30px;
}

.success-home .tool-card h3 {
  margin: 0;
  color: #424242;
  display: -webkit-box;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.success-home .tool-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #605e5c;
  font-size: 10px;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tile-lower {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: end;
  margin-top: auto;
}

.tile-corner-icon,
.success-home .tool-icon {
  width: 27px;
  height: 27px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #aaa;
}

.tile-corner-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 5px;
  background: rgba(213, 43, 30, 0.1);
  color: var(--accent);
  padding: 2px;
}

.tile-corner-icon svg,
.success-home .tool-icon svg {
  width: 25px;
  height: 25px;
  stroke-width: 1.55;
}

.tile-corner-icon.icon-edit {
  background: #fdf3f2;
  color: #d52b1e;
}

.tile-corner-icon.icon-organize {
  background: #eef6ff;
  color: #2563eb;
}

.tile-corner-icon.icon-convert {
  background: #e8f7f2;
  color: #0f8f72;
}

.tile-corner-icon.icon-security {
  background: #f4efff;
  color: #6d42c7;
}

.tile-corner-icon.icon-optimize {
  background: #fff6e6;
  color: #b7791f;
}

.tile-stat {
  justify-self: end;
  text-align: right;
}

.tile-stat strong {
  display: block;
  color: #7d8589;
  font-size: 23px;
  font-weight: 300;
  line-height: 0.9;
}

.tile-stat span {
  display: block;
  color: #605e5c;
  font-size: 10px;
  line-height: 1.15;
}

.success-home .tool-card .tag {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 11px;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 0;
}

.empty-dashboard {
  margin: 24px 0 0 16px;
  color: #fff;
}

.success-home .suite-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: #126a91;
  color: rgba(255, 255, 255, 0.82);
  padding: 18px 56px;
  text-align: left;
}

.tool-main {
  padding: 28px 0 56px;
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.tool-head-icon {
  width: 54px;
  height: 54px;
  flex: none;
}

.tool-head h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.1;
}

.tool-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}

.tool-canvas,
.tool-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.tool-canvas {
  min-height: 460px;
  padding: 22px;
}

.canvas-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.canvas-bar h2,
.tool-panel h2 {
  margin: 0;
  font-size: 15px;
}

.canvas-bar span {
  color: var(--muted);
  font-size: 12px;
}

.icon-command {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}

.icon-command:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.dropzone {
  display: grid;
  min-height: 210px;
  place-items: center;
  gap: 8px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  text-align: center;
  transition: border-color var(--speed), background var(--speed);
}

.dropzone:hover,
.dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-lighter);
}

.drop-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-lighter);
  color: var(--accent);
}

.drop-icon svg {
  width: 28px;
  height: 28px;
}

.dropzone strong {
  display: block;
  font-size: 16px;
}

.dropzone small {
  color: var(--muted);
  font-size: 12px;
}

.file-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.file-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 10px 12px;
}

.file-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item span {
  color: var(--muted);
  font-size: 12px;
}

.remove-file {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.remove-file:hover {
  background: var(--accent-lighter);
  color: var(--accent);
}

.result-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid var(--accent-light);
  border-radius: var(--radius);
  background: var(--accent-lighter);
  padding: 14px;
}

.result-box strong,
.result-box span {
  display: block;
}

.result-box span {
  color: var(--muted);
  font-size: 12px;
}

.tool-panel {
  position: sticky;
  top: 86px;
  overflow: hidden;
}

.tool-panel h2 {
  padding: 18px 18px 0;
}

.option-list {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  padding: 0 10px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 -1px var(--accent);
}

.check-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.empty-options {
  color: var(--muted);
  font-size: 13px;
  padding: 18px;
}

.panel-foot {
  border-top: 1px solid var(--line);
  background: #fbfafa;
  padding: 18px;
}

.run-button {
  width: 100%;
}

.tool-note {
  min-height: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tool-note.error {
  color: var(--accent-pressed);
}

/* ---------- Tool pages aligned with the SAPDF dashboard ---------- */
.tool-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #2db8b5 0%, #158aa0 54%, #126a91 100%);
  color: #fff;
}

.tool-page .tool-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-top: 3px solid #0a789f;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.tool-page .tool-nav {
  width: auto;
  max-width: none;
  min-height: 58px;
  margin: 0;
  gap: 18px;
  border-bottom: 1px solid #d9d9d9;
  background: #f6f6f6;
  padding: 0 42px;
}

.tool-page .brand {
  min-width: 164px;
}

.tool-page .brand .brand-wordmark {
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
}

.tool-page .brand small {
  color: #8a8886;
  font-size: 10px;
}

.tool-page .tool-breadcrumb {
  color: #605e5c;
}

.tool-page .tool-breadcrumb span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  color: #424242;
  font-weight: 650;
}

.tool-page .back-link {
  min-height: 34px;
  color: #605e5c;
}

.tool-page .back-link:hover {
  color: var(--accent);
}

.tool-page .status-pill {
  border-color: #d9d9d9;
  border-radius: 0;
  background: #fff;
  color: #605e5c;
}

.tool-page .tool-main {
  width: min(1180px, calc(100vw - 80px));
  margin: 0;
  padding: 26px 0 80px 56px;
}

.tool-page .tool-layout {
  max-width: 1120px;
  gap: 12px;
}

.tool-page .tool-head {
  margin-bottom: 18px;
}

.tool-page .tool-head h1 {
  color: #fff;
  font-size: 24px;
  font-weight: 650;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
}

.tool-page .tool-head p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.tool-page .tool-head-icon {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  color: var(--accent);
}

.tool-page .tool-head-icon svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.55;
}

.tool-page .tool-head-icon.icon-edit {
  color: #d52b1e;
}

.tool-page .tool-head-icon.icon-organize {
  color: #2563eb;
}

.tool-page .tool-head-icon.icon-convert {
  color: #0f8f72;
}

.tool-page .tool-head-icon.icon-security {
  color: #6d42c7;
}

.tool-page .tool-head-icon.icon-optimize {
  color: #b7791f;
}

.tool-page .tool-canvas,
.tool-page .tool-panel {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.16);
  color: #333;
}

.tool-page .tool-canvas {
  min-height: 430px;
  padding: 18px;
}

.tool-page .canvas-bar {
  border-bottom: 1px solid #edebe9;
  margin: -4px -4px 18px;
  padding: 0 0 14px;
}

.tool-page .canvas-bar h2,
.tool-page .tool-panel h2 {
  color: #424242;
  font-size: 15px;
  font-weight: 650;
}

.tool-page .dropzone {
  border-color: #c8c6c4;
  border-radius: 0;
  background: #fff;
}

.tool-page .dropzone:hover,
.tool-page .dropzone.dragging {
  border-color: var(--accent);
  background: #fdf3f2;
}

.tool-page .drop-icon {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.tool-page .file-item,
.tool-page .result-box {
  border-radius: 0;
}

.tool-page .tool-panel {
  top: 72px;
}

.tool-page .panel-foot {
  background: #f6f6f6;
}

.tool-page .run-button,
.tool-page .primary-action {
  border-radius: 0;
}

@media (max-width: 980px) {
  .hero-inner,
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tool-panel {
    position: static;
  }

  .tool-page .tool-nav {
    padding: 0 20px;
  }

  .tool-page .tool-main {
    width: calc(100vw - 40px);
    padding-left: 24px;
  }
}

@media (max-width: 720px) {
  .wrap {
    width: min(100% - 24px, 1180px);
  }

  .nav-links,
  .header-action {
    display: none;
  }

  .brand {
    min-width: 0;
  }

  .tool-page .tool-nav {
    min-height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .tool-page .nav-spacer {
    flex-basis: 100%;
    height: 0;
  }

  .tool-page .tool-main {
    width: 100%;
    padding: 20px 12px 58px;
  }

  .tool-page .tool-head {
    align-items: flex-start;
  }

  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 34px;
  }
}

@media (max-width: 980px) {
  .sf-nav {
    padding: 0 20px;
  }

  .sf-search {
    width: min(320px, 42vw);
  }

  .sf-workspace {
    padding-left: 24px;
  }

  .sf-board {
    width: calc(100vw - 40px);
  }

  .success-home .tool-card,
  .success-home .tool-card.featured {
    width: 136px;
  }

}

@media (max-width: 720px) {
  .sf-nav {
    min-height: auto;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 14px;
  }

  .sf-breadcrumb,
  .sf-actions {
    display: none;
  }

  .sf-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .sf-tabs {
    overflow-x: auto;
    padding-left: 12px;
  }

  .sf-workspace {
    padding: 20px 12px 58px;
  }

  .sf-board {
    width: 100%;
  }

  .dashboard-section h2 {
    margin-left: 0;
  }

  .success-home .tool-grid {
    gap: 8px;
  }

  .success-home .tool-card,
  .success-home .tool-card.featured {
    width: min(136px, calc(50% - 4px));
    height: 122px;
    min-height: 122px;
  }

  .success-home .suite-footer {
    padding: 18px 12px;
  }
}

@media (max-width: 460px) {
  .success-home .tool-card,
  .success-home .tool-card.featured {
    width: 100%;
  }

}

/* ---------- SAPDF document workspace ---------- */
:root {
  --workspace-bg: #f2f5f7;
  --workspace-panel: #f8fafb;
  --workspace-line: #dce2e7;
  --workspace-line-strong: #c8d0d7;
  --workspace-ink: #24313a;
  --workspace-muted: #66727c;
  --workspace-shadow: 0 8px 22px rgba(30, 48, 60, 0.08);
}

.library-home {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background: var(--workspace-bg);
  color: var(--workspace-ink);
}

.library-home .library-header,
.tool-page .tool-header {
  border: 0;
  border-bottom: 1px solid var(--workspace-line);
  background: #fff;
  box-shadow: 0 2px 9px rgba(30, 48, 60, 0.05);
  backdrop-filter: none;
}

.suite-nav {
  display: flex;
  min-height: 66px;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
}

.library-home .brand,
.tool-page .brand {
  min-width: 168px;
}

.library-home .brand-mark,
.tool-page .brand-mark {
  width: 46px;
  height: 40px;
}

.library-home .brand .brand-wordmark,
.tool-page .brand .brand-wordmark {
  color: var(--brand-primary);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.library-home .brand .brand-wordmark .brand-pdf,
.tool-page .brand .brand-wordmark .brand-pdf {
  --stripe-color: var(--accent);
}

.suite-breadcrumb {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--workspace-muted);
  font-size: 12.5px;
  font-weight: 600;
}

.suite-breadcrumb a,
.suite-breadcrumb span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
}

.suite-breadcrumb a:hover {
  color: var(--accent);
}

.home-glyph {
  width: 34px;
  justify-content: center;
  border-radius: 5px;
}

.home-glyph:hover {
  background: var(--accent-lighter);
}

.suite-search {
  position: relative;
  width: min(430px, 38vw);
  margin-left: auto;
}

.suite-search input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--workspace-line-strong);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--workspace-ink);
  font-size: 13px;
  outline: none;
  padding: 0 14px 0 40px;
  transition: border-color var(--speed), background var(--speed), box-shadow var(--speed);
}

.suite-search input:hover {
  background: #fff;
}

.suite-search input:focus {
  border-color: var(--brand-primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 110, 136, 0.11);
}

.suite-search svg {
  position: absolute;
  top: 50%;
  left: 13px;
  color: var(--workspace-muted);
  transform: translateY(-50%);
}

.suite-workspace {
  display: grid;
  min-height: calc(100vh - 111px);
  flex: 1;
  grid-template-columns: 208px minmax(0, 1fr);
}

.category-nav {
  border-right: 1px solid var(--workspace-line);
  background: #fff;
  padding: 24px 14px;
}

.category-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 8px 14px;
  color: var(--workspace-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.category-nav-head strong {
  min-width: 24px;
  color: var(--workspace-ink);
  font-size: 12px;
  text-align: right;
}

.category-list {
  display: grid;
  gap: 3px;
}

.category-button {
  --category-color: #5f6b75;
  --category-soft: #edf1f3;
  display: grid;
  width: 100%;
  min-height: 42px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--workspace-muted);
  cursor: pointer;
  padding: 4px 10px 4px 7px;
  text-align: left;
  transition: background var(--speed), color var(--speed), border-color var(--speed);
}

.category-button:hover {
  background: var(--category-soft);
  color: var(--workspace-ink);
}

.category-button.active {
  border-left-color: var(--category-color);
  background: var(--category-soft);
  color: var(--workspace-ink);
  font-weight: 700;
}

.category-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 5px;
  color: var(--category-color);
}

.category-icon svg {
  width: 19px;
  height: 19px;
}

.category-label {
  overflow: hidden;
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-count {
  color: #87919a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.category-edit {
  --category-color: #c9362b;
  --category-soft: #fdf1f0;
}

.category-organize {
  --category-color: #2d68b2;
  --category-soft: #edf4fb;
}

.category-convert {
  --category-color: #087d66;
  --category-soft: #e9f6f2;
}

.category-security {
  --category-color: #7050a5;
  --category-soft: #f3eff9;
}

.category-optimize {
  --category-color: #9b6817;
  --category-soft: #fbf4e8;
}

.tool-library {
  min-width: 0;
  padding: 28px 34px 56px;
}

.tool-library #toolSections {
  width: min(1180px, 100%);
}

.dashboard-section {
  margin: 0 0 30px;
}

.dashboard-section:last-child {
  margin-bottom: 0;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.section-heading h2,
.dashboard-section h2 {
  margin: 0;
  color: var(--workspace-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
  text-shadow: none;
}

.section-heading span {
  display: inline-flex;
  min-width: 22px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--workspace-line);
  border-radius: 5px;
  background: #fff;
  color: var(--workspace-muted);
  font-size: 10.5px;
  font-weight: 700;
}

.library-home .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 192px);
  gap: 12px;
  align-items: start;
  justify-content: start;
  max-width: none;
}

.library-home .tool-card,
.library-home .tool-card.featured {
  --category-color: #5f6b75;
  --category-soft: #edf1f3;
  display: flex;
  width: 192px;
  height: 148px;
  min-height: 148px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--workspace-line);
  border-top: 3px solid var(--category-color);
  border-radius: 6px;
  background: #fff;
  box-shadow: none;
  color: var(--workspace-ink);
  padding: 12px 13px 10px;
  transform: none;
  transition: border-color var(--speed), box-shadow var(--speed), transform var(--speed);
}

.library-home .tool-card:hover {
  border-color: var(--category-color);
  box-shadow: var(--workspace-shadow);
  transform: translateY(-1px);
}

.library-home .tool-card:focus-visible {
  outline: 2px solid var(--category-color);
  outline-offset: 2px;
}

.library-home .tool-card.category-edit {
  --category-color: #c9362b;
  --category-soft: #fdf1f0;
}

.library-home .tool-card.category-organize {
  --category-color: #2d68b2;
  --category-soft: #edf4fb;
}

.library-home .tool-card.category-convert {
  --category-color: #087d66;
  --category-soft: #e9f6f2;
}

.library-home .tool-card.category-security {
  --category-color: #7050a5;
  --category-soft: #f3eff9;
}

.library-home .tool-card.category-optimize {
  --category-color: #9b6817;
  --category-soft: #fbf4e8;
}

.tile-top {
  display: flex;
  min-height: 32px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tile-icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  place-items: center;
  border-radius: 6px;
  background: var(--category-soft);
  color: var(--category-color);
}

.tile-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.7;
}

.library-home .tool-card .tag {
  position: static;
  max-width: 82px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 9.5px;
  font-weight: 800;
  padding: 1px 0 0;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tile-copy {
  min-height: 51px;
  padding-top: 7px;
}

.library-home .tool-card h3 {
  display: block;
  overflow: hidden;
  margin: 0;
  color: var(--workspace-ink);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-home .tool-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: var(--workspace-muted);
  font-size: 11.5px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tile-action {
  display: flex;
  min-height: 24px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  border-top: 1px solid #edf0f2;
  color: #7a858e;
  font-size: 10.5px;
  padding-top: 7px;
}

.tile-action svg {
  width: 16px;
  height: 16px;
  color: var(--category-color);
  transition: transform var(--speed);
}

.tool-card:hover .tile-action svg {
  transform: translateX(2px);
}

.empty-dashboard {
  margin: 10px 0;
  border: 1px dashed var(--workspace-line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--workspace-muted);
  padding: 24px;
}

.library-home .suite-footer {
  margin-left: 208px;
  border-top: 1px solid var(--workspace-line);
  background: #fff;
  color: var(--workspace-muted);
  padding: 16px 34px;
  text-align: left;
}

/* ---------- Shared tool pages ---------- */
.tool-page {
  min-height: 100vh;
  background: var(--workspace-bg);
  color: var(--workspace-ink);
}

.tool-page .tool-nav {
  width: auto;
  max-width: none;
  min-height: 66px;
  margin: 0;
  gap: 22px;
  padding: 0 32px;
}

.tool-page .tool-breadcrumb {
  color: var(--workspace-muted);
}

.tool-page .tool-breadcrumb span {
  color: var(--workspace-ink);
  font-weight: 700;
}

.tool-page .status-pill {
  min-width: 76px;
  border: 1px solid var(--workspace-line);
  border-radius: 5px;
  background: var(--workspace-panel);
  color: var(--workspace-muted);
  padding: 6px 10px;
}

.tool-page .tool-main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 64px;
}

.tool-page .tool-layout {
  max-width: none;
  gap: 20px;
}

.tool-page .tool-head {
  margin-bottom: 22px;
}

.tool-page .tool-head h1 {
  color: var(--workspace-ink);
  font-size: 25px;
  font-weight: 750;
  text-shadow: none;
}

.tool-page .tool-head p {
  max-width: 720px;
  color: var(--workspace-muted);
  font-size: 13px;
}

.tool-page .tool-head-icon {
  width: 50px;
  height: 50px;
  border: 1px solid var(--workspace-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}

.tool-page .tool-head-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 1.65;
}

.tool-page .tool-head-icon.icon-edit {
  border-color: #f2d5d2;
  background: #fdf1f0;
  color: #c9362b;
}

.tool-page .tool-head-icon.icon-organize {
  border-color: #d5e4f3;
  background: #edf4fb;
  color: #2d68b2;
}

.tool-page .tool-head-icon.icon-convert {
  border-color: #cde9df;
  background: #e9f6f2;
  color: #087d66;
}

.tool-page .tool-head-icon.icon-security {
  border-color: #e2d9ef;
  background: #f3eff9;
  color: #7050a5;
}

.tool-page .tool-head-icon.icon-optimize {
  border-color: #ecdfc8;
  background: #fbf4e8;
  color: #9b6817;
}

.tool-page .tool-canvas,
.tool-page .tool-panel {
  border: 1px solid var(--workspace-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(30, 48, 60, 0.045);
  color: var(--workspace-ink);
}

.tool-page .tool-canvas {
  min-height: 430px;
  padding: 20px;
}

.tool-page .canvas-bar {
  margin: 0 0 18px;
  border-bottom: 1px solid #edf0f2;
  padding: 0 0 14px;
}

.tool-page .canvas-bar h2,
.tool-page .tool-panel h2 {
  color: var(--workspace-ink);
  font-size: 14px;
  font-weight: 700;
}

.tool-page .dropzone {
  border-color: var(--workspace-line-strong);
  border-radius: 7px;
  background: #fafcfd;
}

.tool-page .dropzone:hover,
.tool-page .dropzone.dragging {
  border-color: var(--accent);
  background: var(--accent-lighter);
}

.tool-page .drop-icon {
  border-radius: 7px;
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.tool-page .file-item,
.tool-page .result-box {
  border-radius: 6px;
}

.tool-page .tool-panel {
  top: 84px;
}

.tool-page .panel-foot {
  background: var(--workspace-panel);
}

.tool-page .run-button,
.tool-page .primary-action {
  border-radius: 4px;
}

@media (max-width: 980px) {
  .suite-nav,
  .tool-page .tool-nav {
    padding: 0 20px;
  }

  .suite-search {
    width: min(360px, 40vw);
  }

  .tool-page .tool-main {
    width: calc(100% - 40px);
    padding: 26px 0 58px;
  }

  .tool-page .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-page .tool-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .suite-nav,
  .tool-page .tool-nav {
    min-height: auto;
    flex-wrap: wrap;
    gap: 9px;
    padding: 10px 14px;
  }

  .suite-breadcrumb {
    display: none;
  }

  .library-home .brand,
  .tool-page .brand {
    min-width: 0;
    margin-right: auto;
  }

  .suite-search {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .suite-workspace {
    display: block;
    min-height: 0;
  }

  .category-nav {
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--workspace-line);
    padding: 9px 12px;
  }

  .category-nav-head {
    display: none;
  }

  .category-list {
    display: flex;
    overflow-x: auto;
    gap: 5px;
    scrollbar-width: thin;
  }

  .category-button {
    width: auto;
    min-width: max-content;
    min-height: 38px;
    grid-template-columns: 24px auto auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 3px 9px;
  }

  .category-button.active {
    border-bottom-color: var(--category-color);
  }

  .category-icon {
    width: 24px;
    height: 24px;
  }

  .tool-library {
    padding: 22px 16px 44px;
  }

  .library-home .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-home .tool-card,
  .library-home .tool-card.featured {
    width: 100%;
  }

  .library-home .suite-footer {
    margin-left: 0;
    padding: 15px 16px;
  }

  .tool-page .nav-spacer {
    display: none;
  }

  .tool-page .tool-main {
    width: 100%;
    padding: 22px 14px 48px;
  }
}

@media (max-width: 520px) {
  .library-home .brand .brand-wordmark,
  .tool-page .brand .brand-wordmark {
    font-size: 23px;
  }

  .library-home .brand-mark,
  .tool-page .brand-mark {
    width: 42px;
    height: 37px;
  }

  .library-home .tool-grid {
    grid-template-columns: 1fr;
  }

  .library-home .tool-card,
  .library-home .tool-card.featured {
    height: 140px;
    min-height: 140px;
  }

  .tool-page .status-pill {
    display: none;
  }
}
