/* App shell */

.os-shell {
  display: flex;
  min-height: 100vh;
}

.os-sidebar {
  flex: 0 0 var(--os-sidebar-width);
  width: var(--os-sidebar-width);
  max-width: 100%;
  background: var(--os-surface);
  color: var(--os-text);
  display: flex;
  flex-direction: column;
  padding: 0;
  gap: 0;
  border-right: 1px solid var(--os-border);
  position: sticky;
  top: 0;
  height: 100vh;
}

.os-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--os-text);
  text-decoration: none;
  padding: 16px 14px 14px;
  border-radius: 0;
}

.os-brand:hover {
  color: var(--os-text);
  background: transparent;
}

.os-brand-logo {
  display: block;
  height: 28px;
  width: auto;
  max-width: 140px;
}

.os-nav-divider {
    height: 1px;
    margin: 0.35rem 0.5rem;
    background: var(--os-border, #e2e8f0);
}

.os-nav-icon {
  display: none;
}

.os-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.os-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--os-nav-text);
  text-decoration: none;
  margin: 0 4px 2px;
  padding: 8px 10px;
  height: auto;
  min-height: 0;
  border-radius: 7px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
}

.os-nav-link:hover {
  color: var(--os-nav-hover-text);
  background: var(--os-nav-hover-bg);
  text-decoration: none;
}

.os-nav-link:hover .os-nav-icon {
  color: var(--os-nav-hover-text);
}

.os-nav-link-muted {
  color: var(--os-nav-muted);
  height: auto;
}

.os-nav-link-active,
.os-nav-link[aria-current="page"] {
  color: var(--os-nav-active-text);
  background: var(--os-nav-active-bg);
  border-color: transparent;
  font-weight: 600;
}

.os-nav-link-active::before,
.os-nav-link[aria-current="page"]::before {
  content: none;
}

.os-nav-link-active .os-nav-icon,
.os-nav-link[aria-current="page"] .os-nav-icon {
  color: var(--os-nav-active-icon, var(--ink));
}

.os-nav-icon {
  display: none;
}

.os-nav-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.os-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.os-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--os-bg);
}

.os-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: var(--os-topbar-height);
  min-height: var(--os-topbar-height);
  padding: 0 var(--os-page-gutter);
  background: var(--os-surface);
  backdrop-filter: none;
  border-bottom: 1px solid var(--os-border);
  box-shadow: none;
}

.os-topbar__lead {
  min-width: 0;
  flex: 1 1 12rem;
}

.os-topbar__kicker {
  margin: 0 0 var(--os-space-1);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--os-text-soft);
}

.os-topbar__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  line-height: var(--os-line-tight);
}

.os-topbar .crumb {
  display: none;
}

/*
 * Remove visual duplicate titles when an in-page shell already states the route
 * (job details supplies its own headings). Does not suppress text for SR when used
 * on a semantic heading; paired with duplicate/presentation elements only.
 */
.os-layout-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap !important;
  border: 0 !important;
}

.os-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
}

.os-content {
  flex: 1;
  padding: 28px var(--os-page-gutter) 56px;
  min-width: 0;
  width: 100%;
  max-width: none;
}

/*
 * Authenticated pages fill the main column. Gutters come from --os-page-gutter.
 * Readable max-widths belong on forms/prose, not the application shell.
 */

.os-content.os-content--workspace,
.os-content.os-content--workflow-full {
  max-width: none;
  width: 100%;
  margin: 0;
}

.os-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.os-page--wide {
  width: 100%;
  max-width: var(--os-content-wide-max-width);
  margin: 0;
}

.os-page--full-width {
  max-width: none;
  width: 100%;
  margin: 0;
}

.os-page-heading {
  display: grid;
  gap: var(--os-space-2);
  min-width: 0;
}

.os-page-title {
  margin: 0;
  font-size: 23px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.os-page-subtitle {
  margin: 5px 0 0;
  color: var(--ink-3);
  font-size: 13.5px;
  font-weight: 400;
}

.os-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.os-page-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--os-space-2);
}

.os-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--os-space-4);
}

.os-workspace-main {
  min-width: 0;
}

.os-workspace-side {
  min-width: 0;
}

.os-grid {
  display: grid;
  gap: var(--os-space-4);
}

.os-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.os-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.os-footer {
  margin-top: auto;
  padding: 14px var(--os-page-gutter);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-4);
  border-top: 1px solid var(--os-border);
  background: transparent;
}

.os-footer a {
  color: var(--os-text-muted);
}

.os-footer-inner {
  max-width: none;
  margin: 0;
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Mobile sidebar */
.os-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: var(--os-space-2);
  padding: 0;
  border: 1px solid var(--os-border);
  border-radius: var(--os-radius-sm);
  background: var(--os-surface-soft);
  color: var(--os-text);
  cursor: pointer;
  flex-shrink: 0;
}

.os-sidebar-toggle:hover {
  background: var(--os-border);
}

.os-topbar__lead-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

/* Public status layout (no platform chrome) */
body.os-public main {
  min-height: calc(100vh - 4.5rem);
}

.os-public-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.os-public-wrap--job {
  max-width: 620px;
}

.cs-brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.cs-brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.cs-brand-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.cs-page {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 32px 28px;
}

.cs-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ink-4);
  font-weight: 500;
}

.cs-title {
  margin: 10px 0 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.cs-lede,
.cs-status {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
}

.cs-alert {
  margin: 22px 0 0;
}

.cs-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px 24px;
  margin: 22px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.cs-fact__label,
.cs-block__title {
  margin: 0 0 3px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-4);
}

.cs-fact__value {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.cs-fact__muted {
  color: var(--ink-3);
}

.cs-block {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--hairline);
}

.cs-price {
  margin: 0;
  font-size: 14px;
  font-family: var(--font-mono);
}

.cs-empty {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}

.cs-visit-list,
.cs-included-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cs-visit-list__item + .cs-visit-list__item,
.cs-included-list__row + .cs-included-list__row {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--os-border);
}

.cs-visit-list__when {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.cs-visit-list__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cs-included-list__row {
  display: flex;
  gap: 9px;
  font-size: 14px;
  color: var(--ink-2);
}

.os-public-footer {
  text-align: left;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--ink-4);
  padding: 24px 0 0;
}

@media (max-width: 900px) {
  .os-sidebar-toggle {
    display: inline-flex;
  }

  .os-shell {
    flex-direction: column;
  }

  .os-sidebar {
    position: fixed;
    z-index: 200;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--os-shadow-md);
  }

  body.os-sidebar-open .os-sidebar {
    transform: translateX(0);
  }

  .os-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(15, 23, 42, 0.35);
  }

  body.os-sidebar-open .os-sidebar-backdrop {
    display: block;
  }

  .os-main {
    width: 100%;
  }

  .os-content,
  .os-content.page,
  .page.os-content {
    padding: 20px 16px 40px;
  }

  .os-topbar {
    padding: 0 16px;
    height: auto;
    min-height: var(--os-topbar-height);
  }

  .cs-page {
    padding: 24px 20px 22px;
  }

  .cs-title {
    font-size: 22px;
  }

  .os-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .os-grid-2,
  .os-grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1100px) {
  .os-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(240px, var(--os-context-width));
    align-items: start;
    gap: 24px;
  }
}

@media (min-width: 1440px) {
  .os-workspace {
    grid-template-columns: minmax(0, 1fr) var(--os-context-width);
  }
}
