/* Granite Safety — shared component styles */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 1440px;
  height: 900px;
  overflow: hidden;
  font-family: var(--body);
  font-size: var(--fs-body);
  color: var(--granite);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Layout */
.app {
  display: grid;
  grid-template-columns: 240px 1fr;
  width: 1440px;
  height: 900px;
}

/* Sidebar */
.sidebar {
  background: var(--granite);
  color: var(--ash);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--iron);
}
.sidebar-logo {
  padding: 24px 24px 32px;
  border-bottom: 1px solid var(--iron);
}
.logo-stencil {
  font-family: var(--display);
  font-weight: 900;
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
  letter-spacing: -1px;
}
.logo-stencil .safety {
  display: block;
  font-weight: 700;
  font-size: 11px;
  color: var(--hivis);
  letter-spacing: 0.42em;
  margin-top: 2px;
  font-family: var(--mono);
}
.sidebar-nav {
  flex: 1;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
}
.nav-eyebrow {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--concrete);
  padding: 0 24px;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 24px;
  color: var(--ash);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border-left: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { color: var(--paper); }
.nav-item.active {
  color: var(--paper);
  border-left-color: var(--hivis);
  background: var(--slate);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--iron);
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px; height: 36px;
  background: var(--bone);
  color: var(--granite);
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 10px; }
.avatar.dark { background: var(--iron); color: var(--paper); }
.user-name { color: var(--paper); font-size: 13px; font-weight: 500; line-height: 1.2; }
.user-role { color: var(--concrete); font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; margin-top: 2px; }

/* Top bar */
.topbar {
  height: 64px;
  background: var(--paper);
  border-bottom: 1px solid var(--bone);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  flex-shrink: 0;
}
.topbar-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: var(--granite);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bone);
  padding: 8px 14px;
  width: 280px;
  border: 1px solid var(--bone);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--concrete);
}
.search svg { width: 14px; height: 14px; }
.bell {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: transparent;
  position: relative;
}
.bell svg { width: 18px; height: 18px; }
.bell .dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--rust);
  border-radius: 50%;
  border: 2px solid var(--paper);
}
.breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--concrete);
  text-transform: uppercase;
}
.breadcrumb .sep { margin: 0 10px; opacity: 0.5; }
.breadcrumb .current { color: var(--granite); }

/* Main */
.main {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  height: 900px;
  overflow: hidden;
}
.content { padding: 32px; flex: 1; overflow: hidden; }

/* Tag / eyebrow */
.tag, .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--concrete);
  font-weight: 500;
}
.eyebrow-rule {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--concrete);
}
.eyebrow-rule::before {
  content: ''; width: 24px; height: 1px; background: var(--concrete);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid var(--granite);
  background: transparent;
  color: var(--granite);
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--hivis);
  border-color: var(--hivis);
  color: var(--granite);
}
.btn-primary:hover { background: var(--hivis-200); }
.btn-sm { padding: 7px 12px; font-size: 10px; }

/* Cards */
.card {
  background: var(--bone);
  border: 1px solid color-mix(in oklab, var(--bone), var(--concrete) 15%);
}
.card-on-dark {
  background: var(--slate);
  border: 1px solid var(--iron);
  color: var(--ash);
}

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1;
}
.pill-current { background: var(--field-green); color: var(--paper); }
.pill-expiring { background: var(--hivis); color: var(--granite); }
.pill-overdue { background: var(--rust); color: var(--paper); }
.pill-missing {
  background: transparent;
  color: var(--concrete);
  border: 1px dashed var(--concrete);
}
.pill-draft { background: var(--rust); color: var(--paper); }
.pill-new { background: var(--hivis); color: var(--granite); }

/* Hairline */
.hairline { height: 1px; background: var(--bone); width: 100%; }
.hairline-strong { height: 1px; background: var(--concrete); opacity: 0.3; width: 100%; }

/* KPI */
.kpi-num {
  font-family: var(--display);
  font-weight: 900;
  font-size: 56px;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--granite);
}
.kpi-num.rust { color: var(--rust); }
.kpi-num.green { color: var(--field-green); }

/* Section title */
.section-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.005em;
  color: var(--granite);
  line-height: 1.1;
}
.section-title-lg {
  font-family: var(--display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.01em;
}

/* Link */
.link-hivis {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--granite);
  text-decoration: none;
  border-bottom: 1.5px solid var(--hivis);
  padding-bottom: 1px;
}
.link-rust { color: var(--rust); }

/* Right rail */
.rail {
  width: 300px;
  border-left: 1px solid var(--bone);
  padding: 32px 24px;
  background: var(--paper);
  overflow: hidden;
  flex-shrink: 0;
}
.rail-block + .rail-block { margin-top: 32px; }
.rail-title {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.rail-title h4 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 18px;
}

/* Progress */
.progress {
  height: 4px;
  background: var(--bone);
  position: relative;
  width: 100%;
}
.progress > i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--hivis);
  display: block;
}

/* Icons */
.ic { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: square; stroke-linejoin: miter; }
.ic-sm { width: 14px; height: 14px; }
.ic-lg { width: 22px; height: 22px; }

/* Scaling stage so 1440x900 always fits */
.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #1a1a1c;
  overflow: hidden;
}
.stage > .frame {
  width: 1440px;
  height: 900px;
  transform-origin: center;
  background: var(--paper);
  box-shadow: 0 0 0 1px #000, 0 30px 80px rgba(0,0,0,0.6);
}
