/* CENTRAL monthly insurance performance and W record. Screen-only and scoped. */
@media screen {
  #goalPerformance {
    grid-area: performance;
    min-width: 0;
    width: 100%;
    padding-top: 15px;
    border-top: 1px solid #e3e8ee;
    color: #304158;
    font-size: 13px;
    line-height: 1.65;
  }
  #goalPerformance button {
    min-height: 35px;
    padding: 7px 11px;
    border: 1px solid #d6dee7;
    border-radius: 7px;
    background: #fff;
    color: #526176;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.45;
  }
  #goalPerformance button:hover { border-color: #b8a071; background: #fcf8ef; }
  #goalPerformance button.primary { border-color: #927039; background: #927039; color: #fff; }
  #goalPerformance button.primary:hover { border-color: #795b2d; background: #795b2d; }
  #goalPerformance .gp-profile-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    min-width: 0;
    margin-bottom: 12px;
  }
  #goalPerformance .gp-profile-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 8px; min-width: 0; }
  #goalPerformance .gp-profile-identity strong { color: #293a50; font-size: 16px; font-weight: 750; line-height: 1.5; overflow-wrap: anywhere; }
  #goalPerformance .gp-nocount-total { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 8px; border: 1px solid #e1e6ee; border-radius: 6px; background: #f7f8fa; color: #5c6b80; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }

  /* W: one clear header and seven small day cells, including on a phone. */
  #goalPerformance .gp-w-panel {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #ded7c9;
    border-radius: 10px;
    background: #fff;
    margin: 0 0 15px;
  }
  #goalPerformance .gp-w-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 7px 10px; min-width: 0; }
  #goalPerformance .gp-w-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 9px; min-width: 0; }
  #goalPerformance .gp-w-heading strong { color: #7b5d29; font-size: 22px; font-weight: 750; line-height: 1.4; letter-spacing: -.4px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  #goalPerformance .gp-w-heading > small { margin: 0; color: #6b7789; font-size: 11px; line-height: 1.5; }
  #goalPerformance .gp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 3px 8px;
    border: 1px solid #e4d3ad;
    border-radius: 6px;
    background: #fbf3e3;
    color: #80602b;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: anywhere;
  }
  #goalPerformance .gp-badge.active { color: #30734f; border-color: #c7dfcf; background: #edf7f0; }
  #goalPerformance .gp-badge.protected { color: #3f6392; border-color: #ccdbec; background: #eef4fc; }
  #goalPerformance .gp-badge.unconfigured { color: #627185; border-color: #dce3eb; background: #f5f7fa; }
  #goalPerformance .gp-badge.pending { color: #80602b; border-color: #e4d3ad; background: #fbf3e3; }
  #goalPerformance .gp-badge.broken { color: #a24d3c; border-color: #e6c7be; background: #fff0eb; }
  #goalPerformance .gp-w-meta { margin: 7px 0 11px; color: #637186; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformance .gp-w-meta b { color: #40516a; font-weight: 650; }
  #goalPerformance .gp-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; min-width: 0; }
  #goalPerformance .gp-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    padding: 7px 4px;
    border: 1px solid #e1e6ed;
    border-radius: 7px;
    background: #fff;
    color: #647287;
    text-align: center;
    font-size: 11px;
    line-height: 1.5;
  }
  #goalPerformance .gp-day :is(b, strong) { color: #3e5069; font-size: 13px; font-weight: 700; line-height: 1.5; font-variant-numeric: tabular-nums; }
  #goalPerformance .gp-day small { margin: 0; color: #69768a; font-size: 11px; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  #goalPerformance .gp-day.done { border-color: #cbb581; background: #fbf5e8; }
  #goalPerformance .gp-day.done :is(b, strong, small) { color: #795b24; }
  #goalPerformance .gp-day.today { border-color: #8a6a31; box-shadow: inset 0 2px #98783e; }
  #goalPerformance .gp-w-status { margin: 9px 0 0; color: #5d6c81; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformance .gp-w-status.active { color: #347454; }
  #goalPerformance .gp-w-status.protected { color: #45658e; }
  #goalPerformance .gp-w-status.broken { color: #a14c3b; }
  #goalPerformance .gp-w-rules { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:10px 0 8px; }
  #goalPerformance .gp-w-rules>span { display:block;min-width:0;padding:8px 9px;border:1px solid #e8dfce;border-radius:7px;background:#fcf8ef;color:#8d733f;font-size:11px;line-height:1.6; }
  #goalPerformance .gp-w-rules b { display:block;color:#725627;font-size:12px;font-weight:750;line-height:1.6; }
  #goalPerformance .gp-w-monthly { margin:7px 0 0;padding:7px 9px;border-radius:6px;background:#f2f6f9;color:#526d85;font-size:12px;line-height:1.7; }
  #goalPerformance .gp-w-monthly strong { color:#35546f; }
  #goalPerformance .gp-upgrade-warning { display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:7px 10px;padding:8px 10px;margin:9px 0;border:1px solid #e4cba0;border-radius:7px;background:#fff6e8;color:#8d6634;font-size:12px;line-height:1.7; }
  #goalPerformance .gp-upgrade-warning>span { min-width:0;flex:1 1 220px;overflow-wrap:anywhere; }
  #goalPerformance #gpRetryNoCount { padding:5px 8px;min-height:32px;font-size:11px; }
  #goalPerformance .gp-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
  #goalPerformance .gp-actions .gp-help { margin: 0; }
  #goalPerformance .gp-history-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 11px; }
  #goalPerformance .gp-history-wrap > details { min-width: 0; border: 1px solid #e1e6ed; border-radius: 7px; background: #fff; overflow: hidden; }
  #goalPerformance .gp-history-wrap summary { min-height: 37px; padding: 8px 10px; color: #5a687c; font-size: 12px; font-weight: 650; line-height: 1.6; cursor: pointer; }
  #goalPerformance .gp-history-wrap summary::marker { color: #94723a; }
  #goalPerformance .gp-history-wrap details[open] > summary { border-bottom: 1px solid #e7ebf0; }
  #goalPerformance .gp-week-history ul { list-style: none; margin: 0; padding: 0 10px; }
  #goalPerformance .gp-week-history li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 8px 0; border-bottom: 1px solid #e9edf2; }
  #goalPerformance .gp-week-history li:last-child { border-bottom: 0; }
  #goalPerformance .gp-week-history li > span { grid-column: 1 / -1; color: #68768b; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; }
  #goalPerformance .gp-week-history li > b { color: #485a72; font-size: 12px; font-weight: 650; line-height: 1.5; }
  #goalPerformance .gp-week-history li > small { margin: 0; color: #80632d; font-size: 11px; font-weight: 650; line-height: 1.5; }
  #goalPerformance .gp-nocount-history > .gp-help { margin: 8px 10px; font-size: 11px; }
  #goalPerformance .gp-history-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 9px 10px; border-top: 1px solid #e9edf2; }
  #goalPerformance .gp-history-row > div { min-width: 0; }
  #goalPerformance .gp-history-row strong { display: block; color: #485a72; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
  #goalPerformance .gp-history-row small { display: block; margin: 1px 0 0; color: #6c788c; font-size: 11px; line-height: 1.6; }
  #goalPerformance .gp-history-row button { min-height: 31px; padding: 5px 8px; color: #9a5140; border-color: #e4d3ca; font-size: 11px; }

  /* A fixed four-column table can shrink to the available phone width. */
  #goalPerformance .gp-sales-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 9px; }
  #goalPerformance .gp-sales-head :is(h3, h4) { margin: 0; color: #304158; font-size: 15px; font-weight: 750; line-height: 1.5; }
  #goalPerformance .gp-sales-head p { margin: 3px 0 0; color: #67758a; font-size: 12px; line-height: 1.6; }
  #goalPerformance .gp-sales-head .gp-actions { margin-top: 0; }
  #goalPerformance button.gp-reset-month { color: #9b4a3a; border-color: #e5ccc4; background: #fffaf8; }
  #goalPerformance button.gp-reset-month:hover { color: #7e3527; border-color: #c99a8c; background: #fff0e9; }
  .goal-performance-dialog .gp-reset-summary { padding: 12px; border: 1px solid #ead2c9; border-radius: 9px; background: #fffaf7; }
  .goal-performance-dialog .gp-reset-summary > p { margin: 0 0 9px; overflow-wrap: anywhere; }
  .goal-performance-dialog .gp-reset-summary > p:last-child { margin-bottom: 0; }
  .goal-performance-dialog .gp-reset-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
  .goal-performance-dialog .gp-reset-totals > div { min-width: 0; padding: 10px; border-radius: 7px; background: #fff; border: 1px solid #ece3dc; }
  .goal-performance-dialog .gp-reset-totals :is(strong,span) { display: block; overflow-wrap: anywhere; }
  .goal-performance-dialog .gp-reset-totals span { margin-top: 4px; font-size: 12px; }
  .goal-performance-dialog .gp-reset-notes { margin: 12px 0; padding-left: 20px; color: #5d6778; font-size: 12px; line-height: 1.65; }
  .goal-performance-dialog .gp-reset-notes li + li { margin-top: 6px; }
  #goalPerformance .gp-sales-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    border: 1px solid #dfe5ed;
    border-radius: 9px;
    overflow: hidden;
    background: #fff;
    color: #304158;
    font-variant-numeric: tabular-nums;
  }
  #goalPerformance .gp-sales-table :is(th, td) { padding: 9px 12px; border: 0; border-bottom: 1px solid #e7ebf0; border-right: 1px solid #e7ebf0; font-size: 13px; line-height: 1.55; white-space: normal; overflow-wrap: anywhere; vertical-align: middle; }
  #goalPerformance .gp-sales-table thead th { background: #f6f7f9; color: #526176; text-align: center; font-size: 12px; font-weight: 650; }
  #goalPerformance .gp-sales-table th:first-child { width: 20%; text-align: left; }
  #goalPerformance .gp-sales-table tbody th { color: #536178; font-size: 12px; font-weight: 650; background: #fcfcfd; }
  #goalPerformance .gp-sales-table td { color: #32455f; text-align: right; font-weight: 600; }
  #goalPerformance .gp-sales-table :is(th, td):last-child { border-right: 0; background: #fdf8ec; color: #795b25; font-weight: 750; }
  #goalPerformance .gp-sales-table tbody tr:last-child > * { border-bottom: 0; }
  #goalPerformance .gp-sales-table small { display: inline; margin: 0 0 0 3px; font-size: 10px; font-weight: 500; color: #68768a; }
  #goalPerformance .gp-contracts { margin-top: 11px; border: 1px solid #e2e7ee; border-radius: 8px; background: #fff; overflow: hidden; }
  #goalPerformance .gp-contracts > summary { min-height: 39px; padding: 9px 12px; color: #526176; font-size: 12px; font-weight: 650; line-height: 1.6; cursor: pointer; }
  #goalPerformance .gp-contracts > summary::marker { color: #94723a; }
  #goalPerformance .gp-contracts[open] > summary { border-bottom: 1px solid #e7ebf0; }
  #goalPerformance .gp-contract-list { min-width: 0; padding: 0 12px; }
  #goalPerformance .gp-contract-row { display: flex; align-items: center; justify-content: space-between; gap: 9px 14px; padding: 12px 0; border-bottom: 1px solid #e8ecf1; }
  #goalPerformance .gp-contract-row:last-child { border-bottom: 0; }
  #goalPerformance .gp-contract-row > div:first-child { min-width: 0; flex: 1; }
  #goalPerformance .gp-contract-row strong { color: #3c4e68; font-size: 13px; font-weight: 650; line-height: 1.6; overflow-wrap: anywhere; }
  #goalPerformance .gp-contract-row p { margin: 4px 0; color: #68768b; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformance .gp-contract-row small { display: block; margin: 0; color: #637187; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
  #goalPerformance .gp-contract-row .gp-actions { flex: 0 0 auto; margin: 0; }
  #goalPerformance .gp-contract-row button[data-gp-delete] { color: #a14e3e; border-color: #e4cdc5; background: #fff9f6; }
  #goalPerformance .gp-contract-history > summary span { margin-left: 5px; color: #8e7243; font-size: 11px; font-weight: 500; }
  #goalPerformance .gp-contract-history .gp-contract-row { align-items: flex-start; }
  #goalPerformance .gp-contract-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
  #goalPerformance .gp-contract-title time { color: #748095; font-size: 11px; font-variant-numeric: tabular-nums; }
  #goalPerformance .gp-contract-type { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #edf3f8; color: #526e88; font-size: 10px; font-weight: 650; }
  #goalPerformance .gp-contract-type.nonlife { background: #f8f0df; color: #937239; }
  #goalPerformance .gp-contract-info > strong { display: block; }
  #goalPerformance .gp-contract-info > p { margin: 1px 0 6px; font-size: 11px; }
  #goalPerformance .gp-contract-amounts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 7px 0 0; padding: 7px 9px; border-radius: 6px; background: #f7f8fa; }
  #goalPerformance .gp-contract-amounts > div { min-width: 0; }
  #goalPerformance .gp-contract-amounts dt { color: #7d8999; font-size: 10px; }
  #goalPerformance .gp-contract-amounts dd { margin: 2px 0 0; color: #4c5d73; font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
  #goalPerformance .gp-contract-actions button { min-height: 31px; padding: 5px 9px; font-size: 11px; }
  #goalPerformance .gp-contract-actions [data-gp-contract-delete] { color: #a14e3e; border-color: #e4cdc5; background: #fff9f6; }
  #goalPerformance .gp-contract-deleted { border-top: 1px solid #e7ebef; background: #fbfbfc; }
  #goalPerformance .gp-contract-deleted > summary { min-height: 36px; padding: 8px 12px; color: #7a8290; font-size: 11px; cursor: pointer; }
  #goalPerformance .gp-contract-deleted .gp-contract-row strong { color: #707c8d; }
  #goalPerformanceDialog .gp-contract-confirm { padding: 11px 13px; border: 1px solid #e0e5eb; border-radius: 8px; background: #f8fafc; color: #546478; overflow-wrap: anywhere; }
  #goalPerformanceDialog .gp-contract-confirm strong { font-size: 13px; }
  #goalPerformanceDialog .gp-contract-confirm p { margin: 6px 0 0; font-size: 12px; }
  #goalPerformance .gp-empty { margin: 0; padding: 13px 12px; color: #68768a; font-size: 12px; line-height: 1.65; }
  #goalPerformance .gp-help { margin: 8px 0 0; color: #67758a; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  :is(#goalPerformance, #goalPerformanceDialog) .gp-legacy-note { margin: 8px 0 12px; padding: 9px 11px; border: 1px solid #e4cea2; border-radius: 7px; background: #fff7e8; color: #815f27; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }

  #goalPerformanceDialog.goal-performance-dialog {
    width: min(580px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    max-height: 90dvh;
    box-sizing: border-box;
    padding: 22px;
    border: 1px solid #d6c7aa;
    border-radius: 15px;
    background: #fff;
    color: #304158;
    overflow: auto;
    overscroll-behavior: contain;
    box-shadow: 0 24px 80px #00000030;
  }
  #goalPerformanceDialog::backdrop { background: #141a24aa; backdrop-filter: blur(3px); }
  #goalPerformanceDialog .gp-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 15px; }
  #goalPerformanceDialog .gp-dialog-head h2 { margin: 0; color: #29394e; font-size: 21px; line-height: 1.5; letter-spacing: -.4px; }
  #goalPerformanceDialog .gp-dialog-head button { flex: 0 0 35px; width: 35px; height: 35px; padding: 0; border: 0; border-radius: 50%; background: #f2f4f7; color: #5a687c; font-size: 21px; line-height: 1; }
  #goalPerformanceDialog .gp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 12px 0; }
  #goalPerformanceDialog .gp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; color: #4a5a70; font-size: 13px; font-weight: 650; line-height: 1.5; }
  #goalPerformanceDialog :is(input, select, textarea) { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; margin: 0; padding: 9px 11px; border: 1px solid #d2dbe5; border-radius: 8px; background: #fff; color: #304158; font: inherit; font-size: 14px; line-height: 1.5; }
  #goalPerformanceDialog textarea { resize: vertical; min-height: 84px; }
  #goalPerformanceDialog :is(input, textarea)::placeholder { color: #768398; }
  #goalPerformanceDialog input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; padding: 0; accent-color: #927039; }
  #goalPerformanceDialog .gp-help { margin: 8px 0 12px; color: #657388; font-size: 12px; font-weight: 400; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformanceDialog .gp-salary-calculator { grid-column: 1 / -1; min-width: 0; padding: 12px; border: 1px solid #dcd5c7; border-radius: 9px; background: #fbf9f4; }
  #goalPerformanceDialog .gp-salary-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; min-width: 0; }
  #goalPerformanceDialog .gp-salary-fields .gp-field > span { min-height: 20px; }
  #goalPerformanceDialog .gp-salary-fields small { color: #657388; font-size: 11px; font-weight: 400; white-space: nowrap; }
  #goalPerformanceDialog .gp-salary-status { margin: 10px 0 3px; color: #5b6676; font-size: 12px; font-weight: 700; line-height: 1.5; }
  #goalPerformanceDialog .gp-salary-status[data-mode="auto"] { color: #77591f; }
  #goalPerformanceDialog .gp-salary-status[data-mode="error"] { color: #a43f2d; }
  #goalPerformanceDialog .gp-salary-formula { margin: 0; color: #3e4d61; font-size: 13px; font-variant-numeric: tabular-nums; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformanceDialog .gp-salary-note { margin: 6px 0 0; color: #657388; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformanceDialog .gp-opening-table { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; width: 100%; min-width: 0; margin: 12px 0; }
  #goalPerformanceDialog .gp-opening-table fieldset,
  #goalPerformanceDialog .gp-baseline-fields { min-inline-size: 0; min-width: 0; margin: 0; padding: 11px 12px; border: 1px solid #dce3eb; border-radius: 9px; background: #fff; }
  #goalPerformanceDialog .gp-opening-table legend,
  #goalPerformanceDialog .gp-baseline-fields legend { padding: 0 6px; color: #7e612c; font-size: 13px; font-weight: 700; line-height: 1.5; }
  #goalPerformanceDialog .gp-opening-table .gp-form-grid { margin: 4px 0; }
  #goalPerformanceDialog .gp-opening-table input { text-align: right; font-variant-numeric: tabular-nums; }
  #goalPerformanceDialog .gp-baseline-fields { margin-top: 15px; }
  #goalPerformanceDialog .gp-check { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; color: #53647b; font-size: 13px; line-height: 1.65; }
  #goalPerformanceDialog .gp-check input[type="checkbox"] { flex: 0 0 18px; margin: 2px 0 0; }
  #goalPerformanceDialog #gpMessage { margin: 11px 0 0; color: #9b4837; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
  #goalPerformanceDialog .gp-form-actions {
    position: sticky;
    bottom: -22px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 18px -22px -22px;
    padding: 12px 22px;
    border-top: 1px solid #e1e7ee;
    background: #fff;
    box-shadow: 0 -5px 13px #ffffffed;
  }
  #goalPerformanceDialog .gp-form-actions button { min-height: 40px; padding: 9px 20px; border: 1px solid #d6dee7; border-radius: 8px; background: #fff; color: #526176; font-size: 13px; font-weight: 650; line-height: 1.5; }
  #goalPerformanceDialog .gp-form-actions button.primary { border-color: #927039; background: #927039; color: #fff; }
  #goalPerformanceDialog .gp-form-actions button.primary:hover { border-color: #795b2d; background: #795b2d; }
  #goalPerformanceDialog .gp-form-actions button.gp-danger { border-color: #b15f4b; background: #b15f4b; color: #fff; }
  #goalPerformanceDialog .gp-form-actions button.gp-danger:hover { border-color: #994c3a; background: #994c3a; }
  #goalPerformance :is(button, summary):focus-visible,
  #goalPerformanceDialog :is(button, input, select, textarea):focus-visible { outline: 3px solid #bf9c58; outline-offset: 2px; }
}

