/* Revision8: original light portal with restrained Apple/Emil refinements.
   Local visual layer only; module logic and role permissions remain unchanged. */
.shell.portal-apple-shell {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  background: #f6f8fb;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}
.shell.portal-apple-shell .sidebar {
  background: rgba(232,239,245,.96);
  border-right-color: #dce5ee;
  gap: 20px;
  padding-top: 26px;
}
.portal-apple-shell .brand strong { color: #16314e; font-weight: 650; letter-spacing: -.025em; }
.portal-apple-shell .brand span { color: #536782; }
.portal-apple-shell .portal-navigation h2 { color: #5e738d; font-size: 10px; letter-spacing: .1em; }
.portal-apple-shell .portal-navigation .stream-tab.active { background: #d7e4ef; color: #102b4d; }
.shell.portal-apple-shell .topbar { padding: 24px 40px; gap: 24px; }
.portal-apple-shell .page-title h1 { color: #243d5b; font-size: 14px; font-weight: 650; }
.portal-apple-shell .search { border-color: #dce5ee; border-radius: 10px; box-shadow: 0 3px 12px rgba(23,49,83,.04); }
.shell.portal-apple-shell .content { padding: 0 40px 36px; }
.portal-apple-shell .briefing > .section-head { padding: 12px 0 28px; }
.portal-apple-shell .section-head:has(+ .dashboard-panel) { padding: 0; }
.portal-apple-shell .section-head h2 { color: #183550; font-size: 28px; font-weight: 650; letter-spacing: -.03em; }
.portal-apple-shell .dashboard-hero { padding: 18px 0 36px; gap: 28px; }
.portal-apple-shell .dashboard-hero h3 { color: #102442; font-size: clamp(30px, 3vw, 44px); font-weight: 650; line-height: 1.1; letter-spacing: -.04em; }
.portal-apple-shell .dashboard-hero .portal-dashboard-date { color: #536782; font-size: 18px; margin: 12px 0 18px; }
.portal-apple-shell .dashboard-hero p { line-height: 1.6; }
.portal-apple-shell .dashboard-hero .small-action { padding: 11px 16px; border-radius: 8px; }
.portal-apple-shell .hesk-dashboard-section { margin-bottom: 28px; border-color: #dde6ee; border-radius: 14px; background: #fff; box-shadow: 0 5px 24px rgba(23,49,83,.035); }
.portal-apple-shell .request-command-head { padding: 28px; gap: 20px; }
.portal-apple-shell .request-command-title h4 { color: #193752; font-size: 27px; font-weight: 650; line-height: 1.15; letter-spacing: -.03em; }
.portal-apple-shell .request-command-title .dashboard-section-note { line-height: 1.6; margin-top: 8px; }
.portal-apple-shell .request-command-actions { justify-content: flex-start; }
.portal-apple-shell .request-command-actions .small-action { padding: 11px 15px; font-size: 12px; border-radius: 8px; text-decoration: none; box-shadow: none; }
.portal-apple-shell .request-command-actions .secondary-action { background: #edf3f8; color: #254764; border: 1px solid #d8e3ed; }
.portal-apple-shell .request-status-strip { background: #fbfcfe; border-color: #e3eaf1; }
.portal-apple-shell .request-status-strip > div { padding: 18px; }
.portal-apple-shell .request-status-primary strong { font-size: 30px; line-height: 1.2; letter-spacing: -.035em; font-weight: 650; }
.portal-apple-shell .request-status-strip span { font-size: 10px; letter-spacing: .06em; }
.portal-apple-shell .request-command-lane { padding: 26px; }
.portal-apple-shell .request-command-lane-head { margin-bottom: 18px; gap: 14px; }
.portal-apple-shell .request-command-lane-head h5 { font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.portal-apple-shell .request-command-lane-head p { line-height: 1.5; }
.portal-apple-shell .request-command-lane-head > span { font-weight: 600; }
.portal-apple-shell .request-command-list { gap: 12px; max-height: 320px; }
.portal-apple-shell .request-command-row,
.portal-apple-shell .request-command-empty { background: #f8fafc; border-color: #e1e8ef; padding: 18px; border-radius: 10px; }
.portal-apple-shell .request-command-row { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.portal-apple-shell .request-command-row .request-command-id { grid-column: 1; grid-row: 1; justify-self: start; max-width: 100%; background: #e5edf5; color: #294c69; font-weight: 650; }
.portal-apple-shell .request-command-row .request-command-time { grid-column: 2; grid-row: 1; font-size: 11px; font-weight: 500; }
.portal-apple-shell .request-command-row .request-command-main { grid-column: 1 / -1; grid-row: 2; gap: 7px; }
.portal-apple-shell .request-command-main strong { font-size: 14px; font-weight: 650; }
.portal-apple-shell .request-shortcut-meta span { background: #fff; border-color: #e1e8ef; font-weight: 500; }
.portal-apple-shell .request-command-foot { margin-top: 18px; flex-wrap: wrap; }
.portal-apple-shell .dashboard-news-section { margin-bottom: 28px; }
.portal-apple-shell .brief-news-panel { border-color: #dde6ee; border-radius: 14px; box-shadow: 0 5px 24px rgba(23,49,83,.035); }
.portal-apple-shell .brief-news-head { padding: 24px 28px; }
.portal-apple-shell .brief-news-head h4 { color: #193752; font-size: 27px; font-weight: 650; letter-spacing: -.03em; }
#oc-intel-portal-root .portal-apple-shell .brief-news-feature { padding: 22px 28px !important; background: #f4f8fb; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.portal-apple-shell .brief-news-feature > span { justify-self: start; }
.portal-apple-shell .brief-news-feature strong { grid-column: 1 / -1; grid-row: 2; font-size: 18px; font-weight: 650; letter-spacing: -.02em; }
.portal-apple-shell .brief-news-feature em { grid-column: 1; grid-row: 3; white-space: normal; }
.portal-apple-shell .brief-news-feature > a { grid-column: 2; grid-row: 3; }
.portal-apple-shell .brief-news-list { max-height: 320px; }
#oc-intel-portal-root .portal-apple-shell .brief-news-row { padding: 16px !important; background: #fff; gap: 10px; }
.portal-apple-shell .brief-news-title { font-size: 13px; font-weight: 650; }
.portal-apple-shell .brief-news-column-head { padding: 16px; }
.portal-apple-shell .portal-shortcuts { margin: 0 40px 24px; padding: 16px; border-color: #dce5ee; border-radius: 12px; }
.portal-apple-shell .portal-shortcuts > summary { font-size: 13px; }
.portal-apple-shell .portal-shortcuts .nav-item strong { font-weight: 600; }
.portal-apple-shell .portal-shortcuts .nav-item :is(small, em) { font-weight: 400; }
.portal-apple-shell button:active { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .portal-apple-shell .request-command-row:hover { background: #f0f5f9; border-color: #c3d4e2; }
  .portal-apple-shell .brief-news-row:hover { background: #f5f8fb; }
}
@media (min-width: 1440px) {
  .portal-apple-shell .portal-shortcuts { margin: 16px 20px 28px 0; padding: 16px; }
}
@media (max-width: 900px) {
  .shell.portal-apple-shell .sidebar { transition: transform 240ms var(--ease-drawer), visibility 240ms; }
  .shell.portal-apple-shell .topbar { padding: 20px 24px; }
  .shell.portal-apple-shell .content { padding: 0 24px 30px; }
  .portal-apple-shell .portal-shortcuts { margin: 0 24px 20px; padding: 14px; }
  .portal-apple-shell .dashboard-hero { padding: 14px 0 28px; gap: 24px; }
  .portal-apple-shell .dashboard-hero h3 { font-size: clamp(30px, 6.5vw, 38px); }
  .portal-apple-shell .request-command-head,
  .portal-apple-shell .request-command-lane { padding: 22px; }
  .portal-apple-shell .request-command-title h4,
  .portal-apple-shell .brief-news-head h4 { font-size: 23px; }
  .portal-apple-shell .request-command-row { padding: 16px; }
  .portal-apple-shell .brief-news-head,
  #oc-intel-portal-root .portal-apple-shell .brief-news-feature { padding: 22px !important; }
}
@media (max-width: 600px) {
  .portal-apple-shell .request-status-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-apple-shell .request-status-strip > div { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .portal-apple-shell .request-type-empty { font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .shell.portal-apple-shell .sidebar { transition: none; }
}

/* Secondary DA Portal mark belongs to the header, away from the official seal. */
.portal-apple-shell .topbar .page-title { order: 0; }
.portal-apple-shell .topbar .search { order: 1; }
.portal-apple-shell .da-portal-header-mark { order: 2; display: block; width: 174px; height: auto; flex: 0 0 174px; object-fit: contain; }
.portal-apple-shell .topbar .preview-status-label { order: 3; flex-basis: 100%; padding: 0 !important; background: transparent !important; font-size: 10px !important; color: #718298 !important; }
@media (min-width: 901px) and (max-width: 1180px) {
  .portal-apple-shell .topbar .page-title { flex: 1 1 calc(100% - 200px); }
  .portal-apple-shell .da-portal-header-mark { order: 1; width: 154px; flex-basis: 154px; }
  .portal-apple-shell .topbar .search { order: 2; width: 100%; flex: 1 1 100%; }
}
@media (max-width: 900px) {
  .portal-apple-shell .topbar .mobile-menu { order: 0; }
  .portal-apple-shell .da-portal-header-mark { order: 1; width: 140px; flex-basis: 140px; margin-left: auto; }
  .portal-apple-shell .topbar .search { order: 2; width: 100%; flex: 1 1 100%; }
}

/* Shared authentication and dialog surfaces. Authentication fields, actions,
   nonces, error text and MFA/recovery handlers are intentionally untouched. */
body.oc-intel-portal-page .portal-login-shell,
.portal-login-shell {
  min-height: 100dvh; padding: 100px 24px 40px !important;
  background: #f6f8fb; color: #172f49; position: relative;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
}
.portal-login-shell .portal-login-panel {
  width: min(520px, 100%); gap: 24px; padding: 36px;
  background: #fff; border: 1px solid #dce5ee; border-radius: 16px;
  box-shadow: 0 14px 50px rgba(23,49,83,.07);
}
.portal-login-shell .portal-login-brand { gap: 14px; padding-bottom: 24px; }
.portal-login-shell .portal-login-brand img { width: 52px; height: 52px; object-fit: contain; }
.portal-login-shell .portal-login-brand p { letter-spacing: .07em; color: #62778d; }
.portal-login-shell .portal-login-brand h1 { font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.portal-login-shell .portal-login-copy h2 { color: #193752; font-size: 28px; font-weight: 650; letter-spacing: -.035em; }
.portal-login-shell .portal-login-copy p { color: #61758a; font-size: 14px; line-height: 1.65; }
.portal-login-shell .portal-login-form { gap: 18px; }
.portal-login-shell .portal-login-form label { font-size: 13px; font-weight: 600; color: #294760; }
.portal-login-shell .portal-login-form :is(input[type="text"],input[type="email"],input[type="password"],input[type="tel"],select) {
  min-height: 46px; border: 1px solid #d6e1eb; border-radius: 9px; background: #fcfdff; font: inherit; font-size: 16px; color: #203b55;
}
.portal-login-shell .login-submit input { min-height: 46px; border-radius: 9px; font-size: 14px; font-weight: 650; background: #0f766e; box-shadow: none; }
.portal-login-shell .portal-login-password-row button { border-radius: 9px; border-color: #dce5ee; background: #f0f5f9; color: #284864; }
.portal-login-shell .portal-login-note { color: #667c90; line-height: 1.6; }
.portal-login-shell .portal-login-switch { gap: 10px; line-height: 1.7; }
.portal-login-shell .portal-login-switch :is(a,button) { background: #f2f7fa; border-color: #dfE8ef; border-radius: 8px; padding: 9px 12px; font-weight: 600; }
.portal-login-header-mark { position: absolute; top: 28px; right: 32px; width: 154px; height: auto; }
.portal-login-shell :is(input,select,button,a,textarea):focus-visible { outline: 3px solid #0f766e; outline-offset: 3px; }

/* Fit the actual padded viewport, including short screens and phone keyboards. */
.modal-backdrop, .portal-rollout-notice, .portal-feedback-dialog, .portal-notice-backdrop,
.wire-modal-backdrop, .forfeiture-modal-backdrop {
  box-sizing: border-box; padding: 16px; overflow-y: auto; overscroll-behavior: contain;
}
.request-charts-modal { width: min(1080px, 100%); }
.officer-confirm-modal { width: min(1280px, 100%); }
.portal-feedback-card, .portal-rollout-card,
.request-charts-modal, .officer-confirm-modal,
.wiki-log-modal, .agency-editor-modal, .wire-modal, .forfeiture-modal,
.modal-card, .admin-notice-modal, .portal-notice-dialog {
  box-sizing: border-box; max-width: 100%; max-height: calc(100dvh - 32px);
  overflow: auto; border: 1px solid #dce5ee; border-radius: 14px;
  background: #fff; color: #203b55;
  box-shadow: 0 18px 70px rgba(23,49,83,.18);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.portal-feedback-card { width: min(520px, 100%); padding: 28px; flex: 0 1 520px; min-height: 0; }
.portal-feedback-card :is(h2,h3), .request-charts-modal h3,
.portal-rollout-card h2 { color: #193752; font-weight: 650; letter-spacing: -.025em; }
.portal-feedback-card input, .portal-feedback-card textarea { font-family: inherit; font-size: 16px; border-color: #d6e1eb; border-radius: 8px; }
.portal-feedback-card .portal-feedback-submit { min-height: 44px; background: #0f766e; border-radius: 8px; font-family: inherit; }
.portal-feedback-close { width: 40px; height: 40px; top: 8px; right: 8px; }
.portal-feedback-card h2, .portal-feedback-card h3 { margin-right: 36px; }
.portal-feedback-dialog[hidden], .portal-rollout-notice[hidden] { display: none; }
dialog { box-sizing: border-box; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); border-color: #dce5ee; border-radius: 14px; font-family: system-ui, sans-serif; }
[role="dialog"] :is(button,input,select,textarea,a):focus-visible { outline: 3px solid #0f766e; outline-offset: 2px; }
[role="dialog"] :is(h1,h2,h3)[tabindex="-1"]:focus { outline: none; }
@media (max-width: 600px) {
  .portal-login-shell .portal-login-panel { padding: 26px; gap: 20px; }
  .portal-login-header-mark { top: 24px; right: 24px; width: 140px; }
  .portal-login-shell .portal-login-copy h2 { font-size: 25px; }
  .portal-feedback-card { padding: 24px; }
}
@media (max-height: 560px) {
  .portal-feedback-dialog { align-items: flex-start; }
  .portal-feedback-card { margin: 0 auto; }
}
.auth-preview-note { padding: 18px 24px; background: #eaf1f7; color: #536d84; font: 12px/1.7 system-ui,sans-serif; text-align: center; }
.auth-preview-note a { color: #175b65; }

/* Short accordion motion uses the measured content height; native open/closed
   semantics and the existing menu handlers remain unchanged. */
@supports selector(details::details-content) and (transition-behavior: allow-discrete) {
  .portal-navigation .portal-disclosure[data-portal-menu-motion]::details-content {
    height: 0; opacity: 0; overflow: clip;
    transition: height 200ms var(--ease-out), opacity 160ms var(--ease-out), content-visibility 200ms allow-discrete;
  }
  .portal-navigation .portal-disclosure[data-portal-menu-motion][open]::details-content {
    height: var(--portal-menu-height, 0px); opacity: 1;
  }
  .portal-navigation .portal-disclosure[data-portal-menu-motion] > summary > svg:last-child {
    transition: transform 200ms var(--ease-out);
  }
  .portal-navigation .portal-disclosure[data-portal-menu-instant]::details-content,
  .portal-navigation .portal-disclosure[data-portal-menu-instant] > summary > svg:last-child { transition: none; }
  @media (prefers-reduced-motion: reduce) {
    .portal-navigation .portal-disclosure[data-portal-menu-motion]::details-content,
    .portal-navigation .portal-disclosure[data-portal-menu-motion] > summary > svg:last-child { transition: none; }
  }
}
