/* KENDALI BARANG — application stylesheet
   Tokens per docs/sources/locked/KENDALI_BARANG_BRAND_BOARD_v1_LOCKED.md §16
   (engineering tokens verbatim) plus layout-only additions noted inline. */

:root {
  /* --- locked brand board tokens, §16, verbatim --- */
  --kb-petrol: #1F2933;
  --kb-vermillion: #E3421F;
  --kb-vermillion-text: #C73618;

  --kb-text: #1F2933;
  --kb-text-secondary: #475467;
  --kb-text-muted: #667085;

  --kb-surface: #FFFFFF;
  --kb-surface-subtle: #F7F8FA;
  --kb-surface-muted: #EEF1F4;

  --kb-border: #D9DEE5;
  --kb-border-strong: #B9C1CA;

  --kb-success: #1F7A4D;
  --kb-warning: #A86412;
  --kb-danger: #B83216;
  --kb-info: #2F6EA5;

  --kb-radius-control: 8px;
  --kb-radius-card: 12px;

  --kb-shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.08);
  --kb-shadow-md: 0 8px 24px rgba(31, 41, 51, 0.10);

  /* --- layout-only additions, not part of the locked token set --- */
  --petrol-300: #94a3ad; /* lighter tint for text on dark sidebar/panel surfaces */
  --vermillion-tint: #fdeae4; /* light accent background, e.g. eyebrow pill */
  --radius-pill: 999px;
  --font-sans: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container-width: 1160px;

  /* --- aliases so the rest of this file reads naturally --- */
  --text-primary: var(--kb-text);
  --text-secondary: var(--kb-text-secondary);
  --text-inverse: #ffffff;
  --surface-0: var(--kb-surface);
  --surface-1: var(--kb-surface-subtle);
  --surface-2: var(--kb-surface-muted);
  --border-subtle: var(--kb-border);
  --border-strong: var(--kb-border-strong);
  --radius-sm: var(--kb-radius-control);
  --radius-md: var(--kb-radius-card);
  --radius-lg: var(--kb-radius-card);
  --shadow-sm: var(--kb-shadow-sm);
  --shadow-md: var(--kb-shadow-md);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--surface-0);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; font-size: inherit; }

:focus-visible {
  outline: 2px solid var(--kb-vermillion);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

/* Primary action — brand board §11: Deep Petrol is the default primary
   button; Vermillion is reserved for a focused commercial/public CTA or a
   selected critical action, not every primary button. */
.btn-primary {
  background: var(--kb-petrol);
  color: var(--text-inverse);
}
.btn-primary:hover { background: #141b22; }

/* Accent CTA — the sanctioned Vermillion exception (public CTAs, login submit). */
.btn-accent {
  background: var(--kb-vermillion);
  color: var(--text-inverse);
}
.btn-accent:hover { background: var(--kb-vermillion-text); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { border-color: var(--kb-petrol); }

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
}
.btn-ghost:hover { color: var(--kb-vermillion); }

.btn-block { width: 100%; }

/* ---------- Public site header ---------- */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: var(--surface-0);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
}

.brand img {
  width: 152px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.site-nav__links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.site-nav__links a:hover { color: var(--text-primary); }

.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 88px 0 72px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--kb-vermillion-text);
  background: var(--vermillion-tint);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 44px;
  max-width: 720px;
  margin-bottom: 20px;
}

.hero__lead {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  margin-bottom: 56px;
}

/* ---------- Product preview (hero mock) ---------- */

.product-preview {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-0);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.product-preview__chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border-subtle);
}

.product-preview__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.product-preview__body {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 300px;
}

.product-preview__sidebar {
  background: var(--kb-petrol);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-preview__sidebar-label {
  color: var(--petrol-300);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 8px 0 4px;
}

.product-preview__nav-item {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
}

.product-preview__nav-item--active {
  background: rgba(227, 66, 31, 0.18);
  color: #fff;
  font-weight: 600;
}

.product-preview__main {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.product-preview__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.product-preview__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.product-preview__card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--surface-1);
}

