/* SyncChain APS — product shell */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Outfit:wght@400;500;600;700&family=Syne:wght@600;700;800&display=swap");

:root {
  --sc-ink: #0b1220;
  --sc-ink-soft: #1a2333;
  --sc-muted: #6b778c;
  --sc-line: #d8dee8;
  --sc-line-strong: #c3ccd9;
  --sc-bg: #e9eef4;
  --sc-panel: #f7f9fc;
  --sc-surface: #ffffff;
  --sc-brand: #0e7c86;
  --sc-brand-deep: #0a5f67;
  --sc-brand-soft: rgba(14, 124, 134, 0.1);
  --sc-accent: #d97706;
  --sc-good: #15803d;
  --sc-bad: #b91c1c;
  --sc-warn: #b45309;
  --sc-sidebar: #0b1220;
  --sc-sidebar-text: #9aa8bc;
  --sc-sidebar-active: #f0f4f8;
  --sc-radius: 14px;
  --sc-shadow: 0 1px 0 rgba(11, 18, 32, 0.04), 0 12px 32px rgba(11, 18, 32, 0.06);
  --font-display: "Syne", "Outfit", sans-serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--sc-ink);
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(14, 124, 134, 0.08), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(217, 119, 6, 0.05), transparent 45%),
    var(--sc-bg);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sc-brand-deep); }

/* —— App shell —— */
.sc-app {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sc-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background:
    linear-gradient(180deg, #10192b 0%, var(--sc-sidebar) 48%, #070b14 100%);
  color: var(--sc-sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 20;
}

.sc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  text-decoration: none;
  color: inherit;
}

.sc-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #14a3af, #0a5f67);
  box-shadow: 0 8px 20px rgba(14, 124, 134, 0.35);
  overflow: hidden;
}

.sc-mark::before,
.sc-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
}

.sc-mark::after {
  inset: 13px;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
  animation: sc-spin 8s linear infinite;
}

@keyframes sc-spin {
  to { transform: rotate(405deg); }
}

.sc-brand-text b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f4f7fb;
  line-height: 1.1;
}

.sc-brand-text small {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7f8ea3;
}

.sc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
}

.sc-nav-label {
  margin: 14px 8px 6px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5d6b80;
}

.sc-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--sc-sidebar-text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sc-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #e8eef7;
}

.sc-nav a.is-active,
.sc-nav a[aria-current="page"] {
  background: rgba(14, 124, 134, 0.22);
  color: var(--sc-sidebar-active);
  box-shadow: inset 0 0 0 1px rgba(14, 124, 134, 0.35);
}

.sc-nav .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

.sc-sidebar-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.sc-user strong {
  color: #e8eef7;
  font-size: 0.88rem;
  font-weight: 600;
}

.sc-user span {
  font-size: 0.75rem;
  color: #7f8ea3;
}

.sc-sidebar-foot a.sc-link {
  color: #9eb0c7;
  text-decoration: none;
  font-size: 0.85rem;
  padding: 6px 10px;
}

.sc-sidebar-foot a.sc-link:hover { color: #fff; }

.sc-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sc-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  background: rgba(247, 249, 252, 0.86);
  border-bottom: 1px solid var(--sc-line);
  backdrop-filter: blur(12px);
}

.sc-top-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-ink);
}

.sc-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wrap {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 28px 56px;
  animation: sc-rise 0.45s ease both;
}

@keyframes sc-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Marketing/login pages without sidebar —— */
body.sc-auth {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(14, 124, 134, 0.18), transparent 50%),
    linear-gradient(160deg, #0b1220 0%, #132033 45%, #0e7c86 160%);
}

body.sc-auth .sc-auth-card {
  width: min(420px, 100%);
  padding: 32px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: sc-rise 0.5s ease both;
}

body.sc-auth .sc-auth-card h1 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 8px;
  color: var(--sc-ink);
}

body.sc-auth .sc-auth-card p {
  margin: 0 0 20px;
  color: var(--sc-muted);
}

/* —— Components —— */
.hero,
.card,
.kpi,
.steps div,
.quick-card {
  background: var(--sc-surface);
  border: 1px solid var(--sc-line);
  border-radius: var(--sc-radius);
  box-shadow: var(--sc-shadow);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 26px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f4fafb 52%, #eef6f7 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 124, 134, 0.16), transparent 68%);
  pointer-events: none;
}

.kicker {
  margin: 0 0 8px;
  color: var(--sc-brand);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--sc-ink);
  line-height: 1.15;
}

h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--sc-ink);
}

h3 {
  margin: 18px 0 10px;
  color: var(--sc-ink-soft);
  font-size: 0.95rem;
}

