/* Shared Planner chrome. Printed cards, reports and emergency pages keep their own layout. */
@media screen {
  :root {
    --site-bg: #f5f7f9;
    --site-panel: #ffffff;
    --site-text: #18212b;
    --site-muted: #657484;
    --site-line: #d8e0e8;
    --site-border: #b6c3cf;
    --site-blue: #2864a6;
    --site-ink: #101820;
    --site-table-head: #edf4f9;
  }
  body[data-site-app] {
    --bg: var(--site-bg);
    --surface: var(--site-panel);
    --surface-2: #edf4f9;
    --surface-soft: #f5f7f9;
    --panel: var(--site-panel);
    --text: var(--site-text);
    --ink: var(--site-text);
    --font-colour: var(--site-text);
    --muted: var(--site-muted);
    --line: var(--site-line);
    --border: var(--site-line);
    --line-strong: var(--site-border);
    --primary: var(--site-blue);
    --secondary: #1e4c7c;
    --blue: var(--site-blue);
    --teal: #247d86;
    --green: #1f7a5b;
    --red: #b63f3f;
    --gold: #b67809;
    --soft-blue: #e7f0fa;
    --soft-green: #e5f5ed;
    --soft-red: #f8e8e8;
    --soft-gold: #fff4d8;
    --radius: 6px;
    --shadow: none;
    --nav-start: white; --nav-end: white; --nav-border: #d8e0e8;
    --button-start: #2864a6; --button-end: #2864a6;
    --app-font-family: "Segoe UI", Arial, sans-serif;
    --app-font-size: 13px;
    --app-line-height: 1.4;
    --menu-font-size: 12px;
    --tab-font-size: 12px;
    --control-min-height: 34px;
    margin: 0;
    background: var(--site-bg);
    color: var(--site-text);
    font: 13px/1.4 "Segoe UI", Arial, sans-serif;
    letter-spacing: 0;
  }
  [data-site-app] *, [data-site-app] *::before, [data-site-app] *::after { box-sizing: border-box; letter-spacing: 0; }
  [data-site-app] [hidden] { display: none !important; }
  [data-site-app] button, [data-site-app] input, [data-site-app] select, [data-site-app] textarea { font: inherit; }
  [data-site-app] :is(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid #4896cb; outline-offset: 2px; }
  [data-site-app] a { color: var(--site-blue); }
  [data-site-app] :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=hidden]), select, textarea) {
    border: 1px solid var(--site-border);
    border-radius: 5px;
    background: white;
    color: var(--site-text);
    min-height: 30px;
    padding: 5px 8px;
    max-width: 100%;
  }
  [data-site-app] :is(input[type=checkbox], input[type=radio]) { accent-color: var(--site-blue); }
  [data-site-app] :is(.solid-button, .button-link, button[type=submit], input[type=submit], .action) {
    border: 1px solid var(--site-blue);
    border-radius: 6px;
    background: var(--site-blue);
    color: white;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
  }
  [data-site-app] :is(.ghost-button, .button-secondary, .chip-button, .site-tool) {
    border: 1px solid var(--site-border);
    border-radius: 6px;
    background: white;
    color: var(--site-text);
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
  }
  [data-site-app] :is(.ghost-button, .button-secondary, .chip-button, .site-tool):hover { border-color: var(--site-blue); }
  .site-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
  .site-tool { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
  .site-tool.icon-only { width: 34px; height: 34px; padding: 7px; flex: 0 0 34px; }
  [data-site-app] .site-appbar, [data-site-app=namecard] .topbar, [data-site-app=hireops] .topbar {
    background: var(--site-ink) !important;
    color: white;
    border: 0;
    border-bottom: 1px solid #334252;
    box-shadow: none;
    padding: 10px 16px;
    gap: 12px;
  }
  [data-site-app] .site-appbar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
  [data-site-app] :is(.site-appbar, .topbar) :is(.site-tool, .mobile-nav-toggle) {
    background: transparent;
    border: 1px solid #4a5a6b;
    color: #dce8f5;
    border-radius: 6px;
  }
  [data-site-app] :is(.site-appbar, .topbar) .site-tool:hover { background: #22303d; color: white; }
  .site-brand { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; }
  [data-site-app] .site-brand { color: white; }
  .site-brand img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 38px; }
  .site-brand strong { display: block; font-size: 18px; font-weight: 650; line-height: 1.2; }
  .site-brand small { display: block; font-size: 11px; color: #b8c8d9; margin-top: 3px; }
  .site-account { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; font-size: 12px; }
  .site-account-name { color: #b8c8d9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }

  /* The app chooser is a work surface, not a marketing page. */
  [data-site-app=portal] main { max-width: 1120px; margin: 30px auto; padding: 0 20px; }
  [data-site-app=portal] h1 { font-size: 22px; font-weight: 650; margin: 0 0 18px; }
  [data-site-app=portal] .modules { border-top: 1px solid var(--site-line); }
  [data-site-app=portal] .module { display: flex; align-items: center; gap: 14px; padding: 16px 10px; border-bottom: 1px solid var(--site-line); color: var(--site-text); text-decoration: none; }
  [data-site-app=portal] .module:hover { background: #e7f0fa; }
  [data-site-app=portal] .module strong { font-size: 16px; font-weight: 650; }
  [data-site-app=portal] .module .mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--site-border); border-radius: 6px; background: white; color: var(--site-blue); }
  [data-site-app=portal] .module .mark img { width: 30px; height: 30px; }
  [data-site-app=portal] .module .arrow { margin-left: auto; color: var(--site-muted); }
  [data-site-app=portal] .empty, [data-site-app=portal] footer { color: var(--site-muted); font-size: 12px; padding: 15px 0; }
  [data-site-app=portal] .secondary { display: inline-block; margin-left: 12px; }

  /* HireOps retains its module navigation and all existing business actions. */
  body[data-site-app=hireops] .topbar {
    position: sticky; top: 0; z-index: 30;
    display: grid; grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
    min-height: 64px; height: auto;
  }
  [data-site-app=hireops] .brand { min-width: 0; gap: 10px; }
  [data-site-app=hireops] .brand-mark, [data-site-app=hireops] .brand-mark img { width: 38px; height: 38px; max-width: 38px; flex: 0 0 38px; background: none; }
  [data-site-app=hireops] .brand h1 { color: white; font-size: 18px; font-weight: 650; line-height: 1.2; }
  [data-site-app=hireops] .brand p { color: #b8c8d9; font-size: 11px; }
  [data-site-app=hireops] .global-controls { display: grid; grid-template-columns: repeat(3, minmax(80px, 1fr)) minmax(140px, 1.4fr); gap: 8px; }
  [data-site-app=hireops] .global-controls :is(label, label:has(#searchInput)) { grid-column: auto; color: #b8c8d9; font-size: 10px; font-weight: 650; gap: 2px; }
  [data-site-app=hireops] .user-panel { min-width: 0; max-width: 300px; }
  [data-site-app=hireops] .user-chip { flex-wrap: wrap; gap: 6px; }
  [data-site-app=hireops] .user-identity { font-size: 11px; color: white; }
  [data-site-app=hireops] .user-identity .muted { color: #b8c8d9; font-size: 10px; }
  [data-site-app=hireops] .topbar :is(.ghost-button, .report-menu-trigger, .notification-bell) { background: transparent; color: #dce8f5; border: 1px solid #4a5a6b; box-shadow: none; border-radius: 6px; }
  [data-site-app=hireops] .topbar .notification-menu, [data-site-app=hireops] .topbar .report-menu-panel { color: var(--site-text); background: white; }
  [data-site-app=hireops] .layout { min-height: calc(100vh - var(--site-header-height, 80px)); }
  body[data-site-app=hireops]:not(.hireops-apk) .sidebar {
    background: white; border-color: var(--site-line); top: var(--site-header-height, 80px) !important;
    max-height: calc(100vh - var(--site-header-height, 80px)) !important;
  }
  [data-site-app=hireops] .nav-group-label { color: var(--site-muted); font-size: 10px; font-weight: 650; padding: 12px 8px 5px; text-transform: uppercase; }
  [data-site-app=hireops] .nav-button, [data-site-app=hireops] .nav-submenu-button {
    color: var(--site-text); background: transparent; border: 1px solid transparent;
    box-shadow: none; border-radius: 4px; font-weight: 500; min-height: 30px;
  }
  [data-site-app=hireops] .nav-button:hover, [data-site-app=hireops] .nav-submenu-button:hover { background: #edf4f9; }
  [data-site-app=hireops] .nav-button.is-active, [data-site-app=hireops] .nav-submenu-button.is-active { background: var(--site-blue); color: white; border-color: var(--site-blue); }
  body[data-site-app=hireops]:not(.hireops-apk) .main-menu-toggle {
    top: var(--site-header-height, 80px) !important; height: calc(100dvh - var(--site-header-height, 80px)) !important;
    background: #edf4f9; color: var(--site-blue); border-color: var(--site-line); box-shadow: none;
  }
  [data-site-app=hireops] .content { min-width: 0; padding: 12px 16px; }
  [data-site-app=hireops] :is(.panel, .kpi, .auth-card) { box-shadow: none; border-color: var(--site-line); border-radius: 6px; }
  [data-site-app=hireops] .panel { border: 0; border-top: 1px solid var(--site-line); border-radius: 0; background: white; padding: 12px; }
  [data-site-app=hireops] h1 { font-size: 22px; } [data-site-app=hireops] h2 { font-size: 17px; } [data-site-app=hireops] h3 { font-size: 15px; }
  [data-site-app=hireops] .view-head { background: white; color: var(--site-text); border-color: var(--site-line); box-shadow: none; }
  [data-site-app=hireops] .view-head :is(h1, h2, h3) { color: var(--site-text); }
  [data-site-app=hireops] .view-head :is(p, .muted) { color: var(--site-muted); }
  [data-site-app=hireops] .tab-row button { background: white; border: 1px solid var(--site-border); border-radius: 0; color: var(--site-blue); box-shadow: none; }
  [data-site-app=hireops] .tab-row button:is(.is-active, .active, [aria-selected=true]) { background: var(--site-blue); color: white; }
  [data-site-app=hireops] .hrh-flow-step, [data-site-app=hireops] .hrh-decision-step { overflow-wrap: normal; word-break: normal; }
  [data-site-app=hireops] :is(.tab-button, .view-tab, .subtab-button) { box-shadow: none; border-radius: 0; }
  [data-site-app=hireops] table th { background: var(--site-table-head); color: #173650; border-color: var(--site-line); font-weight: 650; }
  [data-site-app=hireops] table td { border-color: var(--site-line); }
  [data-site-app=hireops] .hrh-action-button { background: white; border: 1px solid var(--site-border); border-radius: 6px; box-shadow: none; color: var(--site-text); }

  /* Name Card uses the same horizontal toolbar and segmented tabs as Planner. */
  body[data-site-app=namecard].has-app-sidebar { padding-left: 0; }
  body[data-site-app=namecard] .topbar.app-sidebar {
    position: sticky; top: 0; bottom: auto; left: auto; width: 100%; overflow: visible;
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
    min-height: 60px; z-index: 40;
  }
  [data-site-app=namecard] .topbar .brand { color: white; font-size: 18px; font-weight: 650; padding: 0; gap: 10px; }
  [data-site-app=namecard] .brand-symbol { background: #2864a6; border-radius: 6px; width: 36px; height: 36px; font-size: 12px; }
  [data-site-app=namecard] .nav { display: flex; flex-direction: row; justify-content: center; align-items: stretch; gap: 0; min-width: 0; }
  [data-site-app=namecard] .nav a { display: inline-flex; align-items: center; gap: 6px; color: #dce8f5; border: 1px solid #4a5a6b; border-left-width: 0; border-radius: 0; padding: 7px 10px; font-size: 12px; font-weight: 500; white-space: nowrap; text-decoration: none; }
  [data-site-app=namecard] .nav a:first-child { border-left-width: 1px; border-radius: 6px 0 0 6px; }
  [data-site-app=namecard] .nav a:last-child { border-radius: 0 6px 6px 0; }
  [data-site-app=namecard] .nav a:is(:hover, [aria-current=page]) { background: var(--site-blue); color: white; }
  [data-site-app=namecard] .mobile-nav-toggle { display: none; width: 34px; height: 34px; padding: 7px; }
  [data-site-app=namecard] .page-shell { max-width: none; margin: 0; padding: 16px; min-width: 0; }
  [data-site-app=namecard] .toolbar { margin-bottom: 12px; gap: 12px; }
  [data-site-app=namecard] .toolbar-heading h1 { font-size: 20px; font-weight: 650; }
  [data-site-app=namecard] .toolbar-heading p { margin-top: 3px; font-size: 12px; }
  [data-site-app=namecard] :is(.toolbar-title, .toolbar-actions) { gap: 10px; min-width: 0; }
  [data-site-app=namecard] .toolbar-title .button-link { align-self: center; height: 34px; }
  [data-site-app=namecard] .toolbar-actions { flex: 0 1 520px; flex-direction: row; }
  [data-site-app=namecard] .toolbar-actions .search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; flex: none; }
  [data-site-app=namecard] .toolbar-actions .search input { height: 34px; min-width: 0; flex: none; }
  [data-site-app=namecard] .contacts-table { border-radius: 0; box-shadow: none; border: 1px solid var(--site-line); }
  [data-site-app=namecard] .site-table-scroll { max-width: 100%; overflow: auto; }
  [data-site-app=namecard] .site-table-scroll .contacts-table { min-width: 650px; }
  [data-site-app=namecard] .contacts-table :is(th, td) { border-color: var(--site-line); padding: 8px 10px; }
  [data-site-app=namecard] .contacts-table th { background: var(--site-table-head); color: #173650; font-size: 12px; font-weight: 650; text-transform: none; }
  [data-site-app=namecard] :is(.namecard-editor-panel, .namecards-watermark-panel, .namecards-upload-panel, .profile-list-workflow, .filter-panel) { background: white; border: 0; border-top: 1px solid var(--site-line); border-radius: 0; box-shadow: none; }
  [data-site-app=namecard] :is(.namecards-section-head, .section-head) { border-color: var(--site-line); }
  [data-site-app=namecard] h2 { font-size: 16px; font-weight: 650; }
  [data-site-app=namecard] h3 { font-size: 14px; font-weight: 650; }
  [data-site-app=namecard] :is(.namecards-worklist-tile, .profile-card, .list-tile) { border-radius: 6px; border-color: var(--site-line); box-shadow: none; }
  [data-site-app=namecard] .people-mobile-nav { display: none; }
  [data-site-app=namecard] .message { border-radius: 4px; }
  [data-site-app=namecard] .menu-panel { border-radius: 6px; }
  [data-site-app=namecard] .namecard-control-group { border: 0; border-bottom: 1px solid var(--site-line); border-radius: 0; box-shadow: none; }
  [data-site-app=namecard] .namecard-control-group summary { background: var(--site-table-head); border-radius: 0; }
  [data-site-app=namecard] .mini-reset { min-height: 28px; height: 28px; border-radius: 4px; padding: 4px 7px; font-size: 11px; font-weight: 500; }
  [data-site-app=namecard] :is(.namecards-create-list, .namecard-job-strip, .namecard-actions, .namecard-profile-list, .namecards-watermark-grid) { border-radius: 5px; border-color: var(--site-line); box-shadow: none; }

  [data-site-app=auth] header { min-height: 60px; height: auto; padding: 10px 16px; background: var(--site-ink); }
  [data-site-app=auth] header strong { font-size: 18px; font-weight: 650; }
  [data-site-app=auth] main { border-color: var(--site-line); border-radius: 6px; margin-top: 48px; }
  [data-site-app=auth] h1 { font-size: 22px; }
  [data-site-app=auth] input { height: 36px; }
  [data-site-app=auth] button { min-height: 36px; }

  .site-planner-admin {
    --primary: #2864a6; --secondary: #1e4c7c; --link-fg: #2864a6;
    --link-hover-color: #1e4c7c; --link-selected-fg: #1e4c7c;
    --body-bg: #f5f7f9; --body-fg: #18212b; --body-quiet-color: #657484;
    --header-bg: #101820; --header-color: white; --header-link-color: #dce8f5;
    --border-color: #d8e0e8; --hairline-color: #d8e0e8; --darkened-bg: #edf4f9;
    --selected-bg: #e7f0fa; --selected-row: #edf4f9;
    --button-bg: #2864a6; --button-hover-bg: #1e4c7c;
    --default-button-bg: #2864a6; --default-button-hover-bg: #1e4c7c;
    --object-tools-bg: #2864a6; --object-tools-hover-bg: #1e4c7c;
    --breadcrumbs-bg: #f5f7f9; --breadcrumbs-link-fg: #2864a6;
    font: 13px/1.4 "Segoe UI", Arial, sans-serif; background: #f5f7f9;
  }
  .site-planner-admin #header { padding: 10px 16px; background: #101820; }
  .site-planner-admin .admin-brand strong { color: white; font-size: 18px; }
  .site-planner-admin :is(.admin-brand small, .admin-account) { color: #b8c8d9; }
  .site-planner-admin #user-tools .admin-tool { border-color: #4a5a6b; border-radius: 6px; color: #dce8f5; }
  .site-planner-admin .admin-navigation { padding: 0 16px; }
  .site-planner-admin .admin-navigation nav a[aria-current=page] { color: #2864a6; border-bottom-color: #2864a6; }
  .site-planner-admin #content h1 { color: #18212b; font-size: 22px; }

  @media (max-width: 1180px) {
    body[data-site-app=hireops] .topbar { grid-template-columns: minmax(0, 1fr) auto; }
    [data-site-app=hireops] .global-controls { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(3, minmax(100px, 1fr)) minmax(140px, 1.4fr); }
    [data-site-app=hireops] .user-panel { grid-column: 2; grid-row: 1; }
    [data-site-app=namecard] .nav a { padding: 7px; }
    [data-site-app=namecard] .site-account-name { display: none; }
  }
  @media (max-width: 760px) {
    [data-site-app] .site-appbar { padding: 10px 12px; flex-wrap: wrap; }
    .site-account-name { max-width: 140px; }
    .site-account .site-admin-label { display: none; }
    [data-site-app=portal] main { margin: 22px auto; padding: 0 14px; }
    [data-site-app=portal] .module { padding: 15px 4px; }
    [data-site-app=portal] .module strong { font-size: 15px; }
    body[data-site-app=namecard] .topbar.app-sidebar { grid-template-columns: minmax(0, 1fr) auto auto; padding: 10px 12px; }
    [data-site-app=namecard] .mobile-nav-toggle { display: inline-grid; place-items: center; }
    [data-site-app=namecard] .nav { display: none; grid-column: 1 / -1; grid-row: 2; flex-wrap: wrap; justify-content: flex-start; }
    [data-site-app=namecard] .nav.is-open { display: flex; }
    [data-site-app=namecard] .nav a { flex: 1 1 auto; border-left-width: 1px; margin: 2px; border-radius: 4px; justify-content: center; }
    [data-site-app=namecard] .site-account-name { display: none; }
    [data-site-app=namecard] .page-shell { padding: 12px; }
    [data-site-app=namecard] .toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
    [data-site-app=namecard] .toolbar-title { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; width: 100%; }
    [data-site-app=namecard] .toolbar-actions { width: 100%; display: flex; flex: none; }
    [data-site-app=namecard] .toolbar-actions .search { width: 100%; }
    [data-site-app=namecard] .namecards-section-head { flex-direction: row; align-items: center; }
    body[data-site-app=hireops] .topbar { padding: 10px 12px; gap: 8px; }
    [data-site-app=hireops] .brand { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 7px; }
    [data-site-app=hireops] .brand-mark, [data-site-app=hireops] .brand-mark img { width: 30px; height: 30px; }
    [data-site-app=hireops] .brand .site-app-link { width: 30px; height: 30px; min-height: 30px; padding: 6px; }
    [data-site-app=hireops] .brand h1 { font-size: 14px; white-space: nowrap; }
    [data-site-app=hireops] .brand p { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; font-size: 10px; }
    [data-site-app=hireops] .user-panel { max-width: none; }
    [data-site-app=hireops] .user-chip, [data-site-app=hireops] .web-header-tools, [data-site-app=hireops] .web-user-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; min-width: 0; }
    [data-site-app=hireops] .web-header-tools, [data-site-app=hireops] .web-user-actions { flex: 0 0 auto; }
    [data-site-app=hireops] .web-header-tools :is(.global-print-menu, .global-print-trigger) { width: 34px; min-width: 34px; flex: 0 0 34px; }
    [data-site-app=hireops] .web-header-tools :is(.notification-menu-wrap, .notification-bell) { width: 48px; min-width: 48px; flex: 0 0 48px; }
    [data-site-app=hireops] .web-user-actions button[data-logout] { width: 64px; min-width: 64px; flex: 0 0 64px; padding: 5px; font-size: 12px; }
    [data-site-app=hireops] .topbar :is(.report-menu-panel, .notification-menu) { position: fixed; left: 12px; right: 12px; top: calc(var(--site-header-height, 160px) + 6px); width: auto; min-width: 0; max-width: none; max-height: calc(100dvh - var(--site-header-height, 160px) - 24px); overflow: auto; }
    [data-site-app=hireops] .web-user-actions #onlineUsers { display: none; }
    [data-site-app=hireops] .topbar :is(.ghost-button, .report-menu-trigger, .notification-bell) { height: 32px; min-height: 32px; }
    [data-site-app=hireops] .view-head { padding-left: 44px; }
    body[data-site-app=hireops]:not(.hireops-apk) .main-menu-toggle { top: calc(var(--site-header-height, 80px) + 9px) !important; height: 34px !important; min-height: 34px; width: 34px; border: 1px solid var(--site-border); border-radius: 5px; }
    [data-site-app=hireops] .user-identity { display: none; }
    [data-site-app=hireops] .global-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    [data-site-app=hireops] .global-controls :is(input, select) { font-size: 12px; }
    [data-site-app=hireops] .global-controls label > span { position: static; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; }
    [data-site-app=hireops] .content { padding: 10px; }
    [data-site-app=auth] main { margin: 24px 12px; }
  }
}
@media print {
  .site-appbar, .site-app-link { display: none !important; }
}