.product-preview__card-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.product-preview__card-value {
  font-size: 11px;
  color: var(--petrol-300);
}

.product-preview__queue {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section--muted {
  background: var(--surface-1);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section__header {
  max-width: 600px;
  margin-bottom: 44px;
}

.section__header h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.section__header p {
  color: var(--text-secondary);
  font-size: 15px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  background: var(--surface-0);
}

.feature-card__mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--vermillion-tint);
  color: var(--kb-vermillion-text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---------- Operating principles ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.principle {
  background: var(--surface-0);
  padding: 28px 22px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ---------- Final CTA ---------- */

.cta-band {
  padding: 72px 0;
  text-align: center;
  background: var(--kb-petrol);
  color: var(--text-inverse);
}

.cta-band h2 {
  font-size: 30px;
  margin-bottom: 24px;
  color: #fff;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.site-footer__brand {
  font-weight: 700;
  color: var(--text-primary);
}

/* ---------- Auth / login ---------- */

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}

.auth-shell__panel {
  background: var(--kb-petrol);
  color: var(--text-inverse);
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.auth-shell__panel-top img {
  width: 160px;
  height: auto;
  background: var(--surface-0);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.auth-shell__message h2 {
  font-size: 30px;
  max-width: 420px;
  margin-bottom: 16px;
  color: #fff;
}

.auth-shell__message p {
  color: rgba(255,255,255,0.72);
  max-width: 400px;
  font-size: 15px;
}

.auth-shell__panel-foot {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.auth-shell__form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 24px;
}

.auth-card {
  width: 100%;
  max-width: 360px;
}

.auth-card h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.auth-card__helper {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-0);
  color: var(--text-primary);
}

/* Focus ring per brand board §12, exact values. */
.field input:focus {
  border-color: var(--kb-vermillion);
  outline: none;
  box-shadow: 0 0 0 3px rgba(227, 66, 31, 0.16);
}

.field--password {
  position: relative;
}

.field--password input {
  padding-right: 68px;
}

.field__toggle {
  position: absolute;
  right: 10px;
  top: 32px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
}

.field__toggle:hover { color: var(--kb-petrol); }

.form-errors, .field-errors {
  background: var(--vermillion-tint);
  color: var(--kb-vermillion-text);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 18px;
}

.field-errors { margin-top: -10px; margin-bottom: 16px; }

/* ---------- Application shell (authenticated) ---------- */

.app-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

.app-sidebar {
  background: var(--kb-petrol);
  color: var(--text-inverse);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
}

.app-sidebar__brand {
  padding: 4px 8px 28px;
}

.app-sidebar__brand img {
  width: 132px;
  height: auto;
  background: var(--surface-0);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-nav__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
}

.app-nav__item--active {
  background: rgba(227, 66, 31, 0.2);
  color: #fff;
  font-weight: 600;
}

.app-nav__item--disabled {
  color: rgba(255,255,255,0.32);
  cursor: default;
}

.app-nav__badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}

.app-main {
  display: flex;
  flex-direction: column;
  background: var(--surface-1);
}

.app-topbar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: var(--surface-0);
  border-bottom: 1px solid var(--border-subtle);
}

.app-topbar__title {
  font-size: 15px;
  font-weight: 700;
}

.app-topbar__user {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
}

.app-topbar__user strong {
  color: var(--text-primary);
  font-weight: 600;
}

.app-content {
  padding: 32px;
  flex: 1;
}

.app-hero h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.app-hero p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.status-card {
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
}

.status-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.status-card__empty {
  font-size: 13px;
  color: var(--petrol-300);
}

.app-section-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.module-card {
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.module-card h3 {
  font-size: 15px;
}

.module-card p {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}

.module-card__status {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--petrol-500);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
}

.queue-panel {
  background: var(--surface-0);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
}

.queue-panel__empty {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.queue-panel__hint {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell__panel { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .module-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .status-grid { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .site-nav__links { display: none; }
  .product-preview__body { grid-template-columns: 1fr; }
  .product-preview__sidebar { display: none; }
}
