/* Auditor Owl: what is not in GRC Owl's stylesheets. Colours come from their tokens so both themes work. */
.ao-wordmark { font-weight: 700; letter-spacing: -.01em; color: #0f1d33; }
.ao-wordmark span { color: #2f7fd1; }
.ao-crumb { font-size: .875rem; margin-bottom: .35rem; }
.ao-crumb a { text-decoration: none; }
.ao-crumb a:hover { text-decoration: underline; }
.ao-card { transition: box-shadow .15s ease, transform .15s ease; }
.ao-card:hover, .ao-card:focus-visible { box-shadow: 0 6px 20px rgba(15, 29, 51, .12); transform: translateY(-1px); }
.ao-monogram { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.15rem; background: #e6eefa; color: #12335e; }
.ao-num { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.ao-feed { max-height: 34rem; overflow-y: auto; }
.ao-internal .comment-main { background: #fff8e1; border-color: #f0d98a; }
.min-w-0 { min-width: 0; }
.form-section { font-weight: 600; border-bottom: 1px solid #e2e6ec; padding-bottom: .35rem; }
.people-picker, .ao-frameworks { border: 1px solid #d5dbe5; border-radius: .5rem; max-height: 13rem; overflow-y: auto; background: #fff; }
.ao-frameworks { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); max-height: 17rem; }
.people-picker-item { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem .75rem; cursor: pointer; margin: 0; }
.people-picker-item:hover { background: #f3f6fb; }
.people-picker-item .form-check-input { flex: 0 0 auto; margin-top: .2rem; }
.ao-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: .75rem; }
.ao-source { position: relative; display: flex; flex-direction: column; gap: .15rem; border: 1px solid #d5dbe5; border-radius: .6rem; padding: .85rem 1rem; cursor: pointer; background: #fff; }
.ao-source input { position: absolute; top: .9rem; right: .9rem; }
.ao-source i { font-size: 1.25rem; color: #12335e; }
.ao-source small { color: #5d6a80; }
.ao-source:has(input:checked) { border-color: #2f7fd1; box-shadow: 0 0 0 1px #2f7fd1 inset; background: #f4f8fe; }
.ao-source:has(input:focus-visible) { outline: 2px solid #2f7fd1; outline-offset: 2px; }
/* the firm's name can be long: one line, cut with an ellipsis (the full name is the tooltip) */
.x-brand { flex-wrap: wrap; row-gap: 0; }
.x-brand .x-name { white-space: nowrap; }
.x-brand .instance-badge, .navbar-brand .instance-badge { max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-brand .instance-badge { margin-left: 0; }
.comment-head .comment-date { margin-left: .5rem; }
/* co-branding: the audit firm next to Auditor Owl (Settings > Branding) */
.x-firm { flex: 0 0 100%; display: flex; align-items: center; min-width: 0; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid rgba(127, 139, 171, .25); }
.x-brand .x-firm-logo { width: auto; height: auto; max-height: 38px; max-width: 100%; object-fit: contain; flex: 0 1 auto; }
.x-firm-name { font-size: .8rem; font-weight: 600; color: #3d4a60; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-firm-inline { flex: 0 1 auto; margin-top: 0; padding: 0 0 0 .6rem; border-top: 0; border-left: 1px solid rgba(255, 255, 255, .35); max-width: 14rem; }
.x-firm-inline .x-firm-name { color: inherit; }
.x-brand .x-firm-inline .x-firm-logo, .x-firm-inline .x-firm-logo { max-height: 30px; background: #fff; border-radius: 4px; padding: 2px 4px; }
body.sidebar-collapsed .x-firm { display: none; }
.auth-firm { margin-top: .75rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.auth-firm-with { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: #7b879b; }
.auth-firm-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.auth-firm-name { font-weight: 600; color: #0f1d33; }
.cobrand-preview { background: #f8f9fb; }
.cobrand { display: flex; flex-direction: column; align-items: center; gap: .5rem; text-align: center; }
.cobrand-product { display: flex; align-items: center; gap: .5rem; font-size: 1.2rem; }
.cobrand-mark { width: 44px; height: 44px; }
.cobrand-x { width: 40%; border-top: 1px solid #d5dbe5; }
.cobrand-firm { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.cobrand-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.cobrand-name { font-weight: 600; }
.cobrand-tagline { font-size: .8rem; color: #5d6a80; }
.wf-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .75rem; }
.wf-node { border: 1px solid #e2e6ec; border-radius: .5rem; padding: .6rem .75rem; background: #fbfcfd; }
.wf-status { margin-bottom: .35rem; }
.wf-edge { padding-left: .25rem; margin-top: .15rem; }
/* Audit Calendar */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-head { font-size: .75rem; font-weight: 600; text-transform: uppercase; color: #7b879b; padding: .25rem .4rem; }
.cal-day { min-height: 7rem; border: 1px solid #e7ebf0; border-radius: .35rem; padding: .25rem .3rem; background: #fff; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-out { background: #f7f8fa; }
.cal-out .cal-num { color: #b0b8c5; }
.cal-today { border-color: #2f7fd1; box-shadow: inset 0 0 0 1px #2f7fd1; }
.cal-num { font-size: .8rem; font-weight: 600; color: #3d4a60; }
.cal-ev { display: block; font-size: .72rem; line-height: 1.25; padding: 1px 4px; border-radius: 3px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.cal-primary { background: #e8f0fb; color: #12335e; border-color: #2f7fd1; }
.cal-warning { background: #fff6e0; color: #6b4e00; border-color: #e0a800; }
.cal-danger { background: #fdecec; color: #7a1c1c; border-color: #d9534f; }
.cal-success { background: #e6f5ec; color: #1d5e36; border-color: #2e9e5b; }
.cal-late { font-weight: 700; }
.cal-agenda-day { border-bottom: 1px solid #eef1f5; padding: .4rem 0; }
.cal-month { min-width: 9rem; text-align: center; }
.role-matrix td:first-child { min-width: 16rem; }
.role-matrix th:not(:first-child) { min-width: 7rem; }
body.sidebar-collapsed .x-brand { flex-wrap: nowrap; }
@media (max-width: 991.98px) { .x-brand .instance-badge, .x-brand .x-firm { display: none; } .x-top, .x-brand { flex-wrap: nowrap; } html.theme-light body { overflow-x: clip; } }
/* on a phone the Settings pages are a row below the header, not a column inside it */
@media (max-width: 575.98px) {
  html.theme-light .x-shell > .settings-pane { display: flex; flex: 0 0 100%; order: 6; overflow-x: auto; padding: 0 .75rem .35rem; border-bottom: 0; }
  html.theme-light .x-shell:has(> .settings-pane) .app-main { order: 7; }
  .x-shell > .settings-pane .settings-pane-title, .x-shell > .settings-pane .settings-section-label { display: none; }
  .x-shell > .settings-pane .nav { flex-direction: row !important; flex-wrap: nowrap; }
  .x-shell > .settings-pane .nav-link { white-space: nowrap; }
}

/* the firm's own logo stands alone: no Auditor Owl mark or name beside it */
.x-brand > .x-firm:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.navbar-brand > .x-firm-inline:first-child { margin-left: 0 !important; padding-left: 0; border-left: 0; }
