@font-face {
  font-family: "General Sans";
  src: url("/public/brand/fonts/GeneralSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "General Sans";
  src: url("/public/brand/fonts/GeneralSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #f04a04;
  --accent-strong: #d94100;
  --ink: #1c1f2a;
  --ink-soft: #2f3340;
  --muted: #626672;
  --line: #dedfe3;
  --surface: #ffffff;
  --soft: #f5f5f5;
  --warm: #fff3ed;
  --green: #26875d;
  --blue: #4f6fd8;
  --yellow: #ffc820;
  --shadow: 0 18px 50px rgba(28, 31, 42, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  color: var(--ink);
  background: var(--soft);
  font-family:
    "General Sans",
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(115deg, rgba(28, 31, 42, 0.92), rgba(28, 31, 42, 0.7)),
    url("/public/brand/hero-thumbnail.avif") center / cover no-repeat;
}

.login-panel {
  width: min(100%, 460px);
  padding: 34px;
  color: #ffffff;
  background: rgba(28, 31, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-brand,
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-logo {
  width: 150px;
  height: auto;
  display: block;
}

.login-brand span {
  padding: 7px 10px;
  color: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.login-copy {
  margin: 64px 0 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-copy h1,
.hub-topbar h1,
.viewer-header h2,
.section-heading h2,
.empty-material h3 {
  margin: 0;
  letter-spacing: 0;
}

.login-copy h1 {
  font-size: clamp(42px, 8vw, 68px);
  line-height: 0.93;
}

.login-copy p:last-child {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form label {
  display: grid;
  gap: 7px;
}

.login-form label span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240, 74, 4, 0.22);
}

.form-error {
  margin: 0;
  color: #ffd5c6;
  font-size: 13px;
  font-weight: 700;
}

.primary-button,
.secondary-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.primary-button:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.secondary-button {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.secondary-button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.hub-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  background: var(--soft);
}

.hub-sidebar {
  min-height: 100vh;
  padding: 24px 18px;
  color: #ffffff;
  background: var(--ink);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
}

.sidebar-brand img {
  width: 42px;
  height: 46px;
  object-fit: contain;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand strong {
  font-size: 18px;
}

.sidebar-brand span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.category-nav {
  display: grid;
  gap: 6px;
}

.category-nav button {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
}

.category-nav button:hover,
.category-nav button.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
}

.category-nav button.active {
  box-shadow: inset 4px 0 0 var(--accent);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
}

.sidebar-note span,
.metric-card span,
.section-heading span,
.material-type,
.material-meta span,
.status-pill {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-note span {
  color: var(--accent);
}

.sidebar-note strong {
  display: block;
  margin-top: 6px;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.45;
}

.hub-main {
  min-width: 0;
  padding: 28px;
  display: grid;
  gap: 22px;
  overflow: hidden;
}

.hub-topbar {
  min-height: 76px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.hub-topbar h1 {
  max-width: 860px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  overflow-wrap: anywhere;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(260px, 0.8fr);
  gap: 14px;
}

.metric-card {
  min-height: 144px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(28, 31, 42, 0.04);
}

.metric-card span,
.section-heading span,
.material-type,
.material-meta span {
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.metric-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.image-card {
  padding: 0;
  overflow: hidden;
  background: var(--ink);
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 144px;
  display: block;
  object-fit: cover;
}

.content-grid {
  min-height: min(680px, calc(100vh - 300px));
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.content-grid.focus-view {
  grid-template-columns: minmax(0, 1fr);
}

.content-grid.focus-view .viewer-column {
  min-height: clamp(720px, calc(100vh - 150px), 1200px);
}

.content-grid.focus-view .material-frame,
.content-grid.focus-view .brand-guide,
.content-grid.focus-view .empty-material {
  min-height: clamp(620px, calc(100vh - 290px), 1040px);
}

.library-column,
.viewer-column {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 0 rgba(28, 31, 42, 0.04);
}

.library-column {
  padding: 18px;
}

.section-heading {
  min-height: 48px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: 24px;
}

.material-list {
  display: grid;
  gap: 10px;
}

.material-card {
  --material-accent: var(--accent);
  width: 100%;
  min-height: 174px;
  padding: 17px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 5px solid var(--material-accent);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.material-card:hover,
.material-card.active {
  border-color: var(--material-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--material-accent) 16%, transparent);
}

.material-card strong {
  font-size: 16px;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.material-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.material-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: end;
}

.material-meta span,
.status-pill {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  background: var(--soft);
}

.viewer-column {
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr);
}

.viewer-header {
  min-height: 128px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.status-pill {
  width: fit-content;
  color: var(--accent-strong);
  background: var(--warm);
}

.viewer-header h2 {
  margin-top: 12px;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.viewer-header p {
  max-width: 820px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.material-frame {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  background: var(--soft);
}

.empty-material {
  min-height: 520px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  background: #fafafa;
}

.empty-material img {
  width: 48px;
  height: 54px;
  object-fit: contain;
}

.empty-material h3 {
  font-size: 24px;
}

.empty-material p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.brand-guide {
  min-height: 520px;
  padding: 20px;
  overflow: auto;
  background: #fafafa;
  display: grid;
  gap: 18px;
}

.brand-section {
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.brand-section-heading h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
}

.brand-grid,
.swatch-grid,
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.brand-grid article,
.swatch-card,
.logo-card,
.snippet-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.brand-grid article {
  padding: 16px;
}

.brand-grid span,
.swatch-card span,
.logo-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand-grid strong,
.swatch-card strong,
.logo-card strong {
  display: block;
  margin-top: 7px;
}

.brand-grid p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.swatch-card {
  overflow: hidden;
}

.swatch-sample {
  min-height: 86px;
  padding: 12px;
  color: #ffffff;
  background: var(--swatch);
  display: flex;
  align-items: flex-end;
  font-size: 12px;
  font-weight: 700;
}

.swatch-sample.dark-text {
  color: var(--ink);
}

.swatch-card strong,
.swatch-card span {
  margin-left: 12px;
  margin-right: 12px;
}

.swatch-card strong {
  margin-top: 12px;
}

.swatch-card span {
  display: block;
  margin-top: 4px;
  margin-bottom: 12px;
}

.logo-card {
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
}

.logo-card div {
  min-height: 116px;
  padding: 16px;
  border-radius: 8px;
  background: var(--soft);
  display: grid;
  place-items: center;
}

.logo-card.dark div {
  background: var(--ink);
}

.logo-card img {
  max-width: 100%;
  max-height: 62px;
  object-fit: contain;
}

.snippet-list {
  display: grid;
  gap: 12px;
}

.snippet-card {
  overflow: hidden;
}

.snippet-card > div {
  min-height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.snippet-card button {
  min-height: 32px;
  padding: 0 11px;
  color: var(--accent-strong);
  background: var(--warm);
  border: 1px solid #ffd8c8;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.snippet-card pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  color: #f7f7f7;
  background: var(--ink);
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 1120px) {
  .hub-shell {
    grid-template-columns: 1fr;
  }

  .hub-sidebar {
    min-height: auto;
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 14px;
    gap: 14px;
  }

  .category-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .category-nav button {
    width: auto;
    min-width: 92px;
    text-align: center;
  }

  .sidebar-note {
    display: none;
  }

  .content-grid,
  .overview-grid,
  .brand-grid,
  .swatch-grid,
  .logo-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .login-screen,
  .hub-main {
    padding: 14px;
  }

  .login-panel {
    padding: 24px;
  }

  .login-copy {
    margin-top: 46px;
  }

  .hub-topbar,
  .viewer-header {
    display: grid;
  }

  .hub-topbar h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .secondary-button {
    width: 100%;
  }

  .content-grid {
    min-height: auto;
  }

  .viewer-column {
    grid-template-rows: auto minmax(540px, 66vh);
  }
}