/* Wide workspaces show W and sales together instead of adding another full row. */
@media screen and (min-width: 1150px) {
  #goalPerformance {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px 16px;
  }
  #goalPerformance .gp-profile-row { grid-column: 1 / -1; margin-bottom: 0; }
  #goalPerformance .gp-w-panel { grid-column: 1; margin: 0; }
  #goalPerformance .gp-sales-panel {
    grid-column: 2;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #dfe5ed;
    border-radius: 10px;
    background: #fff;
  }
  #goalPerformance .gp-sales-table :is(th, td) { padding: 8px 9px; }
  #goalPerformance .gp-sales-panel > .gp-help { font-size: 11px; }
}

@media screen and (max-width: 620px) {
  #goalPerformance { padding-top: 13px; }
  #goalPerformance button { min-height: 40px; padding: 8px 10px; }
  #goalPerformance .gp-profile-row { gap: 8px 10px; }
  #goalPerformance .gp-profile-identity strong { font-size: 15px; }
  #goalPerformance .gp-nocount-total { margin-left: 0; }
  #goalPerformance .gp-w-panel { padding: 11px 10px; margin-bottom: 13px; }
  #goalPerformance .gp-w-heading strong { font-size: 21px; }
  #goalPerformance .gp-w-meta { margin-bottom: 10px; font-size: 11px; }
  #goalPerformance .gp-days { gap: 3px; }
  #goalPerformance .gp-day { gap: 1px; padding: 6px 1px; border-radius: 5px; font-size: 10px; }
  #goalPerformance .gp-day :is(b, strong) { font-size: 11px; }
  #goalPerformance .gp-day small { font-size: 10px; }
  #goalPerformance .gp-actions { gap: 6px; }
  #goalPerformance .gp-history-wrap { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  #goalPerformance .gp-history-wrap summary { min-height: 40px; }
  #goalPerformance .gp-history-row button { min-height: 36px; }
  #goalPerformance .gp-sales-head { align-items: flex-start; }
  #goalPerformance .gp-sales-head :is(h3, h4) { font-size: 14px; }
  #goalPerformance .gp-sales-table :is(th, td) { padding: 8px 6px; font-size: 12px; }
  #goalPerformance .gp-sales-table thead th,
  #goalPerformance .gp-sales-table tbody th { font-size: 11px; }
  #goalPerformance .gp-sales-table small { margin-left: 1px; font-size: 10px; }
  #goalPerformance .gp-contracts > summary { min-height: 42px; padding: 10px; }
  #goalPerformance .gp-contract-list { padding: 0 10px; }
  #goalPerformance .gp-contract-row { flex-direction: column; align-items: stretch; gap: 7px; }
  #goalPerformanceDialog.goal-performance-dialog { padding: 17px; max-height: 91dvh; }
  #goalPerformanceDialog .gp-dialog-head { margin-bottom: 13px; }
  #goalPerformanceDialog .gp-dialog-head h2 { font-size: 19px; }
  #goalPerformanceDialog .gp-form-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  #goalPerformanceDialog .gp-salary-calculator { padding: 10px; }
  #goalPerformanceDialog .gp-salary-fields { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  #goalPerformanceDialog :is(input, select, textarea) { min-height: 44px; font-size: 16px; }
  #goalPerformanceDialog input[type="checkbox"] { min-height: 18px; }
  #goalPerformanceDialog .gp-opening-table fieldset,
  #goalPerformanceDialog .gp-baseline-fields { padding: 10px; }
  #goalPerformanceDialog .gp-form-actions { bottom: -17px; margin: 16px -17px -17px; padding: 11px 17px; }
  #goalPerformanceDialog .gp-form-actions button { min-height: 44px; }
}

