/* iOS 18 grouped surfaces for live class economics, approvals and their dialogs. */
.op-page { --op-blue: #007aff; --op-green: #168064; --op-text: #1c1c1e; --op-secondary: #63636b; --op-line: #e5e5ea; color: var(--op-text); min-width: 0; animation: op-enter 220ms ease-out both; }
.op-page .page-head { align-items: flex-start; margin-bottom: 26px; }
.op-page .page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: -.8px; color: #1c1c1e; }
.op-page .page-head p { max-width: 880px; line-height: 1.8; font-size: 13px; color: #63636b; margin-top: 9px; }
.op-page .panel,.op-profit-panel,.op-reconcile,.op-settings-card { border: 1px solid #e8e8ed; border-radius: 20px; background: #fff; box-shadow: 0 2px 8px #17244003; overflow: hidden; }
.op-page .panel { margin-bottom: 22px; }
.op-page .panel-head { padding: 25px 26px 20px; align-items: flex-start; }
.op-page .panel-head h2 { font-size: 18px; font-weight: 650; letter-spacing: -.3px; color: #26262c; }
.op-page .panel-head small { max-width: 760px; line-height: 1.8; font-size: 12px; color: #74747d; margin-top: 7px; }
.op-page .notice { padding: 16px 18px; border-radius: 13px; margin-bottom: 20px; font-size: 12px; line-height: 1.8; color: #97723b; background: #fff7e8; }
.op-page .notice.info { background: #edf5ff; color: #4d719b; }
.op-page .notice .icon { width: 18px; height: 18px; margin-top: 2px; }
.op-page button { min-height: 40px; border-radius: 10px; font-size: 13px; transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease; }
.op-page button:active { transform: scale(.98); }
.op-page button.primary { background: #007aff; border-color: #007aff; color: #fff; }
.op-page button.primary:hover { background: #006be0; border-color: #006be0; }
.op-page button.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.op-page .badge { border-radius: 7px; padding: 5px 8px; font-size: 11px; line-height: 1.5; }
.op-page .badge.green { color: #318262; background: #edf7f0; }
.op-page .badge.orange { color: #9e773b; background: #fff6e5; }
.op-page .badge.gray { color: #797982; background: #f1f1f5; }
.op-page .badge.purple { color: #8071a8; background: #f3f0fa; }
.op-page .filters { padding: 0 26px 20px; gap: 12px; }
.op-page .filters select,.op-page .filters input { height: 42px; border-radius: 10px; border: 1px solid #e3e3e9; background: #fff; font-size: 13px; color: #4a4a53; }
.op-page .op-table { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.op-table table { font-size: 14px; }
.op-table th { padding: 14px 23px; font-size: 12px; color: #73737d; background: #fafafd; border-bottom: 1px solid #ededf2; font-weight: 500; }
.op-table td { padding: 19px 23px; font-size: 14px; vertical-align: middle; color: #44444e; border-bottom: 1px solid #efeff4; line-height: 1.7; font-variant-numeric: tabular-nums; }
.op-table td small { font-size: 12px; line-height: 1.7; color: #777781; margin-top: 5px; }
.op-table tbody tr { transition: background-color 180ms ease; }
.op-table tbody tr:hover { background: #fafbfd; }
.op-wrap { white-space: normal; min-width: 170px; max-width: 350px; line-height: 1.8; overflow-wrap: anywhere; }
.op-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.op-row-actions button { white-space: nowrap; }
.op-page [data-action="op-review-request"] { color: #007aff; background: #edf5ff; border-color: #e4efff; }
.op-class-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 26px; }
.op-class-heading { display: flex; align-items: center; gap: 15px; min-width: 0; }
.op-class-heading .class-symbol { width: 46px; height: 46px; border-radius: 13px; color: #168064; background: #eaf5ef; flex-shrink: 0; }
.op-class-heading .class-symbol .icon { width: 25px; height: 25px; }
.op-class-copy { min-width: 0; }
.op-class-picker { display: block; max-width: 100%; }
.op-class-picker select { font-family: inherit; font-size: 19px; font-weight: 650; color: #25252b; border: 0; background-color: transparent; padding: 4px 28px 4px 0; max-width: 100%; min-height: 38px; letter-spacing: -.3px; cursor: pointer; }
.op-class-heading p { display: flex; gap: 9px; align-items: center; margin-top: 5px; font-size: 12px; color: #74747d; line-height: 1.8; }
.op-class-heading p span { color: #b8b8c0; }
.op-class-counts { display: flex; align-items: center; gap: 30px; flex-shrink: 0; }
.op-class-counts>span { font-size: 12px; color: #73737e; }
.op-class-counts strong { display: block; font-size: 28px; font-weight: 600; color: #303037; margin-bottom: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.op-class-counts em { font-size: 12px; color: #777781; font-style: normal; font-weight: 400; margin-left: 5px; }
.op-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 23px; }
.op-metric { border: 1px solid #e8e8ee; background: #fff; border-radius: 18px; padding: 21px 22px; min-width: 0; box-shadow: 0 2px 8px #17244003; }
.op-metric-label { color: #6e6e78; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.op-metric-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: #588dce; background: #f0f5fd; flex-shrink: 0; }
.op-metric-icon .icon { width: 17px; height: 17px; }
.op-metric-value { font-size: 31px; line-height: 1.25; font-weight: 650; letter-spacing: -.8px; font-variant-numeric: tabular-nums; margin: 15px 0 10px; color: #292930; overflow-wrap: anywhere; }
.op-metric-value em { font-style: normal; font-weight: 400; font-size: 12px; color: #74747d; margin-left: 6px; }
.op-metric small { display: block; font-size: 12px; line-height: 1.8; color: #74747e; }
.op-metric.is-warning .op-metric-value { color: #a27b3a; font-size: 28px; }
.op-metric.is-warning .op-metric-icon { background: #fff7e7; color: #ac8648; }
.op-metric.is-green .op-metric-value { color: #168064; }
.op-metric.is-green .op-metric-icon { background: #edf7f1; color: #168064; }
.op-profit-layout { display: grid; grid-template-columns: minmax(0,1.12fr) minmax(300px,.88fr); gap: 22px; margin-bottom: 24px; }
.op-profit-panel,.op-reconcile { padding: 25px 26px; }
.op-panel-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.op-profit-panel h2,.op-reconcile h3 { font-size: 17px; font-weight: 650; letter-spacing: -.2px; margin: 0; color: #303037; }
.op-profit-panel p { font-size: 13px; line-height: 1.9; color: #686872; }
.op-profit-panel>button { margin-top: 19px; }
.op-profit-panel ul { padding: 13px 16px 13px 31px; border-radius: 12px; background: #fff9ee; font-size: 12px; line-height: 1.9; color: #9b793d; margin: 16px 0 0; }
.op-profit-panel ul li+li { margin-top: 4px; }
.op-formula { margin-top: 22px; padding-top: 17px; border-top: 1px solid #ededf2; }
.op-formula strong { font-size: 12px; font-weight: 600; color: #55695e; display: block; margin-bottom: 7px; }
.op-formula p { font-size: 12px; color: #74747e; }
.op-reconcile h3 { margin-bottom: 11px; }
.op-reconcile-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid #efeff4; font-size: 13px; color: #70707a; }
.op-reconcile-row strong { font-size: 15px; font-weight: 550; color: #414149; white-space: nowrap; font-variant-numeric: tabular-nums; }
.op-reconcile-row.is-total { border: 0; padding: 15px 13px; border-radius: 11px; background: #f5f7f7; margin-top: 13px; }
.op-reconcile-row.is-total strong { font-size: 21px; color: #3d6452; letter-spacing: -.4px; }
.op-reconcile p { margin-top: 14px; font-size: 12px; color: #767680; line-height: 1.9; }
.op-tabs { display: inline-flex; max-width: 100%; gap: 4px; padding: 4px; border-radius: 12px; background: #eaeaef; margin-bottom: 23px; overflow-x: auto; scrollbar-width: none; }
.op-tabs button { flex-shrink: 0; min-height: 37px; border: 0; border-radius: 9px; padding: 9px 17px; background: transparent; font-size: 13px; color: #696973; white-space: nowrap; }
.op-tabs button:hover { background: #ffffff75; }
.op-tabs button.active { background: #fff; color: #007aff; box-shadow: 0 2px 5px #121a3510; font-weight: 600; }
.op-settings { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; margin-bottom: 22px; }
.op-settings-card { padding: 25px 26px; }
.op-settings-card h3 { font-size: 17px; font-weight: 600; margin: 0 0 16px; color: #303038; }
.op-settings-card p { font-size: 13px; line-height: 1.9; color: #6b6b76; margin-bottom: 18px; }
.op-rate-value { font-size: 30px; font-weight: 650; color: #3d6251; letter-spacing: -.6px; margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.op-rate-value small { font-size: 12px; font-weight: 400; margin-left: 6px; color: #74747d; }
.op-muted { color: #797983; font-size: 12px; }
.op-empty { padding: 45px 25px; color: #777781; text-align: center; line-height: 1.9; font-size: 14px; }
.op-page .footer { color: #7d7d88; font-size: 11px; line-height: 1.8; }
.op-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Scoped dialog styling keeps the shared shell and its behavior unchanged. */
.modal.op-modal { width: 640px; max-width: 100%; border-radius: 24px; background: #fff; box-shadow: 0 20px 80px #14233b25; animation: op-dialog-enter 220ms cubic-bezier(.2,.75,.25,1) both; }
.op-modal .modal-head { padding: 25px 28px 21px; border-color: #ededf2; }
.op-modal .modal-head h2 { font-size: 22px; font-weight: 650; letter-spacing: -.4px; line-height: 1.5; color: #232329; }
.op-modal .modal-head button { color: #7d7d88; background: #f1f1f6; border-radius: 50%; padding: 6px; }
.op-modal .modal-body { padding: 25px 28px; }
.op-modal .modal-foot { padding: 20px 28px; gap: 11px; border-color: #ededf2; }
.op-modal .modal-foot button { min-height: 44px; font-size: 14px; border-radius: 11px; padding: 11px 18px; }
.op-modal .modal-foot button.primary { background: #007aff; border-color: #007aff; color: #fff; }
.op-modal .modal-foot button.primary:hover { background: #006bdf; }
.op-form .notice { padding: 16px 17px; border-radius: 13px; margin-bottom: 21px; background: #fff8eb; color: #96753d; font-size: 12px; line-height: 1.9; }
.op-form .notice.info { background: #eef5ff; color: #53749a; }
.op-form .notice .icon { width: 18px; height: 18px; margin-top: 2px; }
.op-form .form-grid { gap: 20px; }
.op-form .field { font-size: 14px; font-weight: 500; gap: 9px; color: #4c4c56; }
.op-form input,.op-form select,.op-form textarea { width: 100%; border: 1px solid #dedee6; border-radius: 11px; background: #fff; color: #3f3f49; font-size: 14px; font-weight: 400; padding: 12px 13px; line-height: 1.5; min-height: 46px; transition: border-color 180ms ease, box-shadow 180ms ease; }
.op-form textarea { min-height: 100px; }
.op-form input::placeholder,.op-form textarea::placeholder { color: #9696a0; }
.op-form input:focus,.op-form select:focus,.op-form textarea:focus { border-color: #74aeed; box-shadow: 0 0 0 3px #007aff10; }
.op-form .field small { font-size: 12px; font-weight: 400; line-height: 1.8; color: #73737e; }
.op-form .check { display: flex; align-items: flex-start; gap: 10px; padding: 14px 15px; border-radius: 12px; background: #f7f8fb; font-size: 13px; font-weight: 400; line-height: 1.9; color: #6d6d77; }
.op-form .check input { width: 18px; height: 18px; min-height: 0; padding: 0; flex-shrink: 0; margin-top: 3px; accent-color: #007aff; }
.op-form .check span { min-width: 0; }
.op-form-detail { padding: 18px; border: 1px solid #eeeef3; border-radius: 14px; background: #f7f7fb; margin-bottom: 22px; font-size: 13px; line-height: 1.9; color: #4e4e58; }
.op-form-detail dl { display: grid; grid-template-columns: 102px minmax(0,1fr); gap: 11px 16px; margin: 0; }
.op-form-detail dt { font-size: 12px; color: #797983; }
.op-form-detail dd { margin: 0; overflow-wrap: anywhere; color: #474751; font-variant-numeric: tabular-nums; }
.op-inline-preview { font-size: 13px; color: #427860; line-height: 1.9; padding: 16px 18px; margin-top: 20px; border: 1px solid #e0ede5; border-radius: 13px; background: #f1f8f3; }
.op-inline-preview.is-error { color: #9b713b; background: #fff7e9; border-color: #f0e2c8; }
.op-form .op-hidden { display: none; }
@keyframes op-enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes op-dialog-enter { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media(max-width:1100px) {
  .op-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .op-profit-layout { grid-template-columns: 1fr 1fr; gap: 18px; }
  .op-class-counts { gap: 20px; }
  .op-class-counts>span:last-child { padding-left: 20px; border-left: 1px solid #ededf2; }
  .op-class-bar { flex-wrap: wrap; gap: 22px; }
}
@media(max-width:760px) {
  .op-page .page-head { margin-bottom: 22px; }
  .op-page .page-head h1 { font-size: 29px; }
  .op-page .page-head p { font-size: 12px; max-width: none; line-height: 1.9; }
  .op-page .panel-head { padding: 21px 19px 18px; flex-wrap: wrap; gap: 15px; }
  .op-page .panel-head h2 { font-size: 17px; }
  .op-page .panel-head small { font-size: 12px; }
  .op-page .panel-head>.actions { flex-wrap: wrap; width: 100%; }
  .op-page .panel-head .actions button { min-height: 42px; }
  .op-page .filters { padding: 0 19px 18px; }
  .op-page .filters>* { flex: 1; min-width: 0; }
  .op-class-bar { padding: 20px; gap: 19px; }
  .op-class-heading { width: 100%; gap: 12px; }
  .op-class-heading .class-symbol { width: 41px; height: 41px; }
  .op-class-picker select { font-size: 17px; width: 100%; min-width: 0; }
  .op-class-copy { flex: 1; }
  .op-class-heading p { font-size: 12px; }
  .op-class-counts { gap: 0; width: 100%; padding-top: 18px; border-top: 1px solid #ededf2; justify-content: space-between; }
  .op-class-counts>span { font-size: 11px; }
  .op-class-counts>span:last-child { border: 0; padding-left: 0; }
  .op-class-counts strong { font-size: 25px; }
  .op-class-counts em { font-size: 11px; }
  .op-metrics { gap: 11px; margin-bottom: 20px; }
  .op-metric { padding: 17px 16px; border-radius: 17px; }
  .op-metric-label { font-size: 12px; align-items: flex-start; }
  .op-metric-icon { width: 24px; height: 24px; border-radius: 7px; }
  .op-metric-icon .icon { width: 15px; height: 15px; }
  .op-metric-value { font-size: 26px; margin: 13px 0 9px; }
  .op-metric.is-warning .op-metric-value { font-size: 25px; }
  .op-metric small { font-size: 11px; }
  .op-profit-layout { grid-template-columns: 1fr; gap: 17px; margin-bottom: 21px; }
  .op-profit-panel,.op-reconcile,.op-settings-card { padding: 22px 20px; border-radius: 18px; }
  .op-profit-panel p { font-size: 13px; }
  .op-panel-title { flex-wrap: wrap; }
  .op-reconcile-row { font-size: 12px; }
  .op-reconcile-row strong { font-size: 14px; }
  .op-reconcile-row.is-total strong { font-size: 20px; }
  .op-settings { grid-template-columns: 1fr; gap: 17px; margin-bottom: 20px; }
  .op-tabs { display: flex; margin-bottom: 20px; }
  .op-tabs button { font-size: 12px; padding: 9px 12px; min-height: 40px; }
  .op-table th { padding: 13px 19px; font-size: 12px; }
  .op-table td { padding: 17px 19px; font-size: 13px; }
  .op-table td small { font-size: 12px; }
  .op-row-actions button { min-height: 40px; }
  .op-page .footer { display: block; font-size: 11px; }
  .op-page .footer span { display: block; }
  .modal.op-modal { border-radius: 22px; max-height: 94dvh; }
  .op-modal .modal-head { padding: 22px 21px 18px; }
  .op-modal .modal-head h2 { font-size: 20px; }
  .op-modal .modal-body { padding: 22px 21px; }
  .op-modal .modal-foot { padding: 17px 21px; }
  .op-modal .modal-foot button { min-height: 45px; padding: 11px 15px; }
  .op-form .form-grid { grid-template-columns: 1fr; gap: 18px; }
  .op-form input:not([type="checkbox"]),.op-form select,.op-form textarea { font-size: 16px; }
  .op-form-detail { padding: 16px; }
  .op-form-detail dl { grid-template-columns: 83px minmax(0,1fr); gap: 9px 12px; }
  .op-form .check { font-size: 12px; }
}
@media(prefers-reduced-motion:reduce) {
  .op-page,.modal.op-modal { animation: none; }
  .op-page button,.op-table tbody tr,.op-form input,.op-form select,.op-form textarea { transition: none; }
}
