/* Site management pages share the Enterprise Control sites canvas and heading system.
   Screen-only rules keep exported documents and print layouts unchanged. */
@media screen {
  #screenAdmin .tt-food-profile-adoption {
    display:block;
    padding:0 16px;
    border-color:#dce4ef;
    border-radius:16px;
    background:#f8fafc;
  }
  #screenAdmin .tt-food-profile-adoption > summary { padding:14px 0; }
  #screenAdmin .tt-food-profile-adoption > summary > span { color:#526278; font-weight:500; margin-right:10px; }
  #screenAdmin .tt-food-profile-adoption > summary > strong { color:#0f172a; font-size:14px; }
  #screenAdmin .tt-food-profile-choice { padding:0 0 16px; }
  #screenAdmin .fsms-site-links:empty { display:none; }
  #screenAdmin .fsms-site-filters { grid-template-columns:2fr 1fr 1fr; gap:14px; margin:18px 0; }
  #screenAdmin .fsms-site-toolbar { justify-content:space-between; gap:12px 20px; margin:16px 0; }
  #screenAdmin .fsms-site-toolbar > div { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; }
  #screenAdmin .fsms-site-toolbar span { color:#526278; font-size:12px; }
  #screenAdmin .tt-required-docs-list > .tt-required-doc-empty {
    padding:16px;
    min-height:0;
    text-align:left;
    border:1px solid #e2e8f0;
    border-radius:14px;
    background:#f8fafc;
    font-size:14px;
    line-height:1.5;
  }
  #screenHaccp .haccp-top {
    align-items:center;
    margin-bottom:14px;
    padding:12px 16px;
    border-radius:16px;
    background:#f8fafc;
    box-shadow:none;
  }
  @media(max-width:720px) {
    #screenAdmin .fsms-site-filters { grid-template-columns:1fr; }
    #screenAdmin .tt-food-profile-adoption > summary > strong { display:block; margin-top:4px; }
    #screenAdmin .fsms-site-toolbar { align-items:stretch; }
  }
  #screenAdmin .tt-site-field--switch {
    flex-direction:row;
    text-align:left;
  }
  #screenAdmin .tt-site-field--switch > span:first-child { flex:1; min-width:0; }
  #screenAdmin .tt-site-field--switch > .tt-switch { flex:0 0 auto; margin-left:auto; }
  #screenAdmin .tt-readiness-row-main { width:100%; }
  #screenAdmin .tt-readiness-row-top {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:8px;
  }
  #screenAdmin .tt-readiness-row-top > strong { min-width:0; overflow-wrap:anywhere; }
  #screenAdmin .tt-readiness-status { justify-self:end; }
  #screenAdmin .tt-overflow-menu[open] { z-index:10; }
  #screenAdmin .tt-overflow-options {
    position:absolute;
    z-index:5;
    right:0;
    top:48px;
    min-width:144px;
    padding:4px;
    border:1px solid rgba(15,23,42,.1);
    border-radius:12px;
    background:#fff;
    box-shadow:0 14px 32px rgba(15,23,42,.14);
  }
  #screenAdmin .tt-overflow-options .tt-overflow-action {
    position:static;
    display:block;
    width:100%;
    min-height:44px;
    border:0;
    border-radius:8px;
    box-shadow:none;
  }
  #screenAdmin .tt-overflow-options .tt-overflow-action:hover { background:#f1f5f9; }
  #screenAdmin .tt-overflow-options .tt-overflow-action:disabled { opacity:.5; cursor:not-allowed; }
  html:has(:is(#screenAdmin, #screenHaccp, #screenHaccpPlan, #screenWeeklyVerification,
    #screenSelfAudits, #screenSelfAuditRun, #screenAllergens, #screenEHOReport,
    #screenLogs):not(.hidden)) .main {
    max-width:1120px !important;
  }
  #screenLogs.ops-screen,
  #screenSelfAudits.ops-screen { max-width:none; width:100%; margin-inline:0; }
  #screenLogs > .screen-title-row { margin-inline:0; }
  #ttGateCard:is(.tt-card--scc-editor, .tt-card--scc-checklist-editor, .tt-card--checklist-recommendations),
  #ttGateCard.tt-card--setup:has(#guidedSetupRoot) {
    width:min(1120px,100%);
    max-width:1120px;
    padding:24px;
    max-height:calc(100dvh - 32px);
    overflow-y:auto;
    box-sizing:border-box;
  }
  #screenAdmin #ttAdminPanel,
  #screenAdmin .tt-site-shell,
  #screenAdmin .tt-site-detail-panel,
  #screenAdmin .fsms-shell,
  #screenAdmin .tt-setup-guide {
    width:100%;
    min-width:0;
    max-width:none !important;
    margin-inline:0;
    box-sizing:border-box;
    align-self:stretch;
  }
  #screenAdmin .tt-site-detail-panel,
  #screenAdmin .fsms-shell,
  #screenAdmin .tt-setup-guide {
    padding:24px;
  }
  #screenAdmin .tt-site-detail-head,
  #screenAdmin .tt-site-detail-copy {
    min-width:0;
    margin-inline:0;
    text-align:left;
    gap:0;
  }
  #screenAdmin .tt-site-titlebar > .tt-site-detail-head {
    flex:1 1 auto;
  }
  #ttGateCard:is(.tt-card--scc-editor, .tt-card--scc-checklist-editor, .tt-card--checklist-recommendations) .tt-modal-title,
  #screenAdmin .tt-site-detail-title,
  #screenAdmin .tt-food-profile-titlebar h2,
  #screenAdmin .tt-site-policies-title h2,
  #screenAdmin .tt-required-docs-title,
  #screenAdmin .fsms-shell > h2,
  #screenAdmin .enterprise-setup-guide-heading h2,
  :is(#screenHaccp, #screenHaccpPlan, #screenWeeklyVerification,
    #screenSelfAudits, #screenSelfAuditRun, #screenAllergens, #screenEHOReport,
    #screenLogs) > .screen-head .asset-title,
  #guidedSetupRoot .guided-setup h2 {
    margin:0 0 3px;
    font-family:var(--font-sans,"Gellix",sans-serif);
    font-size:28px;
    font-weight:900;
    letter-spacing:-.035em;
    line-height:1.02;
    color:#0f172a;
  }
  #screenAdmin .tt-site-detail-text,
  #screenAdmin .tt-food-profile-titlebar p,
  #screenAdmin .tt-site-policies-title p,
  #screenAdmin .tt-required-docs-sub,
  #screenAdmin .fsms-shell > h2 + p,
  #screenAdmin .enterprise-setup-guide-heading > p,
  #guidedSetupRoot .guided-setup h2 + p {
    margin:6px 0 18px;
    max-width:none;
    font-family:var(--font-sans,"Gellix",sans-serif);
    font-size:13px;
    font-weight:500;
    line-height:1.5;
    color:var(--muted,#526278);
  }
  #screenAdmin .tt-food-profile-kicker,
  #screenAdmin .tt-site-policies-title > div > span,
  #screenAdmin .tt-required-docs-kicker,
  #screenAdmin .fsms-kicker,
  #screenAdmin .enterprise-setup-guide-kicker {
    display:block;
    margin:0 0 8px;
    font-family:var(--font-sans,"Gellix",sans-serif);
    font-size:12px;
    font-weight:900;
    letter-spacing:normal;
    line-height:1.2;
    text-transform:none;
    color:var(--brand,#1e3a8a);
  }
  #screenAdmin .tt-site-titlebar,
  #screenAdmin .tt-site-detail-head { margin-bottom:18px; }
  #screenAdmin .tt-site-titlebar .tt-site-detail-head { margin-bottom:0; }
  #screenAdmin .tt-food-profile-titlebar,
  #screenAdmin .tt-site-policies-title,
  #screenAdmin .tt-required-docs-titlebar { gap:16px; }
  #screenAdmin .tt-food-profile-panel { padding-bottom:24px; }
  #screenAdmin .tt-site-detail-panel .btn-inline {
    width:auto;
    min-height:44px;
    white-space:normal;
  }
  #screenHaccp .haccp-wrap,
  #screenHaccpPlan .plan-body,
  #screenWeeklyVerification .wv-body,
  #screenSelfAudits .self-audits-list,
  #screenSelfAuditRun .self-audit-run-wrap,
  #screenEHOReport .eho-wrap {
    width:100%;
    min-width:0;
    max-width:none;
    margin-inline:0;
    padding-inline:0;
    box-sizing:border-box;
  }
  #screenHaccp .lh-status { padding:24px; }
  #screenHaccpPlan .lh-document { padding:24px; }
  #screenHaccpPlan .screen-head-center,
  #screenSelfAuditRun .screen-head-center {
    position:static;
    transform:none;
    text-align:left;
    align-items:flex-start;
    min-width:0;
  }
  #screenHaccp .lh-status > h2 {
    font-family:var(--font-sans,"Gellix",sans-serif);
    font-weight:900;
    letter-spacing:-.025em;
  }
  #screenAdmin .site-control-section--fsms .tt-site-card-title { margin-top:0; }
  #screenAdmin .site-control-home .tt-site-card-body { min-height:3.1em; }
  #screenAdmin .site-control-home .tt-site-card-meta { overflow-wrap:anywhere; }
  .site-guide-operation { padding:18px; border:1px solid #dbe3ed; border-radius:16px; }
  .site-guide-operation h3 { margin:0 0 8px; font-size:18px; font-weight:900; }
  .site-guide-operation p { margin:6px 0 14px; font-size:14px; line-height:1.5; color:#526278; }
  .site-guide-operation .guided-actions { justify-content:flex-start; }
  .site-guide-responsibility { margin:0; font-size:14px; line-height:1.5; color:#526278; }
  #guidedSetupRoot .guided-setup { width:100%; max-width:1120px; box-sizing:border-box; }
  @media(max-width:720px) {
    #ttGateCard:is(.tt-card--scc-editor, .tt-card--scc-checklist-editor, .tt-card--checklist-recommendations) .tt-modal-title,
    #screenAdmin .tt-site-detail-title,
    #screenAdmin .tt-food-profile-titlebar h2,
    #screenAdmin .tt-site-policies-title h2,
    #screenAdmin .tt-required-docs-title,
    #screenAdmin .fsms-shell > h2,
    #screenAdmin .enterprise-setup-guide-heading h2,
    :is(#screenHaccp, #screenHaccpPlan, #screenWeeklyVerification,
      #screenSelfAudits, #screenSelfAuditRun, #screenAllergens, #screenEHOReport,
      #screenLogs) > .screen-head .asset-title,
    #guidedSetupRoot .guided-setup h2 { font-size:24px; }
    #ttGateCard:is(.tt-card--scc-editor, .tt-card--scc-checklist-editor, .tt-card--checklist-recommendations),
    #ttGateCard.tt-card--setup:has(#guidedSetupRoot),
    #screenAdmin .tt-site-detail-panel,
    #screenAdmin .fsms-shell,
    #screenAdmin .tt-setup-guide,
    #screenHaccp .lh-status,
    #screenHaccpPlan .lh-document { padding:18px; }
    #screenAdmin .tt-site-titlebar,
    #screenAdmin .tt-site-toolbar { align-items:stretch; flex-direction:column; }
    #screenAdmin .tt-site-status-pill { align-self:flex-start; white-space:normal; }
    #screenAdmin .site-control-home .tt-site-card-body { min-height:0; }
    .site-guide-operation .guided-actions > button { flex:1 1 100%; }
  }
}
/* Intelligence keeps delivery and content controls inside their service. */
.tt-intelligence-services { display:grid; gap:18px; }
.tt-intelligence-channels { display:grid; gap:10px; margin:16px 0 0; padding:0 0 0 16px; border-left:3px solid #dbeafe; }
.tt-intelligence-options { padding:8px 0; }
.tt-intelligence-options > summary { cursor:pointer; color:#334155; font-size:13px; font-weight:600; padding:8px 2px; }
.tt-intelligence-options > .tt-site-field { margin-top:8px; }
.tt-intelligence-channels[hidden], .tt-intelligence-options[hidden] { display:none; }
@media (max-width:600px) { .tt-intelligence-channels { padding-left:8px; } }