/* A separate, native disclosure keeps the dashboard out of the monthly goal card. */
@media screen {
 #goalsView .home-performance-section { min-width:0; margin:0 0 25px; }
 #goalsView .performance-panel { border:1px solid #dcd8cf; border-radius:12px; background:#fff; color:#304158; box-shadow:0 5px 19px #00000012; }
 #goalsView .performance-panel > .performance-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; list-style:none; min-height:67px; padding:14px 18px; border-radius:12px; }
 #goalsView .performance-panel-title { display:flex; align-items:center; flex-wrap:wrap; gap:5px 14px; min-width:0; }
 #goalsView .performance-panel-title strong { font-size:16px; font-weight:750; color:#2c3c51; }
 #goalsView .performance-panel-title small { font-size:12px; line-height:1.6; color:#68758a; word-break:keep-all; }
 #goalsView .performance-panel > .performance-panel-heading { border-radius:12px 12px 0 0; border-bottom:1px solid #e8e6df; }
 #goalsView .performance-panel-body { min-width:0; padding:16px 18px 18px; }
 #goalsView .performance-month-row { display:flex; align-items:center; flex-wrap:wrap; gap:9px 16px; margin-bottom:13px; }
 #goalsView .performance-month-row label { display:flex; align-items:center; gap:9px; margin:0; color:#536176; font-size:12px; font-weight:650; }
 #goalsView .performance-month-row input { width:145px; min-height:36px; margin:0; padding:6px 8px; font-size:13px; color:#34445b; background:#fff; border:1px solid #d5dce5; border-radius:7px; }
 #goalsView .performance-month-row > small { color:#758095; font-size:11px; }
 #goalsView .performance-panel #goalPerformance { border-top:0; padding-top:0; }
}
@media screen and (max-width:620px) {
 #goalsView .home-performance-section { margin-bottom:21px; }
 #goalsView .performance-panel > .performance-panel-heading { padding:12px 14px; }
 #goalsView .performance-panel-title { flex-direction:column; align-items:flex-start; gap:3px; }
 #goalsView .performance-panel-title strong { font-size:15px; }
 #goalsView .performance-panel-title small { font-size:11px; }
 #goalsView .performance-panel-body { padding:13px 14px 14px; }
 #goalsView .performance-month-row input { min-height:40px; font-size:16px; }
}

