/* ============================================================================
   alerts.css — блоки подстраницы «Ценовые алерты» (alerts.html).
   Каркас — ui-base.css, дизайн-слой и токены (--mx-*) — kyrs.css, фон — kyrs-scene.css.
   ============================================================================ */

/* ===== общее (как на других подстраницах раздела) ===== */
.cm-empty { padding: 22px 16px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.cm-dim { color: var(--text-secondary); font-size: 13.5px; }
.page-content .up { color: var(--green, #4ade80); } .page-content .down { color: var(--red, #f87171); }
.live-dot.off { background: var(--text-secondary); animation: none; opacity: .6; }
.cm-num { margin-right: 4px; font: 600 26px/1 var(--mx-f-display); letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 1px var(--mx-gold-line); opacity: .9; }
.al-chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-secondary); cursor: pointer; }
.al-chk input { accent-color: #d4af37; width: 16px; height: 16px; }

/* ===== 01. НОВЫЙ АЛЕРТ ===== */
.al-new { position: relative; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 20px; margin-bottom: 30px; padding: 18px; border: 1px solid var(--mx-gold-line); border-radius: var(--mx-r); background: radial-gradient(70% 90% at 0% 0%, rgba(212,175,55,.1), transparent 70%), var(--mx-surface); }
.al-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.al-search { position: relative; display: flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--mx-line-strong); border-radius: 12px; background: var(--mx-surface-2); }
.al-search:focus-within { border-color: var(--gold, #d4af37); }
.al-search > i { color: var(--text-secondary); font-size: 13px; }
.al-search input { flex: 1; min-width: 0; padding: 11px 0; border: 0; background: transparent; color: var(--text-color); font: 500 13px var(--mx-f-ui); outline: none; }
.al-sug { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--mx-line-strong); border-radius: 12px; background: var(--bg-color, #121211); box-shadow: 0 18px 40px rgba(0,0,0,.45); max-height: 320px; overflow-y: auto; }
.al-sug[hidden] { display: none; }
.al-sug button { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.al-sug button:hover, .al-sug button.hl { background: var(--mx-gold-wash); }
.al-sug b { font-size: 13.5px; color: var(--text-color); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-sug span { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-sug em { font-style: normal; font-size: 12px; color: var(--text-secondary); }
.al-sug-none { padding: 10px; font-size: 13px; color: var(--text-secondary); }
.al-asset { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-height: 30px; }
.al-asset b { font: 600 22px var(--mx-f-display); color: var(--text-color); }
.al-asset span { font-size: 13px; color: var(--text-secondary); }
.al-asset em { margin-left: auto; font: 600 22px var(--mx-f-display); font-style: normal; color: var(--gold, #d4af37); font-variant-numeric: tabular-nums; }
.al-asset i { font-style: normal; font-size: 13px; font-weight: 700; }
.al-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.al-seg button { flex: 1 1 auto; padding: 8px 12px; border: 1px solid var(--mx-line-strong); border-radius: 10px; background: transparent; color: var(--text-secondary); font: 600 13.5px var(--mx-f-ui); cursor: pointer; white-space: nowrap; }
.al-seg button.on { border-color: var(--gold, #d4af37); background: var(--mx-gold-wash); color: var(--text-color); }
.al-lvl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.al-lvl label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 200px; min-width: 0; max-width: 100%; padding: 8px 14px; border: 1px solid var(--mx-line-strong); border-radius: 12px; background: var(--mx-surface-2); }
.al-lvl label:focus-within { border-color: var(--gold, #d4af37); }
.al-lvl small { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.al-lvl input { width: 100%; border: 0; background: transparent; color: var(--text-color); font: 600 24px var(--mx-f-display); outline: none; min-width: 0; font-variant-numeric: tabular-nums; }
.al-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.al-steps button { padding: 6px 10px; border: 1px solid var(--mx-line-strong); border-radius: 999px; background: transparent; color: var(--text-secondary); font: 600 13px var(--mx-f-ui); cursor: pointer; }
.al-steps button:hover { border-color: var(--gold, #d4af37); color: var(--text-color); }
.al-dist { min-height: 18px; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.al-dist b { color: var(--text-color); } .al-dist b.up { color: var(--green, #4ade80); } .al-dist b.down { color: var(--red, #f87171); }
.al-dist .warn { color: #f0a83a; }
.al-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.al-go { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #f5d97a, #c9a227); color: #141413; font: 700 13.5px var(--mx-f-ui); cursor: pointer; box-shadow: 0 8px 22px rgba(212,175,55,.3); }
.al-go:hover { filter: brightness(1.06); }
.al-msg { min-height: 16px; font-size: 13.5px; color: var(--gold, #d4af37); }
.al-msg.bad { color: #f87171; }
.al-scope { position: relative; min-width: 0; }
.al-scope svg { display: block; width: 100%; height: auto; }
.al-scope .cm-empty { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 80%; text-align: center; }
.al-scope .sc-bg { fill: #0f1012; stroke: rgba(212,175,55,.25); }
.al-scope .sc-g { stroke: rgba(255,255,255,.06); }
.al-scope .sc-ln { fill: none; stroke: #e9e7df; stroke-width: 1.6; opacity: .85; }
.al-scope .sc-lv { stroke-width: 1.5; stroke-dasharray: 6 5; }
.al-scope .sc-dd { stroke: rgba(255,255,255,.35); stroke-dasharray: 2 3; }
.al-scope .sc-cross { stroke-width: 1.6; }
.al-scope .sc-cross.anim { animation: alAim 2.4s ease-in-out infinite; transform-box: fill-box; }
@keyframes alAim { 50% { opacity: .55; } }
.al-scope .sc-t { font: 600 12.5px Onest, sans-serif; fill: #e9e7df; }
.al-scope .sc-d { font: 700 12.5px Onest, sans-serif; fill: #f5d97a; }
.al-scope .sc-cap { font: 600 12px Onest, sans-serif; fill: rgba(233,231,223,.55); letter-spacing: .06em; text-transform: uppercase; }

/* ===== 02. МОИ АЛЕРТЫ ===== */
.al-list { display: flex; flex-direction: column; gap: 6px; }
.al-list > .cm-empty { border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.al-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 1px dashed var(--mx-gold-line); border-radius: var(--mx-r); text-align: center; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.al-empty i { font-size: 28px; color: var(--gold, #d4af37); }
.al-empty b { font: 600 16px var(--mx-f-display); color: var(--text-color); }
.al-it { display: grid; grid-template-columns: 160px minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 16px; align-items: center; padding: 10px 14px; border: 1px solid var(--mx-line); border-left: 3px solid var(--gold, #d4af37); border-radius: 12px; background: var(--mx-surface); }
.al-it.off { border-left-color: var(--mx-line-strong); opacity: .6; }
.al-it-n { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.al-it-n b { font: 600 15px var(--mx-f-display); color: var(--text-color); }
.al-it-n small, .al-it-c small, .al-it-p small { font-size: 12.5px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-it-c { display: flex; flex-direction: column; min-width: 0; }
.al-it-c b { font-size: 13.5px; color: var(--text-color); }
.al-it-p { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.al-bar { height: 8px; border-radius: 4px; background: var(--mx-surface-2); overflow: hidden; }
.al-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, rgba(212,175,55,.35), #f5d97a); transition: width .6s; }
.al-it-a { display: flex; align-items: center; gap: 6px; }
.al-it-a button { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid var(--mx-line); border-radius: 8px; background: none; color: var(--text-secondary); cursor: pointer; }
.al-it-a button.on { color: var(--gold, #d4af37); border-color: var(--mx-gold-line); }
.al-it-a button[data-del]:hover { color: #f87171; border-color: #f87171; }
.al-it-a .al-sw { width: 42px; padding: 3px; justify-content: flex-start; border-radius: 999px; background: var(--mx-surface-2); }
.al-it-a .al-sw i { width: 16px; height: 16px; border-radius: 50%; background: var(--text-secondary); transition: transform .2s, background .2s; }
.al-it-a .al-sw.on i { transform: translateX(18px); background: #d4af37; }
.al-io { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 30px; }
.al-io button, .al-imp { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--mx-line-strong); border-radius: 999px; background: none; color: var(--text-secondary); font: 600 13px var(--mx-f-ui); cursor: pointer; }
.al-io button:hover, .al-imp:hover { border-color: var(--gold, #d4af37); color: var(--text-color); }

/* ===== 03. УВЕДОМЛЕНИЯ ===== */
.al-notif { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
.al-notif > .cm-empty { grid-column: 1 / -1; }
.al-n { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); font-size: 13px; line-height: 1.55; color: var(--text-secondary); }
.al-n small { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.al-n > b { display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--mx-f-display); color: var(--text-color); }
.al-n > b i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-secondary); }
.al-n > b.on i { background: #4ade80; } .al-n > b.off i { background: #f87171; } .al-n > b.wait i { background: #f0a83a; }
.al-n span b { color: var(--text-color); }
.al-n button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--mx-gold-line); border-radius: 999px; background: var(--mx-gold-wash); color: var(--text-color); font: 600 13px var(--mx-f-ui); cursor: pointer; }

/* ===== 04. ЖУРНАЛ ===== */
.al-log { padding: 12px 16px; border: 1px solid var(--mx-line); border-radius: var(--mx-r); background: var(--mx-surface); }
.al-log > .cm-empty { padding: 6px 0; }
.al-lg-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; color: var(--text-secondary); }
.al-lg-h button { padding: 5px 10px; border: 1px solid var(--mx-line-strong); border-radius: 999px; background: none; color: var(--text-secondary); font: 600 13px var(--mx-f-ui); cursor: pointer; }
.al-lg { display: grid; grid-template-columns: 100px 90px minmax(0, 1fr) 160px 120px; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px dashed var(--mx-line); font-size: 13.5px; }
.al-lg time { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.al-lg b { font: 600 13px var(--mx-f-display); color: var(--text-color); }
.al-lg span { color: var(--text-color); }
.al-lg em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-color); }
.al-lg em i { font-style: normal; font-size: 13px; font-weight: 700; }
.al-lg small { font-size: 12.5px; color: var(--text-secondary); text-align: right; }

/* ===== ДАЛЬШЕ ===== */
.cm-next { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 34px 0 10px; }
.cm-next a { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 14px 16px; border: 1px dashed var(--mx-line-strong); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.cm-next a:hover { border-color: var(--mx-gold-line); background: var(--mx-gold-wash); }
.cm-next i { grid-row: span 2; font-size: 16px; color: var(--gold, #d4af37); }
.cm-next b { font-size: 13px; color: var(--text-color); }
.cm-next span { font-size: 13px; color: var(--text-secondary); }

/* ===== СВЕТЛАЯ ТЕМА ===== */
body.light .page-content .up, body.light .al-dist b.up { color: #15803d; }
body.light .page-content .down, body.light .al-dist b.down { color: #b91c1c; }
body.light .cm-num { -webkit-text-stroke-color: rgba(138,106,16,.55); }
body.light .al-sug { background: #fff; box-shadow: 0 18px 40px rgba(0,0,0,.15); }
body.light .al-asset em, body.light .al-msg { color: #8a6a10; }
/* прицел — тёмный «экран» в обеих темах */

/* ===== АДАПТИВ ===== */
@media (max-width: 1100px) {
    .al-new { grid-template-columns: 1fr; }
    .al-scope { max-width: 520px; }
    .al-notif { grid-template-columns: 1fr; }
    .al-it { grid-template-columns: 130px minmax(0, 1fr) auto; }
    .al-it-p { grid-column: 1 / -1; grid-row: 2; }
    .al-lg { grid-template-columns: 90px 80px minmax(0, 1fr) 130px; }
    .al-lg small { display: none; }
    .cm-next { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .al-new { padding: 12px; }
    .al-asset em { margin-left: 0; width: 100%; }
    .al-it { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
    .al-it-c { grid-column: 1 / -1; grid-row: 2; } .al-it-p { grid-row: 3; }
    .al-lg { grid-template-columns: 1fr auto; gap: 2px 10px; }
    .al-lg time { grid-column: 1 / -1; } .al-lg span { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .strip-head { flex-wrap: wrap; }
    .cm-num { font-size: 20px; }
    .cm-next { grid-template-columns: 1fr; }
}