.hero p,
.card p,
.steps span,
.quick-card span {
  color: #4b5568;
  line-height: 1.6;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--sc-brand);
  background: var(--sc-brand);
  color: #fff;
  border-radius: 999px;
  padding: 11px 16px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 18px rgba(14, 124, 134, 0.22);
}

.btn:hover {
  background: var(--sc-brand-deep);
  transform: translateY(-1px);
}

.btn:active { transform: translateY(0); }

.btn.secondary {
  background: #fff;
  color: var(--sc-brand-deep);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--sc-panel);
}

.btn.tiny {
  padding: 6px 10px;
  font-size: 0.75rem;
  box-shadow: none;
}

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

.steps div { padding: 18px; }

.steps b {
  display: block;
  color: var(--sc-brand-deep);
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.kpi {
  padding: 18px;
  transition: transform 0.2s ease;
}

.kpi:hover { transform: translateY(-2px); }

.kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sc-ink);
  font-variant-numeric: tabular-nums;
}

.kpi span {
  display: block;
  color: var(--sc-muted);
  margin-top: 6px;
  font-size: 0.82rem;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 16px 0;
}

.card {
  padding: 20px;
  margin-bottom: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 11px 10px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  font-size: 0.88rem;
  vertical-align: top;
}

th {
  background: var(--sc-panel);
  color: #334155;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bad { color: var(--sc-bad); font-weight: 700; }
.good { color: var(--sc-good); font-weight: 700; }

.success,
.warning,
.danger {
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.success { background: #ecfdf5; color: #065f46; }
.warning { background: #fffbeb; color: #92400e; }
.danger { background: #fef2f2; color: #991b1b; }

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0 18px;
}

label {
  display: block;
  font-weight: 600;
  color: #334155;
  font-size: 0.88rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input:not([type]),
textarea,
select {
  width: 100%;
  display: block;
  margin-top: 6px;
  border: 1px solid var(--sc-line-strong);
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-family: var(--font-ui);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--sc-brand);
  box-shadow: 0 0 0 3px var(--sc-brand-soft);
}

input[type="file"] {
  width: 100%;
  display: block;
  margin-top: 6px;
  border: 1px dashed #b6c7d2;
  border-radius: 11px;
  padding: 12px;
  background: var(--sc-panel);
}

textarea {
  min-height: 180px;
  resize: vertical;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

pre {
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  line-height: 1.45;
  max-height: 360px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

ol, ul { color: #475569; line-height: 1.7; }

.muted {
  color: var(--sc-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.user-badge {
  display: none;
}

.topbar { display: none; }

/* dashboard extras */
.dashboard-hero,
.executive-hero {
  background:
    linear-gradient(125deg, rgba(14, 124, 134, 0.08), transparent 42%),
    linear-gradient(135deg, #ffffff 0%, #f4fafb 55%, #eef6f7 100%);
}

.dashboard-kpi strong { font-size: 1.75rem; }
.dashboard-kpi.warn strong { color: var(--sc-warn); }
.dashboard-kpi.bad strong { color: var(--sc-bad); }
.dashboard-kpi.good strong { color: var(--sc-good); }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.quick-card {
  display: block;
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.quick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 124, 134, 0.35);
}

.quick-card b {
  display: block;
  font-family: var(--font-display);
  color: var(--sc-ink);
  margin-bottom: 6px;
}

.quick-card span {
  font-size: 0.85rem;
}

.steps.compact {
  grid-template-columns: 1fr 1fr;
}

.steps.compact div {
  box-shadow: none;
  border-radius: 12px;
  padding: 12px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.timeline div {
  padding: 14px;
  border: 1px solid var(--sc-line);
  border-radius: 14px;
  background: var(--sc-panel);
}

.timeline b {
  display: block;
  color: var(--sc-brand-deep);
  margin-bottom: 7px;
  font-family: var(--font-display);
}

.timeline span {
  display: block;
  color: #475569;
  line-height: 1.5;
  font-size: 0.88rem;
}

.highlight-card {
  border-left: 4px solid var(--sc-accent);
}

.executive-kpi {
  border-top: 3px solid var(--sc-accent);
}

@media (max-width: 980px) {
  .sc-app { grid-template-columns: 1fr; }
  .sc-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .sc-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
  }
  .sc-nav-label { grid-column: 1 / -1; }
  .steps,
  .kpis,
  .grid2,
  .upload-grid,
  .quick-grid,
  .timeline,
  .steps.compact {
    grid-template-columns: 1fr;
  }
  .wrap { padding: 20px 16px 40px; }
  .sc-top { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