/* Direct W entry and separate monthly life/nonlife totals. */
@media screen {
  #goalPerformance .gp-w-input { display:inline-flex; align-items:center; gap:7px; margin:0; color:#7b5d29; font-size:21px; font-weight:750; }
  #goalPerformance #gpWValue { box-sizing:border-box; width:100px; min-width:0; min-height:38px; margin:0; padding:5px 8px; border:1px solid #cab78e; border-radius:7px; background:#fffcf5; color:#755725; font:inherit; font-size:21px; font-weight:750; text-align:center; font-variant-numeric:tabular-nums; }
  #goalPerformance #gpWSave { background:#927039; border-color:#927039; color:#fff; }
  #goalPerformance #gpWValue:focus-visible { outline:3px solid #bf9c58; outline-offset:2px; }
  #goalPerformance #gpInlineMessage { grid-column:1 / -1; margin:7px 0; color:#9b4837; font-size:12px; line-height:1.6; }
  #goalPerformance #gpInlineMessage:empty { display:none; }
  #goalPerformance button.gp-day { min-height:73px; padding:7px 3px; font-weight:500; cursor:pointer; }
  #goalPerformance button.gp-day[aria-pressed="true"] { background:#f8eed7; border-color:#b39150; box-shadow:inset 0 -2px #c7a56b; }
  #goalPerformance button.gp-day:disabled { background:#f4f5f7; border-color:#e6e9ee; box-shadow:none; cursor:default; color:#94a0ae; }
  #goalPerformance button.gp-day:disabled :is(small,b) { color:#94a0ae; }
  #goalPerformance .gp-sales-cards { display:flex; flex-direction:column; gap:12px; min-width:0; }
  #goalPerformance .gp-sales-card { min-width:0; padding:13px 15px; border:1px solid #dce3eb; border-left:3px solid #9cb5bb; border-radius:9px; background:#fff; }
  #goalPerformance .gp-sales-card[data-gp-type="nonlife"] { border-left-color:#bda36d; }
  #goalPerformance .gp-sales-card-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:7px 10px; margin-bottom:6px; }
  #goalPerformance .gp-sales-card-head :is(h4,strong) { margin:0; color:#304158; font-size:15px; font-weight:750; }
  #goalPerformance .gp-sales-card-head button { min-height:32px; padding:5px 10px; }
  #goalPerformance .gp-sales-values { display:flex; flex-direction:column; gap:0; min-width:0; margin:0; }
  #goalPerformance .gp-sales-values > div { display:flex; align-items:baseline; justify-content:space-between; gap:9px; min-width:0; padding:5px 0; border-top:1px solid #edf0f4; }
  #goalPerformance .gp-sales-values :is(dt,span) { color:#6a7789; font-size:12px; font-weight:500; }
  #goalPerformance .gp-sales-values :is(dd,strong,b) { margin:0; color:#35465e; font-size:14px; font-weight:700; text-align:right; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
  #goalPerformance .gp-sales-total { margin-top:12px; padding:13px 15px; border:1px solid #e3d4b4; border-radius:9px; background:#fcf7eb; }
  #goalPerformance .gp-sales-total :is(h4,h5) { margin:0 0 6px; color:#775827; font-size:15px; font-weight:750; }
  #goalPerformance .gp-sales-total .gp-sales-values > div { border-color:#ece1c9; }
  #goalPerformance .gp-sales-total .gp-sales-values :is(dd,strong,b) { color:#755622; }
  #goalPerformanceDialog .gp-legacy-settings { margin-top:14px; border:1px solid #e0e5eb; border-radius:8px; }
  #goalPerformanceDialog .gp-legacy-settings > summary { padding:10px 12px; color:#58677d; font-size:13px; font-weight:650; cursor:pointer; }
  #goalPerformanceDialog .gp-legacy-settings .gp-baseline-fields { margin:0; border:0; }
}
@media screen and (max-width:620px) {
  #goalPerformance .gp-w-input { font-size:20px; }
  #goalPerformance #gpWValue { min-height:42px; width:94px; font-size:20px; }
  #goalPerformance #gpWSave { min-height:42px; }
  #goalPerformance button.gp-day { min-height:68px; padding:6px 1px; }
  #goalPerformance .gp-sales-card, #goalPerformance .gp-sales-total { padding:11px 12px; }
  #goalPerformance .gp-sales-card-head button { min-height:40px; }
  #goalPerformance .gp-sales-values :is(dd,strong,b) { font-size:14px; }
}

