.exceptions-view { display: grid; gap: 24px; min-width: 0; }
.exceptions-view p { line-height: 1.6; margin: 0; }
.exceptions-view h2, .exceptions-view h3, .exceptions-view h4 { margin: 0; }
.exceptions-requested { display: grid; gap: 20px; min-width: 0; }
.exceptions-heading { padding: 2px 0 12px; display: grid; gap: 10px; }
.exceptions-heading .eyebrow { margin: 0; }
.exceptions-heading h2 { font-size: clamp(28px, 4vw, 38px); }
.exceptions-heading > p:last-child { color: var(--muted); font-size: 15px; }
.exceptions-revenue { display: grid; gap: 22px; min-width: 0; }
.exceptions-revenue-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.exceptions-view .exceptions-kicker { color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.exceptions-revenue-heading h3 { font-size: 25px; margin: 5px 0; }
.exceptions-revenue-heading p:last-child { color: var(--muted); font-size: 13px; }
.exceptions-source { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); font-size: 12px; font-weight: 600; }
.exceptions-source::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.exceptions-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }
.exceptions-metrics > div, .exceptions-metrics > button { display: grid; gap: 9px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.exceptions-metrics > button { color: var(--ink); text-align: left; font: inherit; cursor: pointer; }
.exceptions-metrics > button:hover:not(:disabled) { border-color: var(--green); background: var(--green-soft); }
.exceptions-view .exceptions-employee-trigger:disabled { cursor: default; }
.exceptions-employee-review, .exceptions-employee-group { display: grid; gap: 16px; min-width: 0; }
.exceptions-employee-review > button { justify-self: start; }
.exceptions-employee-group { margin-top: 12px; }
.exceptions-employee-group > h4 { font-size: 20px; overflow-wrap: anywhere; }
.exceptions-employee-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.exceptions-employee-metrics dt { font-size: 12px; color: var(--muted); }
.exceptions-employee-metrics dd { margin: 8px 0 0; font-family: 'Space Grotesk', sans-serif; font-size: 24px; color: var(--green); }
.exceptions-view [hidden] { display: none; }
.exceptions-metrics > div:first-child { background: var(--green-soft); border-color: var(--line); }
.exceptions-metrics strong { font-family: 'Space Grotesk', sans-serif; font-size: 34px; font-weight: 500; letter-spacing: -.03em; }
.exceptions-metrics > div:first-child strong { color: var(--green); }
.exceptions-metrics span { font-size: 12px; font-weight: 600; }
.exceptions-metrics small { font-size: 11px; color: var(--muted); }
.exceptions-opportunity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.exceptions-day-heading { grid-column: 1 / -1; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
.exceptions-day-heading:not(:first-child) { margin-top: 8px; }
.exceptions-opportunity { display: grid; gap: 21px; padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 6px; background: var(--panel); box-shadow: 0 4px 16px rgba(29,41,39,.035); min-width: 0; }
.exceptions-card-top, .exceptions-card-heading, .exceptions-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.exceptions-card-top { flex-wrap: wrap; }
.exceptions-status { color: #82500e; background: var(--amber-soft); border-radius: 14px; padding: 5px 9px; white-space: nowrap; font-size: 10px; font-weight: 700; }
.exceptions-card-heading { align-items: flex-start; }
.exceptions-card-heading h4 { font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.exceptions-duration { color: var(--green); font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 500; white-space: nowrap; }
.exceptions-card-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.exceptions-card-details dt { font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.exceptions-card-details dd { margin: 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.exceptions-card-footer { padding-top: 15px; border-top: 1px solid var(--line); }
.exceptions-card-source { color: var(--muted); font-size: 11px; }
.exceptions-view .exceptions-review-button { padding: 9px 17px; font-size: 12px; }
.exceptions-secondary { padding: 0 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--background); min-width: 0; }
.exceptions-secondary > summary { position: relative; cursor: pointer; padding: 20px 25px 20px 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; list-style: none; }
.exceptions-secondary > summary::-webkit-details-marker { display: none; }
.exceptions-secondary > summary::after { content: '+'; position: absolute; right: 0; top: 20px; color: var(--green); font-size: 20px; }
.exceptions-secondary[open] > summary::after { content: '−'; }
.exceptions-secondary-title { font-size: 14px; font-weight: 600; }
.exceptions-secondary-description { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.exceptions-count { font-size: 11px; color: var(--muted); background: var(--panel); padding: 3px 8px; border: 1px solid var(--line); border-radius: 10px; }
.exceptions-data-review-item { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.exceptions-data-review-item h4 { font-size: 15px; margin-bottom: 4px; }
.exceptions-data-review-item p { font-size: 12px; }
.exceptions-data-review-item button { flex-shrink: 0; }
.exceptions-review-list > p { padding-bottom: 20px; }
.exceptions-import { padding: 0 0 22px; }
.exceptions-rule { display: grid; gap: 16px; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.exceptions-rule p { font-size: 12px; color: var(--muted); }
.exceptions-enabled { display: flex; align-items: center; gap: 10px; }
.exceptions-enabled input { width: auto; }
.exceptions-rule input[type=number] { max-width: 220px; }
.exceptions-note, .exceptions-progress { font-size: 12px; color: var(--muted); }
.exceptions-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.exceptions-controls a { color: var(--green); font-size: 12px; }
.exceptions-view button:disabled { cursor: wait; opacity: .6; }
.exceptions-empty { grid-column: 1 / -1; display: grid; justify-items: start; gap: 12px; padding: 36px; border: 1px dashed var(--line); border-radius: 6px; background: var(--panel); }
.exceptions-empty h4 { font-size: 20px; }
.exceptions-empty p { color: var(--muted); font-size: 14px; max-width: 550px; }
.exceptions-empty button { margin-top: 8px; }
.exceptions-review-dialog { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 28px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow); overflow-y: auto; }
.exceptions-review-dialog::backdrop { background: rgba(20, 35, 29, .5); }
.exceptions-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.exceptions-review-dialog h2 { font-size: 26px; margin-bottom: 8px; overflow-wrap: anywhere; }
.exceptions-review-dialog h3 { margin: 24px 0 10px; font-size: 16px; }
.exceptions-review-dialog p, .exceptions-review-dialog li { font-size: 13px; line-height: 1.6; }
.exceptions-confidence { margin-top: 18px !important; padding: 12px; background: var(--green-soft); color: var(--green); border-radius: 4px; }
.exceptions-review-reason { padding: 10px 0; color: var(--amber); }
.exceptions-table-wrap { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.exceptions-view table { border-collapse: collapse; width: 100%; background: var(--panel); font-size: 12px; }
.exceptions-view th, .exceptions-view td { padding: 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.exceptions-view th { background: var(--green-soft); white-space: nowrap; }
.exceptions-evidence { padding: 14px 0; margin-top: 12px; border-top: 1px solid var(--line); }
.exceptions-evidence summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.exceptions-evidence p { margin: 12px 0; }
.exceptions-evidence li { margin: 7px 0; }
.exceptions-view [data-results] { min-width: 0; }
.exceptions-view :focus-visible { outline: 2px solid var(--green); outline-offset: 4px; }
.exceptions-revenue-heading h3:focus { outline: none; }
.exceptions-discovered { border-top: 1px solid var(--line); padding-top: 28px; }
.exceptions-patterns { display: grid; gap: 18px; padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--background); }
.exceptions-patterns header { display: grid; gap: 8px; }
.exceptions-patterns h3 { font-size: 23px; }
.exceptions-patterns header > p:last-child { font-size: 13px; color: var(--muted); }
.exceptions-patterns .exceptions-kicker { color: var(--muted); }
.exceptions-pattern-card { border-top: 1px solid var(--line); box-shadow: none; }
.exceptions-pattern-card .exceptions-status { background: #eeeae0; color: var(--muted); }
.exceptions-pattern-actions { margin: 20px 0 12px; }
.exceptions-queue-title { margin: 24px 0 16px !important; font-size: 18px; }
.exceptions-history { margin-top: 24px; }
.exceptions-history > .exceptions-opportunity-grid { padding: 16px 0 22px; }
.exceptions-workflow-controls { margin: 18px 0; padding: 16px; display: grid; gap: 12px; background: var(--green-soft); border-radius: 6px; }
.exceptions-workflow-controls label { min-width: min(240px, 100%); }
.exceptions-employee-groups, .exceptions-employee-day { display: grid; gap: 18px; min-width: 0; }
.exceptions-employee-day > button { justify-self: start; }
.exceptions-email-address { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.exceptions-email-address > label { flex: 1; min-width: min(240px, 100%); }
.exceptions-email-preview { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
@media (max-width: 900px) {
  .exceptions-opportunity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .exceptions-metrics { grid-template-columns: 1fr; }
  .exceptions-opportunity { padding: 18px; }
  .exceptions-metrics > div, .exceptions-metrics > button { padding: 14px; }
  .exceptions-employee-metrics { grid-template-columns: 1fr; }
  .exceptions-card-heading, .exceptions-data-review-item { flex-direction: column; align-items: flex-start; }
  .exceptions-card-details { grid-template-columns: 1fr; }
  .exceptions-revenue-heading { align-items: flex-start; }
  .exceptions-source { padding: 6px 8px; }
  .exceptions-secondary-description { flex-basis: 100%; }
  .exceptions-review-dialog { padding: 18px; }
  .exceptions-empty { padding: 24px; }
}

.exceptions-daily-section { margin: 16px 0; padding: 16px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.exceptions-daily-section > .exceptions-employee-group { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); gap: 6px; }
.exceptions-employee-group > .exceptions-opportunity-grid { margin-top: 16px; }
.exceptions-employee-review > label { display: inline-grid; gap: 6px; margin: 16px 20px 20px 0; }
.exceptions-employee-review .exceptions-metrics strong { font-size: 24px; overflow-wrap: anywhere; }
.exceptions-card-footer { flex-wrap: wrap; gap: 10px; }


.exceptions-daily-list { display: grid; gap: 16px; }

.exceptions-date-header, .exceptions-employee-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.exceptions-date-header .exceptions-day-heading { margin: 0 0 4px; padding: 0; border: 0; }
.exceptions-date-header p, .exceptions-employee-header p { margin: 0; }
.exceptions-employee-header h4 { margin: 0 0 3px; font-size: 15px; }
.exceptions-employee-actions { display: flex; align-items: flex-start; gap: 12px; }
.exceptions-employee-actions > button, .exceptions-inline-settings > summary { padding: 5px 8px; font-size: 12px; white-space: nowrap; }
.exceptions-inline-settings { position: relative; }
.exceptions-inline-settings > summary { cursor: pointer; color: var(--muted); }
.exceptions-inline-settings[open] .exceptions-email-address { position: absolute; right: 0; z-index: 2; width: min(300px, 75vw); padding: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 4px 16px #0002; }
@media (max-width: 650px) { .exceptions-daily-section { padding: 12px; } .exceptions-date-header, .exceptions-employee-header { align-items: flex-start; flex-wrap: wrap; } }

/* Individual reviews carry the visual emphasis inside each date/employee group. */
.exceptions-daily-section { background: var(--background); padding: 20px; }
.exceptions-daily-section > .exceptions-employee-group { margin-top: 20px; padding-top: 16px; gap: 12px; }
.exceptions-date-header .exceptions-day-heading { font-size: 21px; }
.exceptions-employee-header h4 { font-size: 17px; }
.exceptions-review-card { display: block; min-width: 0; padding: 24px; background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--green); border-radius: 8px; box-shadow: 0 2px 6px #183c2d05; }
.exceptions-review-card-top, .exceptions-review-card-heading, .exceptions-review-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.exceptions-review-card-top { margin-bottom: 20px; }
.exceptions-review-card-top .exceptions-kicker { margin: 0; }
.exceptions-review-card-top .exceptions-status { flex-shrink: 0; padding: 6px 12px; border-radius: 24px; background: #fff1dc; color: #875209; font-size: 11px; }
.exceptions-review-card-heading { align-items: baseline; margin-bottom: 22px; }
.exceptions-review-card-heading h4 { margin: 0; font-size: 22px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.exceptions-review-duration { flex-shrink: 0; color: var(--green); font-family: 'Space Grotesk', sans-serif; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.exceptions-review-card-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin: 0 0 22px; }
.exceptions-review-card-details dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.exceptions-review-card-details dd { margin: 0; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.exceptions-review-card-footer { padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.exceptions-review-card-footer .exceptions-controls { margin: 0; gap: 8px; }
.exceptions-review-card-footer .exceptions-review-button { background: var(--green); color: #fff; border: 1px solid var(--green); padding: 9px 18px; border-radius: 5px; font-weight: 600; }
.exceptions-review-card-footer .exceptions-review-button:hover { filter: brightness(.93); }
.exceptions-review-card-footer .quiet-button { padding: 8px 12px; font-size: 12px; }
@media (max-width: 650px) {
  .exceptions-daily-section { padding: 12px; }
  .exceptions-review-card { padding: 18px; }
  .exceptions-review-card-top, .exceptions-review-card-heading { flex-wrap: wrap; gap: 8px; }
  .exceptions-review-card-heading h4 { font-size: 19px; }
  .exceptions-review-duration { font-size: 22px; }
  .exceptions-review-card-details { gap: 16px; }
}
@media (max-width: 380px) { .exceptions-review-card-details { grid-template-columns: 1fr; } }

.exceptions-date-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.exceptions-date-card-grid .exceptions-review-card { display: flex; flex-direction: column; }
.exceptions-date-card-grid .exceptions-review-card-footer { margin-top: auto; }
.exceptions-date-card-grid .exceptions-review-card-heading { flex-wrap: wrap; gap: 8px 16px; }
.exceptions-date-card-grid .exceptions-review-card-top { flex-wrap: wrap; }
.exceptions-date-email-options { position: relative; }
.exceptions-date-email-options > summary { cursor: pointer; color: var(--muted); font-size: 12px; padding: 6px 8px; }
.exceptions-email-options-panel { position: absolute; right: 0; top: 100%; z-index: 3; width: min(350px, 78vw); max-height: 60vh; overflow: auto; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #183c2d18; }
.exceptions-email-option-employee { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line); }
.exceptions-email-option-employee summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (max-width: 760px) { .exceptions-date-card-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
