/* Portfolio Manager – scoped styles (everything lives under .pm-app / .pm-auth / .pm-modal) */
.pm-app, .pm-auth, .pm-modal-wrap, .pm-toasts {
  --pm-ink: #1f2933; --pm-muted: #6b7480; --pm-line: #e4e7eb; --pm-bg: #f6f7f9; --pm-card: #fff;
  --pm-dark: #3f4655; --pm-blue: #0d6efd; --pm-blue-d: #0b5ed7; --pm-green: #2e9e5b; --pm-red: #d9534f;
  --pm-amber: #ffc107; --pm-amber-bg: #fff4d6; --pm-pink: #f8d7da; --pm-input: #fff8e1;
  --pm-font: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", Arial, sans-serif;
  font-family: var(--pm-font); color: var(--pm-ink); line-height: 1.5; box-sizing: border-box;
}
.pm-app *, .pm-auth *, .pm-modal-wrap * { box-sizing: border-box; }
.pm-app { max-width: 100%; font-size: 14px; }
.pm-app.alignwide { width: 100%; }
.pm-app button, .pm-modal-wrap button, .pm-auth button { font-family: inherit; }
.pm-loading { padding: 48px; text-align: center; color: var(--pm-muted); }

/* header + tabs */
.pm-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: var(--pm-dark); color: #fff; padding: 12px 16px; border-radius: 10px 10px 0 0; }
.pm-top h2 { margin: 0; font-size: 20px; color: #fff; font-weight: 700; }
.pm-top .pm-user { font-size: 13px; opacity: .9; }
.pm-top .pm-user a { color: #9ec5fe; margin-inline-start: 10px; text-decoration: none; }
.pm-tabs { display: flex; gap: 2px; overflow-x: auto; background: var(--pm-dark); padding: 0 8px; border-radius: 0 0 10px 10px;
  scrollbar-width: thin; margin-bottom: 16px; }
.pm-tabs button { background: none; border: 0; color: #c9cfd8; padding: 10px 14px; font-size: 13px; cursor: pointer;
  border-bottom: 3px solid transparent; white-space: nowrap; }
.pm-tabs button:hover { color: #fff; }
.pm-tabs button.is-active { color: #fff; border-bottom-color: #6ea8fe; font-weight: 600; }

/* layout bits */
.pm-section { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: 10px; padding: 16px; margin-bottom: 16px; }
.pm-section > h3 { margin: 0 0 12px; font-size: 16px; }
.pm-sub { color: var(--pm-muted); font-size: 13px; margin: -6px 0 12px; }
.pm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pm-toolbar .pm-spacer { flex: 1; }
.pm-note { color: var(--pm-muted); font-size: 12px; }
.pm-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

.pm-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.pm-kpi { background: var(--pm-card); border: 1px solid var(--pm-line); border-radius: 10px; padding: 10px 12px; }
.pm-kpi .l { font-size: 12px; color: var(--pm-muted); }
.pm-kpi .v { font-size: 19px; font-weight: 700; direction: ltr; text-align: right; }
.pm-kpi.is-bad { border-color: var(--pm-red); background: #fff5f5; }
.pm-kpi.is-warn { border-color: var(--pm-amber); background: var(--pm-amber-bg); }

/* buttons */
.pm-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--pm-line); background: #fff; color: var(--pm-ink);
  border-radius: 8px; padding: 7px 12px; font-size: 13px; cursor: pointer; line-height: 1.2; }
.pm-btn:hover { background: #f1f3f5; }
.pm-btn.primary { background: var(--pm-blue); border-color: var(--pm-blue); color: #fff; }
.pm-btn.primary:hover { background: var(--pm-blue-d); }
.pm-btn.danger { color: var(--pm-red); border-color: #f1b0b7; }
.pm-btn.small { padding: 4px 8px; font-size: 12px; }
.pm-btn[disabled] { opacity: .55; cursor: default; }

/* tables */
.pm-table-wrap { overflow-x: auto; border: 1px solid var(--pm-line); border-radius: 8px; }
.pm-table { border-collapse: collapse; width: 100%; font-size: 13px; background: #fff; margin: 0; }
.pm-table th { unicode-bidi: plaintext; background: var(--pm-dark); color: #fff; font-weight: 600; font-size: 12px; padding: 8px 10px; white-space: nowrap; text-align: center; border: 0; }
.pm-table td { padding: 6px 10px; border-top: 1px solid var(--pm-line); white-space: nowrap; text-align: center; border-left: 0; border-right: 0; }
.pm-table tbody tr:nth-child(even) td { background: #fafbfc; }
.pm-table tbody tr:hover td { background: #f1f6ff; }
.pm-table td.num { direction: ltr; font-variant-numeric: tabular-nums; }
.pm-table td.sym { font-weight: 700; color: var(--pm-blue); }
.pm-table tr.pm-pos td { background: #f3f7ff; font-weight: 600; }
.pm-table tr.pm-lot td { background: #fcfcfd !important; font-size: 12.5px; color: #495057; }
.pm-table tr.pm-lot td.lot { color: var(--pm-muted); font-weight: 500; text-align: start; padding-inline-start: 22px; }
.pm-app .pm-expander { all: unset; cursor: pointer; font-weight: 700; color: var(--pm-blue); white-space: nowrap; }
.pm-app .pm-expander:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; border-radius: 4px; }
.pm-lots-badge { display: inline-block; margin-inline-start: 6px; font-size: 11px; font-weight: 600; color: #fff; background: var(--pm-blue); border-radius: 10px; padding: 1px 7px; vertical-align: 1px; }
.pm-table td.txt { unicode-bidi: plaintext; white-space: normal; min-width: 140px; text-align: start; }
.pm-table td.pos { color: var(--pm-green); }
.pm-table td.neg { color: var(--pm-red); }
.pm-table td.bad { background: var(--pm-pink) !important; }
.pm-table tr.pending td { background: var(--pm-amber-bg) !important; }
.pm-table tr.summary td { background: var(--pm-dark) !important; color: #fff; font-weight: 600; }
.pm-table tr.summary td.pos, .pm-table tr.summary td.neg { color: #fff; }
.pm-table tr.empty td { color: var(--pm-muted); padding: 24px; }
.pm-table td .pm-actions { display: inline-flex; gap: 4px; }
.pm-table tr.muted td { color: #b0b6bd; }

/* forms */
.pm-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 14px; }
.pm-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pm-field > span { color: var(--pm-muted); font-size: 12px; }
.pm-field input, .pm-field select, .pm-field textarea, .pm-app textarea, .pm-app .pm-rule-rows input[type=text], .pm-app .pm-rule-add input[type=text], .pm-app .pm-ob-c input {
  font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid #cdd3da; border-radius: 7px; background: var(--pm-input); color: var(--pm-ink); width: 100%; }
.pm-field input:focus, .pm-field select:focus, .pm-field textarea:focus, .pm-app textarea:focus, .pm-app .pm-rule-rows input[type=text]:focus, .pm-app .pm-rule-add input[type=text]:focus, .pm-app .pm-ob-c input:focus { outline: 2px solid #9ec5fe; border-color: var(--pm-blue); }
.pm-field input[type=number], .pm-field input.ltr { direction: ltr; text-align: right; }
.pm-field.wide { grid-column: 1 / -1; }
.pm-radio { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.pm-check { display: flex; gap: 8px; align-items: center; }
.pm-warn { background: var(--pm-amber-bg); border: 1px solid #ffe08a; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.pm-bad { background: #fff5f5; border: 1px solid #f1b0b7; color: #842029; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.pm-ok { background: #eaf7ef; border: 1px solid #b7e1c6; color: #155b33; border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.pm-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 14px; font-size: 13px; }
.pm-preview b { direction: ltr; display: inline-block; }

/* key/value list */
.pm-kv { width: 100%; border-collapse: collapse; font-size: 14px; }
.pm-kv td { unicode-bidi: plaintext; padding: 7px 8px; border-top: 1px solid var(--pm-line); }
.pm-kv td:last-child { text-align: left; direction: ltr; font-weight: 600; font-variant-numeric: tabular-nums; }
.pm-kv tr.hl td { background: var(--pm-blue); color: #fff; }
.pm-kv th { text-align: start; padding: 7px 8px; font-size: 12px; color: var(--pm-muted); }
.pm-kv td.c2 { text-align: left; direction: ltr; }

/* modal */
.pm-modal-wrap { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 12px; z-index: 100000; overflow-y: auto; }
.pm-modal { background: #fff; border-radius: 12px; width: 100%; max-width: 720px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.pm-modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--pm-line); }
.pm-modal header h3 { margin: 0; font-size: 17px; }
.pm-modal header button { border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--pm-muted); }
.pm-modal .body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.pm-modal footer { padding: 12px 16px; border-top: 1px solid var(--pm-line); display: flex; gap: 8px; justify-content: flex-start; }
.pm-modal .err { color: var(--pm-red); font-size: 13px; }

/* toasts */
.pm-toasts { position: fixed; bottom: 18px; left: 18px; z-index: 100001; display: flex; flex-direction: column; gap: 8px; }
.pm-toasts[dir=ltr] { left: auto; right: 18px; }
.pm-toast { background: var(--pm-dark); color: #fff; padding: 10px 14px; border-radius: 8px; font-size: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); max-width: 360px; white-space: pre-line; }
.pm-toast.err { background: var(--pm-red); }
.pm-toast.ok { background: var(--pm-green); }

/* chart */
.pm-chart { position: relative; direction: ltr; }
.pm-chart-title { font-weight: 600; font-size: 13px; margin: 4px 0 6px; color: var(--pm-text, #212529); }
.pm-drma-charts { margin-bottom: 18px; }
.pm-chart-canvas { display: block; }
.pm-chart-legend { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--pm-muted); margin-bottom: 6px; flex-wrap: wrap; }
.pm-chart-legend i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.pm-chart-legend i.is-dash { background-image: linear-gradient(90deg, transparent 50%, #fff 50%) !important; background-size: 8px 3px; }
.pm-chart-tip { position: absolute; background: rgba(31, 41, 51, .92); color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; pointer-events: none; min-width: 150px; }
.pm-chart-tip-h { font-weight: 700; margin-bottom: 2px; }

.pm-empty { text-align: center; padding: 30px 16px; color: var(--pm-muted); }
.pm-empty .pm-toolbar { justify-content: center; margin-top: 12px; }
.pm-welcome { border: 1px solid #b6d4fe; background: #f1f6ff; }
.pm-rules ol { margin: 0; padding-inline-start: 22px; }
.pm-rules li { margin: 6px 0; }
.pm-badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; background: #e9ecef; color: var(--pm-muted); }
.pm-badge.amber { background: var(--pm-amber); color: #3d2c00; }

/* auth */
.pm-auth { display: flex; justify-content: center; padding: 24px 12px; }
.pm-auth-card { width: 100%; max-width: 440px; background: #fff; border: 1px solid var(--pm-line); border-radius: 12px; padding: 22px; box-shadow: 0 8px 30px rgba(0,0,0,.06); }
.pm-auth-title { margin: 0 0 4px; font-size: 22px; }
.pm-auth-sub { margin: 0 0 16px; color: var(--pm-muted); font-size: 14px; }
.pm-auth-tabs { display: flex; gap: 6px; margin-bottom: 14px; background: var(--pm-bg); padding: 4px; border-radius: 9px; }
.pm-auth-tab { flex: 1; border: 0; background: none; padding: 8px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--pm-muted); }
.pm-auth-tab.is-active { background: #fff; color: var(--pm-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.pm-auth-form { display: flex; flex-direction: column; gap: 10px; }
.pm-auth-form[hidden] { display: none; }
.pm-auth-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--pm-muted); }
.pm-auth-field input { font: inherit; font-size: 15px; padding: 9px 10px; border: 1px solid #cdd3da; border-radius: 8px; color: var(--pm-ink); }
.pm-auth-check { font-size: 13px; display: flex; gap: 6px; align-items: center; }
.pm-auth-btn { background: var(--pm-blue); color: #fff; border: 0; border-radius: 8px; padding: 10px; font-size: 15px; cursor: pointer; }
.pm-auth-btn:hover { background: var(--pm-blue-d); }
.pm-auth-link { font-size: 13px; color: var(--pm-blue); text-align: center; }
.pm-auth-error { background: #fff5f5; border: 1px solid #f1b0b7; color: #842029; border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; font-size: 13px; }
.pm-auth-ok { background: #effaf3; border: 1px solid #a7dcb8; color: #0f5132; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.7; }
.pm-auth-error ul { margin: 0; padding-inline-start: 18px; }
.pm-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .pm-kpi .v { font-size: 16px; }
  .pm-section { padding: 12px; }
  .pm-modal-wrap { padding: 12px 6px; }
}

/* Themes often style every <button> with high-specificity selectors; keep our controls consistent. */
.pm-app .pm-tabs button { background: transparent !important; border: 0 !important; border-bottom: 3px solid transparent !important;
  color: #c9cfd8 !important; box-shadow: none !important; border-radius: 0 !important; text-transform: none !important;
  letter-spacing: normal !important; padding: 10px 14px !important; font-size: 13px !important; font-weight: 400 !important; }
.pm-app .pm-tabs button.is-active { color: #fff !important; border-bottom-color: #6ea8fe !important; font-weight: 600 !important; }
.pm-app .pm-btn, .pm-modal-wrap .pm-btn { background: var(--pm-btn-bg, #fff) !important; color: var(--pm-ink) !important; border: 1px solid var(--pm-btn-line, var(--pm-line)) !important;
  border-radius: 8px !important; padding: 7px 12px !important; font-size: 13px !important; font-weight: 400 !important;
  text-transform: none !important; letter-spacing: normal !important; box-shadow: none !important; text-decoration: none !important; line-height: 1.2 !important; }
.pm-app .pm-btn:hover, .pm-modal-wrap .pm-btn:hover { background: var(--pm-btn-hover, #f1f3f5) !important; }
.pm-app .pm-btn.primary, .pm-modal-wrap .pm-btn.primary { background: var(--pm-blue) !important; border-color: var(--pm-blue) !important; color: #fff !important; }
.pm-app .pm-btn.primary:hover, .pm-modal-wrap .pm-btn.primary:hover { background: var(--pm-blue-d) !important; }
.pm-app .pm-btn.danger, .pm-modal-wrap .pm-btn.danger { color: var(--pm-danger-ink, var(--pm-red)) !important; border-color: var(--pm-danger-line, #f1b0b7) !important; }
.pm-app .pm-btn.small { padding: 4px 8px !important; font-size: 12px !important; }
.pm-modal-wrap .pm-modal header button { background: none !important; border: 0 !important; color: var(--pm-muted) !important; box-shadow: none !important; padding: 0 6px !important; }
.pm-auth .pm-auth-tab { background: transparent !important; border: 0 !important; color: var(--pm-muted) !important; box-shadow: none !important; padding: 8px !important; }
.pm-auth .pm-auth-tab.is-active { background: #fff !important; color: var(--pm-ink) !important; box-shadow: 0 1px 3px rgba(0,0,0,.08) !important; }
.pm-auth .pm-auth-btn { background: var(--pm-blue) !important; color: #fff !important; border: 0 !important; border-radius: 8px !important; padding: 10px !important; }
.pm-app input, .pm-app select, .pm-app textarea, .pm-modal-wrap input, .pm-modal-wrap select, .pm-modal-wrap textarea { max-width: 100%; margin: 0; }
.pm-app table, .pm-modal-wrap table { margin: 0; }

/* English (LTR) layout */
.pm-app[dir=ltr] .pm-kpi .v { text-align: left; }
.pm-app[dir=ltr] .pm-field input[type=number], .pm-app[dir=ltr] .pm-field input.ltr, .pm-modal-wrap[dir=ltr] .pm-field input[type=number] { text-align: left; }
.pm-app[dir=ltr] .pm-kv td:last-child, .pm-app[dir=ltr] .pm-kv td.c2 { text-align: right; }
.pm-app .pm-lang, .pm-auth .pm-auth-lang { all: unset; cursor: pointer; font-size: 12px; font-weight: 600; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 12px; padding: 2px 10px; margin-inline-end: 10px; }
.pm-auth .pm-auth-lang { color: var(--pm-blue, #0d6efd); border-color: var(--pm-line, #dee2e6); float: inline-end; }
.pm-kpi-req .pm-kpi-select { width: 100%; font-size: 12px; font-weight: 500; padding: 2px 4px; margin-top: 4px; color: var(--pm-muted); border: 1px solid var(--pm-line); border-radius: 6px; background: #fff; }
.pm-chooser { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; padding-inline-end: 4px; }
.pm-chooser-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; border: 1px solid var(--pm-line); border-radius: 6px; background: #fff; }
.pm-chooser-row.is-extra { background: #f8fbff; }
.pm-chooser-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.pm-chooser-move { display: flex; gap: 4px; }
.pm-chooser-move .pm-btn { min-width: 28px; padding: 2px 6px; }
.pm-table.pm-mt td { padding: 5px 6px; }
.pm-table.pm-mt input { width: 100%; box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--pm-line); border-radius: 6px; background: #fffbea; font-size: 13px; }
.pm-table.pm-mt td:nth-child(1) { width: 1%; white-space: nowrap; } .pm-table.pm-mt td:nth-child(2) { width: 24%; } .pm-table.pm-mt td:nth-child(3) { width: 48%; } .pm-table.pm-mt td:nth-child(4) { width: 13%; }
.pm-auth-foot { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--pm-line, #dee2e6); font-size: 12px; text-align: center; color: var(--pm-muted, #6c757d); }
.pm-auth-foot a { color: inherit; }
.pm-auth button.pm-auth-link { all: unset; cursor: pointer; display: inline-block; margin-top: 10px; font-size: 13px; color: var(--pm-blue, #0d6efd); }
.pm-auth-terms { align-items: flex-start; line-height: 1.6; }
.pm-pass-wrap { position: relative; display: block; }
.pm-pass-wrap input { width: 100%; box-sizing: border-box; padding-inline-end: 42px !important; }
.pm-pass-eye { all: unset; position: absolute; inset-inline-end: 8px; top: 50%; transform: translateY(-50%); cursor: pointer; font-size: 16px; line-height: 1; padding: 4px; opacity: .7; }
.pm-pass-eye:hover, .pm-pass-eye:focus-visible { opacity: 1; outline: 2px solid var(--pm-blue, #0d6efd); border-radius: 4px; }

/* v1.4 ---------------------------------------------------------------- */
.pm-top .pm-user a.pm-home { color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; padding: 1px 10px; margin-inline-end: 6px; }
.pm-foot { text-align: center; font-size: 12px; color: var(--pm-muted); margin: 10px 0 4px; }
.pm-foot a { color: inherit; }
/* sortable headers */
.pm-table th.pm-sortable { padding: 0; }
.pm-app .pm-table th.pm-sortable button { all: unset; cursor: pointer; display: block; width: 100%; box-sizing: border-box; padding: 8px 10px; white-space: nowrap; text-align: center; }
.pm-app .pm-table th.pm-sortable button:focus-visible { outline: 2px solid #9ec5fe; outline-offset: -2px; }
.pm-sort-ind { opacity: .45; font-size: 10px; }
.pm-table th.is-sorted .pm-sort-ind { opacity: 1; color: #9ec5fe; }
.pm-field.pm-inline { flex-direction: row; align-items: center; gap: 6px; }
.pm-field.pm-inline span { margin: 0; white-space: nowrap; }
/* earnings */
.pm-earn-badge { display: inline-block; margin-inline-start: 6px; font-size: 11px; font-weight: 700; color: #7a4a00; background: var(--pm-amber-bg); border: 1px solid #f3c969; border-radius: 10px; padding: 0 6px; vertical-align: 1px; }
.pm-earn-badge.is-hot { color: #fff; background: var(--pm-red); border-color: var(--pm-red); }
.pm-table td.pm-earn { white-space: nowrap; }
.pm-table td.pm-earn.is-soon span { color: #8a5a00; font-weight: 600; }
.pm-table td.pm-earn.is-hot span { color: var(--pm-red); font-weight: 700; }
.pm-earn-edit { margin-inline-start: 6px; padding: 0 6px !important; }
.pm-earn-banner { margin-bottom: 14px; }
.pm-sym-status { font-size: 13px; margin: 8px 0 4px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.pm-sym-status.is-ok .pm-sym-ok { color: var(--pm-green); font-weight: 600; }
.pm-sym-status.is-bad { color: var(--pm-red); font-weight: 600; }
.pm-sym-status.is-unknown { color: #8a5a00; }
.pm-muted { color: var(--pm-muted); }
/* segmented switch */
.pm-seg { display: inline-flex; border: 1px solid var(--pm-line); border-radius: 8px; overflow: hidden; margin-inline-start: 12px; }
.pm-app .pm-seg button { all: unset; cursor: pointer; padding: 5px 12px; font-size: 13px; color: var(--pm-ink); background: #fff; }
.pm-app .pm-seg button + button { border-inline-start: 1px solid var(--pm-line); }
.pm-app .pm-seg button.is-on { background: var(--pm-blue); color: #fff; font-weight: 600; }
.pm-app .pm-seg button:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: -2px; }
/* arrange mode */
.pm-app .pm-tabs .pm-arrange-toggle { margin-inline-start: auto; color: #ffe08a; white-space: nowrap; }
.pm-app .pm-tabs .pm-arrange-toggle.is-on { color: #fff; background: rgba(255,255,255,.12); border-radius: 6px; }
.pm-tab-move { display: inline-flex; align-items: center; gap: 2px; }
.pm-arranging .pm-movable { position: relative; outline: 2px dashed #9ec5fe; outline-offset: 2px; }
.pm-move { display: inline-flex; gap: 3px; z-index: 5; }
.pm-movable > .pm-move { position: absolute; top: 6px; inset-inline-end: 6px; }
.pm-app .pm-move button { all: unset; cursor: pointer; width: 26px; height: 24px; line-height: 24px; text-align: center; font-size: 14px; font-weight: 700;
  background: var(--pm-blue); color: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.pm-app .pm-move button:disabled { opacity: .3; cursor: default; }
.pm-app .pm-move button:focus-visible { outline: 2px solid #ffe08a; }
.pm-tab-move .pm-move button { width: 20px; height: 20px; line-height: 20px; font-size: 12px; }
/* flows note */
.pm-field.wide-note { flex: 1 1 220px; }
/* session ended */
.pm-session-ended { z-index: 100002; }
.pm-pass-rules { list-style: none; margin: -4px 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--pm-muted, #6c757d); }
.pm-pass-rules li::before { content: '○ '; }
.pm-pass-rules li.is-ok { color: var(--pm-green, #2e9e5b); }
.pm-pass-rules li.is-ok::before { content: '✓ '; }

/* v1.5 ---------------------------------------------------------------- */
.pm-arrange-bar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  background: #fff8db; border: 2px solid #f0c94a; border-radius: 10px; padding: 10px 14px; margin: 10px 0 14px; box-shadow: 0 4px 14px rgba(0,0,0,.12); font-size: 14px; }
body.admin-bar .pm-arrange-bar { top: 32px; }
.pm-app .pm-done { font-size: 16px !important; padding: 8px 26px !important; }
.pm-app .pm-tabs .pm-arrange-toggle.is-on { background: var(--pm-blue); color: #fff; font-weight: 700; padding: 6px 16px; border-radius: 8px; margin: 4px 0; }
.pm-grip { cursor: grab; user-select: none; color: var(--pm-blue); font-weight: 700; }
.pm-movable > .pm-grip { position: absolute; top: 6px; inset-inline-start: 6px; z-index: 6; font-size: 16px; background: #fff; border-radius: 4px; padding: 0 4px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pm-arranging .pm-kpis > .pm-movable, .pm-arranging .pm-grid2 > .pm-movable { cursor: grab; }
.pm-tab-move .pm-grip { color: #ffe08a; padding: 0 2px; }
.pm-drag-handle { touch-action: none; }
.pm-dragging { opacity: .85; z-index: 1000; position: relative; box-shadow: 0 10px 24px rgba(0,0,0,.25); cursor: grabbing !important; }
body.pm-dragging-on, body.pm-dragging-on * { cursor: grabbing !important; user-select: none !important; }
.pm-drop-before { box-shadow: inset 0 4px 0 var(--pm-blue) !important; }
.pm-drop-after { box-shadow: inset 0 -4px 0 var(--pm-blue) !important; }
.pm-kpis .pm-drop-before, .pm-grid2 .pm-drop-before, th.pm-drop-before, .pm-tab-move.pm-drop-before { box-shadow: inset -4px 0 0 var(--pm-blue) !important; }
.pm-kpis .pm-drop-after, .pm-grid2 .pm-drop-after, th.pm-drop-after, .pm-tab-move.pm-drop-after { box-shadow: inset 4px 0 0 var(--pm-blue) !important; }
.pm-app[dir=ltr] .pm-kpis .pm-drop-before, .pm-app[dir=ltr] .pm-grid2 .pm-drop-before, .pm-app[dir=ltr] th.pm-drop-before, .pm-app[dir=ltr] .pm-tab-move.pm-drop-before { box-shadow: inset 4px 0 0 var(--pm-blue) !important; }
.pm-app[dir=ltr] .pm-kpis .pm-drop-after, .pm-app[dir=ltr] .pm-grid2 .pm-drop-after, .pm-app[dir=ltr] th.pm-drop-after, .pm-app[dir=ltr] .pm-tab-move.pm-drop-after { box-shadow: inset -4px 0 0 var(--pm-blue) !important; }
.pm-table th.pm-col-drag { cursor: grab; background: #2b3240; outline: 1px dashed #9ec5fe; outline-offset: -3px; }
.pm-chooser-row .pm-grip { padding: 0 4px; }
.pm-chooser-row label { flex: 1; }
.pm-modal .pm-drop-before { box-shadow: inset 0 3px 0 var(--pm-blue) !important; }
.pm-modal .pm-drop-after { box-shadow: inset 0 -3px 0 var(--pm-blue) !important; }
.pm-bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 8px; font-size: 13px; }
.pm-table td.pm-sel, .pm-table th.pm-sel { width: 28px; text-align: center; }
.pm-iv-monthly { display: inline-block; margin-inline-start: 4px; font-size: 11px; font-weight: 700; color: #fff; background: #b26200; border-radius: 8px; padding: 0 6px; }

/* printing: only the portfolio view, no controls */
@media print {
  body.pm-printing * { visibility: hidden !important; }
  body.pm-printing .pm-app, body.pm-printing .pm-app * { visibility: visible !important; }
  body.pm-printing .pm-app { position: absolute; top: 0; left: 0; right: 0; width: 100% !important; max-width: none !important; margin: 0 !important; }
  body.pm-printing .pm-tabs, body.pm-printing .pm-user, body.pm-printing .pm-foot, body.pm-printing .pm-btn, body.pm-printing .pm-seg,
  body.pm-printing .pm-toolbar select, body.pm-printing .pm-toolbar input, body.pm-printing .pm-field, body.pm-printing .pm-arrange-bar,
  body.pm-printing .pm-toasts, body.pm-printing .pm-grip, body.pm-printing .pm-move, body.pm-printing td:has(> .pm-actions) { display: none !important; }
  body.pm-printing .pm-top { border-radius: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.pm-printing .pm-table th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.pm-printing .pm-table-wrap { overflow: visible !important; border: 0; }
  body.pm-printing .pm-table { font-size: 10px; }
  body.pm-printing .pm-section, body.pm-printing .pm-kpi { break-inside: avoid; box-shadow: none; }
}
.pm-arranging .pm-kpis > .pm-movable, .pm-arranging .pm-grid2 > .pm-movable, .pm-arranging .pm-body > .pm-movable { padding-top: 36px !important; }
.pm-arranging .pm-movable > .pm-move { top: 6px; }
@media print {
  @page { size: landscape; margin: 8mm; }
  body.pm-printing .pm-app { zoom: .78; }
  body.pm-printing .pm-sort-ind, body.pm-printing .pm-sel, body.pm-printing .pm-bulkbar { display: none !important; }
  body.pm-printing .pm-table th, body.pm-printing .pm-table td { padding: 4px 5px; white-space: normal; }
}
.pm-alert { display: flex; align-items: flex-start; gap: 10px; }
.pm-alert-body { flex: 1; }
.pm-app .pm-alert-x { all: unset; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 6px; border-radius: 6px; color: #7a4a00; }
.pm-app .pm-alert-x:hover, .pm-app .pm-alert-x:focus-visible { background: rgba(0,0,0,.08); outline: none; }
.pm-radio-col { display: flex; flex-direction: column; gap: 6px; }
.pm-alert-status { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; font-size: 13px; }

/* Interactive Brokers statement import */
.pm-app .pm-ib-opts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 12px 0; }
.pm-app .pm-ib-opt { display: flex; flex-direction: column; gap: 6px; flex: 1 1 320px; }
.pm-app .pm-ib-opt .pm-radio-row { line-height: 1.5; }
.pm-app .pm-ib-sum { width: auto; max-width: 100%; margin: 8px 0; }
.pm-app .pm-ib-sum th { text-align: start; white-space: nowrap; font-weight: 600; padding-inline-end: 18px; }
.pm-app .pm-ib-sum td { white-space: normal; }
.pm-app .pm-ib-notes { margin: 8px 0; padding-inline-start: 18px; color: #8a5a00; font-size: 13px; }

/* v1.8: tab tools (help + arrange), explanations, KPI dates, period bar, print fit */
.pm-app .pm-tabs .pm-tab-tools { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 2px; }
.pm-app .pm-tabs .pm-tab-tools .pm-arrange-toggle { margin-inline-start: 0; font-size: 17px; }
.pm-app .pm-tabs .pm-help-toggle { font-size: 17px; opacity: .55; white-space: nowrap; }
.pm-app .pm-tabs .pm-help-toggle.is-on { opacity: 1; }
.pm-app .pm-help { display: flex; gap: 10px; align-items: flex-start; background: #eef6ff; border: 1px solid #cfe2ff; color: #1d3b63;
  border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 13px; line-height: 1.7; }
.pm-app .pm-help > div { flex: 1; }
.pm-app .pm-help-i { font-size: 16px; line-height: 1.4; }
.pm-app .pm-help-x { all: unset; cursor: pointer; font-size: 18px; line-height: 1; padding: 0 6px; border-radius: 6px; color: #1d3b63; }
.pm-app .pm-help-x:hover, .pm-app .pm-help-x:focus-visible { background: rgba(0,0,0,.08); }
.pm-kpi .s { font-size: 11px; color: var(--pm-muted); margin-top: 2px; }
.pm-app .pm-period { margin-bottom: 12px; }
.pm-app .pm-ratios td:last-child { direction: ltr; text-align: end; font-weight: 600; }
@media print {
  body.pm-printing .pm-help, body.pm-printing .pm-tab-tools, body.pm-printing .pm-period select { display: none !important; }
  body.pm-printing .pm-app { zoom: var(--pm-pz, .78); }
  body.pm-printing .pm-table { width: 100% !important; min-width: 0 !important; }
}
/* used for a moment before printing to measure how wide the tables get with print styling */
body.pm-print-measure .pm-app .pm-table { font-size: 10px; width: auto !important; min-width: 0 !important; }
body.pm-print-measure .pm-app .pm-table th, body.pm-print-measure .pm-app .pm-table td { padding: 4px 5px; white-space: normal; }
body.pm-print-measure .pm-app .pm-sel, body.pm-print-measure .pm-app td:has(> .pm-actions), body.pm-print-measure .pm-app th:has(> .pm-actions) { display: none !important; }
@media print { body.pm-printing .pm-app .pm-table th.pm-sortable button { white-space: normal; padding: 4px 5px; } }
body.pm-print-measure .pm-app .pm-table th.pm-sortable button { white-space: normal; padding: 4px 5px; }
.pm-app [hidden] { display: none !important; }

/* print without "background graphics": headers and the title bar must not rely on a dark background */
@media print {
  body.pm-printing .pm-app .pm-table th { background: #fff !important; color: #000 !important; border: 1px solid #555 !important; font-weight: 700; }
  body.pm-printing .pm-app .pm-table th.pm-sortable button { background: transparent !important; color: #000 !important; border: 0 !important; font-weight: 700; }
  body.pm-printing .pm-app .pm-table td { border: 1px solid #bbb; }
  body.pm-printing .pm-app .pm-table tr.summary td { background: #fff !important; color: #000 !important; font-weight: 700; border-top: 2px solid #000; }
  body.pm-printing .pm-app .pm-top { background: #fff !important; border-bottom: 2px solid #000; }
  body.pm-printing .pm-app .pm-top h2 { color: #000 !important; }
  body.pm-printing .pm-app .pm-sort-ind { display: none !important; }
}

/* ======================================================================== v2.0 */
.pm-app, .pm-modal-wrap, .pm-toasts, #pm-stop-corner { --pm-grid: #e9ecef; --pm-axis: #6c757d; }
.pm-top-l { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pm-app .pm-pf-select { font: inherit; font-size: 13px; padding: 4px 8px; border-radius: 8px; border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1); color: #fff; max-width: 220px; }
.pm-app .pm-pf-select option { color: #1f2933; background: #fff; }
.pm-app .pm-theme-toggle { all: unset; cursor: pointer; font-size: 16px; padding: 2px 8px; border-radius: 8px; margin-inline-end: 8px; }
.pm-app .pm-theme-toggle:hover, .pm-app .pm-theme-toggle:focus-visible { background: rgba(255,255,255,.15); }
.pm-pf-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.pm-pf-row input { flex: 1; min-width: 140px; font: inherit; padding: 6px 8px; border: 1px solid #cdd3da; border-radius: 7px; }
.pm-pf-new { border-top: 1px solid var(--pm-line); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.pm-pf-new h4 { margin: 0; }
.pm-pf-new input[type=text] { font: inherit; padding: 6px 8px; border: 1px solid #cdd3da; border-radius: 7px; }

/* symbol link + sector tag */
.pm-app .pm-symlink, .pm-modal-wrap .pm-symlink, #pm-stop-corner .pm-symlink { all: unset; cursor: pointer; font-weight: 700; color: var(--pm-blue);
  border-bottom: 1px dashed currentColor; direction: ltr; }
.pm-app .pm-symlink:hover, .pm-app .pm-symlink:focus-visible, .pm-modal-wrap .pm-symlink:hover { color: var(--pm-blue-d); }
.pm-symlink.big { font-size: 16px; }
.pm-sec-tag { display: block; font-size: 10.5px; color: var(--pm-muted); font-weight: 400; line-height: 1.2; margin-top: 2px; }
td.sym .pm-expander { margin-inline-start: 6px; }
.pm-menu { display: flex; flex-direction: column; gap: 10px; }
.pm-modal-wrap .pm-menu-opt { all: unset; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--pm-line);
  border-radius: 10px; background: var(--pm-card, #fff); }
.pm-modal-wrap .pm-menu-opt:hover, .pm-modal-wrap .pm-menu-opt:focus-visible { border-color: var(--pm-blue); background: #f3f7ff; }
.pm-menu-opt span { color: var(--pm-muted); font-size: 12.5px; }
.pm-lot-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--pm-line); flex-wrap: wrap; }
.pm-modal.pm-modal-wide { max-width: 1100px; }
.pm-candle-box { min-height: 300px; position: relative; }
.pm-tv { width: 100%; height: min(560px, 70vh); border: 0; border-radius: 8px; }
.pm-table tr.pm-open-row td { background: #f3f7ff; }

/* sector bars */
.pm-sector-bars { display: flex; flex-direction: column; gap: 6px; }
.pm-sbar { display: grid; grid-template-columns: minmax(110px, 170px) 1fr minmax(120px, auto); gap: 10px; align-items: center; font-size: 13px; }
.pm-sbar-track { height: 12px; background: var(--pm-bg); border-radius: 6px; overflow: hidden; }
.pm-sbar-track i { display: block; height: 100%; border-radius: 6px; background: var(--pm-blue); }
.pm-sbar-track i.neg { background: var(--pm-red); }
.pm-sbar-v { direction: ltr; text-align: end; font-variant-numeric: tabular-nums; color: var(--pm-ink); white-space: nowrap; }

/* historical data page */
.pm-hist { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.pm-hist-side input { width: 100%; font: inherit; padding: 7px 9px; border: 1px solid #cdd3da; border-radius: 7px; margin-bottom: 8px; background: var(--pm-input); color: var(--pm-ink); }
.pm-hist-list { display: flex; flex-direction: column; gap: 4px; max-height: 70vh; overflow-y: auto; }
.pm-app .pm-hist-item { all: unset; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 10px; border: 1px solid var(--pm-line);
  border-radius: 8px; font-size: 12.5px; }
.pm-app .pm-hist-item b { font-size: 14px; direction: ltr; }
.pm-app .pm-hist-item:hover, .pm-app .pm-hist-item:focus-visible { border-color: var(--pm-blue); }
.pm-app .pm-hist-item.is-on { border-color: var(--pm-blue); background: #f3f7ff; }
.pm-hist-detail { min-width: 0; }

/* top scrollbar for wide tables */
.pm-table-outer { position: relative; }
.pm-scroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; margin-bottom: 2px; }
.pm-scroll-top-inner { height: 1px; }

/* stop-loss alert */
.pm-stop-top:empty { display: none; }
.pm-stop-alert { display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px;
  border: 1px solid; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.pm-sa-body { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pm-sa-red { background: #fff1f1; border-color: #f1aeb5; color: #842029; }
.pm-sa-amber { background: #fff4d6; border-color: #f3c969; color: #6b4300; }
.pm-sa-dark { background: #212836; border-color: #3a4252; color: #f1f3f5; }
.pm-sa-large { font-size: 16px; padding: 14px 18px; }
.pm-sa-large .pm-sa-body b { font-size: 18px; }
.pm-stop-alert .pm-sa-x { all: unset; cursor: pointer; font-size: 20px; line-height: 1; padding: 0 6px; border-radius: 6px; }
.pm-stop-alert .pm-sa-x:hover { background: rgba(0,0,0,.08); }
#pm-stop-corner { position: fixed; bottom: 18px; inset-inline-end: 18px; z-index: 99999; max-width: min(440px, calc(100vw - 36px)); margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.pm-sa-preview { max-width: 520px; }

/* ---------------------------------------------------------------- dark theme */
.pm-app.pm-dark, body.pm-theme-dark .pm-modal-wrap, body.pm-theme-dark .pm-toasts, #pm-stop-corner.pm-dark {
  --pm-ink: #e6e9ef; --pm-muted: #9aa4b2; --pm-line: #2e3542; --pm-bg: #11151c; --pm-card: #1a1f29; --pm-dark: #0b0f15;
  --pm-amber-bg: #3a2f12; --pm-pink: #4a2128; --pm-input: #232a36; --pm-grid: #2a313d; --pm-axis: #9aa4b2; --pm-blue: #4c8dff; --pm-blue-d: #6ea0ff;
  --pm-btn-bg: #232a36; --pm-btn-hover: #2c3442; --pm-btn-line: #3a4252; --pm-danger-ink: #ff8787; --pm-danger-line: #6b2a31;
  color: var(--pm-ink); }
.pm-app.pm-dark { background: var(--pm-bg); padding: 10px; border-radius: 14px; }
.pm-app.pm-dark .pm-table, .pm-app.pm-dark .pm-table-wrap { background: var(--pm-card); }
.pm-app.pm-dark .pm-table tbody tr:nth-child(even) td { background: #1e2430; }
.pm-app.pm-dark .pm-table tbody tr:hover td { background: #243049; }
.pm-app.pm-dark .pm-table tr.pm-open-row td, body.pm-theme-dark .pm-modal-wrap .pm-table tr.pm-open-row td { background: #1c2a44; }
.pm-app.pm-dark .pm-btn, body.pm-theme-dark .pm-modal-wrap .pm-btn { background: #232a36; color: var(--pm-ink); border-color: #3a4252; }
.pm-app.pm-dark .pm-btn:hover, body.pm-theme-dark .pm-modal-wrap .pm-btn:hover { background: #2c3442; }
.pm-app.pm-dark .pm-btn.primary, body.pm-theme-dark .pm-modal-wrap .pm-btn.primary { background: var(--pm-blue); border-color: var(--pm-blue); color: #fff; }
.pm-app.pm-dark .pm-btn.danger, body.pm-theme-dark .pm-modal-wrap .pm-btn.danger { color: #ff8787; border-color: #6b2a31; }
.pm-app.pm-dark input, .pm-app.pm-dark select, .pm-app.pm-dark textarea,
body.pm-theme-dark .pm-modal-wrap input, body.pm-theme-dark .pm-modal-wrap select, body.pm-theme-dark .pm-modal-wrap textarea {
  background: var(--pm-input); color: var(--pm-ink); border-color: #3a4252; color-scheme: dark; }
.pm-app.pm-dark .pm-pf-select { background: rgba(255,255,255,.08); }
body.pm-theme-dark .pm-modal { background: var(--pm-card); color: var(--pm-ink); }
.pm-app.pm-dark .pm-kpi.is-bad { background: #3a1d22; }
.pm-app.pm-dark .pm-bad, body.pm-theme-dark .pm-modal-wrap .pm-bad { background: #3a1d22; border-color: #6b2a31; color: #ffb3b8; }
.pm-app.pm-dark .pm-ok, body.pm-theme-dark .pm-modal-wrap .pm-ok { background: #163222; border-color: #275a3a; color: #a9e5bf; }
.pm-app.pm-dark .pm-warn, body.pm-theme-dark .pm-modal-wrap .pm-warn { border-color: #6b5520; color: #ffe8a3; }
.pm-app.pm-dark .pm-help { background: #162338; border-color: #24406b; color: #cfe2ff; }
.pm-app.pm-dark .pm-help-x { color: #cfe2ff; }
.pm-app.pm-dark .pm-hist-item.is-on, body.pm-theme-dark .pm-modal-wrap .pm-menu-opt:hover { background: #1c2a44; }
.pm-app.pm-dark .pm-chart-tip { background: rgba(240, 242, 245, .95); color: #11151c; }
.pm-app.pm-dark .pm-seg button { background: #232a36; color: var(--pm-ink); }
.pm-app.pm-dark .pm-seg button.is-on { background: var(--pm-blue); color: #fff; }
body.pm-theme-dark .pm-modal-wrap .pm-seg button { background: #232a36; color: var(--pm-ink); }
body.pm-theme-dark .pm-modal-wrap .pm-seg button.is-on { background: var(--pm-blue); color: #fff; }
.pm-app.pm-dark .pm-table tr.pending td { background: #3a2f12; }
.pm-app.pm-dark .pm-kv tr.hl td { background: var(--pm-blue); }

/* ---------------------------------------------------------------- smart import */
.pm-app .pm-smart { border-color: #9ec5fe; }
.pm-app .pm-smart h4 { margin: 14px 0 8px; font-size: 14px; }
.pm-app .pm-smart-name { font-size: 13px; font-weight: 600; max-width: 100%; overflow-wrap: anywhere; }
.pm-app .pm-smart-sheet { border: 1px solid var(--pm-line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.pm-app .pm-smart-sheet.is-off { opacity: .7; }
.pm-app .pm-smart-sheet-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.pm-app .pm-smart-sheet-head select { max-width: 100%; }
.pm-app .pm-smart-inc { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.pm-app .pm-smart-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 12px; margin-top: 10px; }
.pm-app .pm-smart-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--pm-muted); min-width: 0; }
.pm-app .pm-smart-f select { width: 100%; min-width: 0; font-size: 12px; padding: 4px 6px; }
.pm-app .pm-smart-f.is-low select { border-color: var(--pm-amber); background: var(--pm-amber-bg); }
.pm-app .pm-smart-f.is-user select { border-color: var(--pm-blue); }
.pm-app .pm-smart-help { margin-top: 8px; font-size: 12px; }
.pm-app .pm-smart-help summary { cursor: pointer; color: var(--pm-muted); }
.pm-app .pm-smart-opts { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0; align-items: flex-end; }
.pm-app .pm-smart-size .pm-toolbar { margin: 6px 0 0; }
.pm-app .pm-smart-sum { margin: 14px 0 8px; padding: 8px 10px; border-radius: 8px; background: #e7f5ec; border: 1px solid #b7e0c4; }
.pm-app .pm-smart-sum.has-err { background: var(--pm-amber-bg); border-color: #ffe08a; }
.pm-app .pm-smart-preview .pm-table td { padding: 3px 4px; }
.pm-app .pm-smart-in { width: 96px; font-size: 12px; padding: 3px 5px; border: 1px solid var(--pm-line); border-radius: 5px; background: transparent; color: inherit; }
.pm-app .pm-smart-in.sym { width: 80px; text-transform: uppercase; }
.pm-app .pm-smart-in[type=date] { width: 132px; }
.pm-app .pm-smart-src { font-size: 11px; color: var(--pm-muted); max-width: 190px; white-space: normal !important; }
.pm-app .pm-smart-msg { font-size: 12px; white-space: normal !important; min-width: 180px; text-align: start !important; }
.pm-app .pm-smart-msg.warn { color: #8a5a00; }
.pm-app .pm-smart-preview tr.is-err td { background: #fff1f1 !important; }
.pm-app .pm-smart-preview tr.is-warn td { background: #fffaeb !important; }
.pm-app .pm-smart-preview tr.is-skip td { opacity: .5; }
.pm-app.pm-dark .pm-smart { border-color: #24406b; }
.pm-app.pm-dark .pm-smart-sum { background: #163222; border-color: #275a3a; }
.pm-app.pm-dark .pm-smart-sum.has-err { background: #3a2f12; border-color: #6b5520; }
.pm-app.pm-dark .pm-smart-preview tr.is-err td { background: #3a1d22 !important; }
.pm-app.pm-dark .pm-smart-preview tr.is-warn td { background: #2e2815 !important; }
.pm-app.pm-dark .pm-smart-msg.warn { color: #ffe8a3; }
@media (max-width: 720px) {
  .pm-app .pm-smart-map { grid-template-columns: 1fr 1fr; }
  .pm-app .pm-smart-preview .pm-table-wrap { overflow-x: auto; border: 1px solid var(--pm-line); }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 720px) {
  .pm-top { padding: 10px 12px; }
  .pm-top h2 { font-size: 17px; }
  .pm-top .pm-user { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .pm-top .pm-user a { margin-inline-start: 0; }
  .pm-tabs { padding: 0 4px; }
  .pm-tabs button { padding: 10px 10px; }
  .pm-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pm-kpi { padding: 8px 10px; }
  .pm-toolbar { gap: 6px; }
  .pm-toolbar .pm-spacer { display: none; }
  .pm-grid2 { grid-template-columns: 1fr; }
  .pm-form { grid-template-columns: 1fr 1fr; }
  .pm-hist { grid-template-columns: 1fr; }
  .pm-hist-list { max-height: 260px; }
  .pm-sbar { grid-template-columns: 1fr; gap: 2px; }
  .pm-sbar-v { text-align: start; }
  .pm-modal-wrap { padding: 0; align-items: stretch; }
  .pm-modal { border-radius: 0; min-height: 100vh; max-width: 100% !important; }
  .pm-app .pm-arrange-toggle, .pm-app .pm-help-toggle { font-size: 18px; }
  /* tables become cards: one card per row, each cell with its column name */
  .pm-table.pm-cards thead { display: none; }
  .pm-table.pm-cards, .pm-table.pm-cards tbody, .pm-table.pm-cards tr, .pm-table.pm-cards td { display: block; width: 100%; }
  .pm-table.pm-cards tr { border: 1px solid var(--pm-line); border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; background: var(--pm-card); }
  .pm-table.pm-cards tbody tr:nth-child(even) td, .pm-table.pm-cards tbody tr:hover td { background: transparent; }
  .pm-table.pm-cards td { display: flex; justify-content: space-between; gap: 10px; border: 0; border-top: 1px dashed var(--pm-line);
    padding: 5px 0; white-space: normal; text-align: end; }
  .pm-table.pm-cards td:first-child { border-top: 0; }
  .pm-table.pm-cards td[data-label]::before { content: attr(data-label); color: var(--pm-muted); font-size: 12px; text-align: start; font-weight: 400; }
  .pm-table.pm-cards td.sym { font-size: 15px; }
  .pm-table.pm-cards td.pm-sel { justify-content: flex-start; }
  .pm-table.pm-cards td:empty { display: none; }
  .pm-table-wrap { border: 0; overflow: visible; }
  .pm-table-wrap:has(.pm-cards) + * { margin-top: 0; }
  .pm-table-outer .pm-scroll-top { display: none !important; }
  #pm-stop-corner { inset-inline: 10px; bottom: 10px; max-width: none; }
}

/* ======================================================================== v2.1 */
/* in-page confirmation */
.pm-ask-msg { font-size: 15px; margin: 0 0 10px; line-height: 1.7; }
.pm-ask-wrap .pm-modal { max-width: 460px; }
.pm-app .pm-btn.danger-solid, .pm-modal-wrap .pm-btn.danger-solid { background: #c92a2a !important; border-color: #c92a2a !important; color: #fff !important; }
.pm-modal-wrap .pm-btn.danger-solid:hover { background: #a61e1e !important; }
.pm-app .pm-linkbtn, .pm-modal-wrap .pm-linkbtn { all: unset; cursor: pointer; color: var(--pm-blue); font-size: 12.5px; text-decoration: underline; margin-inline-start: 6px; }

/* the symbol column stays visible while the table scrolls sideways; a clicked row stays marked */
.pm-app .pm-table:not(.pm-mt) td.sym { position: sticky; inset-inline-start: 0; z-index: 1; background: var(--pm-card);
  box-shadow: inset -1px 0 0 var(--pm-line); }
.pm-app[dir=rtl] .pm-table:not(.pm-mt) td.sym { box-shadow: inset 1px 0 0 var(--pm-line); }
.pm-app .pm-table tbody tr:nth-child(even) td.sym { background: #fafbfc; }
.pm-app .pm-table tbody tr:hover td.sym { background: #f1f6ff; }
.pm-app .pm-table tbody tr.is-picked td, .pm-app .pm-table tbody tr.is-picked td.sym { background: #fff3bf !important; }
.pm-app .pm-table tbody tr.is-picked td:first-child { box-shadow: inset 4px 0 0 #f08c00; }
.pm-app[dir=rtl] .pm-table tbody tr.is-picked td:first-child { box-shadow: inset -4px 0 0 #f08c00; }
.pm-app .pm-table.pm-cards tbody tr { cursor: default; }
.pm-app.pm-dark .pm-table tbody tr:nth-child(even) td.sym { background: #1e2430; }
.pm-app.pm-dark .pm-table tbody tr:hover td.sym { background: #243049; }
.pm-app.pm-dark .pm-table tbody tr.is-picked td, .pm-app.pm-dark .pm-table tbody tr.is-picked td.sym { background: #4a3b10 !important; }

/* sector tables */
.pm-sectors .pm-table td.pm-sec-name { font-weight: 600; text-align: start; white-space: nowrap; }
.pm-sectors .pm-table td.pm-sec-bar { min-width: 220px; }
.pm-sectors .pm-sbi { display: flex; align-items: center; gap: 10px; }
.pm-sectors .pm-sbi .pm-sbar-track { flex: 1; min-width: 80px; }
.pm-sectors .pm-sbi b { direction: ltr; min-width: 64px; text-align: end; font-variant-numeric: tabular-nums; }
.pm-sectors .pm-table td.pm-sec-syms { white-space: normal; text-align: start; max-width: 360px; }
.pm-chip { display: inline-block; direction: ltr; font-size: 11.5px; padding: 1px 7px; margin: 2px; border-radius: 10px; background: var(--pm-bg); border: 1px solid var(--pm-line); }
.pm-sec-tag { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-hist-side select { width: 100%; font: inherit; padding: 7px 9px; border: 1px solid #cdd3da; border-radius: 7px; margin-bottom: 8px; background: var(--pm-input); color: var(--pm-ink); }

/* appearance: palette pickers */
.pm-pal-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.pm-pal { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid var(--pm-line); border-radius: 20px; padding: 4px 12px 4px 8px; cursor: pointer; font-size: 13px; }
.pm-pal i { width: 16px; height: 16px; border-radius: 50%; display: inline-block; background: linear-gradient(135deg, var(--sw1) 50%, var(--sw2) 50%); border: 1px solid rgba(0,0,0,.15); }
.pm-pal-light i, .pm-pal-dark i { display: none; }
.pm-pal-blue { --sw1: #3f4655; --sw2: #0d6efd; } .pm-pal-green { --sw1: #1f4d3a; --sw2: #2b8a3e; } .pm-pal-purple { --sw1: #3b2f5c; --sw2: #7048e8; }
.pm-pal-teal { --sw1: #164e57; --sw2: #0c8599; } .pm-pal-slate { --sw1: #2f3640; --sw2: #868e96; } .pm-pal-sand { --sw1: #5c4a32; --sw2: #c08a2e; }
.pm-pal-navy { --sw1: #0b0f15; --sw2: #4c8dff; } .pm-pal-charcoal { --sw1: #0a0a0a; --sw2: #9ca3af; } .pm-pal-midnight { --sw1: #070d1a; --sw2: #5c9dff; }
.pm-pal-forest { --sw1: #0a120d; --sw2: #40c057; } .pm-pal-plum { --sw1: #120c18; --sw2: #b197fc; }

/* light palettes */
.pm-app[data-pal=green], body[data-pm-pal=green] .pm-modal-wrap { --pm-dark: #1f4d3a; --pm-blue: #2b8a3e; --pm-blue-d: #237032; }
.pm-app[data-pal=purple], body[data-pm-pal=purple] .pm-modal-wrap { --pm-dark: #3b2f5c; --pm-blue: #7048e8; --pm-blue-d: #5f3dc4; }
.pm-app[data-pal=teal], body[data-pm-pal=teal] .pm-modal-wrap { --pm-dark: #164e57; --pm-blue: #0c8599; --pm-blue-d: #0b7285; }
.pm-app[data-pal=slate], body[data-pm-pal=slate] .pm-modal-wrap { --pm-dark: #2f3640; --pm-blue: #495057; --pm-blue-d: #343a40; }
.pm-app[data-pal=sand], body[data-pm-pal=sand] .pm-modal-wrap { --pm-dark: #5c4a32; --pm-blue: #b5781f; --pm-blue-d: #96631a; --pm-bg: #faf6ef; }
/* dark palettes (navy is the default dark set) */
.pm-app.pm-dark[data-pal=charcoal], body.pm-theme-dark[data-pm-pal=charcoal] .pm-modal-wrap {
  --pm-bg: #121212; --pm-card: #1e1e1e; --pm-dark: #0a0a0a; --pm-line: #2e2e2e; --pm-input: #262626; --pm-btn-bg: #262626; --pm-btn-hover: #303030; --pm-btn-line: #3a3a3a; --pm-blue: #8ab4f8; --pm-grid: #2c2c2c; }
.pm-app.pm-dark[data-pal=midnight], body.pm-theme-dark[data-pm-pal=midnight] .pm-modal-wrap {
  --pm-bg: #0b1324; --pm-card: #121c33; --pm-dark: #070d1a; --pm-line: #22304f; --pm-input: #18233d; --pm-btn-bg: #18233d; --pm-btn-hover: #1f2c4b; --pm-btn-line: #2b3b60; --pm-blue: #5c9dff; --pm-grid: #1d2a45; }
.pm-app.pm-dark[data-pal=forest], body.pm-theme-dark[data-pm-pal=forest] .pm-modal-wrap {
  --pm-bg: #0f1a14; --pm-card: #16241c; --pm-dark: #0a120d; --pm-line: #24382c; --pm-input: #1c2e23; --pm-btn-bg: #1c2e23; --pm-btn-hover: #23392b; --pm-btn-line: #2f4a39; --pm-blue: #40c057; --pm-blue-d: #51cf66; --pm-grid: #203328; }
.pm-app.pm-dark[data-pal=plum], body.pm-theme-dark[data-pm-pal=plum] .pm-modal-wrap {
  --pm-bg: #1a1222; --pm-card: #241a2f; --pm-dark: #120c18; --pm-line: #382a48; --pm-input: #2d2139; --pm-btn-bg: #2d2139; --pm-btn-hover: #372846; --pm-btn-line: #46345a; --pm-blue: #b197fc; --pm-blue-d: #c5b0ff; --pm-grid: #32253f; }
.pm-app.pm-dark .pm-table tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--pm-card) 88%, #fff 4%); }
.pm-app.pm-dark .pm-table tbody tr:nth-child(even) td.sym { background: color-mix(in srgb, var(--pm-card) 88%, #fff 4%); }

@media (max-width: 720px) {
  .pm-app .pm-table.pm-cards td.sym { position: static; box-shadow: none; }
  .pm-sectors .pm-sbi { flex: 1; justify-content: flex-end; }
  .pm-sectors .pm-table td.pm-sec-syms { max-width: none; }
}

/* ======================================================================== v2.3 */
/* ⚙ arrange toggle in the top bar, beside the light / dark switch */
.pm-app .pm-top .pm-arrange-toggle { all: unset; cursor: pointer; font-size: 16px; padding: 2px 8px; border-radius: 8px; margin-inline-end: 4px; color: #fff; white-space: nowrap; }
.pm-app .pm-top .pm-arrange-toggle:hover, .pm-app .pm-top .pm-arrange-toggle:focus-visible { background: rgba(255,255,255,.15); }
.pm-app .pm-top .pm-arrange-toggle.is-on { background: var(--pm-blue); font-weight: 700; padding: 3px 12px; }
/* hide / show tabs while arranging */
.pm-app .pm-tabs button.is-hidden { opacity: .45; text-decoration: line-through; }
.pm-tab-move.is-hidden { opacity: .8; }
.pm-app .pm-tab-eye { all: unset; cursor: pointer; width: 18px; height: 18px; line-height: 18px; text-align: center; font-size: 13px; font-weight: 700;
  border-radius: 50%; background: rgba(255,255,255,.18); color: #fff; }
.pm-app .pm-tab-move.is-hidden .pm-tab-eye { background: #2f9e44; }
.pm-app .pm-tab-eye:focus-visible { outline: 2px solid #ffe08a; }
/* margin strip */
.pm-margin { background: var(--pm-card); border: 1px solid var(--pm-line); border-inline-start: 4px solid var(--pm-blue); border-radius: 8px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.pm-margin.is-over { border-inline-start-color: var(--pm-red); }
/* psych field: select + "another state" box */
.pm-psych { display: flex; flex-direction: column; gap: 6px; }
.pm-psych input[hidden] { display: none; }
/* closed trades: partial sales, pager */
.pm-app .pm-table tr.pm-partopen td { background: #f3f0ff; }
.pm-lots-badge.is-part { background: #e5dbff; color: #5f3dc4; }
.pm-partopen-note { margin: 0 0 12px; }
.pm-parts-hint { font-size: 12px; white-space: nowrap; }
.pm-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pm-pager-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.pm-period-note { margin: -4px 0 10px; }
/* P&L calendar */
.pm-cal { display: grid; gap: 6px; margin-top: 8px; }
.pm-cal-day { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.pm-cal-week { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.pm-cal-month { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.pm-cal-wd { text-align: center; font-size: 12px; color: var(--pm-muted); font-weight: 600; }
.pm-cal-cell { --pm-cal-a: .25; position: relative; min-height: 62px; border: 1px solid var(--pm-line); border-radius: 8px; padding: 5px 7px; background: var(--pm-card);
  display: flex; flex-direction: column; gap: 2px; font-size: 12px; overflow: hidden; }
.pm-cal-cell.is-pos { background: rgba(47, 158, 68, var(--pm-cal-a)); border-color: rgba(47, 158, 68, .5); }
.pm-cal-cell.is-neg { background: rgba(224, 49, 49, var(--pm-cal-a)); border-color: rgba(224, 49, 49, .5); }
.pm-cal-cell.is-blank { border: 0; background: transparent; }
.pm-cal-cell.is-weekend { opacity: .6; }
.pm-cal-cell.is-future { opacity: .5; }
.pm-cal-cell.is-today { outline: 2px solid var(--pm-blue); outline-offset: -2px; }
.pm-cal-d { color: var(--pm-muted); font-weight: 600; }
.pm-cal-v { font-size: 13px; direction: ltr; text-align: end; }
.pm-cal-n { color: var(--pm-muted); font-size: 11px; }
.pm-cal-nav { display: inline-flex; align-items: center; gap: 8px; }
.pm-cal-sum { margin-top: 10px; font-size: 13px; }
/* guided setup */
.pm-onboard { border: 2px solid var(--pm-blue); }
.pm-ob-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 10px 0 14px; }
.pm-ob-steps li { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--pm-line); font-size: 13px; color: var(--pm-muted); }
.pm-ob-steps li.is-on { background: var(--pm-blue); border-color: var(--pm-blue); color: #fff; font-weight: 700; }
.pm-ob-steps li.is-done { color: var(--pm-green); border-color: var(--pm-green); }
.pm-ob-mkt { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px dashed var(--pm-line); }
.pm-ob-mkt input[type=number] { width: 90px; }
/* market notes */
.pm-notes-month { margin: 16px 0 6px; color: var(--pm-muted); font-size: 14px; }
.pm-note-card { border: 1px solid var(--pm-line); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: var(--pm-card); }
.pm-note-card header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.pm-note-body { white-space: pre-wrap; line-height: 1.7; }
.pm-note-upd { font-size: 11px; margin-top: 4px; }
.pm-notes-q { flex: 1 1 260px; }
.pm-notes-q input { width: 100%; }
/* import privacy note */
.pm-privacy { display: flex; gap: 10px; align-items: flex-start; background: #ebfbee; border: 1px solid #b2f2bb; color: #1b4332; border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; line-height: 1.7; }
.pm-privacy-i { font-size: 18px; }
.pm-app.pm-dark .pm-privacy { background: #12291b; border-color: #23533a; color: #c3f0d0; }
.pm-app.pm-dark .pm-table tr.pm-partopen td { background: #241d3a; }
.pm-reset .pm-toolbar { gap: 8px; }
.pm-chart-from input { width: 150px; }
.pm-kelly td.c2 { text-align: center; }
/* symbol options button (phones only, inside an opened card) */
.pm-app .pm-sym-more { display: none; }
@media (max-width: 720px) {
  /* open / closed trades: a card shows only the symbol until it is tapped */
  .pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td:not(.sym):not(.lot):not(.pm-k):not(.pm-sel) { display: none; }
  .pm-app .pm-table.pm-acc tbody tr:not(.is-open) { padding: 4px 10px; }
  .pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td.sym .pm-sec-tag { display: none; }
  .pm-app .pm-table.pm-acc tbody tr > td.sym { cursor: pointer; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
  .pm-app .pm-table.pm-acc tbody tr > td.sym::after { content: '▾'; margin-inline-start: auto; color: var(--pm-muted); }
  .pm-app .pm-table.pm-acc tbody tr.is-open > td.sym::after { content: '▴'; }
  .pm-app .pm-table.pm-acc tbody tr.is-open { border-color: var(--pm-blue); }
  .pm-app .pm-table.pm-acc tbody tr.is-open .pm-sym-more { all: unset; display: inline-block; cursor: pointer; font-size: 12px; color: var(--pm-blue); border: 1px solid var(--pm-blue);
    border-radius: 12px; padding: 1px 10px; margin-inline-start: 8px; }
  .pm-app .pm-table.pm-acc tbody tr > td.sym::before { display: none; }
  .pm-cal-day { gap: 3px; }
  .pm-cal-cell { min-height: 46px; padding: 3px 4px; font-size: 10px; }
  .pm-cal-day .pm-cal-n { display: none; }
  .pm-cal-v { font-size: 11px; }
}

/* ======================================================================== v2.4 */
.pm-perf-top { align-items: start; }
.pm-perf-top .pm-ts .pm-kv td { padding: 4px 8px; font-size: 13px; }
.pm-perf-top .pm-ts h3, .pm-perf-top .pm-ratios-sec h3 { font-size: 16px; }
.pm-chart-period { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pm-chart-pnote { color: var(--pm-amber, #b35c00); }
.pm-ob-mkts { display: flex; flex-direction: column; gap: 6px; }
.pm-ob-mkt .pm-field { margin: 0; }
.pm-ob-mkt .pm-ob-desc { flex: 1 1 220px; }
.pm-ob-mkt .pm-ob-desc input { width: 100%; }
.pm-ob-cur { white-space: nowrap; font-size: 13px; }
.pm-mobile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.pm-mobile-set h4 { margin: 10px 0 4px; }
/* phone bottom bar (hidden on larger screens) */
.pm-app .pm-mbar { display: none; }
@media (max-width: 720px) {
  .pm-app .pm-m-hide { display: none !important; }
  .pm-app .pm-top .pm-arrange-toggle, .pm-app .pm-customize, .pm-app .pm-print-btn, .pm-app .pm-col-drag .pm-grip { display: none !important; }
  .pm-app { padding-bottom: 72px; }
  .pm-app .pm-mbar { display: flex; position: fixed; inset-inline: 0; bottom: 0; z-index: 9990; background: var(--pm-dark); border-top: 1px solid rgba(255,255,255,.12);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around; box-shadow: 0 -4px 14px rgba(0,0,0,.18); }
  .pm-app .pm-mbar-btn { all: unset; cursor: pointer; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; color: #dbe2ea; font-size: 11px; padding: 4px 0; border-radius: 10px; }
  .pm-app .pm-mbar-btn.is-on { color: #fff; background: rgba(255,255,255,.12); font-weight: 700; }
  .pm-app .pm-mbar-i { font-size: 18px; line-height: 1; }
}

/* ======================================================================== v2.5 */
.pm-app .pm-ts-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.pm-app .pm-ts-cols .pm-kv { margin: 0; width: 100%; }
@media (max-width: 767px) { .pm-app .pm-ts-cols { grid-template-columns: 1fr; } }
.pm-app .pm-wr-chart { min-height: 260px; position: relative; }
.pm-app .pm-wr-chart .pm-chart-tip { min-width: 210px; }
.pm-app .pm-eye.is-on { background: var(--pm-accent, #0d6efd); color: #fff; border-color: transparent; }
.pm-app .pm-seg button[disabled] { opacity: .45; cursor: not-allowed; }
.pm-app .pm-mine .pm-seg-l { padding: 0 8px; font-size: 12px; opacity: .8; align-self: center; }
.pm-kv.pm-nomine td.c2 { width: 40%; }
.pm-modal .pm-share-list { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0; }
.pm-modal .pm-share-item { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.pm-modal .pm-share-item.is-money { opacity: .85; }
.pm-modal .pm-share-money { display: block; margin: 6px 0 10px; }
.pm-modal .pm-share-prev { display: block; width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; border: 1px solid rgba(0,0,0,.12); background: #0f172a; }
.pm-modal:has(.pm-share) { max-width: 760px; }
.pm-app .pm-fileimp-btn { font-size: 15px; }
.pm-app .pm-brk .pm-ib-sum { margin-top: 10px; }
/* v2.5 phone: the stock symbols you tap to open the company are bigger, button-like tap targets */
@media (max-width: 767px) {
  .pm-app .pm-table .pm-symlink, .pm-modal-wrap .pm-table .pm-symlink {
    display: inline-flex; align-items: center; min-height: 34px; padding: 4px 10px; font-size: 15px; letter-spacing: .3px;
    border-radius: 8px; background: color-mix(in srgb, var(--pm-blue) 12%, transparent); border: 1px solid color-mix(in srgb, var(--pm-blue) 35%, transparent);
    text-decoration: none; }
  .pm-app .pm-table .pm-symlink:active { background: color-mix(in srgb, var(--pm-blue) 24%, transparent); }
  .pm-app .pm-share-btn { padding-inline: 10px; }
}
.pm-app .pm-fb-btn { all: unset; cursor: pointer; font-size: 13px; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35); color: inherit; }
.pm-app .pm-fb-btn:hover { background: rgba(255,255,255,.12); }
.pm-app .pm-demo-bar { flex-basis: 100%; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #fff3cd; color: #664d03; font-size: 14px; }
.pm-app .pm-demo-bar a { font-weight: 700; color: #0a58ca; }
.pm-app .pm-top { flex-wrap: wrap; }
.pm-app .pm-demo-reg { color: #fff !important; text-decoration: none; }
.pm-auth .pm-auth-demo { text-align: center; margin: 4px 0 12px; }
.pm-auth .pm-auth-demo-btn { display: inline-block; padding: 8px 14px; border-radius: 10px; background: #fff3cd; color: #664d03; text-decoration: none; font-weight: 700; }
/* v2.5.1 */
.pm-modal .pm-note-prev { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.pm-modal .pm-note-prev .pm-share-prev { max-height: none; }
.pm-modal .pm-note-mode { margin: 6px 0 10px; }
.pm-app .pm-bulk-psych-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pm-app .pm-bulk-psych-wrap .pm-psych { display: inline-flex; gap: 6px; }

/* ---------------------------------------------------------------- v2.5.6 */
/* dark theme: headings follow the app's ink colour instead of the site theme's (dark) heading colour */
.pm-app.pm-dark :is(h1, h2, h3, h4, h5, h6),
body.pm-theme-dark .pm-modal-wrap :is(h1, h2, h3, h4, h5, h6),
#pm-stop-corner.pm-dark :is(h1, h2, h3, h4, h5, h6) { color: var(--pm-ink); }
/* numeric inputs: ▲▼ stepper (0.01 for prices / amounts / percents, 1 for counts) */
.pm-inwrap { position: relative; display: block; }
.pm-inwrap > input.pm-num { padding-left: 28px; }
.pm-inwrap > .pm-stp { position: absolute; left: 1px; top: 1px; bottom: 1px; }
.pm-app[dir=ltr] .pm-inwrap > input.pm-num, .pm-modal-wrap[dir=ltr] .pm-inwrap > input.pm-num { padding-left: 9px; padding-right: 28px; }
.pm-app[dir=ltr] .pm-inwrap > .pm-stp, .pm-modal-wrap[dir=ltr] .pm-inwrap > .pm-stp { left: auto; right: 1px; }
.pm-stp { display: inline-flex; flex-direction: column; width: 24px; border-radius: 6px; overflow: hidden; }
.pm-stp.is-inline { vertical-align: middle; height: 30px; margin-inline-start: 4px; border: 1px solid #cdd3da; }
.pm-stp-b { flex: 1; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; border: 0; border-radius: 0;
  background: transparent; color: var(--pm-muted); font-size: 8px; line-height: 1; cursor: pointer; min-height: 0; box-shadow: none; }
.pm-stp-b:hover { background: rgba(13, 110, 253, .12); color: var(--pm-blue); }
.pm-stp-b:active { background: rgba(13, 110, 253, .22); }
.pm-inwrap > input.pm-num:disabled ~ .pm-stp, input.pm-num:disabled + .pm-stp { opacity: .35; pointer-events: none; }
.pm-app.pm-dark .pm-stp.is-inline, body.pm-theme-dark .pm-modal-wrap .pm-stp.is-inline { border-color: #3a4252; }
/* dark theme: multi-lot position rows and other light-blue highlights (were #f3f7ff = white text on white) */
.pm-app.pm-dark .pm-table tr.pm-pos td:not(.bad), body.pm-theme-dark .pm-modal-wrap .pm-table tr.pm-pos td:not(.bad) { background: color-mix(in srgb, var(--pm-blue) 16%, var(--pm-card)); }
.pm-app.pm-dark .pm-table tr.pm-pos:hover td:not(.bad) { background: color-mix(in srgb, var(--pm-blue) 24%, var(--pm-card)); }
body.pm-theme-dark .pm-modal-wrap .pm-menu-opt:hover, body.pm-theme-dark .pm-modal-wrap .pm-menu-opt:focus-visible,
.pm-app.pm-dark .pm-hist-item.is-on { background: color-mix(in srgb, var(--pm-blue) 16%, var(--pm-card)); }

/* ---------------------------------------------------------------- v2.5.8 */
/* dark theme: «تخصيص العرض» rows and other boxes that still had a fixed white / light background */
body.pm-theme-dark .pm-modal-wrap .pm-chooser-row, .pm-app.pm-dark .pm-chooser-row { background: var(--pm-card); border-color: var(--pm-line); color: var(--pm-ink); }
body.pm-theme-dark .pm-modal-wrap .pm-chooser-row.is-extra, .pm-app.pm-dark .pm-chooser-row.is-extra { background: color-mix(in srgb, var(--pm-blue) 12%, var(--pm-card)); }
body.pm-theme-dark .pm-modal-wrap .pm-chooser-row label, .pm-app.pm-dark .pm-chooser-row label { color: var(--pm-ink); }
.pm-app.pm-dark .pm-welcome { background: color-mix(in srgb, var(--pm-blue) 12%, var(--pm-card)); border-color: color-mix(in srgb, var(--pm-blue) 40%, var(--pm-card)); }
.pm-app.pm-dark .pm-table tr.pm-lot td, body.pm-theme-dark .pm-modal-wrap .pm-table tr.pm-lot td { background: color-mix(in srgb, var(--pm-card) 92%, #fff 3%) !important; color: var(--pm-muted); }
.pm-app.pm-dark .pm-movable > .pm-grip { background: var(--pm-card); }
.pm-app.pm-dark .pm-table.pm-mt input, body.pm-theme-dark .pm-modal-wrap .pm-table.pm-mt input { background: var(--pm-input); color: var(--pm-ink); }
.pm-app.pm-dark .pm-kpi-req .pm-kpi-select { background: var(--pm-input); color: var(--pm-ink); }
.pm-app.pm-dark .pm-demo-bar { background: #3a2f12; color: #ffe8a3; }
/* drop-downs: the site theme fixes their height (2.25em) with no room for the padding, which cut the words at the bottom */
.pm-app select, .pm-modal-wrap select, .pmt select { height: auto !important; min-height: 2.35em; line-height: 1.45 !important; padding-top: 6px !important; padding-bottom: 6px !important; }
.pm-app .pm-pf-select { padding-top: 4px !important; padding-bottom: 4px !important; }
/* notes: type chip, trade notes, pager */
.pm-note-kind { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--pm-line); color: var(--pm-muted); margin-inline-start: 8px; }
.pm-note-kind.k-market { color: #0b5ed7; border-color: #9ec5fe; }
.pm-note-kind.k-stock { color: #6f42c1; border-color: #c5b3f2; }
.pm-note-kind.k-trade { color: #2e9e5b; border-color: #a3d9b8; }
.pm-note-kind.k-psych { color: #b5781f; border-color: #f0cf95; }
.pm-note-card.is-trade { border-inline-start: 3px solid #2e9e5b; }
.pm-notes-pager { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; justify-content: center; margin-top: 12px; }
.pm-notes-pager .pm-btn.is-on { background: var(--pm-blue); color: #fff; border-color: var(--pm-blue); }
/* reminders (rules, psych, motivation, personal) */
.pm-remind-body { font-size: 15px; line-height: 1.9; }
.pm-remind-body ol { margin: 6px 0 12px; padding-inline-start: 1.4em; }
.pm-remind-quote { font-size: 17px; font-weight: 600; background: color-mix(in srgb, var(--pm-blue) 10%, transparent); border-radius: 10px; padding: 12px 14px; margin: 6px 0 10px; white-space: pre-wrap; }
.pm-psych-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pm-psych-pick .pm-btn { font-size: 14px; padding: 8px 14px; }
.pm-pmsg { border: 1px solid var(--pm-line); border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.pm-pmsg textarea { width: 100%; }
.pm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-days label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; border: 1px solid var(--pm-line); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.pm-share-chart-img { max-width: 100%; border-radius: 8px; }

/* v2.6.0 «الشروحات» */
.pm-app .pm-g-bar { display: flex; justify-content: flex-start; margin: -6px 0 10px; }
.pm-app .pm-g-btn { background: var(--pm-card); border: 1px solid var(--pm-line); color: var(--pm-blue); border-radius: 999px; padding: 4px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; line-height: 1.6; }
.pm-app .pm-g-btn:hover { border-color: var(--pm-blue); }
.pm-app .pm-g-prog { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pm-app .pm-g-prog-t { font-weight: 600; font-size: 14px; }
.pm-app .pm-g-prog-b { display: block; height: 8px; border-radius: 99px; background: var(--pm-line); overflow: hidden; }
.pm-app .pm-g-prog-f { display: block; height: 100%; width: 0; background: var(--pm-green); border-radius: 99px; transition: width .25s; }
.pm-app .pm-g-mod { border: 1px solid var(--pm-line); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.pm-app .pm-g-mod > summary { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 15px;
  background: var(--pm-bg); list-style: none; }
.pm-app .pm-g-mod > summary::-webkit-details-marker { display: none; }
.pm-app .pm-g-mod > summary::after { content: '▾'; margin-inline-start: 4px; color: var(--pm-muted); transition: transform .2s; }
.pm-app .pm-g-mod:not([open]) > summary::after { transform: rotate(90deg); }
.pm-app[dir=rtl] .pm-g-mod:not([open]) > summary::after { transform: rotate(-90deg); }
.pm-app .pm-g-mnum { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border-radius: 50%;
  background: var(--pm-dark); color: #fff; font-size: 13px; }
.pm-app .pm-g-mt { flex: 1; }
.pm-app .pm-g-cnt { font-size: 12px; font-weight: 500; color: var(--pm-muted); }
.pm-app .pm-g-ls { list-style: none; margin: 0; padding: 0; }
.pm-app .pm-g-l { border-top: 1px solid var(--pm-line); padding: 8px 14px; }
.pm-app .pm-g-row { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.pm-app .pm-g-num { flex: none; min-width: 34px; font-size: 12px; color: var(--pm-muted); font-variant-numeric: tabular-nums; direction: ltr; text-align: center; }
.pm-app .pm-g-play { flex: 1; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px 0; text-align: start;
  font-size: 14px; color: var(--pm-ink); cursor: pointer; }
.pm-app .pm-g-play:hover .pm-g-t { color: var(--pm-blue); text-decoration: underline; }
.pm-app .pm-g-pi { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--pm-blue); color: #fff; font-size: 10px; }
.pm-app[dir=rtl] .pm-g-pi { transform: scaleX(-1); }
.pm-app .pm-g-l.is-playing .pm-g-t { color: var(--pm-blue); font-weight: 600; }
.pm-app .pm-g-l.is-done .pm-g-pi { background: var(--pm-green); }
.pm-app .pm-g-seen { flex: none; display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--pm-muted); cursor: pointer; white-space: nowrap; }
.pm-app .pm-g-l.is-soon { opacity: .55; }
.pm-app .pm-g-l.is-soon .pm-g-t { flex: 1; font-size: 14px; }
.pm-app .pm-g-soon { flex: none; font-size: 12px; background: var(--pm-line); color: var(--pm-muted); border-radius: 99px; padding: 1px 10px; }
.pm-app .pm-g-player, .pm-modal-wrap .pm-g-player { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 8px; background: #000; border-radius: 8px; overflow: hidden; }
.pm-app .pm-g-player iframe, .pm-modal-wrap .pm-g-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pm-modal-wrap .pm-modal:has(.pm-g-modal) { width: min(920px, 96vw); max-width: 96vw; }
.pm-modal-wrap .pm-g-modal .pm-g-player { margin-top: 0; }
@media (max-width: 640px) {
  .pm-app .pm-g-l { padding: 8px 10px; }
  .pm-app .pm-g-num { min-width: 28px; }
  .pm-app .pm-g-play { font-size: 13.5px; }
}
.pm-app .pm-g-l .pm-g-player { max-width: 760px; margin-inline: auto; }
.pm-app .pm-g-play:focus:not(:focus-visible) { outline: none; }
.pm-app .pm-g-play:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; border-radius: 6px; }

/* v2.6.2: notice while historical prices are still loading (equity curve) */
.pm-eq-loading { background: #fff7e6; border: 1px solid #f0c36d; color: #7a5200; padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 0 0 12px; }
.pm-app.pm-dark .pm-eq-loading { background: #3a2f12; border-color: #8a6d1f; color: #ffe2a3; }

/* v2.6.3: long trade notes fold to two lines; click to show all */
.pm-table td.pm-note-cell { min-width: 180px; max-width: 320px; }
.pm-note-clip { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; cursor: pointer; white-space: pre-line; border-bottom: 1px dashed currentColor; border-bottom-color: rgba(127,127,127,.5); }
.pm-note-clip.is-open { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; border-bottom-color: transparent; }
.pm-note-clip:focus-visible { outline: 2px solid #4f4fb3; outline-offset: 2px; border-radius: 3px; }
@media print { .pm-note-clip { display: block; -webkit-line-clamp: unset; line-clamp: unset; overflow: visible; border: 0; } }

/* ======================================================================== v2.6.5 */
/* multi-lot position: «📝 n» opens every lot's note */
.pm-app .pm-note-mark { all: unset; cursor: pointer; padding: 1px 8px; border: 1px solid var(--pm-line); border-radius: 12px; font-size: 13px; white-space: nowrap; }
.pm-app .pm-note-mark:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
.pm-app .pm-note-mark[aria-expanded=true] { border-color: var(--pm-blue); color: var(--pm-blue); }
.pm-app .pm-lot-notes { margin-top: 6px; display: grid; gap: 4px; text-align: start; white-space: pre-line; }
.pm-app .pm-lot-notes[hidden] { display: none; }
.pm-app .pm-lot-note b { font-weight: 600; color: var(--pm-muted); }

/* trade cards on phones: the folded card shows the symbol and its key numbers */
.pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td.pm-k { display: inline-flex !important; width: 48% !important; flex-direction: column; align-items: flex-start;
  gap: 0; border-top: 0; padding: 2px 0; font-size: 13px; text-align: start; }
.pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td.pm-k::before { font-size: 11px; }
.pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td.pm-sel { display: inline-flex !important; width: auto !important; border: 0; padding: 2px 0; }
.pm-app .pm-table.pm-acc tbody tr:not(.is-open) > td.pm-sel::before { display: none; }

/* phones wider than 720px (turned sideways, large phones): the same cards */
.pm-app.pm-tcards .pm-table.pm-cards thead { display: none; }
.pm-app.pm-tcards .pm-table.pm-cards, .pm-app.pm-tcards .pm-table.pm-cards tbody, .pm-app.pm-tcards .pm-table.pm-cards tr, .pm-app.pm-tcards .pm-table.pm-cards td { display: block; width: 100%; }
.pm-app.pm-tcards .pm-table.pm-cards tr { border: 1px solid var(--pm-line); border-radius: 10px; margin: 0 0 10px; padding: 6px 10px; background: var(--pm-card); }
.pm-app.pm-tcards .pm-table.pm-cards tbody tr:nth-child(even) td, .pm-app.pm-tcards .pm-table.pm-cards tbody tr:hover td { background: transparent; }
.pm-app.pm-tcards .pm-table.pm-cards td { display: flex; justify-content: space-between; gap: 10px; border: 0; border-top: 1px dashed var(--pm-line); padding: 5px 0; white-space: normal; text-align: end; position: static; box-shadow: none; }
.pm-app.pm-tcards .pm-table.pm-cards td:first-child { border-top: 0; }
.pm-app.pm-tcards .pm-table.pm-cards td[data-label]::before { content: attr(data-label); color: var(--pm-muted); font-size: 12px; text-align: start; font-weight: 400; }
.pm-app.pm-tcards .pm-table.pm-cards td.sym { font-size: 15px; }
.pm-app.pm-tcards .pm-table.pm-cards td:empty { display: none; }
.pm-app.pm-tcards .pm-table-wrap:has(.pm-cards) { border: 0; overflow: visible; }
.pm-app.pm-tcards .pm-table-outer:has(.pm-cards) .pm-scroll-top { display: none !important; }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr:not(.is-open) > td:not(.sym):not(.lot):not(.pm-k):not(.pm-sel) { display: none; }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr > td.sym { cursor: pointer; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr > td.sym::before { display: none; }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr > td.sym::after { content: '▾'; margin-inline-start: auto; color: var(--pm-muted); }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr.is-open > td.sym::after { content: '▴'; }
.pm-app.pm-tcards .pm-table.pm-acc tbody tr.is-open { border-color: var(--pm-blue); }
@media (max-width: 720px) {
  /* the member chose «جدول»: the trades table scrolls sideways instead of turning into cards */
  .pm-app .pm-table-wrap:has(> .pm-table:not(.pm-cards)) { overflow-x: auto; border: 1px solid var(--pm-line); }
}

/* ======================================================================== v2.7.0 — new look */
@font-face { font-family: 'PM Tajawal'; font-weight: 400 600; font-display: swap; src: url(../fonts/tajawal-arabic-500.woff2) format('woff2'); }
@font-face { font-family: 'PM Tajawal'; font-weight: 400 600; font-display: swap; src: url(../fonts/tajawal-latin-500.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
@font-face { font-family: 'PM Tajawal'; font-weight: 700 900; font-display: swap; src: url(../fonts/tajawal-arabic-800.woff2) format('woff2'); }
@font-face { font-family: 'PM Tajawal'; font-weight: 700 900; font-display: swap; src: url(../fonts/tajawal-latin-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F, U+2212; }
.pm-app, .pm-auth, .pm-modal-wrap, .pm-toasts, #pm-stop-corner {
  --pm-ink: #1B1B33; --pm-muted: #5F6380; --pm-line: #E7E9F2; --pm-bg: #F5F6FA; --pm-card: #fff;
  --pm-dark: #1B1B33; --pm-blue: #4F4FB3; --pm-blue-d: #36368A; --pm-green: #12805C; --pm-red: #C2410C;
  --pm-amber-bg: #FDF1E3; --pm-amber-ink: #B45309; --pm-pink: #FCE3D7; --pm-input: #fff; --pm-track: #EEF0FA;
  --pm-grid: #EEF0F5; --pm-axis: #8A8EA8; --pm-soft: color-mix(in srgb, var(--pm-blue) 9%, var(--pm-card)); --pm-th: #F7F8FC;
  --pm-btn-bg: #fff; --pm-btn-hover: #F3F4FA; --pm-btn-line: #E1E4EE;
  --pm-font: 'PM Tajawal', 'Tajawal', system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
}
.pm-app[data-pal=green], body[data-pm-pal=green] .pm-modal-wrap { --pm-blue: #1F7A4D; --pm-blue-d: #175E3B; }
.pm-app[data-pal=purple], body[data-pm-pal=purple] .pm-modal-wrap { --pm-blue: #7048E8; --pm-blue-d: #5F3DC4; }
.pm-app[data-pal=teal], body[data-pm-pal=teal] .pm-modal-wrap { --pm-blue: #0C7C8C; --pm-blue-d: #0B6572; }
.pm-app[data-pal=slate], body[data-pm-pal=slate] .pm-modal-wrap { --pm-blue: #4A5068; --pm-blue-d: #33374A; }
.pm-app[data-pal=sand], body[data-pm-pal=sand] .pm-modal-wrap { --pm-blue: #A86A16; --pm-blue-d: #8A5612; --pm-bg: #FAF6EF; }
.pm-app[data-pal=blue], body[data-pm-pal=blue] .pm-modal-wrap { --pm-blue: #2563EB; --pm-blue-d: #1D4FBF; }
.pm-pal-indigo { --sw1: #1B1B33; --sw2: #4F4FB3; }
.pm-app.pm-dark, body.pm-theme-dark .pm-modal-wrap, body.pm-theme-dark .pm-toasts, #pm-stop-corner.pm-dark {
  --pm-track: #2A3142; --pm-th: color-mix(in srgb, var(--pm-card) 85%, #fff 4%); --pm-soft: color-mix(in srgb, var(--pm-blue) 16%, var(--pm-card));
  --pm-green: #3DBE85; --pm-red: #F2895C; --pm-amber-ink: #F2B35C; --pm-dark: #0b0f15;
}
.pm-app.pm-dark[data-pal=navy], body.pm-theme-dark[data-pm-pal=navy] .pm-modal-wrap { --pm-bg: #10131C; --pm-card: #191D2A; --pm-line: #2A3042; --pm-input: #20253A;
  --pm-btn-bg: #20253A; --pm-btn-hover: #282E46; --pm-btn-line: #333A55; --pm-blue: #8B8BF0; --pm-blue-d: #A5A5F5; --pm-grid: #252B3C; }
.pm-app, .pm-modal-wrap, .pm-toasts { font-family: var(--pm-font); }
.pm-app.pm-v27 { background: var(--pm-bg); border: 1px solid var(--pm-line); border-radius: 20px; overflow: clip; font-size: 14px; color: var(--pm-ink); }
.pm-app.pm-v27 h1, .pm-app.pm-v27 h2, .pm-app.pm-v27 h3, .pm-app.pm-v27 h4, .pm-modal-wrap h3 { font-family: var(--pm-font); color: var(--pm-ink); letter-spacing: 0; }

/* top bar */
.pm-app.pm-v27 .pm-top { background: var(--pm-card); color: var(--pm-ink); border-radius: 0; border-bottom: 1px solid var(--pm-line); padding: 12px 20px; }
.pm-app.pm-v27 .pm-top h2 { color: var(--pm-ink); font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.pm-app.pm-v27 .pm-top h2::before { content: ''; width: 32px; height: 32px; border-radius: 10px; flex: none; background: var(--pm-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 17l5-5 4 4 7-8'/%3E%3Cpath d='M15 8h5v5'/%3E%3C/svg%3E") center / 18px no-repeat; }
.pm-app.pm-v27 .pm-top .pm-user { color: var(--pm-muted); opacity: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.pm-app.pm-v27 .pm-top .pm-user a, .pm-app.pm-v27 .pm-top .pm-lang { color: var(--pm-blue); margin-inline-start: 0; }
.pm-app.pm-v27 .pm-pf-select { background: var(--pm-card); color: var(--pm-ink); border: 1px solid var(--pm-btn-line); border-radius: 10px; padding: 6px 10px; }
.pm-app.pm-v27 .pm-theme-toggle:hover, .pm-app.pm-v27 .pm-theme-toggle:focus-visible { background: var(--pm-soft); }
.pm-app.pm-v27 .pm-top .pm-arrange-toggle { color: var(--pm-ink); }

/* side menu + main column */
.pm-app.pm-v27 .pm-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
.pm-app.pm-v27 .pm-side { background: var(--pm-card); border-inline-end: 1px solid var(--pm-line); padding: 16px 12px; display: flex; flex-direction: column; gap: 16px;
  min-height: 100%; align-self: stretch; }
.pm-app.pm-v27 .pm-tabs { display: flex; flex-direction: column; gap: 2px; background: none; padding: 0; margin: 0; border-radius: 0; overflow: visible; }
.pm-app.pm-v27 .pm-tabs button[role=tab] { display: flex !important; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px !important; border: 0 !important;
  border-radius: 10px !important; color: color-mix(in srgb, var(--pm-ink) 80%, var(--pm-muted)) !important; font-size: 14px !important; font-weight: 500 !important; text-align: start; cursor: pointer; }
.pm-app.pm-v27 .pm-tabs button[role=tab]:hover { background: var(--pm-soft) !important; color: var(--pm-ink) !important; }
.pm-app.pm-v27 .pm-tabs button[role=tab].is-active { background: var(--pm-soft) !important; color: var(--pm-blue-d) !important; font-weight: 700 !important; }
.pm-app.pm-dark.pm-v27 .pm-tabs button[role=tab].is-active { color: var(--pm-blue) !important; }
.pm-app.pm-v27 .pm-ti { display: inline-flex; color: var(--pm-axis); flex: none; }
.pm-app.pm-v27 .pm-tabs button.is-active .pm-ti { color: var(--pm-blue); }
.pm-app.pm-v27 .pm-tabs .pm-tab-move { display: flex; align-items: center; gap: 4px; }
.pm-app.pm-v27 .pm-tabs .pm-tab-move > button[role=tab] { flex: 1; }
.pm-app.pm-v27 .pm-tab-move .pm-grip { color: var(--pm-blue); }
.pm-app.pm-v27 .pm-tab-move .pm-move.is-h button:first-child::after { content: ''; }
.pm-app.pm-v27 .pm-tabs .pm-tab-eye { all: unset; cursor: pointer; width: 22px; text-align: center; color: var(--pm-muted); font-weight: 700; }
.pm-app.pm-v27 .pm-side-foot { margin-top: 8px; }
.pm-app.pm-v27 .pm-mkt { all: unset; cursor: pointer; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px; border: 1px solid var(--pm-line); border-radius: 12px; }
.pm-app.pm-v27 .pm-mkt:hover, .pm-app.pm-v27 .pm-mkt:focus-visible { border-color: var(--pm-blue); }
.pm-app.pm-v27 .pm-mkt .l { font-size: 12px; color: var(--pm-muted); }
.pm-app.pm-v27 .pm-mkt b { font-size: 13px; line-height: 1.4; }
.pm-app.pm-v27 .pm-mkt-row { display: flex; align-items: center; gap: 8px; }
.pm-app.pm-v27 .pm-mkt-bar { flex: 1; height: 6px; border-radius: 4px; background: var(--pm-track); overflow: hidden; }
.pm-app.pm-v27 .pm-mkt-bar i { display: block; height: 100%; background: var(--pm-green); border-radius: 4px; }
.pm-app.pm-v27 .pm-mkt .v { font-size: 12px; font-weight: 700; color: var(--pm-green); direction: ltr; }
.pm-app.pm-v27 .pm-main { min-width: 0; padding: 22px 26px 26px; container-type: inline-size; container-name: pmmain; }
.pm-app.pm-v27 .pm-phead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pm-app.pm-v27 .pm-ptitle { margin: 0; font-size: 26px; font-weight: 800; line-height: 1.25; }
.pm-app.pm-v27 .pm-phead .pm-g-bar { margin: 0; }
.pm-app.pm-v27 .pm-foot { margin-top: 18px; color: var(--pm-muted); font-size: 13px; }

/* cards, numbers, buttons, fields */
.pm-app.pm-v27 .pm-section { border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; border-color: var(--pm-line); box-shadow: none; }
.pm-app.pm-v27 .pm-section > h3 { font-size: 15.5px; font-weight: 700; margin-bottom: 14px; }
.pm-app.pm-v27 .pm-sub { color: var(--pm-muted); }
.pm-app.pm-v27 .pm-kpis { gap: 14px; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); margin-bottom: 18px; }
.pm-app.pm-v27 .pm-kpi { border-radius: 14px; padding: 14px 16px; border-color: var(--pm-line); }
.pm-app.pm-v27 .pm-kpi .l { font-size: 12.5px; color: var(--pm-muted); margin-bottom: 4px; }
.pm-app.pm-v27 .pm-kpi .v { font-size: 21px; font-weight: 800; line-height: 1.25; }
.pm-app.pm-v27 .pm-kpi.is-bad { border-color: color-mix(in srgb, var(--pm-red) 45%, var(--pm-line)); background: color-mix(in srgb, var(--pm-red) 7%, var(--pm-card)); }
.pm-app.pm-v27 .pm-kpi.is-bad .v { color: var(--pm-red); }
.pm-app.pm-v27 .pm-kpi.is-warn { border-color: color-mix(in srgb, var(--pm-amber-ink) 40%, var(--pm-line)); background: color-mix(in srgb, var(--pm-amber-ink) 8%, var(--pm-card)); }
.pm-app.pm-v27 .pm-btn, .pm-modal-wrap .pm-btn { border-radius: 10px !important; padding: 8px 14px !important; font-size: 13.5px !important; font-weight: 500 !important; line-height: 1.3 !important; }
.pm-app.pm-v27 .pm-btn.small, .pm-modal-wrap .pm-btn.small { padding: 5px 10px !important; font-size: 12.5px !important; border-radius: 8px !important; }
.pm-app.pm-v27 .pm-btn.primary, .pm-modal-wrap .pm-btn.primary { font-weight: 700 !important; }
.pm-app.pm-v27 .pm-seg { border-radius: 10px; border-color: var(--pm-btn-line); background: var(--pm-track); padding: 2px; gap: 2px; }
.pm-app.pm-v27 .pm-seg button { border-radius: 8px; padding: 5px 12px; background: transparent; color: var(--pm-muted); border: 0 !important; }
.pm-app.pm-v27 .pm-seg button.is-on { background: var(--pm-card); color: var(--pm-ink); box-shadow: 0 1px 2px rgba(27,27,51,.1); }
.pm-app.pm-v27 .pm-field > span { font-size: 12.5px; }
.pm-app.pm-v27 .pm-field input, .pm-app.pm-v27 .pm-field select, .pm-app.pm-v27 .pm-field textarea, .pm-app.pm-v27 textarea,
.pm-modal-wrap .pm-field input, .pm-modal-wrap .pm-field select, .pm-modal-wrap .pm-field textarea {
  border: 1px solid var(--pm-btn-line); border-radius: 10px; padding: 8px 10px; background: var(--pm-input); }
.pm-app.pm-v27 select, .pm-modal-wrap select { border-radius: 10px; }
.pm-app.pm-v27 .pm-field input:focus, .pm-app.pm-v27 .pm-field select:focus, .pm-app.pm-v27 textarea:focus, .pm-modal-wrap .pm-field input:focus {
  outline: 3px solid color-mix(in srgb, var(--pm-blue) 22%, transparent); border-color: var(--pm-blue); }
.pm-app.pm-v27 .pm-help { background: var(--pm-soft); border: 1px solid color-mix(in srgb, var(--pm-blue) 18%, var(--pm-line)); color: var(--pm-ink); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; }
.pm-app.pm-v27 .pm-help-x { color: var(--pm-muted); }
.pm-app.pm-v27 .pm-warn { border-radius: 10px; }
.pm-app.pm-v27 .pm-bad, .pm-app.pm-v27 .pm-ok { border-radius: 10px; }

/* tables: light header, airy rows */
.pm-app.pm-v27 .pm-table-wrap { border-color: var(--pm-line); border-radius: 12px; background: var(--pm-card); }
.pm-app.pm-v27 .pm-table { background: var(--pm-card); font-size: 13.5px; }
.pm-app.pm-v27 .pm-table th { background: var(--pm-th); color: var(--pm-muted); font-weight: 600; font-size: 12px; padding: 10px 10px; border-bottom: 1px solid var(--pm-line); }
.pm-app.pm-v27 .pm-table th button, .pm-app.pm-v27 .pm-table th.pm-sortable button { color: var(--pm-muted) !important; font-weight: 600; }
.pm-app.pm-v27 .pm-table th.is-sorted button { color: var(--pm-ink) !important; }
.pm-app.pm-v27 .pm-table td { padding: 10px 10px; border-top: 1px solid color-mix(in srgb, var(--pm-line) 70%, var(--pm-card)); }
.pm-app.pm-v27 .pm-table tbody tr:nth-child(even) td { background: transparent; }
.pm-app.pm-v27 .pm-table tbody tr:hover td { background: color-mix(in srgb, var(--pm-blue) 4%, var(--pm-card)); }
.pm-app.pm-v27 .pm-table tr.summary td { background: var(--pm-th) !important; color: var(--pm-ink); font-weight: 800; border-top: 1px solid var(--pm-line); }
.pm-app.pm-v27 .pm-table tr.summary td.pos { color: var(--pm-green); }
.pm-app.pm-v27 .pm-table tr.summary td.neg { color: var(--pm-red); }
.pm-app.pm-v27 .pm-table tr.pm-pos td { background: color-mix(in srgb, var(--pm-blue) 5%, var(--pm-card)); }
.pm-app.pm-v27 .pm-table td.pos { color: var(--pm-green); font-weight: 600; }
.pm-app.pm-v27 .pm-table td.neg { color: var(--pm-red); font-weight: 600; }
.pm-app.pm-v27 .pm-kv td { border-top-color: color-mix(in srgb, var(--pm-line) 70%, var(--pm-card)); padding: 9px 8px; }
.pm-app.pm-v27 .pm-sbar-track { background: var(--pm-track); height: 10px; }
.pm-app.pm-v27 .pm-sbar-track i { background: var(--pm-green); }
.pm-app.pm-v27 .pm-sbar-track i.neg { background: var(--pm-red); }
.pm-modal-wrap .pm-modal { border-radius: 18px; }
.pm-modal-wrap .pm-modal header { padding: 16px 20px; }
.pm-modal-wrap .pm-modal .body { padding: 18px 20px; }
.pm-modal-wrap .pm-modal footer { padding: 14px 20px; }
.pm-toast { border-radius: 12px; }
.pm-app.pm-v27 .pm-arrange-bar { border-radius: 14px; }

/* «لوحتي» */
.pm-app.pm-v27 .pm-body.pm-dash { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; grid-auto-flow: row dense; }
.pm-app.pm-v27 .pm-dash > * { grid-column: span 3; margin: 0; min-width: 0; }
.pm-app.pm-v27 .pm-dash > :not(.pm-w) { grid-column: 1 / -1 !important; }
.pm-app.pm-v27 .pm-dash > [data-pm-key=dTools] { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pm-app.pm-v27 .pm-dash > [data-pm-key=dTools] .pm-spacer { flex: 1; }
.pm-app.pm-v27 .pm-dash > [data-size=s] { grid-column: span 3; }
.pm-app.pm-v27 .pm-dash > [data-size=m] { grid-column: span 6; }
.pm-app.pm-v27 .pm-dash > [data-size=l] { grid-column: 1 / -1; }
.pm-app.pm-v27 .pm-w-size { margin-inline-start: auto; font-size: 12.5px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--pm-btn-line); background: var(--pm-card); color: var(--pm-ink); }
.pm-app.pm-v27 .pm-w-head h3 { margin-inline-end: auto; }
.pm-app.pm-v27 .pm-w-seg button { padding: 3px 10px; font-size: 12px; }
.pm-modal-wrap .pm-dash-rows { display: flex; flex-direction: column; gap: 4px; }
.pm-modal-wrap .pm-dash-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--pm-line); }
.pm-modal-wrap .pm-dash-row select { padding: 4px 8px; border-radius: 8px; }
.pm-app.pm-v27 .pm-w { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.pm-app.pm-v27 .pm-w.is-off { opacity: .45; }
.pm-app.pm-v27 .pm-w.is-bad { border-color: color-mix(in srgb, var(--pm-red) 40%, var(--pm-line)); }
.pm-app.pm-v27 .pm-w-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pm-app.pm-v27 .pm-w-head h3 { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.pm-app.pm-v27 .pm-w-open { all: unset; cursor: pointer; font-size: 12.5px; color: var(--pm-blue); white-space: nowrap; }
.pm-app.pm-v27 .pm-w-open:hover, .pm-app.pm-v27 .pm-w-open:focus-visible { text-decoration: underline; }
.pm-app.pm-v27 .pm-count { font-size: 11.5px; font-weight: 700; color: var(--pm-amber-ink); background: var(--pm-amber-bg); border-radius: 9px; padding: 1px 8px; }
.pm-app.pm-v27 .pm-w-big { font-size: 28px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pm-app.pm-v27 .pm-w-mid { font-size: 16px; font-weight: 800; color: var(--pm-ink); }
.pm-app.pm-v27 .pm-w-sub { font-size: 12.5px; color: var(--pm-muted); }
.pm-app.pm-v27 .pm-w .pos, .pm-app.pm-v27 .pm-w-big.pos { color: var(--pm-green); }
.pm-app.pm-v27 .pm-w .neg, .pm-app.pm-v27 .pm-w-big.neg { color: var(--pm-red); }
.pm-app.pm-v27 .pm-w .warn { color: var(--pm-amber-ink); }
.pm-app.pm-v27 .pm-w bdi { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
.pm-app.pm-v27 .pm-w-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-app.pm-v27 .pm-spark { color: var(--pm-blue); display: inline-flex; }
.pm-app.pm-v27 .pm-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 8px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pm-app.pm-v27 .pm-chip.is-pos { background: color-mix(in srgb, var(--pm-green) 12%, var(--pm-card)); color: var(--pm-green); }
.pm-app.pm-v27 .pm-chip.is-neg { background: color-mix(in srgb, var(--pm-red) 12%, var(--pm-card)); color: var(--pm-red); }
.pm-app.pm-v27 .pm-w-flex { display: flex; align-items: center; gap: 14px; }
.pm-app.pm-v27 .pm-w-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pm-app.pm-v27 .pm-w-ringbox, .pm-app.pm-v27 .pm-w-gauge { position: relative; display: inline-flex; flex: none; color: var(--pm-blue); }
.pm-app.pm-v27 .pm-ring-v { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; }
.pm-app.pm-v27 .pm-gauge-v { position: absolute; inset-inline: 0; bottom: 2px; text-align: center; font-weight: 800; font-size: 17px; }
.pm-app.pm-v27 .pm-w > .pm-w-bar { flex: none; }
.pm-app.pm-v27 .pm-w-bar { flex: 1; height: 8px; background: var(--pm-track); border-radius: 5px; overflow: hidden; display: block; min-width: 40px; }
.pm-app.pm-v27 .pm-w-bar i { display: block; height: 100%; border-radius: 5px; }
.pm-app.pm-v27 .pm-w-bars { display: flex; flex-direction: column; gap: 9px; }
.pm-app.pm-v27 .pm-w-barrow { display: grid; grid-template-columns: minmax(56px, auto) minmax(0, 1fr) 64px; gap: 10px; align-items: center; font-size: 13px; }
.pm-app.pm-v27 .pm-w-barrow > bdi { text-align: end; font-weight: 700; }
.pm-app.pm-v27 .pm-w-chart { display: block; color: var(--pm-blue); }
.pm-app.pm-v27 .pm-w-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--pm-axis); direction: ltr; }
.pm-app.pm-v27 .pm-w-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--pm-muted); align-items: center; }
.pm-app.pm-v27 .pm-w-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.pm-app.pm-v27 .pm-w-legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.pm-app.pm-v27 .pm-w-legend i.is-acc { background: var(--pm-blue); }
.pm-app.pm-v27 .pm-w-legend i.is-dash { background: repeating-linear-gradient(90deg, var(--pm-axis) 0 4px, transparent 4px 7px); }
.pm-app.pm-v27 .pm-w-list { display: flex; flex-direction: column; gap: 8px; }
.pm-app.pm-v27 .pm-w-alert { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--pm-ink) 3%, var(--pm-card)); }
.pm-app.pm-v27 .pm-w-alert > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pm-app.pm-v27 .pm-w-alert b { font-size: 13.5px; }
.pm-app.pm-v27 .pm-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pm-blue); }
.pm-app.pm-v27 .pm-w-alert.is-neg { background: color-mix(in srgb, var(--pm-red) 8%, var(--pm-card)); }
.pm-app.pm-v27 .pm-w-alert.is-neg .pm-dot { background: var(--pm-red); }
.pm-app.pm-v27 .pm-w-alert.is-warn .pm-dot { background: var(--pm-amber-ink); }
.pm-app.pm-v27 .pm-w-calm { margin: 0; color: var(--pm-muted); font-size: 13px; }
.pm-app.pm-v27 .pm-w-earn { display: flex; align-items: center; gap: 12px; padding: 4px 0; }
.pm-app.pm-v27 .pm-w-earn > div { display: flex; flex-direction: column; }
.pm-app.pm-v27 .pm-w-date { width: 44px; flex: none; display: flex; flex-direction: column; align-items: center; border-radius: 10px; padding: 4px 0; background: var(--pm-track); line-height: 1.15; }
.pm-app.pm-v27 .pm-w-date b { font-size: 16px; }
.pm-app.pm-v27 .pm-w-date span { font-size: 10.5px; color: var(--pm-muted); direction: ltr; }
.pm-app.pm-v27 .pm-w-earn.is-soon .pm-w-date { background: var(--pm-amber-bg); color: var(--pm-amber-ink); }
.pm-app.pm-v27 .pm-w-cols { display: flex; direction: ltr; gap: 6px; height: 180px; align-items: stretch; }
.pm-app.pm-v27 .pm-w-colm { flex: 1; display: grid; grid-template-rows: 1fr 1fr auto; min-width: 0; }
.pm-app.pm-v27 .pm-w-up, .pm-app.pm-v27 .pm-w-dn { display: flex; justify-content: center; }
.pm-app.pm-v27 .pm-w-up { align-items: flex-end; border-bottom: 1px solid var(--pm-line); }
.pm-app.pm-v27 .pm-w-dn { align-items: flex-start; }
.pm-app.pm-v27 .pm-w-colm i { display: block; width: min(30px, 70%); min-height: 2px; }
.pm-app.pm-v27 .pm-w-colm i.is-pos { background: var(--pm-green); border-radius: 6px 6px 2px 2px; }
.pm-app.pm-v27 .pm-w-colm i.is-neg { background: var(--pm-red); border-radius: 2px 2px 6px 6px; }
.pm-app.pm-v27 .pm-w-ml { font-size: 10.5px; color: var(--pm-axis); text-align: center; padding-top: 4px; white-space: nowrap; }
.pm-app.pm-v27 .pm-w-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid color-mix(in srgb, var(--pm-line) 70%, var(--pm-card)); }
.pm-app.pm-v27 .pm-w-line:last-child { border-bottom: 0; }
.pm-app.pm-v27 .pm-w-line > div { display: flex; flex-direction: column; }
.pm-app.pm-v27 .pm-w-kv { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--pm-line) 70%, var(--pm-card)); }
.pm-app.pm-v27 .pm-w-kv span { color: var(--pm-muted); }
.pm-app.pm-v27 .pm-dash .pm-empty { padding: 30px 10px; }
@container pmmain (max-width: 1060px) {
  .pm-app.pm-v27 .pm-dash > [data-size=s] { grid-column: span 6; }
  .pm-app.pm-v27 .pm-dash > [data-size=m], .pm-app.pm-v27 .pm-dash > [data-size=l] { grid-column: 1 / -1; }
}
@media (max-width: 1000px) {
  .pm-app.pm-v27 .pm-shell { grid-template-columns: minmax(0, 1fr); }
  .pm-app.pm-v27 .pm-side { border-inline-end: 0; border-bottom: 1px solid var(--pm-line); padding: 8px 10px; min-height: 0; }
  .pm-app.pm-v27 .pm-tabs { flex-direction: row; overflow-x: auto; position: static; scrollbar-width: thin; }
  .pm-app.pm-v27 .pm-tabs button[role=tab] { width: auto; white-space: nowrap; flex: none; }
  .pm-app.pm-v27 .pm-tabs .pm-tab-move { flex: none; }
  .pm-app.pm-v27 .pm-side-foot { display: none; }
}
@media (max-width: 720px) {
  .pm-app.pm-v27 { border-radius: 0; border-inline: 0; }
  .pm-app.pm-v27 .pm-top { padding: 10px 14px; }
  .pm-app.pm-v27 .pm-main { padding: 14px 12px 20px; }
  .pm-app.pm-v27 .pm-ptitle { font-size: 21px; }
  .pm-app.pm-v27 .pm-section { padding: 14px 14px; border-radius: 14px; margin-bottom: 14px; }
  .pm-app.pm-v27 .pm-kpis { gap: 10px; }
  .pm-app.pm-v27 .pm-kpi { padding: 10px 12px; }
  .pm-app.pm-v27 .pm-kpi .v { font-size: 17px; }
  .pm-app.pm-v27 .pm-mbar { background: var(--pm-card); border-top: 1px solid var(--pm-line); box-shadow: 0 -6px 18px rgba(27,27,51,.08); padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
  .pm-app.pm-v27 .pm-mbar-btn { color: var(--pm-axis); font-size: 11px; gap: 3px; padding: 4px 0; }
  .pm-app.pm-v27 .pm-mbar-btn.is-on { color: var(--pm-blue); background: transparent; font-weight: 700; }
  .pm-app.pm-v27 .pm-mbar-i { display: inline-flex; }
  .pm-app.pm-v27 .pm-mbar-i .pm-ti, .pm-app.pm-v27 .pm-mbar-btn.is-on .pm-ti { color: inherit; }
  .pm-app.pm-v27 .pm-mbar-i svg { width: 22px; height: 22px; }
  .pm-app.pm-v27 .pm-mbar-btn:nth-child(3) .pm-mbar-i { width: 40px; height: 40px; margin-top: -14px; border-radius: 14px; background: var(--pm-blue); color: #fff; align-items: center; justify-content: center; box-shadow: 0 6px 14px color-mix(in srgb, var(--pm-blue) 35%, transparent); }
}
@media print {
  .pm-app.pm-v27 .pm-side, .pm-app.pm-v27 .pm-phead .pm-g-bar { display: none !important; }
  .pm-app.pm-v27 .pm-shell { display: block; }
  .pm-app.pm-v27 { border: 0; background: #fff; }
}
@container pmmain (max-width: 640px) {
  .pm-app.pm-v27 .pm-body.pm-dash { gap: 12px; }
  .pm-app.pm-v27 .pm-dash > * { grid-column: 1 / -1 !important; }
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure], .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] { grid-column: span 6 !important; }
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure] .pm-w-col { display: none; }
  .pm-app.pm-v27 .pm-w-big { font-size: 24px; }
}
@media (max-width: 720px) {
  .pm-app.pm-v27 .pm-top { gap: 8px; }
  .pm-app.pm-v27 .pm-top-l { width: 100%; justify-content: space-between; }
  .pm-app.pm-v27 .pm-top h2 { font-size: 16px; }
  .pm-app.pm-v27 .pm-top h2::before { width: 28px; height: 28px; border-radius: 9px; background-size: 16px; }
  .pm-app.pm-v27 .pm-pf-select { max-width: 150px; font-size: 12.5px; padding: 4px 8px; }
  .pm-app.pm-v27 .pm-top .pm-user { font-size: 12.5px; gap: 2px 12px; }
  .pm-app.pm-v27 .pm-tabs button[role=tab] { min-height: 36px; font-size: 13px !important; }
}
/* v2.7.0: printing keeps the compact table sizing (the new screen spacing must not widen printed tables) */
@media print {
  body.pm-printing .pm-app.pm-v27 { border: 0; border-radius: 0; background: #fff; }
  body.pm-printing .pm-app.pm-v27 .pm-main { padding: 0; }
  body.pm-printing .pm-app.pm-v27 .pm-phead { margin-bottom: 6px; }
  body.pm-printing .pm-app.pm-v27 .pm-section { padding: 10px 12px; border-radius: 8px; }
  body.pm-printing .pm-app.pm-v27 .pm-table { font-size: 10px; }
  body.pm-printing .pm-app.pm-v27 .pm-table th, body.pm-printing .pm-app.pm-v27 .pm-table td { padding: 4px 5px; white-space: normal; }
}

/* ======================================================================== v2.7.1 */
/* trading rules: one row per rule */
.pm-app.pm-v27 .pm-rule-rows { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 14px; }
.pm-app.pm-v27 .pm-rule-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--pm-line); border-radius: 12px; background: var(--pm-card); }
.pm-app.pm-v27 .pm-rule-n { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--pm-soft); color: var(--pm-blue); font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; }
.pm-app.pm-v27 .pm-rule-t { flex: 1; line-height: 1.7; padding-top: 2px; }
.pm-app.pm-v27 .pm-rule-row textarea { flex: 1; }
.pm-app.pm-v27 .pm-rule-acts { display: flex; gap: 4px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.pm-app.pm-v27 .pm-rule-add { display: flex; gap: 8px; align-items: flex-end; }
.pm-app.pm-v27 .pm-rule-add textarea { flex: 1; }
/* reminders list */
.pm-app.pm-v27 .pm-rem-list { border: 1px solid var(--pm-line); border-radius: 12px; overflow: hidden; }
.pm-app.pm-v27 .pm-rem-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.5fr) minmax(0, 1fr) 70px auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--pm-line); font-size: 13.5px; }
.pm-app.pm-v27 .pm-rem-row:first-child { border-top: 0; }
.pm-app.pm-v27 .pm-rem-head { background: var(--pm-th); color: var(--pm-muted); font-size: 12px; font-weight: 600; padding-block: 9px; }
.pm-app.pm-v27 .pm-rem-row.is-off .pm-rem-name, .pm-app.pm-v27 .pm-rem-row.is-off .pm-rem-cond, .pm-app.pm-v27 .pm-rem-row.is-off .pm-rem-time { opacity: .55; }
.pm-app.pm-v27 .pm-rem-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pm-app.pm-v27 .pm-rem-name b { font-weight: 600; overflow-wrap: anywhere; }
.pm-app.pm-v27 .pm-rem-mail { color: var(--pm-blue); font-size: 13px; }
.pm-app.pm-v27 .pm-rem-cond { color: var(--pm-muted); }
.pm-app.pm-v27 .pm-rem-time { font-variant-numeric: tabular-nums; }
.pm-app.pm-v27 .pm-rem-state { font-size: 12px; font-weight: 700; color: var(--pm-muted); background: var(--pm-track); border-radius: 8px; padding: 2px 8px; text-align: center; }
.pm-app.pm-v27 .pm-rem-state.is-on { color: var(--pm-green); background: color-mix(in srgb, var(--pm-green) 12%, var(--pm-card)); }
.pm-app.pm-v27 .pm-rem-acts { display: flex; gap: 4px; justify-content: flex-end; }
@container pmmain (max-width: 720px) {
  .pm-app.pm-v27 .pm-rem-head { display: none; }
  .pm-app.pm-v27 .pm-rem-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .pm-app.pm-v27 .pm-rem-cond, .pm-app.pm-v27 .pm-rem-time { grid-column: 1; font-size: 12.5px; }
  .pm-app.pm-v27 .pm-rem-state { grid-column: 2; grid-row: 1; }
  .pm-app.pm-v27 .pm-rem-acts { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
}
/* time + days: same height, same look (psych question and messages) */
.pm-modal-wrap .pm-rem-when, .pm-app.pm-v27 .pm-rem-when { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 10px; }
.pm-modal-wrap .pm-rem-when .pm-field > span { font-size: 12.5px; color: var(--pm-muted); display: block; margin-bottom: 4px; }
.pm-modal-wrap .pm-time, .pm-app .pm-time { height: 38px; box-sizing: border-box; padding: 0 10px; border: 1px solid var(--pm-btn-line); border-radius: 10px; background: var(--pm-input); font: inherit; min-width: 120px; }
.pm-modal-wrap .pm-days, .pm-app.pm-v27 .pm-days { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-modal-wrap .pm-days label, .pm-app.pm-v27 .pm-days label { height: 38px; box-sizing: border-box; display: inline-flex; align-items: center; gap: 5px; padding: 0 10px; border: 1px solid var(--pm-btn-line); border-radius: 10px; background: var(--pm-card); font-size: 13px; cursor: pointer; }
.pm-modal-wrap .pm-days label:has(input:checked), .pm-app.pm-v27 .pm-days label:has(input:checked) { border-color: var(--pm-blue); background: var(--pm-soft); color: var(--pm-blue-d); font-weight: 600; }
.pm-modal-wrap .pm-msg-edit { display: flex; flex-direction: column; gap: 10px; }
.pm-modal-wrap .pm-msg-edit .pm-field select, .pm-modal-wrap .pm-msg-edit textarea { width: 100%; }
.pm-modal-wrap .pm-rem-cond { font-weight: 600; }
/* stop alerts: four equal fields */
.pm-app.pm-v27 .pm-alert-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; margin-top: 10px; }
.pm-app.pm-v27 .pm-alert-grid .pm-field input, .pm-app.pm-v27 .pm-alert-grid .pm-field select { width: 100%; height: 38px; box-sizing: border-box; }
@container pmmain (max-width: 760px) { .pm-app.pm-v27 .pm-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* reset card: small, at the end */
.pm-app.pm-v27 .pm-reset-sm { padding: 14px 18px; background: transparent; }
.pm-app.pm-v27 .pm-reset-sm h3 { font-size: 14px; margin-bottom: 4px; }
.pm-modal-wrap .pm-reset-warn ul { margin: 6px 0 12px; padding-inline-start: 20px; line-height: 1.8; }
/* AI import */
.pm-app.pm-v27 .pm-ai-steps { margin: 6px 0 12px; padding-inline-start: 22px; line-height: 1.9; }
.pm-app.pm-v27 .pm-ai-det { margin-top: 12px; }
.pm-app.pm-v27 .pm-ai-det summary { cursor: pointer; color: var(--pm-blue); font-size: 13.5px; }
.pm-app.pm-v27 .pm-ai-prompt { white-space: pre-wrap; font-family: inherit; font-size: 13px; line-height: 1.8; background: var(--pm-th); border: 1px solid var(--pm-line); border-radius: 10px; padding: 12px 14px; max-height: 320px; overflow: auto; margin: 8px 0 0; }
/* notes: «مسح البحث» as tall as the fields beside it */
.pm-app.pm-v27 .pm-clear-q { align-self: flex-end; height: 38px; padding: 0 16px !important; }
/* trade distribution: the bottom table fits */
.pm-app.pm-v27 .pm-drma-bottom { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.pm-app.pm-v27 .pm-drma-bottom .pm-table-wrap { overflow: visible; }
.pm-app.pm-v27 .pm-drma-bottom .pm-table th, .pm-app.pm-v27 .pm-drma-bottom .pm-table td { padding: 7px 6px; font-size: 12.5px; white-space: nowrap; }
@container pmmain (max-width: 900px) { .pm-app.pm-v27 .pm-drma-bottom { grid-template-columns: minmax(0, 1fr); } .pm-app.pm-v27 .pm-drma-bottom .pm-table-wrap { overflow-x: auto; } }
.pm-app.pm-v27 .pm-alert-grid .pm-field select, .pm-app.pm-v27 .pm-alert-grid .pm-field input { height: 38px !important; min-height: 38px; }
.pm-modal-wrap .pm-rem-when[hidden], .pm-modal-wrap .pm-note[hidden], .pm-app .pm-rem-when[hidden] { display: none !important; }

/* ================================================================== v2.7.2 */
.pm-app.pm-v27 .pm-rule-row input[type=text] { flex: 1; min-width: 0; }
.pm-app.pm-v27 .pm-rule-add input[type=text] { flex: 1; min-width: 0; }
.pm-app.pm-v27 .pm-w-open { display: inline-flex; align-items: center; }
.pm-app.pm-v27 .pm-w-open-i { display: none; }
@media (max-width: 479.98px) {
  .pm-app.pm-v27 .pm-w-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .pm-app.pm-v27 .pm-w-link:active { background: color-mix(in srgb, var(--pm-blue) 4%, var(--pm-card)); }
  .pm-app.pm-v27 .pm-w-open-t { display: none; }
  .pm-app.pm-v27 .pm-w-open-i { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border-radius: 9px; background: var(--pm-soft); color: var(--pm-blue); }
  .pm-app.pm-v27 .pm-w-open:hover, .pm-app.pm-v27 .pm-w-open:focus-visible { text-decoration: none; }
  .pm-app.pm-v27 .pm-w-open:focus-visible .pm-w-open-i { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
  .pm-app.pm-v27 .pm-w-head { flex-wrap: wrap; row-gap: 8px; }
  .pm-app.pm-v27 .pm-w-head h3 { font-size: 14px; min-width: 0; flex: 1 1 0; order: 1; }
  .pm-app.pm-v27 .pm-w-head .pm-w-open { order: 2; flex: none; }
  .pm-app.pm-v27 .pm-w-head .pm-w-seg { order: 3; flex: 1 0 100%; display: flex; }
  .pm-app.pm-v27 .pm-w-head .pm-w-seg { margin-inline-start: 0; }
  .pm-app.pm-v27 .pm-w-head .pm-w-seg button { flex: 1; text-align: center; padding: 6px 10px; }
  /* the two half-width cards (exposure, open risk): smaller title, arrow moves to the card's bottom corner so the title keeps one line */
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure], .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] { position: relative; padding: 14px 12px 40px; }
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure] .pm-w-head h3, .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] .pm-w-head h3 { font-size: 13px; white-space: nowrap; }
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure] .pm-w-open, .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] .pm-w-open { position: absolute; inset-inline-end: 8px; bottom: 8px; }
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure] .pm-w-open-i, .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] .pm-w-open-i { width: 26px; height: 26px; }
}
@media (max-width: 374.98px) {
  .pm-app.pm-v27 .pm-dash > [data-pm-key=dExposure], .pm-app.pm-v27 .pm-dash > [data-pm-key=dRisk] { grid-column: 1 / -1 !important; }
}
/* v2.7.2: one-row editors (rules, entry reasons, psych states) on phones — text on its own line, buttons below it */
@media (max-width: 479.98px) {
  .pm-app.pm-v27 .pm-rule-row { flex-wrap: wrap; row-gap: 8px; padding: 10px; }
  .pm-app.pm-v27 .pm-rule-t, .pm-app.pm-v27 .pm-rule-row textarea, .pm-app.pm-v27 .pm-rule-row input[type=text] { flex: 1 1 calc(100% - 40px); min-width: 0; }
  .pm-app.pm-v27 .pm-rule-acts { flex: 1 0 100%; justify-content: flex-end; }
  .pm-app.pm-v27 .pm-rule-add { flex-wrap: wrap; }
  .pm-app.pm-v27 .pm-rule-add textarea, .pm-app.pm-v27 .pm-rule-add input[type=text] { flex: 1 0 100%; }
  .pm-app.pm-v27 .pm-rule-add .pm-btn { margin-inline-start: auto; }
}

/* ================================================================== v2.7.3 */
/* drag handle for one-row lists (rules, entry reasons, psych states, market conditions) */
.pm-app .pm-row-grip { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; min-height: 26px; border-radius: 8px; font-size: 16px; line-height: 1; color: var(--pm-axis, #8a8fa3); cursor: grab; touch-action: none; }
.pm-app .pm-row-grip:hover, .pm-app .pm-row-grip:focus-visible { color: var(--pm-blue); background: var(--pm-soft, #eef0fb); outline: none; }
.pm-app .pm-row-grip:focus-visible { box-shadow: 0 0 0 2px var(--pm-blue); }
.pm-app .pm-rule-row.pm-drop-before { box-shadow: inset 0 3px 0 var(--pm-blue) !important; }
.pm-app .pm-rule-row.pm-drop-after { box-shadow: inset 0 -3px 0 var(--pm-blue) !important; }
.pm-app .pm-mt tr.pm-drop-before > td { box-shadow: inset 0 3px 0 var(--pm-blue) !important; }
.pm-app .pm-mt tr.pm-drop-after > td { box-shadow: inset 0 -3px 0 var(--pm-blue) !important; }
.pm-app .pm-mt tr.pm-dragging { background: var(--pm-card, #fff); }
.pm-app .pm-mt td.sym { display: table-cell; }
.pm-app .pm-mt td.sym .pm-row-grip { margin-inline-end: 6px; vertical-align: middle; }
/* «الحالية» column */
.pm-app .pm-cur-btn { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--pm-blue); white-space: nowrap; }
.pm-app .pm-cur-btn:focus-visible { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
.pm-app .pm-cur-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--pm-axis, #8a8fa3); box-sizing: border-box; display: inline-block; flex: none; }
.pm-app .pm-cur-btn:hover .pm-cur-dot { border-color: var(--pm-blue); }
.pm-app .pm-cur-btn.is-on { background: color-mix(in srgb, var(--pm-blue) 12%, transparent); cursor: default; }
.pm-app .pm-cur-btn.is-on .pm-cur-dot { border-color: var(--pm-blue); background: radial-gradient(circle, var(--pm-blue) 0 45%, transparent 50%); }
.pm-app .pm-mt tr.pm-current > td { background: color-mix(in srgb, var(--pm-blue) 6%, transparent); }
/* phone page choices: the v2.7 side-menu style forces tabs to show, so the phone hide wins again */
@media (max-width: 720px) {
  .pm-app.pm-v27 .pm-tabs button[role=tab].pm-m-hide, .pm-app.pm-v27 .pm-tabs .pm-m-hide { display: none !important; }
}
/* «مذكراتي» search: aligned fields on the computer, a tidy grid on the phone */
.pm-app .pm-notes-filters { align-items: flex-end; gap: 10px 12px; }
.pm-app .pm-notes-filters .pm-field { margin: 0; }
.pm-app .pm-notes-filters .pm-field > span { display: block; font-size: 12.5px; color: var(--pm-muted); margin-bottom: 4px; }
.pm-app .pm-notes-filters input, .pm-app .pm-notes-filters select { height: 38px; box-sizing: border-box; }
.pm-app .pm-notes-filters .pm-clear-q { height: 38px; }
@media (max-width: 600px) {
  .pm-app .pm-notes-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .pm-app .pm-notes-filters .pm-notes-q { grid-column: 1 / -1; order: 1; }
  .pm-app .pm-notes-filters .pm-nf-kind { grid-column: 1 / -1; order: 2; }
  .pm-app .pm-notes-filters .pm-nf-from { order: 3; }
  .pm-app .pm-notes-filters .pm-nf-to { order: 4; }
  .pm-app .pm-notes-filters .pm-clear-q { grid-column: 1 / -1; order: 5; width: 100%; justify-content: center; text-align: center; }
  .pm-app .pm-notes-filters .pm-field, .pm-app .pm-notes-filters input, .pm-app .pm-notes-filters select { width: 100%; min-width: 0; max-width: 100%; }
}
/* «المظهر»: every colour choice is an even tile with a clear two-tone swatch */
.pm-app .pm-pal-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.pm-app .pm-pal { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border: 1px solid var(--pm-line); border-radius: 12px; background: var(--pm-card); font-size: 13.5px; white-space: nowrap; cursor: pointer; }
.pm-app .pm-pal input { flex: none; margin: 0; }
.pm-app .pm-pal i { flex: none; display: inline-block; width: 22px; height: 22px; min-width: 22px; border-radius: 50%; background: linear-gradient(135deg, var(--sw1) 50%, var(--sw2) 50%); border: 1px solid rgba(0,0,0,.18); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.pm-app .pm-pal-light i, .pm-app .pm-pal-dark i { display: none; }
.pm-app .pm-pal:hover { border-color: var(--pm-blue); }
.pm-app .pm-pal:has(input:checked) { border-color: var(--pm-blue); box-shadow: 0 0 0 1px var(--pm-blue) inset; background: color-mix(in srgb, var(--pm-blue) 6%, var(--pm-card)); font-weight: 700; }
.pm-app .pm-pal:has(input:focus-visible) { outline: 2px solid var(--pm-blue); outline-offset: 2px; }
@media (max-width: 600px) {
  .pm-app .pm-pal-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pm-app .pm-pal { white-space: normal; line-height: 1.3; }
}
.pm-app .pm-field .pm-pal input[type=radio], .pm-app .pm-pal input[type=radio] { width: auto !important; min-width: 0; height: auto; padding: 0; border: 0; flex: none; }

/* ================================================================== v2.7.4 */
.pm-app .pm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* setup step 3: one table */
.pm-app .pm-ob-mkts { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--pm-line); border-radius: 12px; overflow: hidden; margin: 8px 0; }
.pm-app .pm-ob-mkt { display: grid; grid-template-columns: 104px minmax(140px, 1fr) minmax(200px, 2fr) 150px 64px; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--pm-line); flex-wrap: nowrap; }
.pm-app .pm-ob-mkt:first-child { border-top: 0; }
.pm-app .pm-ob-mkt-h { background: var(--pm-soft, #f4f5fb); font-size: 12.5px; color: var(--pm-muted); font-weight: 700; padding-top: 8px; padding-bottom: 8px; }
.pm-app .pm-ob-mkt.is-cur { background: color-mix(in srgb, var(--pm-blue) 6%, transparent); }
.pm-app .pm-ob-c { display: block; margin: 0; min-width: 0; }
.pm-app .pm-ob-c input { width: 100%; box-sizing: border-box; }
.pm-app .pm-ob-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pm-app .pm-ob-exp .pm-inwrap { display: flex; width: 100%; }
.pm-app .pm-ob-exp .pm-inwrap input { flex: 1; min-width: 0; }
.pm-app .pm-ob-cur { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--pm-blue); cursor: pointer; white-space: nowrap; }
.pm-app .pm-ob-cur input { margin: 0; width: 18px; height: 18px; accent-color: var(--pm-blue); flex: none; }
.pm-app .pm-ob-del { text-align: end; }
@media (max-width: 760px) {
  .pm-app .pm-ob-mkts { border: 0; border-radius: 0; gap: 10px; overflow: visible; }
  .pm-app .pm-ob-mkt-h { display: none; }
  .pm-app .pm-ob-mkt { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cur" "desc desc" "exp del"; border: 1px solid var(--pm-line); border-radius: 12px; align-items: end; }
  .pm-app .pm-ob-mkt:first-child { border-top: 1px solid var(--pm-line); }
  .pm-app .pm-ob-mkt-h + .pm-ob-mkt { border-top: 1px solid var(--pm-line); }
  .pm-app .pm-ob-cur { grid-area: cur; align-self: end; padding-bottom: 10px; }
  .pm-app .pm-ob-name { grid-area: name; } .pm-app .pm-ob-desc { grid-area: desc; } .pm-app .pm-ob-exp { grid-area: exp; max-width: 170px; } .pm-app .pm-ob-del { grid-area: del; align-self: end; }
  .pm-app .pm-ob-lbl { position: static; width: auto; height: auto; overflow: visible; clip: auto; display: block; font-size: 12px; color: var(--pm-muted); margin-bottom: 4px; }
}
/* small line for a member who skipped the setup */
.pm-app .pm-ob-hint { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; padding: 10px 14px; margin-bottom: 14px; border: 1px solid color-mix(in srgb, var(--pm-blue) 30%, var(--pm-line)); border-radius: 12px; background: color-mix(in srgb, var(--pm-blue) 6%, var(--pm-card)); font-size: 14px; }
.pm-app .pm-ob-hint-t { flex: 1 1 0; min-width: 0; font-weight: 700; }
.pm-app .pm-ob-hint .pm-btn { flex: none; white-space: nowrap; }
@media (max-width: 480px) { .pm-app .pm-ob-hint { padding: 8px 10px; gap: 8px; font-size: 13px; } }
.pm-app .pm-ob-hint-x { all: unset; cursor: pointer; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--pm-muted); font-size: 14px; }
.pm-app .pm-ob-hint-x:hover { background: var(--pm-soft, #eef0fb); color: var(--pm-ink, inherit); }
.pm-app .pm-ob-hint-x:focus-visible { outline: 2px solid var(--pm-blue); }