/* One small annual no-count record, editable independently of W. */
@media screen {
  #goalPerformance .gp-nocount-record { margin-top:13px; padding:12px; border:1px solid #e1d8c4; border-radius:8px; background:#fffcf6; }
  #goalPerformance .gp-nocount-controls { display:flex; align-items:center; flex-wrap:wrap; gap:7px; }
  #goalPerformance .gp-history-wrap > details:only-child { grid-column:1 / -1; }
  #goalPerformance .gp-nocount-record :is(h4,h5) { margin:0 0 7px; color:#735a2d; font-size:13px; font-weight:750; }
  #goalPerformance .gp-nocount-input { display:inline-flex; align-items:center; flex-wrap:wrap; gap:6px; margin:0 8px 0 0; color:#536176; font-size:12px; }
  #goalPerformance #gpNoCountValue { box-sizing:border-box; width:58px; min-width:0; min-height:36px; margin:0; padding:6px 5px; border:1px solid #ccb990; border-radius:6px; background:#fff; color:#705325; font-size:16px; font-weight:700; text-align:center; font-variant-numeric:tabular-nums; }
  #goalPerformance #gpNoCountValue:focus-visible { outline:3px solid #bf9c58; outline-offset:2px; }
  #goalPerformance .gp-nocount-record .gp-actions { margin-top:9px; }
  #goalPerformance .gp-nocount-record .gp-help { margin:7px 0 0; font-size:11px; }
  #goalPerformance #gpNoCountAdd { background:#927039; border-color:#927039; color:#fff; }
  #goalPerformance #gpNoCountCancel { border-color:#dec9bc; color:#95553d; background:#fff; }
  #goalPerformance .gp-nocount-manual { margin-top:9px;border-top:1px solid #e7ddc9;padding-top:6px; }
  #goalPerformance .gp-nocount-manual>summary { cursor:pointer;font-size:11px;color:#8c7855;line-height:1.7;padding:3px 0; }
  #goalPerformance .gp-nocount-manual .gp-nocount-controls { margin-top:7px; }
}
@media screen and (max-width:620px) {
  #goalPerformance .gp-nocount-record { padding:10px; }
  #goalPerformance #gpNoCountValue { min-height:40px; }
  #goalPerformance .gp-w-rules { grid-template-columns:1fr;gap:5px; }
  #goalPerformance .gp-w-rules>span { display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:3px 7px;padding:7px 9px;font-size:12px; }
}

/* Preserve older totals without interrupting new contract entry. */
@media screen {
  #goalPerformance .gp-preserved-sales { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; padding:12px 14px; margin:0 0 12px; border:1px solid #ddcfaf; border-radius:9px; background:#fffaf0; }
  #goalPerformance .gp-preserved-sales > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 12px; min-width:0; }
  #goalPerformance .gp-preserved-sales strong { color:#735a2d; font-size:13px; }
  #goalPerformance .gp-preserved-sales span { color:#33435a; font-size:13px; font-weight:700; }
  #goalPerformance .gp-preserved-sales small { flex-basis:100%; color:#6b6a63; font-size:11px; }
  #goalPerformance .gp-partial-label { display:block; font-size:10px; color:#7b7468; font-weight:500; }
  #goalPerformance .gp-partial-note { color:#756344; }
  #goalPerformanceDialog .gp-allocation-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
  #goalPerformanceDialog .gp-allocation-shortcuts button { min-height:40px; padding:8px 13px; border:1px solid #cbb68b; border-radius:7px; color:#6e5427; background:#fffbf3; font-weight:650; }
}
