:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #13213a; background: #f7f9fc; font-size: 14px;
  --teal: #00949c; --teal-dark: #007b83; --border: #e4eaf2; --muted: #71809a;
}
* { box-sizing: border-box; }
body { margin: 0; }
button,input,select,textarea { font: inherit; }
button,a,input,select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: #007e91; text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible,a:focus-visible { outline: 3px solid #79d4d9; outline-offset: 3px; }
input,select,textarea { color: #22314b; background: #fff; border: 1px solid #dbe3ee; border-radius: 8px; padding: 11px 12px; min-width: 0; }
input:focus,select:focus,textarea:focus { outline: 2px solid #68c9d0; outline-offset: 1px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--teal); padding: 0; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 600; color: #35445e; }
label small { font-weight: 400; }
small { font-size: 11px; }
.hidden { display: none !important; }
.icon { width: 19px; height: 19px; flex-shrink: 0; vertical-align: middle; }
.brand { display: flex; align-items: center; gap: 10px; color: #101b32; font-size: 26px; letter-spacing: -.9px; text-decoration: none !important; }
.brand-arrow { font-size: 42px; color: var(--teal); font-weight: 800; line-height: 1; }
.boot { padding: 15vh 10vw; }
.boot p { color: var(--muted); }
.workspace { display: flex; min-height: 100vh; }
.sidebar { width: 215px; min-width: 215px; padding: 23px 12px 16px; border-right: 1px solid var(--border); background: #fcfdff; position: fixed; top: 0; bottom: 0; display: flex; flex-direction: column; z-index: 20; }
.sidebar .brand { padding: 0 11px; }
.sidebar-label { font-size: 9px; color: #9aa5b8; letter-spacing: 1.25px; font-weight: 700; margin: 44px 14px 14px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 14px; color: #344661; padding: 13px 14px; border: 0; background: transparent; border-radius: 9px; text-align: left; font-weight: 500; margin: 3px 0; white-space: nowrap; }
.nav-item .icon { color: #687b95; width: 21px; height: 21px; }
.nav-item.active { background: #e6f6f7; color: #00868f; font-weight: 700; }
.nav-item.active .icon { color: #0098a2; }
.nav-item:hover { background: #eef4f8; }
.sidebar-bottom { margin-top: auto; }
.profile { border: 0; background: none; width: 100%; display: flex; align-items: center; gap: 10px; padding: 13px 10px; text-align: left; color: #3b4d67; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: #e5ecf4; color: #5d7793; display: inline-grid; place-items: center; font-weight: 600; flex-shrink: 0; }
.main-shell { flex: 1; min-width: 0; margin-left: 215px; }
.topbar { height: 50px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font-size: 12px; }
.topbar-label { color: #8c99ad; }
.topbar-right { display: flex; gap: 16px; align-items: center; }
#main { max-width: 1720px; margin: auto; padding: 22px 24px 50px; outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 2px 0 25px; }
.page-heading h1 { margin: 0 0 7px; font-size: 28px; letter-spacing: -.8px; font-weight: 720; }
.page-heading p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 13px; }
.heading-actions { display: flex; gap: 10px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; border: 1px solid var(--border); padding: 10px 15px; min-height: 40px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none !important; }
.button.primary { background: var(--teal); color: white; border-color: var(--teal); }
.button.primary:hover { background: var(--teal-dark); }
.button.secondary { background: white; color: #34445f; }
.button.secondary:hover { border-color: #a8c4d2; background: #fbfdff; }
.button.danger { background: #fff3f2; color: #b5443c; border-color: #f4d5d2; }
.button.small { min-height: 31px; padding: 6px 10px; font-size: 11px; }
.icon-button { display: inline-grid; place-items: center; border: 0; background: none; width: 32px; height: 32px; padding: 5px; border-radius: 6px; color: #7b8ba3; }
.icon-button:hover { background: #edf4f6; color: #007f8b; }
.quiet { color: var(--muted); font-weight: 400; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 11px; padding: 23px; margin-bottom: 20px; }
.panel h2 { font-size: 17px; margin: 0 0 8px; letter-spacing: -.3px; }
.panel p { color: var(--muted); line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 23px; }
.stat { background: white; border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 46px; height: 46px; border-radius: 50%; background: #eaf8f8; color: var(--teal); display: grid; place-items: center; }
.stat-icon .icon { width: 24px; height: 24px; }
.stat .quiet { font-size: 12px; display: block; margin-bottom: 5px; }
.stat strong { display: block; font-size: 27px; font-weight: 700; }
.notice { display: flex; align-items: flex-start; gap: 11px; border: 1px solid #d9eded; background: #eef9f9; color: #377581; border-radius: 9px; padding: 14px 16px; font-size: 12px; line-height: 1.6; margin: 15px 0; }
.notice.amber { background: #fff8e9; border-color: #f6e5bf; color: #997026; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 17px; }
.toolbar input { flex: 1; min-width: 180px; }
.toolbar select { max-width: 220px; font-size: 12px; }
.table-card { background: white; border: 1px solid var(--border); border-radius: 10px; overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { color: #7c8aa0; font-size: 11px; font-weight: 500; background: #fbfcfe; padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { font-size: 12px; padding: 12px 14px; border-bottom: 1px solid #edf1f6; vertical-align: middle; line-height: 1.5; }
tr:last-child td { border-bottom: 0; }
td small { display: block; color: #8592a7; line-height: 1.5; margin-top: 2px; }
td strong { color: #26364f; font-weight: 650; }
tbody tr:hover { background: #fcfdff; }
.table-title { font-weight: 600; color: #243951; font-size: 13px; }
.table-link { background: none; border: 0; padding: 0; color: #008995; text-align: left; font-weight: 600; }
.actions { display: flex; align-items: center; gap: 4px; }
.nowrap { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; padding: 5px 8px; font-size: 10px; line-height: 1.3; font-weight: 500; white-space: nowrap; background: #f1f4f8; color: #76869c; }
.dot { width: 6px; height: 6px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.badge.green { background: #eaf9ef; color: #1a9953; }
.badge.amber { background: #fff4df; color: #c0801b; }
.badge.blue { background: #eaf4ff; color: #328cd9; }
.badge.red { background: #fff0ee; color: #c25d54; }
.badge.teal { background: #e6f8f7; color: #008d96; }
.empty { padding: 65px 25px; text-align: center; background: white; }
.empty-icon { display: inline-grid; place-items: center; width: 55px; height: 55px; border-radius: 14px; color: var(--teal); background: #e9f8f8; }
.empty h3 { font-size: 16px; margin: 18px 0 6px; }
.empty p { color: var(--muted); line-height: 1.7; max-width: 450px; margin: 0 auto 20px; font-size: 12px; }
.skeleton { padding: 55px; text-align: center; color: var(--muted); }
.error-panel { padding: 25px; background: #fff5f2; border: 1px solid #f2d9d1; border-radius: 10px; color: #ad5a47; }
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 1000; display: grid; gap: 10px; max-width: 450px; }
.toast { padding: 15px 20px; border: 1px solid #cce8e5; background: #f1fffc; color: #2a766b; border-radius: 10px; box-shadow: 0 8px 30px #19335318; font-size: 12px; line-height: 1.7; }
.toast.error { background: #fff5f2; color: #ae574a; border-color: #efd6cf; }
dialog { width: min(94vw,520px); border: 1px solid var(--border); border-radius: 14px; padding: 32px; color: #1f304c; box-shadow: 0 20px 70px #152a3f25; }
dialog::backdrop { background: #16304b45; }
dialog.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; max-height: 100vh; height: 100vh; width: min(94vw,490px); border-radius: 0; padding: 35px 30px; }
.modal-close { position: absolute; top: 17px; right: 17px; }
dialog h2 { margin: 0 25px 7px 0; font-size: 23px; letter-spacing: -.6px; }
dialog p { color: var(--muted); line-height: 1.7; font-size: 12px; }
dialog form { display: grid; gap: 19px; margin-top: 23px; }
dialog form .button.primary { margin-top: 5px; }
.form-error { border: 1px solid #f1d8d4; border-radius: 7px; padding: 10px 12px; background: #fff5f2; color: #ab584a; font-size: 12px; line-height: 1.6; }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 10px; }
.secret-input { display: flex; border: 1px solid #dbe3ee; border-radius: 8px; align-items: center; }
.secret-input input { border: 0; flex: 1; width: 100%; }
.secret-input button { border: 0; background: none; color: #72839b; padding: 10px; }
.steps-instructions { display: grid; gap: 12px; padding: 18px 0; font-size: 12px; color: #687b93; }
.steps-instructions div { display: flex; align-items: center; gap: 10px; }
.step-number { width: 26px; height: 26px; border-radius: 50%; background: #eef4f8; display: inline-grid; place-items: center; color: #6f8198; flex-shrink: 0; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-story { padding: 9vh 6vw; background: #edf7f8; display: flex; flex-direction: column; }
.auth-story h1 { font-size: clamp(30px,3.3vw,52px); letter-spacing: -1.7px; line-height: 1.17; max-width: 530px; margin: 10vh 0 22px; }
.auth-story p { color: #617e8b; max-width: 450px; font-size: 15px; line-height: 1.8; }
.auth-points { display: grid; gap: 16px; margin-top: 20px; color: #407b82; font-size: 13px; }
.auth-points span { display: flex; gap: 12px; align-items: center; }
.auth-form-area { background: #fff; display: grid; place-items: center; padding: 40px; }
.auth-card { max-width: 370px; width: 100%; }
.auth-card h2 { font-size: 28px; letter-spacing: -.8px; margin: 0 0 10px; }
.auth-card p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-card form { display: grid; gap: 20px; margin-top: 27px; }
.auth-toggle { background: none; border: 0; padding: 0; color: #008d97; font-weight: 600; font-size: 12px; }
.auth-foot { margin-top: 24px; text-align: center; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; line-height: 1.6; }
.check-row input { margin-top: 2px; flex-shrink: 0; }
.schedule-scroll { overflow-x: auto; padding-bottom: 8px; }
.week-schedule { display: grid; grid-template-columns: 29px repeat(24,minmax(18px,1fr)); gap: 3px; min-width: 580px; margin: 20px 0 10px; user-select: none; touch-action: pan-y; }
.week-schedule .hour,.week-schedule .day { font-size: 10px; color: #7e8ca1; text-align: center; align-self: center; }
.week-schedule .day { text-align: left; }
.slot { height: 22px; padding: 0; border: 0; border-radius: 3px; background: #e5ebf2; }
.slot.active { background: #11afb2; }
.slot.hold { background: #f1f3f6; border: 1px dashed #c6d0de; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 11px; color: #8896ab; padding: 17px 4px; }
.pagination .actions { gap: 8px; }
.event-icon { width: 29px; height: 29px; border-radius: 50%; background: #eaf8f5; color: #129676; display: inline-grid; place-items: center; }
.event-icon.decrease { background: #fff0f1; color: #df6479; }
.event-icon.blocked,.event-icon.limit { background: #fff5e8; color: #d79431; }
.event-icon.schedule { background: #ecf2fe; color: #5c8bda; }
.event-cell { display: flex; align-items: flex-start; gap: 10px; min-width: 265px; }
.history-table td { padding: 12px 13px; font-size: 11px; }
.history-table .reason { color: #7a8ca7; max-width: 380px; }
.history-table td:last-child { min-width: 105px; }
.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 25px; }
.details-grid small { display: block; color: #8191a7; margin-bottom: 5px; }
.mini-check { display: inline-flex; align-items: center; gap: 5px; color: #7f8da4; }
.link-button { border: 0; background: none; padding: 0; color: #008a95; text-align: left; }
.note-list { color: #71849c; font-size: 12px; line-height: 1.8; }
@media(max-width:1150px) {
  .sidebar { width: 205px; min-width: 205px; }
  .main-shell { margin-left: 205px; }
  #main { padding: 24px 22px 50px; }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:800px) {
  .sidebar { width: 68px; min-width: 68px; padding: 21px 9px; }
  .sidebar .brand b,.sidebar-label,.nav-item>span,.profile>span:not(.avatar) { display: none; }
  .sidebar .brand { padding: 0 5px; }
  .sidebar nav { margin-top: 35px; }
  .nav-item { padding: 12px; }
  .main-shell { margin-left: 68px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 15px; }
  .topbar { padding: 0 20px; }
  .topbar-label { display: none; }
  .topbar-right { margin-left: auto; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-story { padding: 25px; }
  .auth-story h1,.auth-story>p,.auth-points { display: none; }
  .auth-form-area { padding: 35px 25px 70px; }
}
@media(max-width:500px) {
  #main { padding: 22px 14px 45px; }
  .stats { gap: 8px; }
  .stat { padding: 13px; gap: 9px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat strong { font-size: 22px; }
  .page-heading h1 { font-size: 24px; }
  .heading-actions { width: 100%; flex-wrap: wrap; }
  .heading-actions .button { flex: 1; font-size: 11px; }
  .panel { padding: 18px; }
  .field-grid,.mode-grid { grid-template-columns: 1fr; gap: 15px; }
  dialog.drawer { width: 100vw; padding: 28px 22px; }
}

/* One-page strategy workspace. Hour colours are repeated in the legend and labels. */
.strategy-identity { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 18px; }
.identity-fields { display: grid; grid-template-columns: minmax(220px,1.3fr) minmax(180px,1fr); gap: 20px; flex: 1; }
.strategy-live { display: grid; gap: 12px; min-width: 190px; }
.strategy-live>span { font-size: 20px; font-weight: 700; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.section-heading h2 { margin: 0; }
.section-heading>label { min-width: 210px; font-size: 11px; }
.section-heading p { margin: 8px 0 0; }
.listing-picker { margin-bottom: 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 5px; }
.tab { border: 0; border-radius: 8px; background: transparent; color: #63768e; padding: 11px 16px; font-weight: 600; }
.tab.selected { color: #007e87; background: #e6f6f7; }
.tab b { display: inline-block; margin-left: 8px; padding: 2px 7px; border-radius: 6px; background: #d4eeee; }
.save-status { color: #70839b; font-size: 11px; margin: 15px 0 0; line-height: 1.7; }
#listing-picker-body { margin-top: 15px; }
.schedule-panel { margin-bottom: 18px; }
.rule-palette { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 16px; }
.rule-chip { border: 1px solid currentColor; border-radius: 8px; padding: 11px 16px; font-size: 12px; background: #fff; font-weight: 600; }
.rule-chip.minimum,.rule-key.minimum { color: #697b94; background: #f1f4f8; }
.rule-chip.fixed,.rule-key.fixed { color: #068698; background: #e8f9fc; }
.rule-chip.top3,.rule-key.top3 { color: #c34068; background: #fff0f5; }
.rule-chip.top10,.rule-key.top10 { color: #b26813; background: #fff3df; }
.rule-chip.page,.rule-key.page { color: #3f76b5; background: #edf5ff; }
.rule-chip.range,.rule-key.range { color: #557c22; background: #f0f8e7; }
.rule-chip.hold,.rule-key.hold { color: #85909f; background: #f6f7fa; }
.rule-chip.quality,.rule-key.quality { color: #7f63be; background: #f5f0ff; }
.rule-chip.selected { box-shadow: 0 0 0 2px #fff,0 0 0 4px currentColor; }
.hour-rule-settings { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; background: #f8fafc; border: 1px solid var(--border); padding: 17px; border-radius: 9px; min-height: 94px; }
.hour-rule-settings label { font-size: 11px; width: 185px; }
.hour-rule-settings>.quiet { align-self: center; max-width: 280px; font-size: 12px; line-height: 1.7; }
.selection-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 20px 0 12px; font-size: 11px; color: #7c8da4; }
.selection-toolbar .button { font-size: 11px; padding: 7px 10px; }
.selection-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; padding: 10px 0; }
.selection-detail { display: block; color: #7789a0; line-height: 1.7; margin-top: 6px; }
.hourly-grid { grid-template-columns: 30px repeat(24,minmax(32px,1fr)); min-width: 930px; gap: 4px; }
.hourly-grid .hour,.hourly-grid .day { border: 0; background: none; padding: 5px 0; color: #64768e; }
.hourly-grid .day { font-weight: 650; }
.hourly-grid .slot { height: 36px; font-size: 9px; white-space: nowrap; border: 1px solid transparent; line-height: 1; }
.hourly-grid .slot.minimum { background: #edf1f6; color: #6c7c94; }
.hourly-grid .slot.fixed { background: #c8edf3; color: #126d7c; }
.hourly-grid .slot.top3 { background: #fbd7e4; color: #9d3154; }
.hourly-grid .slot.top10 { background: #fce1b8; color: #965c10; }
.hourly-grid .slot.page { background: #d4e6fb; color: #32689f; }
.hourly-grid .slot.range { background: #dcebc8; color: #547723; }
.hourly-grid .slot.quality { background: #e4d9f7; color: #7356ac; }
.hourly-grid .slot.hold { background: #fafbfc; color: #9ba7b6; border: 1px dashed #d5dde7; }
.hourly-grid .slot.chosen { outline: 2px solid #1d576a; outline-offset: -2px; box-shadow: inset 0 0 0 3px #ffffff80; }
.hourly-grid .slot:focus-visible { outline: 3px solid #122b46; outline-offset: 0; }
.schedule-help { color: #75859a; font-size: 11px; line-height: 1.8; margin-top: 8px; }
.hour-legend { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.rule-key { padding: 5px 9px; border-radius: 5px; font-size: 10px; }
.budget-details { margin-top: 18px; }
.budget-details summary { cursor: pointer; font-weight: 650; }
.strategy-savebar { position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: space-between; gap: 15px; align-items: center; background: #fffffff5; border: 1px solid var(--border); border-radius: 10px; padding: 16px 20px; box-shadow: 0 -5px 20px #19355308; margin: 20px 0; }
.strategy-history .section-heading { margin-bottom: 20px; }
.strategy-editor .page-heading { margin-bottom: 16px; }
.strategy-editor .page-heading h1 { font-size: 24px; }
.strategy-editor .panel { padding: 16px; margin-bottom: 14px; }
.strategy-editor label { gap: 5px; font-size: 12px; }
.strategy-editor input:not([type=checkbox]),.strategy-editor select { padding: 8px 10px; min-height: 36px; }
.strategy-editor .button { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.strategy-editor .section-heading { margin-bottom: 10px; gap: 12px; }
.strategy-editor .section-heading p { margin: 3px 0 0; font-size: 12px; }
.strategy-editor .strategy-live { gap: 5px; }
.strategy-editor .strategy-live>span { font-size: 18px; }
.strategy-editor .tab { padding: 8px 12px; min-height: 36px; }
.strategy-editor .save-status { margin: 8px 0; line-height: 1.5; }
.membership-warning { padding: 8px 10px; margin: 8px 0; border-radius: 6px; background: #fff8e9; color: #93671f; font-size: 11px; line-height: 1.6; }
.listing-picker .toolbar { gap: 8px; margin: 10px 0; }
.membership-bulk { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; font-size: 11px; color: #71809a; }
.membership-bulk b { color: #35445e; }
.picker-table { max-height: 320px; overflow: auto; scrollbar-gutter: stable; overscroll-behavior: contain; }
.picker-table:focus-visible { outline: 2px solid #79d4d9; outline-offset: 2px; }
.picker-table table { table-layout: fixed; min-width: 620px; }
.picker-table th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; padding: 6px 10px; }
.picker-table td { padding: 6px 10px; height: 52px; }
.picker-table .check-cell { width: 44px; padding: 0; }
.listing-check { display: flex; align-items: center; justify-content: center; min-height: 38px; cursor: pointer; }
.listing-check input { margin: 0; }
.picker-table th:nth-child(3) { width: 90px; }
.picker-table th:nth-child(4) { width: 150px; }
.picker-table .listing-title strong { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; font-size: 12px; }
.picker-table .listing-title small { white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 1px; }
.picker-table .member-row { background: #f0faf9; }
.listing-state { font-size: 11px; color: #398577; }
.listing-state.pending { color: #9b792c; }
.listing-picker .pagination { padding: 8px 0 0; }
.listing-picker .pagination .button { min-height: 30px; padding: 4px 10px; }
.listing-picker .empty { padding: 22px 12px; }
.strategy-editor .rule-palette { gap: 8px; margin: 12px 0; }
.strategy-editor .rule-chip { padding: 8px 12px; font-size: 12px; }
.strategy-editor .hour-rule-settings { padding: 10px 12px; min-height: 72px; gap: 12px; }
.strategy-editor .selection-toolbar { margin: 12px 0 4px; gap: 6px; }
.strategy-editor .selection-toolbar .button { min-height: 30px; padding: 6px 9px; font-size: 11px; }
.strategy-editor .selection-action { padding: 8px 0 2px; }
.strategy-editor .week-schedule { margin: 10px 0 4px; }
.strategy-editor .hourly-grid { grid-template-columns: 30px repeat(24,minmax(28px,1fr)); min-width: 820px; gap: 3px; }
.strategy-editor .hourly-grid .slot { height: 30px; }
.strategy-editor .schedule-help { margin-top: 4px; }
.strategy-editor .hour-legend { margin-top: 8px; }
.strategy-editor .field-grid { gap: 14px; margin: 14px 0; }
.strategy-editor .notice { padding: 10px 12px; margin: 10px 0; }
.strategy-editor .strategy-savebar { padding: 10px 14px; margin: 14px 0; }
.strategy-editor .strategy-history .section-heading { margin-bottom: 10px; }
.strategy-editor .strategy-history .empty { padding: 24px 12px; }
.readiness-link { display: block; margin-top: 5px; font-size: 11px; }
#position-source-notice { align-items: center; flex-wrap: wrap; }
#position-source-notice span { flex: 1; min-width: 200px; }
@media(max-width:1150px){ .strategy-identity { align-items: flex-start; } .identity-fields { grid-template-columns: 1fr; } }
@media(max-width:800px){ .strategy-identity,.section-heading { flex-direction: column; align-items: stretch; } .identity-fields { width: 100%; } .strategy-live { grid-template-columns: 1fr 1fr; align-items: center; } .strategy-live small { grid-column: 1/-1; } .section-heading>label { width: 100%; } .rule-chip { padding: 10px 12px; } }
@media(max-width:500px){ .rule-palette { gap: 9px; } .rule-chip { font-size: 11px; } .selection-action,.strategy-savebar { align-items: stretch; flex-direction: column; } .hour-rule-settings label { width: 100%; } .strategy-live { grid-template-columns: 1fr; } .tab { font-size: 11px; padding: 10px; } }
@media(max-width:800px){ .strategy-editor .strategy-identity { gap: 12px; } .picker-table { max-height: 285px; } }
@media(max-width:500px){ .strategy-editor .panel { padding: 12px; } .strategy-editor .button,.strategy-editor .tab { min-height: 40px; } .membership-bulk { align-items: stretch; flex-direction: column; } .membership-bulk .button { width: 100%; } .strategy-editor .strategy-savebar { gap: 8px; } }
/* Compact editor: prices remain readable; mode is carried by colour and tooltip. */
.strategy-editor .panel { padding: 14px; margin-bottom: 12px; }
.strategy-editor .identity-fields { gap: 12px; }
.strategy-editor .rule-palette { gap: 6px; margin: 10px 0; }
.strategy-editor .rule-chip { border-radius: 6px; padding: 6px 10px; min-height: 32px; font-size: 11px; }
.rule-chip.top3,.rule-key.top3,.hourly-grid .slot.top3 { color:#a33762; background:#fce0ec; border-color:#efafc9; }
.rule-chip.top10,.rule-key.top10,.hourly-grid .slot.top10 { color:#98521c; background:#ffe4cc; border-color:#efbe99; }
.rule-chip.page,.rule-key.page,.hourly-grid .slot.page { color:#8e711a; background:#fff2c9; border-color:#e8d58d; }
.rule-chip.fixed,.rule-key.fixed,.hourly-grid .slot.fixed { color:#176d7b; background:#daf3f5; border-color:#9cd6dd; }
.rule-chip.range,.rule-key.range,.hourly-grid .slot.range { color:#4e742e; background:#e5f1d5; border-color:#bdd69a; }
.rule-chip.quality,.rule-key.quality,.hourly-grid .slot.quality { color:#725096; background:#eee3f8; border-color:#ceb6e4; }
.strategy-editor .hour-rule-settings { min-height: 60px; padding: 8px 10px; gap: 10px; }
.strategy-editor .hour-rule-settings label { width: 155px; }
.strategy-editor .selection-toolbar { margin-top: 8px; }
.strategy-editor .hourly-grid { grid-template-columns: 29px repeat(24,minmax(30px,1fr)); min-width: 820px; gap: 3px; }
.strategy-editor .hourly-grid .slot { height: 28px; padding: 0 1px; border-radius: 4px; font-size: 10px; font-variant-numeric: tabular-nums; }
.hourly-grid .hour,.hourly-grid .day { min-height: 27px; cursor: pointer; border-radius: 4px; }
.hourly-grid .selected-axis { color:#087b85; background:#d7eff1; font-weight:700; box-shadow:inset 0 0 0 1px #80c3ca; }
.hourly-grid .slot.chosen { box-shadow:inset 0 0 0 2px #176874; outline: none; }
.listing-with-cover { display:flex; align-items:center; gap:9px; min-width:0; }
.listing-cover { display:block; width:44px; height:34px; flex:0 0 44px; object-fit:cover; border-radius:5px; background:#edf1f6; border:1px solid #e1e7ef; }
.no-cover { display:flex; align-items:center; justify-content:center; color:#a2afbd; }
.no-cover .icon { width:18px; height:18px; }
.listing-copy { min-width:0; }
.strategy-editor .picker-table td { height:46px; padding-top:4px; padding-bottom:4px; }
.strategy-editor .picker-table { max-height:280px; }
.strategy-editor .picker-table th:nth-child(4) { width:185px; }
.strategy-editor .budget-details p { font-size:11px; line-height:1.7; }
#transfer-confirm { border:1px solid #ead3a2; }
#transfer-confirm p { margin:6px 0 8px; }
.strategy-editor input[type=checkbox]:disabled { cursor:not-allowed; opacity:.45; }
@media(max-width:600px){ .strategy-editor .rule-chip { min-height:36px; padding:7px 10px; } .strategy-editor .hour-rule-settings label { width:calc(50% - 5px); } }
/* Direct-paint editor, bounded on wide desktops rather than stretched cells. */
.strategy-editor { max-width:1100px; margin-inline:auto; }
.strategy-editor .page-heading h1 { font-size:22px; }
.strategy-editor .panel { padding:12px; margin-bottom:10px; }
.strategy-editor .schedule-panel .section-heading { margin-bottom:6px; }
.strategy-editor .schedule-panel h2 { font-size:15px; }
.strategy-editor .schedule-panel .section-heading p { font-size:11px; }
.strategy-editor .rule-palette { margin:7px 0; gap:5px; }
.strategy-editor .rule-chip { min-height:28px; padding:5px 9px; font-size:11px; }
.strategy-editor .hour-rule-settings { background:transparent; border:0; padding:3px 0; min-height:0; gap:10px; align-items:center; }
.strategy-editor .hour-rule-settings label { display:flex; flex-direction:row; align-items:center; width:auto; gap:7px; white-space:nowrap; font-size:11px; }
.strategy-editor .hour-rule-settings input { width:100px; min-height:30px; height:30px; padding:4px 7px; }
.strategy-editor .hour-rule-settings>.quiet { max-width:none; font-size:11px; }
.strategy-editor .selection-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin:5px 0; }
.strategy-editor .selection-toolbar .button { min-height:26px; padding:4px 8px; font-size:10px; }
.strategy-editor .selection-toolbar #selected-hours { margin-left:auto; font-size:10px; }
.strategy-editor .hourly-grid { min-width:750px; grid-template-columns:26px repeat(24,minmax(28px,1fr)); gap:2px; margin:5px 0; }
.strategy-editor .hourly-grid .slot { height:24px; border-radius:3px; font-size:10px; }
.strategy-editor .hourly-grid .hour,.strategy-editor .hourly-grid .day { min-height:22px; height:22px; padding:1px; font-size:10px; }
.strategy-editor .schedule-help { font-size:10px; line-height:1.4; margin-top:5px; }
#schedule-save-state { color:#287970; }
.strategy-editor .compact-options .field-grid { margin:0; grid-template-columns:1fr 1fr; }
.date-input-row { display:flex; align-items:center; gap:4px; }
.date-input-row input { flex:1; min-width:0; }
.strategy-editor .date-input-row .button { min-height:30px; padding:3px 10px; }
@media(max-width:600px){ .strategy-editor .rule-chip { min-height:32px; } .strategy-editor .compact-options .field-grid { grid-template-columns:1fr; } .strategy-editor .hour-rule-settings { gap:7px; flex-wrap:wrap; } }

/* Search monitoring pilot */
.monitor-service{display:flex;gap:16px;align-items:center;margin:16px 0}.monitor-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,420px),1fr));gap:20px;margin:20px 0}.monitor-card{min-width:0}.monitor-card-head{display:flex;gap:12px;align-items:center;justify-content:space-between}.monitor-card h2{font-size:18px;margin:0 0 12px}.monitor-url{display:block;overflow-wrap:anywhere;font-size:13px}.monitor-ranks{display:flex;gap:24px;flex-wrap:wrap;margin:20px 0}.monitor-ranks small,.monitor-ranks strong{display:block}.monitor-ranks strong{font-size:24px;margin-top:6px}.monitor-card .actions{flex-wrap:wrap}.monitor-service span{overflow-wrap:anywhere}#monitor-form{display:grid;gap:16px}#monitor-form textarea{width:100%;font:inherit;padding:10px;border:1px solid #dce5e8;border-radius:8px}@media(max-width:600px){.monitor-service,.monitor-card-head{align-items:flex-start;flex-direction:column}}

/* Compact strategy audit log. */
.strategy-history{min-width:0}
.strategy-history .section-heading h2{margin-bottom:4px}
.strategy-history .section-heading p{margin:0;color:var(--muted)}
.log-legend{display:flex;flex-wrap:wrap;gap:10px 18px;padding:14px 0;border-bottom:1px solid var(--border);color:var(--muted);font-size:12px}
.log-legend span{display:inline-flex;align-items:center;gap:5px}
.log-legend .icon{width:17px;height:17px;padding:2px;background:#f6f6fa;border-radius:5px}
.log-toolbar{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;padding:16px 0}
.log-tabs{flex-wrap:wrap;background:#f6f6fa;border:1px solid #e9e9f1;border-radius:10px;padding:3px}
.log-tabs .tab{font-size:12px;padding:8px 12px;border-radius:7px}
.log-tabs .tab.selected{background:#7164dc;color:#fff;box-shadow:none}
.strategy-log-scroll{overflow-x:auto}
.strategy-log-table{width:100%;min-width:950px;border-collapse:collapse;font-size:12px}
.strategy-log-table th{font-size:10px;text-transform:uppercase;color:var(--muted);letter-spacing:.04em;padding:10px 8px;text-align:left;white-space:nowrap}
.strategy-log-table td{padding:10px 8px;border-top:1px solid #e6e6ed;vertical-align:top}
.strategy-log-table small{display:block;color:var(--muted);font-size:11px;line-height:1.5}
.strategy-log-table .log-time{width:90px;font-variant-numeric:tabular-nums}
.strategy-log-table .event-cell{align-items:flex-start;gap:8px}
.strategy-log-table .event-icon{flex-shrink:0;width:25px;height:25px;border-radius:7px;background:#f6f6fa;color:#606477}
.strategy-log-table .log-warning{background:#fff4de;color:#aa751e}
.strategy-log-table .log-title{display:block;color:#7164dc;font-weight:500;line-height:1.5;overflow-wrap:anywhere}
.strategy-log-table .log-strategy{font-size:10px;margin-bottom:2px}
.log-target{display:inline-block;padding:3px 7px;border-radius:5px;background:#f0eef9;color:#7164dc;white-space:nowrap}
.strategy-log-table .log-price{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
.log-applied{color:#16976a}
.strategy-log-table .log-error{color:#b95050}
.strategy-history .pagination{padding:16px 0 0;font-size:12px}
@media(max-width:700px){.log-toolbar>.actions{width:100%;justify-content:flex-end}.log-tabs .tab{padding:7px 8px}.log-legend{gap:8px}.strategy-history .pagination{gap:10px;flex-wrap:wrap}}

.rule-chip.minimum_plus,.rule-key.minimum_plus { color: #376b67; background: #eaf5f0; }
.hourly-grid .slot.minimum_plus { background: #eaf5f0; color: #376b67; }
