/* Раздел «Акции». Своих цветов не заводит: всё из темы (01-theme.css),
   чипы и бейджи — те же, что в остальных разделах. */

/* Окно настроек раздела: строки те же, что в общих настройках сайта. */
#act-settings .sheet-inner { width: min(720px, 100%); }
#act-settings .setrow { align-items: flex-start; gap: 18px; padding: 14px 0;
                        border-bottom: 1px solid var(--line); }
#act-settings .setrow:last-child { border-bottom: none; }
#act-settings .setrow-label { max-width: 460px; }
#act-settings .setrow-label .t { display: block; font-weight: 600; margin-bottom: 4px; }
#act-settings .setrow-label .n { display: block; color: var(--muted); font-size: 12px;
                                 line-height: 1.5; }
/* Поле с единицей внутри рамки — как поля форм сайта, а не белый прямоугольник
   браузера по умолчанию. */
.actthr { display: inline-flex; align-items: center; gap: 6px;
          padding: 7px 14px; border: 1px solid var(--line);
          border-radius: var(--r-pill); background: var(--card); color: var(--muted); }
.actthr:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.actthr input { width: 56px; padding: 0; border: none; background: none;
                color: var(--text); font: inherit; font-size: 13px; text-align: right;
                font-variant-numeric: tabular-nums; appearance: textfield;
                -moz-appearance: textfield; }
.actthr input::-webkit-outer-spin-button,
.actthr input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.actthr input:focus { outline: none; }
.actthr .u { color: var(--muted); font-size: 13px; }
.acthint { color: var(--muted); font-size: 12px; }

/* Акции в ячейке идут столбиком: одна строка — одна акция. Название тянется,
   цифры стоят в колонку, действие всегда в одном и том же месте справа. */
.actline { display: flex; align-items: center; gap: 8px; min-height: 30px;
           padding: 3px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.actline:last-child { border-bottom: none; }
.actline .t { flex: 1 1 auto; min-width: 0; overflow: hidden;
              text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.actline .p { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap;
              color: var(--text); }
.actline .d { flex: none; font-variant-numeric: tabular-nums; white-space: nowrap;
              color: var(--bad); }
.actline .go { flex: none; padding: 2px 10px; font-size: 12px; line-height: 18px;
               border-radius: var(--r-pill); }
.actline .x { flex: none; padding: 0 4px; color: var(--muted); background: none;
              border: none; font-size: 13px; }
.actline .x:hover { color: var(--bad); }
.actline.part .p { color: var(--good); }
/* Предупреждение — подпись под своей акцией, а не отдельная строка списка. */
.actwarn { display: block; color: var(--bad); font-size: 11px;
           margin: -4px 0 6px; padding-left: 2px; }

#act { table-layout: fixed; width: 100%; }
#act td { vertical-align: top; padding-top: 10px; padding-bottom: 10px; }
#act th.pick, #act td.pick { width: 34px; }
/* Ширины держим руками: названия акций длинные и без этого растаскивают
   таблицу так, что цена уезжает на вторую строку. */
#act th:nth-child(2) { width: 34%; }
#act th:nth-child(3) { width: 120px; }
#act th:last-child { width: 44px; }
#act td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
#act td.acts .none { color: var(--muted); }
#act tr.picked td { background: var(--card-hover); }
#act .evlist { display: flex; flex-direction: column; gap: 4px; }
#act .evrow { display: flex; gap: 10px; align-items: baseline; font-size: 12px;
              padding: 3px 0 3px 14px; }
#act .evrow .when { color: var(--muted); flex: 0 0 52px;
                    font-variant-numeric: tabular-nums; }
/* День — свой сворачиваемый блок: за неделю журнал иначе становится простынёй. */
.evday > summary { cursor: pointer; list-style: none; padding: 6px 0;
                   color: var(--text-2); font-size: 12px; font-weight: 600;
                   border-bottom: 1px solid var(--line); }
.evday > summary::-webkit-details-marker { display: none; }
.evday > summary::before { content: "▸"; display: inline-block; width: 14px;
                           color: var(--muted); transition: transform .15s ease; }
.evday[open] > summary::before { transform: rotate(90deg); }
.evday > summary .n { margin-left: 8px; color: var(--muted); font-weight: 400; }

/* Подсказка про ключ: не ошибка, а объяснение — поэтому мягкий фон, а не красный. */
.actnote { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--r-block);
           background: var(--card); border: 1px solid var(--line);
           color: var(--text-2); font-size: 13px; line-height: 1.45; }
.actnote a { color: var(--accent); text-decoration: none; border-bottom: 1px solid var(--accent-soft); }
.actnote a:hover { border-bottom-color: var(--accent); }

/* «сам» — вход, который раздел сделает без вопросов на следующем прогоне. */
.actself { padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-soft);
           color: var(--accent); font-size: 11px; }

/* Свёрнутая строка: сводка плашками, разбор — по клику, как в «Соинвесте». */
#act td.badges { display: table-cell; }
#act td.badges .badge { margin: 0 6px 4px 0; }
/* Товары разделяем полосой и подсветкой при наведении: сплошной список
   одинаковых карточек читался как одно полотно. */
#act tbody tr.watch > td { border-top: 1px solid var(--line); cursor: pointer; }
#act tbody tr.watch:hover > td { background: var(--card-hover); }
#act tbody tr.watch.open > td { background: var(--card-hover); border-bottom: none; }
#act tbody tr.watch.open > td:first-child { box-shadow: inset 3px 0 0 var(--accent-2); }

.actdetail { display: flex; flex-direction: column; gap: 16px;
             padding: 14px 18px 18px; background: var(--card-hover);
             border-radius: 0 0 var(--r-row) var(--r-row); }
.actcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
           gap: 16px; }
/* Каждая группа — своя карточка: три колонки подряд сливались в общий столбец. */
.actgroup { padding: 12px 14px; background: var(--card); border: 1px solid var(--line);
            border-radius: var(--r-block); }
.actgroup-h { color: var(--muted); font-size: 12px; margin-bottom: 8px;
              text-transform: uppercase; letter-spacing: .04em; }

/* Правка цены участия прямо в строке. */
.actline .edit { flex: none; padding: 0 7px; color: var(--muted); background: none;
                 border: 1px solid var(--line); border-radius: var(--r-pill);
                 font-size: 12px; line-height: 20px; }
.actline .edit:hover { color: var(--accent); border-color: var(--accent-2); }
.priceedit { display: inline-flex; align-items: center; gap: 6px; }
.priceedit input { width: 72px; padding: 2px 8px; border: 1px solid var(--line);
                   border-radius: var(--r-pill); background: var(--card);
                   color: var(--text); font: inherit; font-size: 12px; text-align: right;
                   font-variant-numeric: tabular-nums; appearance: textfield;
                   -moz-appearance: textfield; }
.priceedit input::-webkit-outer-spin-button,
.priceedit input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.priceedit input:focus { outline: none; border-color: var(--accent);
                         box-shadow: 0 0 0 3px var(--accent-soft); }
.priceedit .u { color: var(--muted); font-size: 12px; }
.priceedit .cap { color: var(--muted); font-size: 11px; white-space: nowrap; }
.priceedit.over input { border-color: var(--bad); }
.priceedit.over input:focus { border-color: var(--bad); box-shadow: none; }
.priceedit.over .cap { color: var(--bad); }
.priceedit button[disabled] { opacity: .45; cursor: default; }
